From 518348a9fa0759d526718d50907e67e26b053163 Mon Sep 17 00:00:00 2001 From: sve1r Date: Mon, 14 Aug 2023 10:16:03 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=93=BA=20feat:=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=20BiliBili=20=E7=9B=B8=E5=85=B3=E8=84=9A=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rewrite/AdBlock/BiliBili.adblock | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Rewrite/AdBlock/BiliBili.adblock b/Rewrite/AdBlock/BiliBili.adblock index 66f1be7..876a979 100644 --- a/Rewrite/AdBlock/BiliBili.adblock +++ b/Rewrite/AdBlock/BiliBili.adblock @@ -9,8 +9,8 @@ // @TgChannel https://t.me/ddgksf2021 // @Contribute https://t.me/ddgksf2013_bot // @Feedback 📮 ddgksf2013@163.com 📮 -// @UpdateTime 2023-06-28 -// @ConfigVersion V2.0.123 +// @UpdateTime 2023-08-07 +// @ConfigVersion V2.0.124 // @Attention 如果广告仍然存在,请清除缓存或卸载应用重新安装 // @Attention 如需引用请注明出处,谢谢合作! // @Function 去广告配置(自用,不定期更新) @@ -86,6 +86,11 @@ hostname = -broadcast.chat.bilibili.com, -*cdn*.biliapi.net, -*tracker*.biliapi. ;^https?:\/\/(app\.bilibili\.com|grpc\.biliapi\.net)\/bilibili\.community\.service\.dm\.v1\.DM\/DmView url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Bilibili/BiliBili.helper.beta.min.js # ~ BiliBili_哔哩哔哩_青少年弹窗@Maasea ;^https:\/\/(grpc\.biliapi\.net|app\.bilibili\.com)\/bilibili\.app\.interface\.v1\.Teenagers\/ModeStatus url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Bilibili/BiliBili.helper.beta.min.js +^https?:\/\/(grpc\.biliapi\.net|app\.bilibili\.com)\/bilibili\.polymer\.app\.search\.v1\.Search\/SearchAll$ url script-response-body https://cdn.jsdelivr.net/gh/BiliUniverse/ADBlock@main/js/BiliBili.ADBlock.response.js +# ~ BiliBili_哔哩哔哩_交互点赞投票弹幕@BiliUniverse +^https?:\/\/(app\.bilibili\.com|grpc\.biliapi\.net)\/bilibili\.community\.service\.dm\.v1\.DM\/DmView url script-response-body https://cdn.jsdelivr.net/gh/BiliUniverse/ADBlock@beta/js/BiliBili.ADBlock.response.beta.js +# ~ BiliBili_哔哩哔哩_青少年弹窗@BiliUniverse +^https:\/\/(grpc\.biliapi\.net|app\.bilibili\.com)\/bilibili\.app\.interface\.v1\.Teenagers\/ModeStatus url script-response-body https://cdn.jsdelivr.net/gh/BiliUniverse/ADBlock@main/js/BiliBili.ADBlock.response.js # ~ BiliBili_哔哩哔哩_UP主推荐广告[适配ipad端]@app2smile@ddgksf2013 ^https?:\/\/(app\.bilibili\.com|grpc\.biliapi\.net)\/bilibili\.app\.view\.v1\.View\/View$ url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/Unlock/BiliBili.proto.min.js # ~ BiliBili_哔哩哔哩_动态页面去广告@app2smile@kokoryh@ddgksf2013 From 4d42448bcd0ea8a3c74bbf2221d397c2fea0215f Mon Sep 17 00:00:00 2001 From: sve1r Date: Mon, 14 Aug 2023 10:16:14 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=93=BA=20feat:=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=20BiliBili=20=E7=9B=B8=E5=85=B3=E8=84=9A=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rewrite/AdBlock/BiliBili.adblock | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Rewrite/AdBlock/BiliBili.adblock b/Rewrite/AdBlock/BiliBili.adblock index 876a979..0c03157 100644 --- a/Rewrite/AdBlock/BiliBili.adblock +++ b/Rewrite/AdBlock/BiliBili.adblock @@ -81,11 +81,6 @@ hostname = -broadcast.chat.bilibili.com, -*cdn*.biliapi.net, -*tracker*.biliapi. # ~ BiliBili_哔哩哔哩_屏蔽DefaultWord@ddgksf2013 ^https?:\/\/(app\.bilibili\.com|grpc\.biliapi\.net)\/bilibili\.app\.interface\.v1\.Search\/Default url reject # ~ BiliBili_哔哩哔哩_搜索去广告@BiliUniverse -^https?:\/\/(grpc\.biliapi\.net|app\.bilibili\.com)\/bilibili\.polymer\.app\.search\.v1\.Search\/SearchAll$ url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Bilibili/BiliBili.response.min.js -# ~ BiliBili_哔哩哔哩_交互点赞投票弹幕@Maasea -;^https?:\/\/(app\.bilibili\.com|grpc\.biliapi\.net)\/bilibili\.community\.service\.dm\.v1\.DM\/DmView url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Bilibili/BiliBili.helper.beta.min.js -# ~ BiliBili_哔哩哔哩_青少年弹窗@Maasea -;^https:\/\/(grpc\.biliapi\.net|app\.bilibili\.com)\/bilibili\.app\.interface\.v1\.Teenagers\/ModeStatus url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Bilibili/BiliBili.helper.beta.min.js ^https?:\/\/(grpc\.biliapi\.net|app\.bilibili\.com)\/bilibili\.polymer\.app\.search\.v1\.Search\/SearchAll$ url script-response-body https://cdn.jsdelivr.net/gh/BiliUniverse/ADBlock@main/js/BiliBili.ADBlock.response.js # ~ BiliBili_哔哩哔哩_交互点赞投票弹幕@BiliUniverse ^https?:\/\/(app\.bilibili\.com|grpc\.biliapi\.net)\/bilibili\.community\.service\.dm\.v1\.DM\/DmView url script-response-body https://cdn.jsdelivr.net/gh/BiliUniverse/ADBlock@beta/js/BiliBili.ADBlock.response.beta.js From a518a16d74c737f396468fa6db0d7d090d3e7214 Mon Sep 17 00:00:00 2001 From: sve1r Date: Mon, 14 Aug 2023 10:22:59 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=9B=B8feat:=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=8E=BB=E5=B9=BF=E5=91=8A=E7=9B=B8=E5=85=B3=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rewrite/AdBlock/StartUp.adblock | 24 +- Scripts/AdBlock/Other/BaiduMap.js | 6709 +++++++++----------------- Scripts/AdBlock/Other/CoolApk.js | 62 +- Scripts/AdBlock/Other/CoolApk.min.js | 3 + Scripts/AdBlock/Other/Quark.js | 999 ++-- 5 files changed, 2499 insertions(+), 5298 deletions(-) create mode 100644 Scripts/AdBlock/Other/CoolApk.min.js diff --git a/Rewrite/AdBlock/StartUp.adblock b/Rewrite/AdBlock/StartUp.adblock index acf6b76..dc4ea4d 100644 --- a/Rewrite/AdBlock/StartUp.adblock +++ b/Rewrite/AdBlock/StartUp.adblock @@ -1,28 +1,28 @@ // ==UserScript== -// @ScriptName 墨鱼去开屏V2.0 +// @ScriptName 墨鱼去开屏𝐕𝟐.𝟎 // @Author @ddgksf2013, @blackmatrix7, @app2smile, @DivineEngine, @kyle, @Nick-workflow, @kkpp, @LE // @TgChannel 𝐡𝐭𝐭𝐩𝐬://𝐭.𝐦𝐞/𝐝𝐝𝐠𝐤𝐬𝐟𝟐𝟎𝟐𝟏 // @TgBot https://t.me/ddgksf2013_bot // @WechatID 公众号墨鱼手记 // @Feedback 💡 请通过邮件反馈问题『其它方式一概无视』:𝐝𝐝𝐠𝐤𝐬𝐟𝟐𝟎𝟏𝟑@𝟏𝟔𝟑.𝐜𝐨𝐦 💡 -// @UpdateTime 2023-07-12 +// @UpdateTime 2023-08-13 // @Please 如需引用请注明出处,谢谢合作! // @Function 去除APP首页启动广告和部分应用内广告,如果有需要的去除广告的APP,可以公众号后台直接回复 // @ExtraTxt Only provide the removal of open-screen advertisements for personally used apps -// @Attention QuantumultX能去广告,不代表能去所有广告!(应用个数:214) +// @Attention QuantumultX能去广告,不代表能去所有广告!(应用个数:218) // @Mark 名字后面的*代表该应用启动倒计时仍然存在 -// @APPList 无法通过𝐌𝐈𝐓𝐌去广告的应用:银行类[Most]|抖音|蜂巢|小米运动|万年历|豆瓣[信息流]|虎牙直播|货拉拉|番茄小说|携程旅行 +// @APPList 无法通过𝐌𝐈𝐓𝐌去广告的应用:银行类[Most]|抖音|蜂巢|小米运动|万年历|豆瓣[信息流]|虎牙直播|货拉拉|番茄小说|携程旅行[APP] // @Attention 如果广告仍然存在,请『卸载应用』重新安装,还是不行则表示『规则里没有或已失效』 // @ScriptURL https://github.com/ddgksf2013/Rewrite/raw/master/AdBlock/StartUp.conf // ==/UserScript== -hostname = igetcool-gateway.igetcool.com, *.ahhhhfs.com, open-cms-api.quark.cn, ftapi.10jqka.com.cn, wxa.wxs.qq.com, evs.500.com, j1.pupuapi.com, dq.dxy.cn, m.you.163.com, open-cms-api.uc.cn, *.yuxueyuan.cn, pan-api.bitqiu.com, client.tujia.com, vip7.fzwdyy.cn, run.api.qyfxgd.cn, *cupid.iqiyi.com, gateway.36kr.com, shopapi.io.mi.com, tk.lanjiyin.com, gongdu.youshu.cc, api.21ec74.com, ztoread.ziroom.com, iphone.ac.qq.com, web.chelaile.net.cn, gd.10086.cn, api.00bang.cn, app.hbooker.com, api.sfacg.com, newclient.map.baidu.com, api3.cls.cn, gateway-api.dushu365.com, p0.pipi.cn, jdread-api.jd.com, ms.jr.jd.com, bdsp-x.jd.com, dsp-x.jd.com, api.m.jd.com, router-app-api.jdcloud.com, app.homeinns.com, cdn-evone-ceph.echargenet.com, mlol.qt.qq.com, gg.caixin.com, app-gw.csdn.net, api.gameplus.qq.com, mrobot.pconline.com.cn, djcapp.game.qq.com, mxsa.mxbc.net, cn-acs.m.cainiao.com, zjdr666.com, api.caiyunapp.com, api.ahmobile.cn, gx.10086.cn, emdcadvertise.eastmoney.com, acs.m.taobao.com, api-sams.walmartmobile.cn, creditcardapp.bankcomm.cn, m.creditcard.ecitic.com, lban.spdb.com.cn, adapi.izuiyou.com, i.ys7.com, apps.api.ke.com, api.yonghuivip.com, access.mypikpak.com, gateway.shouqiev.com, res.pizzahut.com.cn, api.caijingmobile.com, 3g.csair.com, client-api.oray.com, bgw.xinyue.qq.com, api-new.app.acfun.cn, m.client.10010.com, open.fitdays.cn, gha.ghac.cn, ap.dongqiudi.com, sh-gateway.shihuo.cn, wcprd.hilton.com, ad.12306.cn, 103.91.210.141, adx-cn.anythinktech.com, js-ad.ayximgs.com, api.dangdang.com, pzoap.moedot.com, pipi.4kya.com, vip7.fzwdyy.cn, sdk.alibaba.com.ailbaba.me, tft-app.cdtft.cn, bgw.xinyue.qq.com, pan.baidu.com, yunbusiness.ccb.com, client.app.coc.10086.cn, t1.market.xiaomi.com, api.m.mi.com, app.zhuanzhuan.com, api.cloud.189.cn, appwk.baidu.com, us.l.qq.com, open.e.kuaishou.com, mi.gdt.qq.com, emdcadvertise.eastmoney.com, adm.10jqka.com.cn, a.qiumibao.com, api.tipsoon.com, b.appsimg.com, ios.sspai.com, zconfig.alibabausercontent.com, api.touker.com, mpcs.suning.com, api.pinduoduo.com, api.yangkeduo.com, easyreadfs.nosdn.127.net, sp.kaola.com, gw.kaola.com, mime.baidu.com, learn.chaoxing.com, mapi.dangdang.com, api.dangdang.com, open.e.kuaishou.com, client.qunar.com, mpos-pic.helipay.com, dili.bdatu.com, wap.ngchina.cn, ih2.ireader.com, adpai.thepaper.cn, api.haohaozhu.cn, list-app-m.i4.cn, api.xiachufang.com, peisongapi.meituan.com, *gaoqingdianshi.com, *.kakamobi.cn, api.jxedt.com, slapi.oray.net, r.inews.qq.com, app.yinxiang.com, mapi.appvipshop.com, syh.zybang.com, cdn.cmgadx.com, api.internetofcity.cn, img.meituan.net, lcen.xiaote.net, venus.yhd.com, api.shenyin.name, mage*.if.qidian.com, god.gameyw.netease.com, m.ibuscloud.com, e.dangdang.com, app2.autoimg.cn, adproxy.autohome.com.cn, discardrp.umetrip.com, startup.umetrip.com, explorer.tratao.com, overseas.weico.cc, 118.178.214.118, dapis.mting.info, acs.m.taobao.com, open3.vistastory.com, ssp.dzh.com.cn, www.meituan.com, client.mail.163.com, api.izuiyou.com, appapi.huazhu.com, api.wfdata.club, interface*.music.163.com, api.psy-1.com, res.kfc.com.cn, mp.weixin.qq.com, security.wechat.com, weixin110.qq.com, cdn.*.chelaileapp.cn, api.coolapk.com, app3.qdaily.com, daoyu.sdo.com, img.jiemian.com, ccsp-egmas.sf-express.com, *.laichon.com, app.ap.d3yuiw4.com, www.i3zh.com, api.yikaobang.com.cn, api-ad-product.huxiu.com, jad-api.jin10.com, mob.mddcloud.com.cn, appactive.1234567.com.cn, rtbapi.douyucdn.cn, service.busi.inke.cn, gab.122.gov.cn, dispatcher.camera360.com, app.api.versa-ai.com, open.taou.com, api.taou.com, track.mm.taou.com, app.dewu.com, data-collector.soulapp.cn, api.gamer.com.tw, beta-api.crunchyroll.com, api.vistopia.com.cn, pss.txffp.com, m.sd.10086.cn, helper.2bulu.com, 47.100.65.202, api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, new.vip.weibo.cn, wap.js.10086.cn, tagit.hyhuo.com, top-widgets-api.xiaozujian.com, *mangaapi.manhuaren.*, apis.lifeweek.com.cn, support.you.163.com, yanxuan.nosdn.127.net, *.peopleapp.com, new-app-api.ylyk.com, gw.aihuishou.com, *.58cdn.com.cn, app.58.com, api.zhihu.com, creditcardapp.bankcomm.com, res.xiaojukeji.com, 116.85.2.15, 116.85.2.14, lchttpapi.xczim.com, business.msstatic.com, api.kkmh.com, *.chelaile.net.cn, api.jr.mi.com, api.m.mi.com, guanyu.longfor.com, elemecdn.com, fuss10.elemecdn.com, www1.elecfans.com, m.tuniu.com, mapi.mafengwo.cn, api.xiaoyi.com, api.douban.com, otheve.beacon.qq.com, mapi.sfbest.com, api.mwee.cn, sso.ifanr.com, s3plus.meituan.net, flowplus.meituan.net, p*.meituan.net, testflight.apple.com, wmapi.meituan.com, appconf.mail.163.com, dl-cu-hz.lechange.cn, fbchina.flipchina.cn, zone.guiderank-app.com, homefront.qunar.com, afd.baidu.com, j-image.missfresh.cn, ma-adx.ctrip.com, mbd.baidu.com, img.rr.tv, api.rr.tv, *.hoopchina.com, goblin.hupu.com, spclient.wg.spotify.com +hostname = mgw.mpaas.cn-hangzhou.aliyuncs.com, ytmsout.radio.cn, api.kmovie.gifshow.com, igetcool-gateway.igetcool.com, *.ahhhhfs.com, open-cms-api.quark.cn, ftapi.10jqka.com.cn, wxa.wxs.qq.com, evs.500.com, j1.pupuapi.com, dq.dxy.cn, m.you.163.com, open-cms-api.uc.cn, *.yuxueyuan.cn, pan-api.bitqiu.com, client.tujia.com, vip7.fzwdyy.cn, run.api.qyfxgd.cn, *cupid.iqiyi.com, gateway.36kr.com, shopapi.io.mi.com, tk.lanjiyin.com, gongdu.youshu.cc, api.21ec74.com, ztoread.ziroom.com, iphone.ac.qq.com, web.chelaile.net.cn, gd.10086.cn, api.00bang.cn, app.hbooker.com, api.sfacg.com, newclient.map.baidu.com, api3.cls.cn, gateway-api.dushu365.com, p0.pipi.cn, jdread-api.jd.com, ms.jr.jd.com, bdsp-x.jd.com, dsp-x.jd.com, api.m.jd.com, router-app-api.jdcloud.com, app.homeinns.com, cdn-evone-ceph.echargenet.com, mlol.qt.qq.com, gg.caixin.com, app-gw.csdn.net, api.gameplus.qq.com, mrobot.pconline.com.cn, djcapp.game.qq.com, mxsa.mxbc.net, cn-acs.m.cainiao.com, zjdr666.com, api.caiyunapp.com, api.ahmobile.cn, gx.10086.cn, emdcadvertise.eastmoney.com, api-sams.walmartmobile.cn, creditcardapp.bankcomm.cn, m.creditcard.ecitic.com, lban.spdb.com.cn, adapi.izuiyou.com, i.ys7.com, apps.api.ke.com, api.yonghuivip.com, access.mypikpak.com, gateway.shouqiev.com, res.pizzahut.com.cn, api.caijingmobile.com, 3g.csair.com, client-api.oray.com, bgw.xinyue.qq.com, api-new.app.acfun.cn, m.client.10010.com, open.fitdays.cn, gha.ghac.cn, ap.dongqiudi.com, sh-gateway.shihuo.cn, wcprd.hilton.com, ad.12306.cn, 103.91.210.141, adx-cn.anythinktech.com, js-ad.ayximgs.com, api.dangdang.com, pzoap.moedot.com, pipi.4kya.com, vip7.fzwdyy.cn, sdk.alibaba.com.ailbaba.me, tft-app.cdtft.cn, bgw.xinyue.qq.com, pan.baidu.com, yunbusiness.ccb.com, client.app.coc.10086.cn, t1.market.xiaomi.com, api.m.mi.com, app.zhuanzhuan.com, api.cloud.189.cn, appwk.baidu.com, us.l.qq.com, open.e.kuaishou.com, mi.gdt.qq.com, emdcadvertise.eastmoney.com, adm.10jqka.com.cn, a.qiumibao.com, api.tipsoon.com, b.appsimg.com, ios.sspai.com, zconfig.alibabausercontent.com, api.touker.com, mpcs.suning.com, api.pinduoduo.com, api.yangkeduo.com, easyreadfs.nosdn.127.net, sp.kaola.com, gw.kaola.com, mime.baidu.com, learn.chaoxing.com, mapi.dangdang.com, api.dangdang.com, open.e.kuaishou.com, client.qunar.com, mpos-pic.helipay.com, dili.bdatu.com, wap.ngchina.cn, ih2.ireader.com, adpai.thepaper.cn, api.haohaozhu.cn, list-app-m.i4.cn, api.xiachufang.com, peisongapi.meituan.com, *gaoqingdianshi.com, *.kakamobi.cn, api.jxedt.com, slapi.oray.net, r.inews.qq.com, app.yinxiang.com, mapi.appvipshop.com, syh.zybang.com, cdn.cmgadx.com, api.internetofcity.cn, img.meituan.net, lcen.xiaote.net, venus.yhd.com, api.shenyin.name, mage*.if.qidian.com, god.gameyw.netease.com, m.ibuscloud.com, e.dangdang.com, app2.autoimg.cn, adproxy.autohome.com.cn, discardrp.umetrip.com, startup.umetrip.com, explorer.tratao.com, overseas.weico.cc, 118.178.214.118, dapis.mting.info, acs.m.taobao.com, open3.vistastory.com, ssp.dzh.com.cn, www.meituan.com, client.mail.163.com, api.izuiyou.com, appapi.huazhu.com, api.wfdata.club, interface*.music.163.com, api.psy-1.com, res.kfc.com.cn, mp.weixin.qq.com, security.wechat.com, weixin110.qq.com, cdn.*.chelaileapp.cn, api.coolapk.com, app3.qdaily.com, daoyu.sdo.com, img.jiemian.com, ccsp-egmas.sf-express.com, *.laichon.com, app.ap.d3yuiw4.com, www.i3zh.com, api.yikaobang.com.cn, api-ad-product.huxiu.com, jad-api.jin10.com, mob.mddcloud.com.cn, appactive.1234567.com.cn, rtbapi.douyucdn.cn, service.busi.inke.cn, gab.122.gov.cn, dispatcher.camera360.com, app.api.versa-ai.com, open.taou.com, api.taou.com, track.mm.taou.com, app.dewu.com, data-collector.soulapp.cn, api.gamer.com.tw, beta-api.crunchyroll.com, api.vistopia.com.cn, pss.txffp.com, m.sd.10086.cn, helper.2bulu.com, 47.100.65.202, api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, new.vip.weibo.cn, wap.js.10086.cn, tagit.hyhuo.com, top-widgets-api.xiaozujian.com, *mangaapi.manhuaren.*, apis.lifeweek.com.cn, support.you.163.com, yanxuan.nosdn.127.net, *.peopleapp.com, new-app-api.ylyk.com, gw.aihuishou.com, *.58cdn.com.cn, app.58.com, api.zhihu.com, creditcardapp.bankcomm.com, res.xiaojukeji.com, 116.85.2.15, 116.85.2.14, lchttpapi.xczim.com, business.msstatic.com, api.kkmh.com, *.chelaile.net.cn, api.jr.mi.com, api.m.mi.com, guanyu.longfor.com, elemecdn.com, fuss10.elemecdn.com, www1.elecfans.com, m.tuniu.com, mapi.mafengwo.cn, api.xiaoyi.com, api.douban.com, otheve.beacon.qq.com, mapi.sfbest.com, api.mwee.cn, sso.ifanr.com, s3plus.meituan.net, flowplus.meituan.net, p*.meituan.net, testflight.apple.com, wmapi.meituan.com, appconf.mail.163.com, dl-cu-hz.lechange.cn, fbchina.flipchina.cn, zone.guiderank-app.com, homefront.qunar.com, afd.baidu.com, j-image.missfresh.cn, ma-adx.ctrip.com, mbd.baidu.com, img.rr.tv, api.rr.tv, *.hoopchina.com, goblin.hupu.com, spclient.wg.spotify.com # ======= 0~9 ======= # # > version -^https?:\/\/2023.07.12\/v2.0.328 url reject-200 +^https?:\/\/2023.08.13/v2.0.338 url reject-200 # > 10 ^https?:\/\/ftapi\.10jqka\.com\.cn\/futgwapi\/api\/om\/v\d\/ad\/common\/transfer url reject # > 58 @@ -154,6 +154,7 @@ https?:\/\/res\.xiaojukeji\.com\/resapi\/activity\/get(Ruled|Preload|PasMultiNot ^https?:\/\/emdcadvertise\.eastmoney\.com\/infoService\/v2 url reject # > damai ^https?:\/\/acs\.m\.taobao\.com\/gw\/mtop\.damai\.wireless\.home\.welcome url reject +^https?:\/\/acs\.m\.taobao\.com\/gw\/mtop\.damai\.mec\.popup\.get url reject # > dami ^https?:\/\/vip7\.fzwdyy\.cn:8083\/api\/(getAdvertInfo|getGOOGAdvert) url reject # > dingxiangyuan @@ -276,6 +277,8 @@ https://fbchina.flipchina.cn/v2/ad/query/* url reject ^https?:\/\/\w+\.kakamobi\.cn\/api\/open\/v\d\/advert-sdk\/ url reject # > jianhanglife ^https?:\/\/yunbusiness\.ccb\.com\/clp_service\/txCtrl\?txcode=A3341A00(2|9) url reject +# > jike +^https?:\/\/mgw\.mpaas\.cn-hangzhou\.aliyuncs\.com\/mgw\.htm url reject # ======= K ======= # @@ -285,7 +288,8 @@ https://fbchina.flipchina.cn/v2/ad/query/* url reject # > kuaikan ^https?:\/\/api.kkmh.com\/v\d\/(ad|advertisement)\/ url reject # > ku'an -^https?:\/\/api\.coolapk\.com\/v6\/(feed\/(replyList|detail)|main\/indexV8|dataList) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/CoolApk.js +^https?:\/\/api\.coolapk\.com\/v6\/(feed\/(replyList|detail)|main\/indexV8|dataList) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/CoolApk.min.js +^https?:\/\/api.coolapk.com\/v6\/main\/init url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/CoolApk.min.js ^https?:\/\/api\.coolapk\.com\/v6\/search\?.*type=hotSearch url reject-dict # > kanlixiang ^https?:\/\/api\.vistopia\.com\.cn\/api\/v\d\/home\/advertisement url reject @@ -296,6 +300,8 @@ https://open3.vistastory.com/v3/api.*get_popup url reject ^https?:\/\/open-cms-api\.(uc|quark)\.cn\/open-cms url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Quark.min.js # > kuaishou ^https:\/\/open\.e\.kuaishou\.com\/rest\/e\/v3\/open\/univ url reject +# > kuaiying +^https?:\/\/api\.kmovie\.gifshow\.com\/rest\/n\/kmovie\/app\/(resource|banner) url reject # ======= L ======= # @@ -590,6 +596,10 @@ https://new-app-api.ylyk.com/v1/user/myinfo/adviser url reject ^https?:\/\/i\.ys7\.com\/api\/ads\/ url reject # > yuxueyuan ^https?:\/\/.*\.yuxueyuan\.cn\/yxy-api-gateway\/api\/json\/advert\/getsAdStartScreen url reject-200 +# > yitao +^https?:\/\/acs\.m\.taobao\.com\/gw\/mtop\.etao\.noah\.query.*etao_splash url reject +# > yunting +^https?:\/\/ytmsout\.radio\.cn\/publish\/recScreen\/getLoadPage url reject # ======= Z ======= # diff --git a/Scripts/AdBlock/Other/BaiduMap.js b/Scripts/AdBlock/Other/BaiduMap.js index a0a425f..09e94e1 100644 --- a/Scripts/AdBlock/Other/BaiduMap.js +++ b/Scripts/AdBlock/Other/BaiduMap.js @@ -1,4542 +1,2185 @@ let protobuf; -!(function (g) { - 'use strict'; - !(function (r, e, t) { - var i = (function t(i) { - var n = e[i]; - return ( - n || r[i][0].call((n = e[i] = { exports: {} }), t, n, n.exports), - n.exports - ); - })(t[0]); - (protobuf = i.util.global.protobuf = i), - 'function' == typeof define && - define.amd && - define(['long'], function (t) { - return t && t.isLong && ((i.util.Long = t), i.configure()), i; - }), - 'object' == typeof module && - module && - module.exports && - (module.exports = i); - })( - { - 1: [ - function (t, i, n) { - i.exports = function (t, i) { - var n = Array(arguments.length - 1), - s = 0, - r = 2, - u = !0; - for (; r < arguments.length; ) n[s++] = arguments[r++]; - return new Promise(function (r, e) { - n[s] = function (t) { - if (u) - if (((u = !1), t)) e(t); - else { - for ( - var i = Array(arguments.length - 1), n = 0; - n < i.length; - - ) - i[n++] = arguments[n]; - r.apply(null, i); - } - }; - try { - t.apply(i || null, n); - } catch (t) { - u && ((u = !1), e(t)); - } - }); - }; - }, - {}, - ], - 2: [ - function (t, i, n) { - n.length = function (t) { - var i = t.length; - if (!i) return 0; - for (var n = 0; 1 < --i % 4 && '=' == (t[0 | i] || ''); ) ++n; - return Math.ceil(3 * t.length) / 4 - n; - }; - for (var f = Array(64), h = Array(123), r = 0; r < 64; ) - h[ - (f[r] = - r < 26 - ? r + 65 - : r < 52 - ? r + 71 - : r < 62 - ? r - 4 - : (r - 59) | 43) - ] = r++; - n.encode = function (t, i, n) { - for (var r, e = null, s = [], u = 0, o = 0; i < n; ) { - var h = t[i++]; - switch (o) { - case 0: - (s[u++] = f[h >> 2]), (r = (3 & h) << 4), (o = 1); - break; - case 1: - (s[u++] = f[r | (h >> 4)]), (r = (15 & h) << 2), (o = 2); - break; - case 2: - (s[u++] = f[r | (h >> 6)]), (s[u++] = f[63 & h]), (o = 0); - } - 8191 < u && - ((e = e || []).push(String.fromCharCode.apply(String, s)), - (u = 0)); +!function (g) { + "use strict"; + !function (r, e, t) { + var i = function t(i) { + var n = e[i]; + return n || r[i][0].call(n = e[i] = {exports: {}}, t, n, n.exports), n.exports + }(t[0]); + protobuf = i.util.global.protobuf = i, "function" == typeof define && define.amd && define(["long"], function (t) { + return t && t.isLong && (i.util.Long = t, i.configure()), i + }), "object" == typeof module && module && module.exports && (module.exports = i) + }({ + 1: [function (t, i, n) { + i.exports = function (t, i) { + var n = Array(arguments.length - 1), s = 0, r = 2, u = !0; + for (; r < arguments.length;) n[s++] = arguments[r++]; + return new Promise(function (r, e) { + n[s] = function (t) { + if (u) if (u = !1, t) e(t); else { + for (var i = Array(arguments.length - 1), n = 0; n < i.length;) i[n++] = arguments[n]; + r.apply(null, i) + } + }; + try { + t.apply(i || null, n) + } catch (t) { + u && (u = !1, e(t)) + } + }) } - return ( - o && ((s[u++] = f[r]), (s[u++] = 61), 1 === o && (s[u++] = 61)), - e - ? (u && - e.push(String.fromCharCode.apply(String, s.slice(0, u))), - e.join('')) - : String.fromCharCode.apply(String, s.slice(0, u)) - ); - }; - var c = 'invalid encoding'; - (n.decode = function (t, i, n) { - for (var r, e = n, s = 0, u = 0; u < t.length; ) { - var o = t.charCodeAt(u++); - if (61 == o && 1 < s) break; - if ((o = h[o]) === g) throw Error(c); - switch (s) { - case 0: - (r = o), (s = 1); - break; - case 1: - (i[n++] = (r << 2) | ((48 & o) >> 4)), (r = o), (s = 2); - break; - case 2: - (i[n++] = ((15 & r) << 4) | ((60 & o) >> 2)), - (r = o), - (s = 3); - break; - case 3: - (i[n++] = ((3 & r) << 6) | o), (s = 0); - } - } - if (1 === s) throw Error(c); - return n - e; - }), - (n.test = function (t) { - return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test( - t - ); - }); - }, - {}, - ], - 3: [ - function (t, i, n) { - function a(i, n) { - 'string' == typeof i && ((n = i), (i = g)); - var h = []; - function f(t) { - if ('string' != typeof t) { - var i = c(); - if ( - (a.verbose && console.log('codegen: ' + i), - (i = 'return ' + i), - t) - ) { - for ( - var n = Object.keys(t), - r = Array(n.length + 1), - e = Array(n.length), - s = 0; - s < n.length; - - ) - (r[s] = n[s]), (e[s] = t[n[s++]]); - return (r[s] = i), Function.apply(null, r).apply(null, e); - } - return Function(i)(); - } - for (var u = Array(arguments.length - 1), o = 0; o < u.length; ) - u[o] = arguments[++o]; - if ( - ((o = 0), - (t = t.replace(/%([%dfijs])/g, function (t, i) { - var n = u[o++]; - switch (i) { - case 'd': - case 'f': - return '' + +('' + n); - case 'i': - return '' + Math.floor(n); - case 'j': - return JSON.stringify(n); - case 's': - return '' + n; - } - return '%'; - })), - o !== u.length) - ) - throw Error('parameter count mismatch'); - return h.push(t), f; - } - function c(t) { - return ( - 'function ' + - (t || n || '') + - '(' + - ((i && i.join(',')) || '') + - '){\n ' + - h.join('\n ') + - '\n}' - ); - } - return (f.toString = c), f; - } - (i.exports = a).verbose = !1; - }, - {}, - ], - 4: [ - function (t, i, n) { - function r() { - this.t = {}; - } - ((i.exports = r).prototype.on = function (t, i, n) { - return ( - (this.t[t] || (this.t[t] = [])).push({ fn: i, ctx: n || this }), - this - ); - }), - (r.prototype.off = function (t, i) { - if (t === g) this.t = {}; - else if (i === g) this.t[t] = []; - else - for (var n = this.t[t], r = 0; r < n.length; ) - n[r].fn === i ? n.splice(r, 1) : ++r; - return this; - }), - (r.prototype.emit = function (t) { - var i = this.t[t]; - if (i) { - for (var n = [], r = 1; r < arguments.length; ) - n.push(arguments[r++]); - for (r = 0; r < i.length; ) i[r].fn.apply(i[r++].ctx, n); - } - return this; - }); - }, - {}, - ], - 5: [ - function (t, i, n) { - i.exports = o; - var s = t(1), - u = t(7)('fs'); - function o(n, r, e) { - return ( - (r = 'function' == typeof r ? ((e = r), {}) : r || {}), - e - ? !r.xhr && u && u.readFile - ? u.readFile(n, function (t, i) { - return t && 'undefined' != typeof XMLHttpRequest - ? o.xhr(n, r, e) - : t - ? e(t) - : e(null, r.binary ? i : i.toString('utf8')); - }) - : o.xhr(n, r, e) - : s(o, this, n, r) - ); - } - o.xhr = function (t, n, r) { - var e = new XMLHttpRequest(); - (e.onreadystatechange = function () { - if (4 !== e.readyState) return g; - if (0 !== e.status && 200 !== e.status) - return r(Error('status ' + e.status)); - if (n.binary) { - if (!(t = e.response)) - for (var t = [], i = 0; i < e.responseText.length; ++i) - t.push(255 & e.responseText.charCodeAt(i)); - return r( - null, - 'undefined' != typeof Uint8Array ? new Uint8Array(t) : t - ); - } - return r(null, e.responseText); - }), - n.binary && - ('overrideMimeType' in e && - e.overrideMimeType('text/plain; charset=x-user-defined'), - (e.responseType = 'arraybuffer')), - e.open('GET', t), - e.send(); - }; - }, - { 1: 1, 7: 7 }, - ], - 6: [ - function (t, i, n) { - function r(t) { - function i(t, i, n, r) { - var e = i < 0 ? 1 : 0; - t( - 0 === (i = e ? -i : i) - ? 0 < 1 / i - ? 0 - : 2147483648 - : isNaN(i) - ? 2143289344 - : 34028234663852886e22 < i - ? ((e << 31) | 2139095040) >>> 0 - : i < 11754943508222875e-54 - ? ((e << 31) | Math.round(i / 1401298464324817e-60)) >>> 0 - : ((e << 31) | - ((127 + (t = Math.floor(Math.log(i) / Math.LN2))) << 23) | - (8388607 & Math.round(i * Math.pow(2, -t) * 8388608))) >>> - 0, - n, - r - ); - } - function n(t, i, n) { - (t = t(i, n)), - (i = 2 * (t >> 31) + 1), - (n = (t >>> 23) & 255), - (t &= 8388607); - return 255 == n - ? t - ? NaN - : (1 / 0) * i - : 0 == n - ? 1401298464324817e-60 * i * t - : i * Math.pow(2, n - 150) * (8388608 + t); - } - function r(t, i, n) { - (o[0] = t), - (i[n] = h[0]), - (i[n + 1] = h[1]), - (i[n + 2] = h[2]), - (i[n + 3] = h[3]); - } - function e(t, i, n) { - (o[0] = t), - (i[n] = h[3]), - (i[n + 1] = h[2]), - (i[n + 2] = h[1]), - (i[n + 3] = h[0]); - } - function s(t, i) { - return ( - (h[0] = t[i]), - (h[1] = t[i + 1]), - (h[2] = t[i + 2]), - (h[3] = t[i + 3]), - o[0] - ); - } - function u(t, i) { - return ( - (h[3] = t[i]), - (h[2] = t[i + 1]), - (h[1] = t[i + 2]), - (h[0] = t[i + 3]), - o[0] - ); - } - var o, h, f, c, a; - function l(t, i, n, r, e, s) { - var u, - o = r < 0 ? 1 : 0; - 0 === (r = o ? -r : r) - ? (t(0, e, s + i), t(0 < 1 / r ? 0 : 2147483648, e, s + n)) - : isNaN(r) - ? (t(0, e, s + i), t(2146959360, e, s + n)) - : 17976931348623157e292 < r - ? (t(0, e, s + i), t(((o << 31) | 2146435072) >>> 0, e, s + n)) - : r < 22250738585072014e-324 - ? (t((u = r / 5e-324) >>> 0, e, s + i), - t(((o << 31) | (u / 4294967296)) >>> 0, e, s + n)) - : (t( - (4503599627370496 * - (u = - r * - Math.pow( - 2, - -(r = - 1024 === (r = Math.floor(Math.log(r) / Math.LN2)) - ? 1023 - : r) - ))) >>> - 0, - e, - s + i - ), - t( - ((o << 31) | - ((r + 1023) << 20) | - ((1048576 * u) & 1048575)) >>> - 0, - e, - s + n - )); - } - function d(t, i, n, r, e) { - (i = t(r, e + i)), - (t = t(r, e + n)), - (r = 2 * (t >> 31) + 1), - (e = (t >>> 20) & 2047), - (n = 4294967296 * (1048575 & t) + i); - return 2047 == e - ? n - ? NaN - : (1 / 0) * r - : 0 == e - ? 5e-324 * r * n - : r * Math.pow(2, e - 1075) * (n + 4503599627370496); - } - function v(t, i, n) { - (f[0] = t), - (i[n] = c[0]), - (i[n + 1] = c[1]), - (i[n + 2] = c[2]), - (i[n + 3] = c[3]), - (i[n + 4] = c[4]), - (i[n + 5] = c[5]), - (i[n + 6] = c[6]), - (i[n + 7] = c[7]); - } - function b(t, i, n) { - (f[0] = t), - (i[n] = c[7]), - (i[n + 1] = c[6]), - (i[n + 2] = c[5]), - (i[n + 3] = c[4]), - (i[n + 4] = c[3]), - (i[n + 5] = c[2]), - (i[n + 6] = c[1]), - (i[n + 7] = c[0]); - } - function p(t, i) { - return ( - (c[0] = t[i]), - (c[1] = t[i + 1]), - (c[2] = t[i + 2]), - (c[3] = t[i + 3]), - (c[4] = t[i + 4]), - (c[5] = t[i + 5]), - (c[6] = t[i + 6]), - (c[7] = t[i + 7]), - f[0] - ); - } - function y(t, i) { - return ( - (c[7] = t[i]), - (c[6] = t[i + 1]), - (c[5] = t[i + 2]), - (c[4] = t[i + 3]), - (c[3] = t[i + 4]), - (c[2] = t[i + 5]), - (c[1] = t[i + 6]), - (c[0] = t[i + 7]), - f[0] - ); - } - return ( - 'undefined' != typeof Float32Array - ? ((o = new Float32Array([-0])), - (h = new Uint8Array(o.buffer)), - (a = 128 === h[3]), - (t.writeFloatLE = a ? r : e), - (t.writeFloatBE = a ? e : r), - (t.readFloatLE = a ? s : u), - (t.readFloatBE = a ? u : s)) - : ((t.writeFloatLE = i.bind(null, m)), - (t.writeFloatBE = i.bind(null, w)), - (t.readFloatLE = n.bind(null, g)), - (t.readFloatBE = n.bind(null, j))), - 'undefined' != typeof Float64Array - ? ((f = new Float64Array([-0])), - (c = new Uint8Array(f.buffer)), - (a = 128 === c[7]), - (t.writeDoubleLE = a ? v : b), - (t.writeDoubleBE = a ? b : v), - (t.readDoubleLE = a ? p : y), - (t.readDoubleBE = a ? y : p)) - : ((t.writeDoubleLE = l.bind(null, m, 0, 4)), - (t.writeDoubleBE = l.bind(null, w, 4, 0)), - (t.readDoubleLE = d.bind(null, g, 0, 4)), - (t.readDoubleBE = d.bind(null, j, 4, 0))), - t - ); - } - function m(t, i, n) { - (i[n] = 255 & t), - (i[n + 1] = (t >>> 8) & 255), - (i[n + 2] = (t >>> 16) & 255), - (i[n + 3] = t >>> 24); - } - function w(t, i, n) { - (i[n] = t >>> 24), - (i[n + 1] = (t >>> 16) & 255), - (i[n + 2] = (t >>> 8) & 255), - (i[n + 3] = 255 & t); - } - function g(t, i) { - return ( - (t[i] | (t[i + 1] << 8) | (t[i + 2] << 16) | (t[i + 3] << 24)) >>> - 0 - ); - } - function j(t, i) { - return ( - ((t[i] << 24) | (t[i + 1] << 16) | (t[i + 2] << 8) | t[i + 3]) >>> - 0 - ); - } - i.exports = r(r); - }, - {}, - ], - 7: [ - function (t, i, n) { - function r(t) { - try { - var i = eval('require')(t); - if (i && (i.length || Object.keys(i).length)) return i; - } catch (t) {} - return null; - } - i.exports = r; - }, - {}, - ], - 8: [ - function (t, i, n) { - var e = (n.isAbsolute = function (t) { - return /^(?:\/|\w+:)/.test(t); - }), - r = (n.normalize = function (t) { - var i = (t = t.replace(/\\/g, '/').replace(/\/{2,}/g, '/')).split( - '/' - ), - n = e(t), - t = ''; - n && (t = i.shift() + '/'); - for (var r = 0; r < i.length; ) - '..' === i[r] - ? 0 < r && '..' !== i[r - 1] - ? i.splice(--r, 2) - : n - ? i.splice(r, 1) - : ++r - : '.' === i[r] - ? i.splice(r, 1) - : ++r; - return t + i.join('/'); - }); - n.resolve = function (t, i, n) { - return ( - n || (i = r(i)), - !e(i) && - (t = (t = n ? t : r(t)).replace(/(?:\/|^)[^/]+$/, '')).length - ? r(t + '/' + i) - : i - ); - }; - }, - {}, - ], - 9: [ - function (t, i, n) { - i.exports = function (i, n, t) { - var r = t || 8192, - e = r >>> 1, - s = null, - u = r; - return function (t) { - if (t < 1 || e < t) return i(t); - r < u + t && ((s = i(r)), (u = 0)); - t = n.call(s, u, (u += t)); - return 7 & u && (u = 1 + (7 | u)), t; + }, {}], 2: [function (t, i, n) { + n.length = function (t) { + var i = t.length; + if (!i) return 0; + for (var n = 0; 1 < --i % 4 && "=" == (t[0 | i] || "");) ++n; + return Math.ceil(3 * t.length) / 4 - n }; - }; - }, - {}, - ], - 10: [ - function (t, i, n) { - (n.length = function (t) { - for (var i, n = 0, r = 0; r < t.length; ++r) - (i = t.charCodeAt(r)) < 128 - ? (n += 1) - : i < 2048 - ? (n += 2) - : 55296 == (64512 & i) && 56320 == (64512 & t.charCodeAt(r + 1)) - ? (++r, (n += 4)) - : (n += 3); - return n; - }), - (n.read = function (t, i, n) { - if (n - i < 1) return ''; - for (var r, e = null, s = [], u = 0; i < n; ) - (r = t[i++]) < 128 - ? (s[u++] = r) - : 191 < r && r < 224 - ? (s[u++] = ((31 & r) << 6) | (63 & t[i++])) - : 239 < r && r < 365 - ? ((r = - (((7 & r) << 18) | - ((63 & t[i++]) << 12) | - ((63 & t[i++]) << 6) | - (63 & t[i++])) - - 65536), - (s[u++] = 55296 + (r >> 10)), - (s[u++] = 56320 + (1023 & r))) - : (s[u++] = - ((15 & r) << 12) | ((63 & t[i++]) << 6) | (63 & t[i++])), - 8191 < u && - ((e = e || []).push(String.fromCharCode.apply(String, s)), - (u = 0)); - return e - ? (u && - e.push(String.fromCharCode.apply(String, s.slice(0, u))), - e.join('')) - : String.fromCharCode.apply(String, s.slice(0, u)); - }), - (n.write = function (t, i, n) { - for (var r, e, s = n, u = 0; u < t.length; ++u) - (r = t.charCodeAt(u)) < 128 - ? (i[n++] = r) - : (r < 2048 - ? (i[n++] = (r >> 6) | 192) - : (55296 == (64512 & r) && - 56320 == (64512 & (e = t.charCodeAt(u + 1))) - ? (++u, - (i[n++] = - ((r = 65536 + ((1023 & r) << 10) + (1023 & e)) >> - 18) | - 240), - (i[n++] = ((r >> 12) & 63) | 128)) - : (i[n++] = (r >> 12) | 224), - (i[n++] = ((r >> 6) & 63) | 128)), - (i[n++] = (63 & r) | 128)); - return n - s; - }); - }, - {}, - ], - 11: [ - function (t, i, n) { - var l = t(14), - d = t(33); - function u(t, i, n, r) { - var e = !1; - if (i.resolvedType) - if (i.resolvedType instanceof l) { - t('switch(d%s){', r); - for ( - var s = i.resolvedType.values, u = Object.keys(s), o = 0; - o < u.length; - ++o - ) - s[u[o]] !== i.typeDefault || - e || - (t('default:')( - 'if(typeof(d%s)==="number"){m%s=d%s;break}', - r, - r, - r - ), - i.repeated || t('break'), - (e = !0)), - t('case%j:', u[o])('case %i:', s[u[o]])( - 'm%s=%j', - r, - s[u[o]] - )('break'); - t('}'); - } else - t('if(typeof d%s!=="object")', r)( - 'throw TypeError(%j)', - i.fullName + ': object expected' - )('m%s=types[%i].fromObject(d%s)', r, n, r); - else { - var h = !1; - switch (i.type) { - case 'double': - case 'float': - t('m%s=Number(d%s)', r, r); - break; - case 'uint32': - case 'fixed32': - t('m%s=d%s>>>0', r, r); - break; - case 'int32': - case 'sint32': - case 'sfixed32': - t('m%s=d%s|0', r, r); - break; - case 'uint64': - h = !0; - case 'int64': - case 'sint64': - case 'fixed64': - case 'sfixed64': - t('if(util.Long)')( - '(m%s=util.Long.fromValue(d%s)).unsigned=%j', - r, - r, - h - )('else if(typeof d%s==="string")', r)( - 'm%s=parseInt(d%s,10)', - r, - r - )('else if(typeof d%s==="number")', r)( - 'm%s=d%s', - r, - r - )('else if(typeof d%s==="object")', r)( - 'm%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)', - r, - r, - r, - h ? 'true' : '' - ); - break; - case 'bytes': - t('if(typeof d%s==="string")', r)( - 'util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)', - r, - r, - r - )('else if(d%s.length >= 0)', r)('m%s=d%s', r, r); - break; - case 'string': - t('m%s=String(d%s)', r, r); - break; - case 'bool': - t('m%s=Boolean(d%s)', r, r); - } - } - return t; - } - function v(t, i, n, r) { - if (i.resolvedType) - i.resolvedType instanceof l - ? t( - 'd%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s', - r, - n, - r, - r, - n, - r, - r - ) - : t('d%s=types[%i].toObject(m%s,o)', r, n, r); - else { - var e = !1; - switch (i.type) { - case 'double': - case 'float': - t('d%s=o.json&&!isFinite(m%s)?String(m%s):m%s', r, r, r, r); - break; - case 'uint64': - e = !0; - case 'int64': - case 'sint64': - case 'fixed64': - case 'sfixed64': - t('if(typeof m%s==="number")', r)( - 'd%s=o.longs===String?String(m%s):m%s', - r, - r, - r - )('else')( - 'd%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s', - r, - r, - r, - r, - e ? 'true' : '', - r - ); - break; - case 'bytes': - t( - 'd%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s', - r, - r, - r, - r, - r - ); - break; - default: - t('d%s=m%s', r, r); - } - } - return t; - } - (n.fromObject = function (t) { - var i = t.fieldsArray, - n = d.codegen( - ['d'], - t.name + '$fromObject' - )('if(d instanceof this.ctor)')('return d'); - if (!i.length) return n('return new this.ctor'); - n('var m=new this.ctor'); - for (var r = 0; r < i.length; ++r) { - var e = i[r].resolve(), - s = d.safeProp(e.name); - e.map - ? (n('if(d%s){', s)('if(typeof d%s!=="object")', s)( - 'throw TypeError(%j)', - e.fullName + ': object expected' - )('m%s={}', s)( - 'for(var ks=Object.keys(d%s),i=0;i> 2], r = (3 & h) << 4, o = 1; + break; + case 1: + s[u++] = f[r | h >> 4], r = (15 & h) << 2, o = 2; + break; + case 2: + s[u++] = f[r | h >> 6], s[u++] = f[63 & h], o = 0 + } + 8191 < u && ((e = e || []).push(String.fromCharCode.apply(String, s)), u = 0) } - n('}'); - } - for (var c = !1, u = 0; u < i.length; ++u) { - var h = i[u], - a = t.i.indexOf(h), - f = d.safeProp(h.name); - h.map - ? (c || ((c = !0), n('var ks2')), - n( - 'if(m%s&&(ks2=Object.keys(m%s)).length){', - f, - f - )( - 'd%s={}', - f - )('for(var j=0;j>>3){'); - for (var n = 0; n < t.fieldsArray.length; ++n) { - var r = t.i[n].resolve(), - e = r.resolvedType instanceof o ? 'int32' : r.type, - s = 'm' + f.safeProp(r.name); - i('case %i: {', r.id), - r.map - ? (i('if(%s===util.emptyObject)', s)('%s={}', s)( - 'var c2 = r.uint32()+r.pos' - ), - h.defaults[r.keyType] !== g - ? i('k=%j', h.defaults[r.keyType]) - : i('k=null'), - h.defaults[e] !== g - ? i('value=%j', h.defaults[e]) - : i('value=null'), - i('while(r.pos>>3){' - )( - 'case 1: k=r.%s(); break', - r.keyType - )('case 2:'), - h.basic[e] === g - ? i('value=types[%i].decode(r,r.uint32())', n) - : i('value=r.%s()', e), - i('break')('default:')('r.skipType(tag2&7)')('break')('}')( - '}' - ), - h.long[r.keyType] !== g - ? i( - '%s[typeof k==="object"?util.longToHash(k):k]=value', - s - ) - : i('%s[k]=value', s)) - : r.repeated - ? (i('if(!(%s&&%s.length))', s, s)('%s=[]', s), - h.packed[e] !== g && - i('if((t&7)===2){')('var c2=r.uint32()+r.pos')( - 'while(r.pos>> 0, - 8 | c.mapKey[s.keyType], - s.keyType - ), - h === g - ? n( - 'types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()', - u, - i - ) - : n('.uint32(%i).%s(%s[ks[i]]).ldelim()', 16 | h, o, i), - n('}')('}')) - : s.repeated - ? (n('if(%s!=null&&%s.length){', i, i), - s.packed && c.packed[o] !== g - ? n('w.uint32(%i).fork()', ((s.id << 3) | 2) >>> 0)( - 'for(var i=0;i<%s.length;++i)', - i - )( - 'w.%s(%s[i])', - o, - i - )('w.ldelim()') - : (n('for(var i=0;i<%s.length;++i)', i), - h === g - ? l(n, s, u, i + '[i]') - : n( - 'w.uint32(%i).%s(%s[i])', - ((s.id << 3) | h) >>> 0, - o, - i - )), - n('}')) - : (s.optional && - n( - 'if(%s!=null&&Object.hasOwnProperty.call(m,%j))', - i, - s.name - ), - h === g - ? l(n, s, u, i) - : n( - 'w.uint32(%i).%s(%s)', - ((s.id << 3) | h) >>> 0, - o, - i - )); - } - return n('return w'); - }; - var f = t(14), - c = t(32), - a = t(33); - function l(t, i, n, r) { - i.resolvedType.group - ? t( - 'types[%i].encode(%s,w.uint32(%i)).uint32(%i)', - n, - r, - ((i.id << 3) | 3) >>> 0, - ((i.id << 3) | 4) >>> 0 - ) - : t( - 'types[%i].encode(%s,w.uint32(%i).fork()).ldelim()', - n, - r, - ((i.id << 3) | 2) >>> 0 - ); - } - }, - { 14: 14, 32: 32, 33: 33 }, - ], - 14: [ - function (t, i, n) { - i.exports = s; - var h = t(22), - r = - ((((s.prototype = Object.create(h.prototype)).constructor = - s).className = 'Enum'), - t(21)), - e = t(33); - function s(t, i, n, r, e, s) { - if ((h.call(this, t, n), i && 'object' != typeof i)) - throw TypeError('values must be an object'); - if ( - ((this.valuesById = {}), - (this.values = Object.create(this.valuesById)), - (this.comment = r), - (this.comments = e || {}), - (this.valuesOptions = s), - (this.reserved = g), - i) - ) - for (var u = Object.keys(i), o = 0; o < u.length; ++o) - 'number' == typeof i[u[o]] && - (this.valuesById[(this.values[u[o]] = i[u[o]])] = u[o]); - } - (s.fromJSON = function (t, i) { - t = new s(t, i.values, i.options, i.comment, i.comments); - return (t.reserved = i.reserved), t; - }), - (s.prototype.toJSON = function (t) { - t = !!t && !!t.keepComments; - return e.toObject([ - 'options', - this.options, - 'valuesOptions', - this.valuesOptions, - 'values', - this.values, - 'reserved', - this.reserved && this.reserved.length ? this.reserved : g, - 'comment', - t ? this.comment : g, - 'comments', - t ? this.comments : g, - ]); - }), - (s.prototype.add = function (t, i, n, r) { - if (!e.isString(t)) throw TypeError('name must be a string'); - if (!e.isInteger(i)) throw TypeError('id must be an integer'); - if (this.values[t] !== g) - throw Error("duplicate name '" + t + "' in " + this); - if (this.isReservedId(i)) - throw Error('id ' + i + ' is reserved in ' + this); - if (this.isReservedName(t)) - throw Error("name '" + t + "' is reserved in " + this); - if (this.valuesById[i] !== g) { - if (!this.options || !this.options.allow_alias) - throw Error('duplicate id ' + i + ' in ' + this); - this.values[t] = i; - } else this.valuesById[(this.values[t] = i)] = t; - return ( - r && - (this.valuesOptions === g && (this.valuesOptions = {}), - (this.valuesOptions[t] = r || null)), - (this.comments[t] = n || null), - this - ); - }), - (s.prototype.remove = function (t) { - if (!e.isString(t)) throw TypeError('name must be a string'); - var i = this.values[t]; - if (null == i) - throw Error("name '" + t + "' does not exist in " + this); - return ( - delete this.valuesById[i], - delete this.values[t], - delete this.comments[t], - this.valuesOptions && delete this.valuesOptions[t], - this - ); - }), - (s.prototype.isReservedId = function (t) { - return r.isReservedId(this.reserved, t); - }), - (s.prototype.isReservedName = function (t) { - return r.isReservedName(this.reserved, t); - }); - }, - { 21: 21, 22: 22, 33: 33 }, - ], - 15: [ - function (t, i, n) { - i.exports = u; - var r, - o = t(22), - e = - ((((u.prototype = Object.create(o.prototype)).constructor = - u).className = 'Field'), - t(14)), - h = t(32), - f = t(33), - c = /^required|optional|repeated$/; - function u(t, i, n, r, e, s, u) { - if ( - (f.isObject(r) - ? ((u = e), (s = r), (r = e = g)) - : f.isObject(e) && ((u = s), (s = e), (e = g)), - o.call(this, t, s), - !f.isInteger(i) || i < 0) - ) - throw TypeError('id must be a non-negative integer'); - if (!f.isString(n)) throw TypeError('type must be a string'); - if (r !== g && !c.test((r = r.toString().toLowerCase()))) - throw TypeError('rule must be a string rule'); - if (e !== g && !f.isString(e)) - throw TypeError('extend must be a string'); - (this.rule = - (r = 'proto3_optional' === r ? 'optional' : r) && 'optional' !== r - ? r - : g), - (this.type = n), - (this.id = i), - (this.extend = e || g), - (this.required = 'required' === r), - (this.optional = !this.required), - (this.repeated = 'repeated' === r), - (this.map = !1), - (this.message = null), - (this.partOf = null), - (this.typeDefault = null), - (this.defaultValue = null), - (this.long = !!f.Long && h.long[n] !== g), - (this.bytes = 'bytes' === n), - (this.resolvedType = null), - (this.extensionField = null), - (this.declaringField = null), - (this.n = null), - (this.comment = u); - } - (u.fromJSON = function (t, i) { - return new u( - t, - i.id, - i.type, - i.rule, - i.extend, - i.options, - i.comment - ); - }), - Object.defineProperty(u.prototype, 'packed', { - get: function () { - return ( - null === this.n && (this.n = !1 !== this.getOption('packed')), - this.n - ); - }, - }), - (u.prototype.setOption = function (t, i, n) { - return ( - 'packed' === t && (this.n = null), - o.prototype.setOption.call(this, t, i, n) - ); - }), - (u.prototype.toJSON = function (t) { - t = !!t && !!t.keepComments; - return f.toObject([ - 'rule', - ('optional' !== this.rule && this.rule) || g, - 'type', - this.type, - 'id', - this.id, - 'extend', - this.extend, - 'options', - this.options, - 'comment', - t ? this.comment : g, - ]); - }), - (u.prototype.resolve = function () { - var t; - return this.resolved - ? this - : ((this.typeDefault = h.defaults[this.type]) === g - ? ((this.resolvedType = ( - this.declaringField || this - ).parent.lookupTypeOrEnum(this.type)), - this.resolvedType instanceof r - ? (this.typeDefault = null) - : (this.typeDefault = - this.resolvedType.values[ - Object.keys(this.resolvedType.values)[0] - ])) - : this.options && - this.options.proto3_optional && - (this.typeDefault = null), - this.options && - null != this.options.default && - ((this.typeDefault = this.options.default), - this.resolvedType instanceof e && - 'string' == typeof this.typeDefault && - (this.typeDefault = - this.resolvedType.values[this.typeDefault])), - this.options && - ((!0 !== this.options.packed && - (this.options.packed === g || - !this.resolvedType || - this.resolvedType instanceof e)) || - delete this.options.packed, - Object.keys(this.options).length || (this.options = g)), - this.long - ? ((this.typeDefault = f.Long.fromNumber( - this.typeDefault, - 'u' == (this.type[0] || '') - )), - Object.freeze && Object.freeze(this.typeDefault)) - : this.bytes && - 'string' == typeof this.typeDefault && - (f.base64.test(this.typeDefault) - ? f.base64.decode( - this.typeDefault, - (t = f.newBuffer( - f.base64.length(this.typeDefault) - )), - 0 - ) - : f.utf8.write( - this.typeDefault, - (t = f.newBuffer(f.utf8.length(this.typeDefault))), - 0 - ), - (this.typeDefault = t)), - this.map - ? (this.defaultValue = f.emptyObject) - : this.repeated - ? (this.defaultValue = f.emptyArray) - : (this.defaultValue = this.typeDefault), - this.parent instanceof r && - (this.parent.ctor.prototype[this.name] = this.defaultValue), - o.prototype.resolve.call(this)); - }), - (u.d = function (n, r, e, s) { - return ( - 'function' == typeof r - ? (r = f.decorateType(r).name) - : r && 'object' == typeof r && (r = f.decorateEnum(r).name), - function (t, i) { - f.decorateType(t.constructor).add( - new u(i, n, r, e, { default: s }) - ); + return o && (s[u++] = f[r], s[u++] = 61, 1 === o && (s[u++] = 61)), e ? (u && e.push(String.fromCharCode.apply(String, s.slice(0, u))), e.join("")) : String.fromCharCode.apply(String, s.slice(0, u)) + }; + var c = "invalid encoding"; + n.decode = function (t, i, n) { + for (var r, e = n, s = 0, u = 0; u < t.length;) { + var o = t.charCodeAt(u++); + if (61 == o && 1 < s) break; + if ((o = h[o]) === g) throw Error(c); + switch (s) { + case 0: + r = o, s = 1; + break; + case 1: + i[n++] = r << 2 | (48 & o) >> 4, r = o, s = 2; + break; + case 2: + i[n++] = (15 & r) << 4 | (60 & o) >> 2, r = o, s = 3; + break; + case 3: + i[n++] = (3 & r) << 6 | o, s = 0 + } } - ); - }), - (u.r = function (t) { - r = t; - }); - }, - { 14: 14, 22: 22, 32: 32, 33: 33 }, - ], - 16: [ - function (t, i, n) { - var r = (i.exports = t(17)); - (r.build = 'light'), - (r.load = function (t, i, n) { - return (i = - 'function' == typeof i - ? ((n = i), new r.Root()) - : i || new r.Root()).load(t, n); - }), - (r.loadSync = function (t, i) { - return (i = i || new r.Root()).loadSync(t); - }), - (r.encoder = t(13)), - (r.decoder = t(12)), - (r.verifier = t(36)), - (r.converter = t(11)), - (r.ReflectionObject = t(22)), - (r.Namespace = t(21)), - (r.Root = t(26)), - (r.Enum = t(14)), - (r.Type = t(31)), - (r.Field = t(15)), - (r.OneOf = t(23)), - (r.MapField = t(18)), - (r.Service = t(30)), - (r.Method = t(20)), - (r.Message = t(19)), - (r.wrappers = t(37)), - (r.types = t(32)), - (r.util = t(33)), - r.ReflectionObject.r(r.Root), - r.Namespace.r(r.Type, r.Service, r.Enum), - r.Root.r(r.Type), - r.Field.r(r.Type); - }, - { - 11: 11, - 12: 12, - 13: 13, - 14: 14, - 15: 15, - 17: 17, - 18: 18, - 19: 19, - 20: 20, - 21: 21, - 22: 22, - 23: 23, - 26: 26, - 30: 30, - 31: 31, - 32: 32, - 33: 33, - 36: 36, - 37: 37, - }, - ], - 17: [ - function (t, i, n) { - var r = n; - function e() { - r.util.r(), r.Writer.r(r.BufferWriter), r.Reader.r(r.BufferReader); - } - (r.build = 'minimal'), - (r.Writer = t(38)), - (r.BufferWriter = t(39)), - (r.Reader = t(24)), - (r.BufferReader = t(25)), - (r.util = t(35)), - (r.rpc = t(28)), - (r.roots = t(27)), - (r.configure = e), - e(); - }, - { 24: 24, 25: 25, 27: 27, 28: 28, 35: 35, 38: 38, 39: 39 }, - ], - 18: [ - function (t, i, n) { - i.exports = s; - var u = t(15), - r = - ((((s.prototype = Object.create(u.prototype)).constructor = - s).className = 'MapField'), - t(32)), - o = t(33); - function s(t, i, n, r, e, s) { - if ((u.call(this, t, i, r, g, g, e, s), !o.isString(n))) - throw TypeError('keyType must be a string'); - (this.keyType = n), (this.resolvedKeyType = null), (this.map = !0); - } - (s.fromJSON = function (t, i) { - return new s(t, i.id, i.keyType, i.type, i.options, i.comment); - }), - (s.prototype.toJSON = function (t) { - t = !!t && !!t.keepComments; - return o.toObject([ - 'keyType', - this.keyType, - 'type', - this.type, - 'id', - this.id, - 'extend', - this.extend, - 'options', - this.options, - 'comment', - t ? this.comment : g, - ]); - }), - (s.prototype.resolve = function () { - if (this.resolved) return this; - if (r.mapKey[this.keyType] === g) - throw Error('invalid key type: ' + this.keyType); - return u.prototype.resolve.call(this); - }), - (s.d = function (n, r, e) { - return ( - 'function' == typeof e - ? (e = o.decorateType(e).name) - : e && 'object' == typeof e && (e = o.decorateEnum(e).name), - function (t, i) { - o.decorateType(t.constructor).add(new s(i, n, r, e)); + if (1 === s) throw Error(c); + return n - e + }, n.test = function (t) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t) + } + }, {}], 3: [function (t, i, n) { + function a(i, n) { + "string" == typeof i && (n = i, i = g); + var h = []; + + function f(t) { + if ("string" != typeof t) { + var i = c(); + if (a.verbose && console.log("codegen: " + i), i = "return " + i, t) { + for (var n = Object.keys(t), r = Array(n.length + 1), e = Array(n.length), s = 0; s < n.length;) r[s] = n[s], e[s] = t[n[s++]]; + return r[s] = i, Function.apply(null, r).apply(null, e) + } + return Function(i)() + } + for (var u = Array(arguments.length - 1), o = 0; o < u.length;) u[o] = arguments[++o]; + if (o = 0, t = t.replace(/%([%dfijs])/g, function (t, i) { + var n = u[o++]; + switch (i) { + case"d": + case"f": + return "" + +("" + n); + case"i": + return "" + Math.floor(n); + case"j": + return JSON.stringify(n); + case"s": + return "" + n + } + return "%" + }), o !== u.length) throw Error("parameter count mismatch"); + return h.push(t), f } - ); - }); - }, - { 15: 15, 32: 32, 33: 33 }, - ], - 19: [ - function (t, i, n) { - i.exports = e; - var r = t(35); - function e(t) { - if (t) - for (var i = Object.keys(t), n = 0; n < i.length; ++n) - this[i[n]] = t[i[n]]; - } - (e.create = function (t) { - return this.$type.create(t); - }), - (e.encode = function (t, i) { - return this.$type.encode(t, i); - }), - (e.encodeDelimited = function (t, i) { - return this.$type.encodeDelimited(t, i); - }), - (e.decode = function (t) { - return this.$type.decode(t); - }), - (e.decodeDelimited = function (t) { - return this.$type.decodeDelimited(t); - }), - (e.verify = function (t) { - return this.$type.verify(t); - }), - (e.fromObject = function (t) { - return this.$type.fromObject(t); - }), - (e.toObject = function (t, i) { - return this.$type.toObject(t, i); - }), - (e.prototype.toJSON = function () { - return this.$type.toObject(this, r.toJSONOptions); - }); - }, - { 35: 35 }, - ], - 20: [ - function (t, i, n) { - i.exports = r; - var f = t(22), - c = - ((((r.prototype = Object.create(f.prototype)).constructor = - r).className = 'Method'), - t(33)); - function r(t, i, n, r, e, s, u, o, h) { - if ( - (c.isObject(e) - ? ((u = e), (e = s = g)) - : c.isObject(s) && ((u = s), (s = g)), - i !== g && !c.isString(i)) - ) - throw TypeError('type must be a string'); - if (!c.isString(n)) throw TypeError('requestType must be a string'); - if (!c.isString(r)) - throw TypeError('responseType must be a string'); - f.call(this, t, u), - (this.type = i || 'rpc'), - (this.requestType = n), - (this.requestStream = !!e || g), - (this.responseType = r), - (this.responseStream = !!s || g), - (this.resolvedRequestType = null), - (this.resolvedResponseType = null), - (this.comment = o), - (this.parsedOptions = h); - } - (r.fromJSON = function (t, i) { - return new r( - t, - i.type, - i.requestType, - i.responseType, - i.requestStream, - i.responseStream, - i.options, - i.comment, - i.parsedOptions - ); - }), - (r.prototype.toJSON = function (t) { - t = !!t && !!t.keepComments; - return c.toObject([ - 'type', - ('rpc' !== this.type && this.type) || g, - 'requestType', - this.requestType, - 'requestStream', - this.requestStream, - 'responseType', - this.responseType, - 'responseStream', - this.responseStream, - 'options', - this.options, - 'comment', - t ? this.comment : g, - 'parsedOptions', - this.parsedOptions, - ]); - }), - (r.prototype.resolve = function () { - return this.resolved - ? this - : ((this.resolvedRequestType = this.parent.lookupType( - this.requestType - )), - (this.resolvedResponseType = this.parent.lookupType( - this.responseType - )), - f.prototype.resolve.call(this)); - }); - }, - { 22: 22, 33: 33 }, - ], - 21: [ - function (t, i, n) { - i.exports = a; - var e, - s, - u, - r = t(22), - o = - ((((a.prototype = Object.create(r.prototype)).constructor = - a).className = 'Namespace'), - t(15)), - h = t(33), - f = t(23); - function c(t, i) { - if (!t || !t.length) return g; - for (var n = {}, r = 0; r < t.length; ++r) - n[t[r].name] = t[r].toJSON(i); - return n; - } - function a(t, i) { - r.call(this, t, i), (this.nested = g), (this.e = null); - } - function l(t) { - return (t.e = null), t; - } - (a.fromJSON = function (t, i) { - return new a(t, i.options).addJSON(i.nested); - }), - (a.arrayToJSON = c), - (a.isReservedId = function (t, i) { - if (t) - for (var n = 0; n < t.length; ++n) - if ('string' != typeof t[n] && t[n][0] <= i && t[n][1] > i) - return !0; - return !1; - }), - (a.isReservedName = function (t, i) { - if (t) - for (var n = 0; n < t.length; ++n) if (t[n] === i) return !0; - return !1; - }), - Object.defineProperty(a.prototype, 'nestedArray', { - get: function () { - return this.e || (this.e = h.toArray(this.nested)); - }, - }), - (a.prototype.toJSON = function (t) { - return h.toObject([ - 'options', - this.options, - 'nested', - c(this.nestedArray, t), - ]); - }), - (a.prototype.addJSON = function (t) { - if (t) - for (var i, n = Object.keys(t), r = 0; r < n.length; ++r) - (i = t[n[r]]), - this.add( - (i.fields !== g - ? e - : i.values !== g - ? u - : i.methods !== g - ? s - : i.id !== g - ? o - : a - ).fromJSON(n[r], i) - ); - return this; - }), - (a.prototype.get = function (t) { - return (this.nested && this.nested[t]) || null; - }), - (a.prototype.getEnum = function (t) { - if (this.nested && this.nested[t] instanceof u) - return this.nested[t].values; - throw Error('no such enum: ' + t); - }), - (a.prototype.add = function (t) { - if ( - !( - (t instanceof o && t.extend !== g) || - t instanceof e || - t instanceof f || - t instanceof u || - t instanceof s || - t instanceof a - ) - ) - throw TypeError('object must be a valid nested object'); - if (this.nested) { - var i = this.get(t.name); + + function c(t) { + return "function " + (t || n || "") + "(" + (i && i.join(",") || "") + "){\n " + h.join("\n ") + "\n}" + } + + return f.toString = c, f + } + + (i.exports = a).verbose = !1 + }, {}], 4: [function (t, i, n) { + function r() { + this.t = {} + } + + (i.exports = r).prototype.on = function (t, i, n) { + return (this.t[t] || (this.t[t] = [])).push({fn: i, ctx: n || this}), this + }, r.prototype.off = function (t, i) { + if (t === g) this.t = {}; else if (i === g) this.t[t] = []; else for (var n = this.t[t], r = 0; r < n.length;) n[r].fn === i ? n.splice(r, 1) : ++r; + return this + }, r.prototype.emit = function (t) { + var i = this.t[t]; if (i) { - if ( - !(i instanceof a && t instanceof a) || - i instanceof e || - i instanceof s - ) - throw Error("duplicate name '" + t.name + "' in " + this); - for (var n = i.nestedArray, r = 0; r < n.length; ++r) - t.add(n[r]); - this.remove(i), - this.nested || (this.nested = {}), - t.setOptions(i.options, !0); + for (var n = [], r = 1; r < arguments.length;) n.push(arguments[r++]); + for (r = 0; r < i.length;) i[r].fn.apply(i[r++].ctx, n) } - } else this.nested = {}; - return (this.nested[t.name] = t).onAdd(this), l(this); - }), - (a.prototype.remove = function (t) { - if (!(t instanceof r)) - throw TypeError('object must be a ReflectionObject'); - if (t.parent !== this) - throw Error(t + ' is not a member of ' + this); - return ( - delete this.nested[t.name], - Object.keys(this.nested).length || (this.nested = g), - t.onRemove(this), - l(this) - ); - }), - (a.prototype.define = function (t, i) { - if (h.isString(t)) t = t.split('.'); - else if (!Array.isArray(t)) throw TypeError('illegal path'); - if (t && t.length && '' === t[0]) - throw Error('path must be relative'); - for (var n = this; 0 < t.length; ) { - var r = t.shift(); - if (n.nested && n.nested[r]) { - if (!((n = n.nested[r]) instanceof a)) - throw Error('path conflicts with non-namespace objects'); - } else n.add((n = new a(r))); - } - return i && n.addJSON(i), n; - }), - (a.prototype.resolveAll = function () { - for (var t = this.nestedArray, i = 0; i < t.length; ) - t[i] instanceof a ? t[i++].resolveAll() : t[i++].resolve(); - return this.resolve(); - }), - (a.prototype.lookup = function (t, i, n) { - if ( - ('boolean' == typeof i - ? ((n = i), (i = g)) - : i && !Array.isArray(i) && (i = [i]), - h.isString(t) && t.length) - ) { - if ('.' === t) return this.root; - t = t.split('.'); - } else if (!t.length) return this; - if ('' === t[0]) return this.root.lookup(t.slice(1), i); - var r = this.get(t[0]); - if (r) { - if (1 === t.length) { - if (!i || ~i.indexOf(r.constructor)) return r; - } else if (r instanceof a && (r = r.lookup(t.slice(1), i, !0))) - return r; - } else - for (var e = 0; e < this.nestedArray.length; ++e) - if ( - this.e[e] instanceof a && - (r = this.e[e].lookup(t, i, !0)) - ) - return r; - return null === this.parent || n - ? null - : this.parent.lookup(t, i); - }), - (a.prototype.lookupType = function (t) { - var i = this.lookup(t, [e]); - if (i) return i; - throw Error('no such type: ' + t); - }), - (a.prototype.lookupEnum = function (t) { - var i = this.lookup(t, [u]); - if (i) return i; - throw Error("no such Enum '" + t + "' in " + this); - }), - (a.prototype.lookupTypeOrEnum = function (t) { - var i = this.lookup(t, [e, u]); - if (i) return i; - throw Error("no such Type or Enum '" + t + "' in " + this); - }), - (a.prototype.lookupService = function (t) { - var i = this.lookup(t, [s]); - if (i) return i; - throw Error("no such Service '" + t + "' in " + this); - }), - (a.r = function (t, i, n) { - (e = t), (s = i), (u = n); - }); - }, - { 15: 15, 22: 22, 23: 23, 33: 33 }, - ], - 22: [ - function (t, i, n) { - (i.exports = e).className = 'ReflectionObject'; - var r, - u = t(33); - function e(t, i) { - if (!u.isString(t)) throw TypeError('name must be a string'); - if (i && !u.isObject(i)) - throw TypeError('options must be an object'); - (this.options = i), - (this.parsedOptions = null), - (this.name = t), - (this.parent = null), - (this.resolved = !1), - (this.comment = null), - (this.filename = null); - } - Object.defineProperties(e.prototype, { - root: { - get: function () { - for (var t = this; null !== t.parent; ) t = t.parent; - return t; - }, - }, - fullName: { - get: function () { - for (var t = [this.name], i = this.parent; i; ) - t.unshift(i.name), (i = i.parent); - return t.join('.'); - }, - }, - }), - (e.prototype.toJSON = function () { - throw Error(); - }), - (e.prototype.onAdd = function (t) { - this.parent && this.parent !== t && this.parent.remove(this), - (this.parent = t), - (this.resolved = !1); - t = t.root; - t instanceof r && t.u(this); - }), - (e.prototype.onRemove = function (t) { - t = t.root; - t instanceof r && t.o(this), - (this.parent = null), - (this.resolved = !1); - }), - (e.prototype.resolve = function () { - return ( - this.resolved || - (this.root instanceof r && (this.resolved = !0)), - this - ); - }), - (e.prototype.getOption = function (t) { - return this.options ? this.options[t] : g; - }), - (e.prototype.setOption = function (t, i, n) { - return ( - (n && this.options && this.options[t] !== g) || - ((this.options || (this.options = {}))[t] = i), - this - ); - }), - (e.prototype.setParsedOption = function (i, t, n) { - this.parsedOptions || (this.parsedOptions = []); - var r, - e, - s = this.parsedOptions; - return ( - n - ? (r = s.find(function (t) { - return Object.prototype.hasOwnProperty.call(t, i); - })) - ? ((e = r[i]), u.setProperty(e, n, t)) - : (((r = {})[i] = u.setProperty({}, n, t)), s.push(r)) - : (((e = {})[i] = t), s.push(e)), - this - ); - }), - (e.prototype.setOptions = function (t, i) { - if (t) - for (var n = Object.keys(t), r = 0; r < n.length; ++r) - this.setOption(n[r], t[n[r]], i); - return this; - }), - (e.prototype.toString = function () { - var t = this.constructor.className, - i = this.fullName; - return i.length ? t + ' ' + i : t; - }), - (e.r = function (t) { - r = t; - }); - }, - { 33: 33 }, - ], - 23: [ - function (t, i, n) { - i.exports = u; - var e = t(22), - r = - ((((u.prototype = Object.create(e.prototype)).constructor = - u).className = 'OneOf'), - t(15)), - s = t(33); - function u(t, i, n, r) { - if ( - (Array.isArray(i) || ((n = i), (i = g)), - e.call(this, t, n), - i !== g && !Array.isArray(i)) - ) - throw TypeError('fieldNames must be an Array'); - (this.oneof = i || []), (this.fieldsArray = []), (this.comment = r); - } - function o(t) { - if (t.parent) - for (var i = 0; i < t.fieldsArray.length; ++i) - t.fieldsArray[i].parent || t.parent.add(t.fieldsArray[i]); - } - (u.fromJSON = function (t, i) { - return new u(t, i.oneof, i.options, i.comment); - }), - (u.prototype.toJSON = function (t) { - t = !!t && !!t.keepComments; - return s.toObject([ - 'options', - this.options, - 'oneof', - this.oneof, - 'comment', - t ? this.comment : g, - ]); - }), - (u.prototype.add = function (t) { - if (t instanceof r) - return ( - t.parent && t.parent !== this.parent && t.parent.remove(t), - this.oneof.push(t.name), - this.fieldsArray.push(t), - o((t.partOf = this)), - this - ); - throw TypeError('field must be a Field'); - }), - (u.prototype.remove = function (t) { - if (!(t instanceof r)) throw TypeError('field must be a Field'); - var i = this.fieldsArray.indexOf(t); - if (i < 0) throw Error(t + ' is not a member of ' + this); - return ( - this.fieldsArray.splice(i, 1), - -1 < (i = this.oneof.indexOf(t.name)) && - this.oneof.splice(i, 1), - (t.partOf = null), - this - ); - }), - (u.prototype.onAdd = function (t) { - e.prototype.onAdd.call(this, t); - for (var i = 0; i < this.oneof.length; ++i) { - var n = t.get(this.oneof[i]); - n && !n.partOf && (n.partOf = this).fieldsArray.push(n); - } - o(this); - }), - (u.prototype.onRemove = function (t) { - for (var i, n = 0; n < this.fieldsArray.length; ++n) - (i = this.fieldsArray[n]).parent && i.parent.remove(i); - e.prototype.onRemove.call(this, t); - }), - (u.d = function () { - for ( - var n = Array(arguments.length), t = 0; - t < arguments.length; - - ) - n[t] = arguments[t++]; - return function (t, i) { - s.decorateType(t.constructor).add(new u(i, n)), - Object.defineProperty(t, i, { - get: s.oneOfGetter(n), - set: s.oneOfSetter(n), - }); - }; - }); - }, - { 15: 15, 22: 22, 33: 33 }, - ], - 24: [ - function (t, i, n) { - i.exports = h; - var r, - e = t(35), - s = e.LongBits, - u = e.utf8; - function o(t, i) { - return RangeError( - 'index out of range: ' + t.pos + ' + ' + (i || 1) + ' > ' + t.len - ); - } - function h(t) { - (this.buf = t), (this.pos = 0), (this.len = t.length); - } - function f() { - return e.Buffer - ? function (t) { - return (h.create = function (t) { - return e.Buffer.isBuffer(t) ? new r(t) : a(t); - })(t); - } - : a; - } - var c, - a = - 'undefined' != typeof Uint8Array - ? function (t) { - if (t instanceof Uint8Array || Array.isArray(t)) - return new h(t); - throw Error('illegal buffer'); - } - : function (t) { - if (Array.isArray(t)) return new h(t); - throw Error('illegal buffer'); - }; - function l() { - var t = new s(0, 0), - i = 0; - if (!(4 < this.len - this.pos)) { - for (; i < 3; ++i) { - if (this.pos >= this.len) throw o(this); - if ( - ((t.lo = - (t.lo | ((127 & this.buf[this.pos]) << (7 * i))) >>> 0), - this.buf[this.pos++] < 128) - ) - return t; - } - return ( - (t.lo = - (t.lo | ((127 & this.buf[this.pos++]) << (7 * i))) >>> 0), - t - ); + return this } - for (; i < 4; ++i) - if ( - ((t.lo = - (t.lo | ((127 & this.buf[this.pos]) << (7 * i))) >>> 0), - this.buf[this.pos++] < 128) - ) - return t; - if ( - ((t.lo = (t.lo | ((127 & this.buf[this.pos]) << 28)) >>> 0), - (t.hi = (t.hi | ((127 & this.buf[this.pos]) >> 4)) >>> 0), - this.buf[this.pos++] < 128) - ) - return t; - if (((i = 0), 4 < this.len - this.pos)) { - for (; i < 5; ++i) - if ( - ((t.hi = - (t.hi | ((127 & this.buf[this.pos]) << (7 * i + 3))) >>> 0), - this.buf[this.pos++] < 128) - ) - return t; - } else - for (; i < 5; ++i) { - if (this.pos >= this.len) throw o(this); - if ( - ((t.hi = - (t.hi | ((127 & this.buf[this.pos]) << (7 * i + 3))) >>> 0), - this.buf[this.pos++] < 128) - ) - return t; - } - throw Error('invalid varint encoding'); - } - function d(t, i) { - return ( - (t[i - 4] | - (t[i - 3] << 8) | - (t[i - 2] << 16) | - (t[i - 1] << 24)) >>> - 0 - ); - } - function v() { - if (this.pos + 8 > this.len) throw o(this, 8); - return new s( - d(this.buf, (this.pos += 4)), - d(this.buf, (this.pos += 4)) - ); - } - (h.create = f()), - (h.prototype.h = - e.Array.prototype.subarray || e.Array.prototype.slice), - (h.prototype.uint32 = - ((c = 4294967295), - function () { - if ( - ((c = (127 & this.buf[this.pos]) >>> 0), - this.buf[this.pos++] < 128 || - ((c = (c | ((127 & this.buf[this.pos]) << 7)) >>> 0), - this.buf[this.pos++] < 128 || - ((c = (c | ((127 & this.buf[this.pos]) << 14)) >>> 0), - this.buf[this.pos++] < 128 || - ((c = (c | ((127 & this.buf[this.pos]) << 21)) >>> 0), - this.buf[this.pos++] < 128 || - ((c = (c | ((15 & this.buf[this.pos]) << 28)) >>> 0), - this.buf[this.pos++] < 128 || - !((this.pos += 5) > this.len)))))) - ) - return c; - throw ((this.pos = this.len), o(this, 10)); - })), - (h.prototype.int32 = function () { - return 0 | this.uint32(); - }), - (h.prototype.sint32 = function () { - var t = this.uint32(); - return ((t >>> 1) ^ -(1 & t)) | 0; - }), - (h.prototype.bool = function () { - return 0 !== this.uint32(); - }), - (h.prototype.fixed32 = function () { - if (this.pos + 4 > this.len) throw o(this, 4); - return d(this.buf, (this.pos += 4)); - }), - (h.prototype.sfixed32 = function () { - if (this.pos + 4 > this.len) throw o(this, 4); - return 0 | d(this.buf, (this.pos += 4)); - }), - (h.prototype.float = function () { - if (this.pos + 4 > this.len) throw o(this, 4); - var t = e.float.readFloatLE(this.buf, this.pos); - return (this.pos += 4), t; - }), - (h.prototype.double = function () { - if (this.pos + 8 > this.len) throw o(this, 4); - var t = e.float.readDoubleLE(this.buf, this.pos); - return (this.pos += 8), t; - }), - (h.prototype.bytes = function () { - var t = this.uint32(), - i = this.pos, - n = this.pos + t; - if (n > this.len) throw o(this, t); - return ( - (this.pos += t), - Array.isArray(this.buf) - ? this.buf.slice(i, n) - : i === n - ? new this.buf.constructor(0) - : this.h.call(this.buf, i, n) - ); - }), - (h.prototype.string = function () { - var t = this.bytes(); - return u.read(t, 0, t.length); - }), - (h.prototype.skip = function (t) { - if ('number' == typeof t) { - if (this.pos + t > this.len) throw o(this, t); - this.pos += t; - } else - do { - if (this.pos >= this.len) throw o(this); - } while (128 & this.buf[this.pos++]); - return this; - }), - (h.prototype.skipType = function (t) { - switch (t) { - case 0: - this.skip(); - break; - case 1: - this.skip(8); - break; - case 2: - this.skip(this.uint32()); - break; - case 3: - for (; 4 != (t = 7 & this.uint32()); ) this.skipType(t); - break; - case 5: - this.skip(4); - break; - default: - throw Error( - 'invalid wire type ' + t + ' at offset ' + this.pos - ); - } - return this; - }), - (h.r = function (t) { - (r = t), (h.create = f()), r.r(); - var i = e.Long ? 'toLong' : 'toNumber'; - e.merge(h.prototype, { - int64: function () { - return l.call(this)[i](!1); - }, - uint64: function () { - return l.call(this)[i](!0); - }, - sint64: function () { - return l.call(this).zzDecode()[i](!1); - }, - fixed64: function () { - return v.call(this)[i](!0); - }, - sfixed64: function () { - return v.call(this)[i](!1); - }, - }); - }); - }, - { 35: 35 }, - ], - 25: [ - function (t, i, n) { - i.exports = s; - var r = t(24), - e = - (((s.prototype = Object.create(r.prototype)).constructor = s), - t(35)); - function s(t) { - r.call(this, t); - } - (s.r = function () { - e.Buffer && (s.prototype.h = e.Buffer.prototype.slice); - }), - (s.prototype.string = function () { - var t = this.uint32(); - return this.buf.utf8Slice - ? this.buf.utf8Slice( - this.pos, - (this.pos = Math.min(this.pos + t, this.len)) - ) - : this.buf.toString( - 'utf-8', - this.pos, - (this.pos = Math.min(this.pos + t, this.len)) - ); - }), - s.r(); - }, - { 24: 24, 35: 35 }, - ], - 26: [ - function (t, i, n) { - i.exports = h; - var r, - d, - v, - e = t(21), - s = - ((((h.prototype = Object.create(e.prototype)).constructor = - h).className = 'Root'), - t(15)), - u = t(14), - o = t(23), - b = t(33); - function h(t) { - e.call(this, '', t), (this.deferred = []), (this.files = []); - } - function p() {} - (h.fromJSON = function (t, i) { - return ( - (i = i || new h()), - t.options && i.setOptions(t.options), - i.addJSON(t.nested) - ); - }), - (h.prototype.resolvePath = b.path.resolve), - (h.prototype.fetch = b.fetch), - (h.prototype.load = function t(i, s, e) { - 'function' == typeof s && ((e = s), (s = g)); - var u = this; - if (!e) return b.asPromise(t, u, i, s); - var o = e === p; - function h(t, i) { - if (e) { - var n = e; - if (((e = null), o)) throw t; - n(t, i); + }, {}], 5: [function (t, i, n) { + i.exports = o; + var s = t(1), u = t(7)("fs"); + + function o(n, r, e) { + return r = "function" == typeof r ? (e = r, {}) : r || {}, e ? !r.xhr && u && u.readFile ? u.readFile(n, function (t, i) { + return t && "undefined" != typeof XMLHttpRequest ? o.xhr(n, r, e) : t ? e(t) : e(null, r.binary ? i : i.toString("utf8")) + }) : o.xhr(n, r, e) : s(o, this, n, r) + } + + o.xhr = function (t, n, r) { + var e = new XMLHttpRequest; + e.onreadystatechange = function () { + if (4 !== e.readyState) return g; + if (0 !== e.status && 200 !== e.status) return r(Error("status " + e.status)); + if (n.binary) { + if (!(t = e.response)) for (var t = [], i = 0; i < e.responseText.length; ++i) t.push(255 & e.responseText.charCodeAt(i)); + return r(null, "undefined" != typeof Uint8Array ? new Uint8Array(t) : t) + } + return r(null, e.responseText) + }, n.binary && ("overrideMimeType" in e && e.overrideMimeType("text/plain; charset=x-user-defined"), e.responseType = "arraybuffer"), e.open("GET", t), e.send() + } + }, {1: 1, 7: 7}], 6: [function (t, i, n) { + function r(t) { + function i(t, i, n, r) { + var e = i < 0 ? 1 : 0; + t(0 === (i = e ? -i : i) ? 0 < 1 / i ? 0 : 2147483648 : isNaN(i) ? 2143289344 : 34028234663852886e22 < i ? (e << 31 | 2139095040) >>> 0 : i < 11754943508222875e-54 ? (e << 31 | Math.round(i / 1401298464324817e-60)) >>> 0 : (e << 31 | 127 + (t = Math.floor(Math.log(i) / Math.LN2)) << 23 | 8388607 & Math.round(i * Math.pow(2, -t) * 8388608)) >>> 0, n, r) } - } - function f(t) { - var i = t.lastIndexOf('google/protobuf/'); - if (-1 < i) { - t = t.substring(i); - if (t in v) return t; + + function n(t, i, n) { + t = t(i, n), i = 2 * (t >> 31) + 1, n = t >>> 23 & 255, t &= 8388607; + return 255 == n ? t ? NaN : 1 / 0 * i : 0 == n ? 1401298464324817e-60 * i * t : i * Math.pow(2, n - 150) * (8388608 + t) } - return null; - } - function c(t, i) { + + function r(t, i, n) { + o[0] = t, i[n] = h[0], i[n + 1] = h[1], i[n + 2] = h[2], i[n + 3] = h[3] + } + + function e(t, i, n) { + o[0] = t, i[n] = h[3], i[n + 1] = h[2], i[n + 2] = h[1], i[n + 3] = h[0] + } + + function s(t, i) { + return h[0] = t[i], h[1] = t[i + 1], h[2] = t[i + 2], h[3] = t[i + 3], o[0] + } + + function u(t, i) { + return h[3] = t[i], h[2] = t[i + 1], h[1] = t[i + 2], h[0] = t[i + 3], o[0] + } + + var o, h, f, c, a; + + function l(t, i, n, r, e, s) { + var u, o = r < 0 ? 1 : 0; + 0 === (r = o ? -r : r) ? (t(0, e, s + i), t(0 < 1 / r ? 0 : 2147483648, e, s + n)) : isNaN(r) ? (t(0, e, s + i), t(2146959360, e, s + n)) : 17976931348623157e292 < r ? (t(0, e, s + i), t((o << 31 | 2146435072) >>> 0, e, s + n)) : r < 22250738585072014e-324 ? (t((u = r / 5e-324) >>> 0, e, s + i), t((o << 31 | u / 4294967296) >>> 0, e, s + n)) : (t(4503599627370496 * (u = r * Math.pow(2, -(r = 1024 === (r = Math.floor(Math.log(r) / Math.LN2)) ? 1023 : r))) >>> 0, e, s + i), t((o << 31 | r + 1023 << 20 | 1048576 * u & 1048575) >>> 0, e, s + n)) + } + + function d(t, i, n, r, e) { + i = t(r, e + i), t = t(r, e + n), r = 2 * (t >> 31) + 1, e = t >>> 20 & 2047, n = 4294967296 * (1048575 & t) + i; + return 2047 == e ? n ? NaN : 1 / 0 * r : 0 == e ? 5e-324 * r * n : r * Math.pow(2, e - 1075) * (n + 4503599627370496) + } + + function v(t, i, n) { + f[0] = t, i[n] = c[0], i[n + 1] = c[1], i[n + 2] = c[2], i[n + 3] = c[3], i[n + 4] = c[4], i[n + 5] = c[5], i[n + 6] = c[6], i[n + 7] = c[7] + } + + function b(t, i, n) { + f[0] = t, i[n] = c[7], i[n + 1] = c[6], i[n + 2] = c[5], i[n + 3] = c[4], i[n + 4] = c[3], i[n + 5] = c[2], i[n + 6] = c[1], i[n + 7] = c[0] + } + + function p(t, i) { + return c[0] = t[i], c[1] = t[i + 1], c[2] = t[i + 2], c[3] = t[i + 3], c[4] = t[i + 4], c[5] = t[i + 5], c[6] = t[i + 6], c[7] = t[i + 7], f[0] + } + + function y(t, i) { + return c[7] = t[i], c[6] = t[i + 1], c[5] = t[i + 2], c[4] = t[i + 3], c[3] = t[i + 4], c[2] = t[i + 5], c[1] = t[i + 6], c[0] = t[i + 7], f[0] + } + + return "undefined" != typeof Float32Array ? (o = new Float32Array([-0]), h = new Uint8Array(o.buffer), a = 128 === h[3], t.writeFloatLE = a ? r : e, t.writeFloatBE = a ? e : r, t.readFloatLE = a ? s : u, t.readFloatBE = a ? u : s) : (t.writeFloatLE = i.bind(null, m), t.writeFloatBE = i.bind(null, w), t.readFloatLE = n.bind(null, g), t.readFloatBE = n.bind(null, j)), "undefined" != typeof Float64Array ? (f = new Float64Array([-0]), c = new Uint8Array(f.buffer), a = 128 === c[7], t.writeDoubleLE = a ? v : b, t.writeDoubleBE = a ? b : v, t.readDoubleLE = a ? p : y, t.readDoubleBE = a ? y : p) : (t.writeDoubleLE = l.bind(null, m, 0, 4), t.writeDoubleBE = l.bind(null, w, 4, 0), t.readDoubleLE = d.bind(null, g, 0, 4), t.readDoubleBE = d.bind(null, j, 4, 0)), t + } + + function m(t, i, n) { + i[n] = 255 & t, i[n + 1] = t >>> 8 & 255, i[n + 2] = t >>> 16 & 255, i[n + 3] = t >>> 24 + } + + function w(t, i, n) { + i[n] = t >>> 24, i[n + 1] = t >>> 16 & 255, i[n + 2] = t >>> 8 & 255, i[n + 3] = 255 & t + } + + function g(t, i) { + return (t[i] | t[i + 1] << 8 | t[i + 2] << 16 | t[i + 3] << 24) >>> 0 + } + + function j(t, i) { + return (t[i] << 24 | t[i + 1] << 16 | t[i + 2] << 8 | t[i + 3]) >>> 0 + } + + i.exports = r(r) + }, {}], 7: [function (t, i, n) { + function r(t) { try { - if ( - (b.isString(i) && - '{' == (i[0] || '') && - (i = JSON.parse(i)), - b.isString(i)) - ) { - d.filename = t; - var n, - r = d(i, u, s), - e = 0; - if (r.imports) - for (; e < r.imports.length; ++e) - (n = - f(r.imports[e]) || u.resolvePath(t, r.imports[e])) && - a(n); - if (r.weakImports) - for (e = 0; e < r.weakImports.length; ++e) - (n = - f(r.weakImports[e]) || - u.resolvePath(t, r.weakImports[e])) && a(n, !0); - } else u.setOptions(i.options).addJSON(i.nested); + var i = eval("require")(t); + if (i && (i.length || Object.keys(i).length)) return i } catch (t) { - h(t); } - o || l || h(null, u); - } - function a(n, r) { - if (!~u.files.indexOf(n)) - if ((u.files.push(n), n in v)) - o - ? c(n, v[n]) - : (++l, - setTimeout(function () { - --l, c(n, v[n]); - })); - else if (o) { - var t; - try { - t = b.fs.readFileSync(n).toString('utf8'); - } catch (t) { - return void (r || h(t)); - } - c(n, t); - } else - ++l, - u.fetch(n, function (t, i) { - --l, e && (t ? (r ? l || h(null, u) : h(t)) : c(n, i)); - }); - } - var l = 0; - b.isString(i) && (i = [i]); - for (var n, r = 0; r < i.length; ++r) - (n = u.resolvePath('', i[r])) && a(n); - return o ? u : (l || h(null, u), g); - }), - (h.prototype.loadSync = function (t, i) { - if (b.isNode) return this.load(t, i, p); - throw Error('not supported'); - }), - (h.prototype.resolveAll = function () { - if (this.deferred.length) - throw Error( - 'unresolvable extensions: ' + - this.deferred - .map(function (t) { - return ( - "'extend " + t.extend + "' in " + t.parent.fullName - ); - }) - .join(', ') - ); - return e.prototype.resolveAll.call(this); - }); - var f = /^[A-Z]/; - function c(t, i) { - var n, - r = i.parent.lookup(i.extend); - if (r) - return ( - (((n = new s( - i.fullName, - i.id, - i.type, - i.rule, - g, - i.options - )).declaringField = i).extensionField = n), - r.add(n), - 1 - ); - } - (h.prototype.u = function (t) { - if (t instanceof s) - t.extend === g || - t.extensionField || - c(0, t) || - this.deferred.push(t); - else if (t instanceof u) - f.test(t.name) && (t.parent[t.name] = t.values); - else if (!(t instanceof o)) { - if (t instanceof r) - for (var i = 0; i < this.deferred.length; ) - c(0, this.deferred[i]) ? this.deferred.splice(i, 1) : ++i; - for (var n = 0; n < t.nestedArray.length; ++n) this.u(t.e[n]); - f.test(t.name) && (t.parent[t.name] = t); + return null } - }), - (h.prototype.o = function (t) { - var i; - if (t instanceof s) - t.extend !== g && - (t.extensionField - ? (t.extensionField.parent.remove(t.extensionField), - (t.extensionField = null)) - : -1 < (i = this.deferred.indexOf(t)) && - this.deferred.splice(i, 1)); - else if (t instanceof u) - f.test(t.name) && delete t.parent[t.name]; - else if (t instanceof e) { - for (var n = 0; n < t.nestedArray.length; ++n) this.o(t.e[n]); - f.test(t.name) && delete t.parent[t.name]; - } - }), - (h.r = function (t, i, n) { - (r = t), (d = i), (v = n); - }); - }, - { 14: 14, 15: 15, 21: 21, 23: 23, 33: 33 }, - ], - 27: [ - function (t, i, n) { - i.exports = {}; - }, - {}, - ], - 28: [ - function (t, i, n) { - n.Service = t(29); - }, - { 29: 29 }, - ], - 29: [ - function (t, i, n) { - i.exports = r; - var o = t(35); - function r(t, i, n) { - if ('function' != typeof t) - throw TypeError('rpcImpl must be a function'); - o.EventEmitter.call(this), - (this.rpcImpl = t), - (this.requestDelimited = !!i), - (this.responseDelimited = !!n); - } - (((r.prototype = Object.create( - o.EventEmitter.prototype - )).constructor = r).prototype.rpcCall = function t(n, i, r, e, s) { - if (!e) throw TypeError('request must be specified'); - var u = this; - if (!s) return o.asPromise(t, u, n, i, r, e); - if (!u.rpcImpl) - return ( - setTimeout(function () { - s(Error('already ended')); - }, 0), - g - ); - try { - return u.rpcImpl( - n, - i[u.requestDelimited ? 'encodeDelimited' : 'encode']( - e - ).finish(), - function (t, i) { - if (t) return u.emit('error', t, n), s(t); - if (null === i) return u.end(!0), g; - if (!(i instanceof r)) - try { - i = - r[u.responseDelimited ? 'decodeDelimited' : 'decode']( - i - ); - } catch (t) { - return u.emit('error', t, n), s(t); - } - return u.emit('data', i, n), s(null, i); - } - ); - } catch (t) { - return ( - u.emit('error', t, n), - setTimeout(function () { - s(t); - }, 0), - g - ); - } - }), - (r.prototype.end = function (t) { - return ( - this.rpcImpl && - (t || this.rpcImpl(null, null, null), - (this.rpcImpl = null), - this.emit('end').off()), - this - ); - }); - }, - { 35: 35 }, - ], - 30: [ - function (t, i, n) { - i.exports = u; - var r = t(21), - s = - ((((u.prototype = Object.create(r.prototype)).constructor = - u).className = 'Service'), - t(20)), - o = t(33), - h = t(28); - function u(t, i) { - r.call(this, t, i), (this.methods = {}), (this.f = null); - } - function e(t) { - return (t.f = null), t; - } - (u.fromJSON = function (t, i) { - var n = new u(t, i.options); - if (i.methods) - for (var r = Object.keys(i.methods), e = 0; e < r.length; ++e) - n.add(s.fromJSON(r[e], i.methods[r[e]])); - return i.nested && n.addJSON(i.nested), (n.comment = i.comment), n; - }), - (u.prototype.toJSON = function (t) { - var i = r.prototype.toJSON.call(this, t), - n = !!t && !!t.keepComments; - return o.toObject([ - 'options', - (i && i.options) || g, - 'methods', - r.arrayToJSON(this.methodsArray, t) || {}, - 'nested', - (i && i.nested) || g, - 'comment', - n ? this.comment : g, - ]); - }), - Object.defineProperty(u.prototype, 'methodsArray', { - get: function () { - return this.f || (this.f = o.toArray(this.methods)); - }, - }), - (u.prototype.get = function (t) { - return this.methods[t] || r.prototype.get.call(this, t); - }), - (u.prototype.resolveAll = function () { - for (var t = this.methodsArray, i = 0; i < t.length; ++i) - t[i].resolve(); - return r.prototype.resolve.call(this); - }), - (u.prototype.add = function (t) { - if (this.get(t.name)) - throw Error("duplicate name '" + t.name + "' in " + this); - return t instanceof s - ? e(((this.methods[t.name] = t).parent = this)) - : r.prototype.add.call(this, t); - }), - (u.prototype.remove = function (t) { - if (t instanceof s) { - if (this.methods[t.name] !== t) - throw Error(t + ' is not a member of ' + this); - return delete this.methods[t.name], (t.parent = null), e(this); - } - return r.prototype.remove.call(this, t); - }), - (u.prototype.create = function (t, i, n) { - for ( - var r, e = new h.Service(t, i, n), s = 0; - s < this.methodsArray.length; - ++s - ) { - var u = o - .lcFirst((r = this.f[s]).resolve().name) - .replace(/[^$\w_]/g, ''); - e[u] = o.codegen( - ['r', 'c'], - o.isReserved(u) ? u + '_' : u - )('return this.rpcCall(m,q,s,r,c)')({ - m: r, - q: r.resolvedRequestType.ctor, - s: r.resolvedResponseType.ctor, - }); - } - return e; - }); - }, - { 20: 20, 21: 21, 28: 28, 33: 33 }, - ], - 31: [ - function (t, i, n) { - i.exports = w; - var u = t(21), - o = - ((((w.prototype = Object.create(u.prototype)).constructor = - w).className = 'Type'), - t(14)), - h = t(23), - f = t(15), - c = t(18), - a = t(30), - e = t(19), - s = t(24), - l = t(38), - d = t(33), - v = t(13), - b = t(12), - p = t(36), - y = t(11), - m = t(37); - function w(t, i) { - u.call(this, t, i), - (this.fields = {}), - (this.oneofs = g), - (this.extensions = g), - (this.reserved = g), - (this.group = g), - (this.c = null), - (this.i = null), - (this.a = null), - (this.l = null); - } - function r(t) { - return ( - (t.c = t.i = t.a = null), - delete t.encode, - delete t.decode, - delete t.verify, - t - ); - } - Object.defineProperties(w.prototype, { - fieldsById: { - get: function () { - if (!this.c) { - this.c = {}; - for ( - var t = Object.keys(this.fields), i = 0; - i < t.length; - ++i - ) { - var n = this.fields[t[i]], - r = n.id; - if (this.c[r]) - throw Error('duplicate id ' + r + ' in ' + this); - this.c[r] = n; - } - } - return this.c; - }, - }, - fieldsArray: { - get: function () { - return this.i || (this.i = d.toArray(this.fields)); - }, - }, - oneofsArray: { - get: function () { - return this.a || (this.a = d.toArray(this.oneofs)); - }, - }, - ctor: { - get: function () { - return this.l || (this.ctor = w.generateConstructor(this)()); - }, - set: function (t) { - for ( - var i = t.prototype, - n = - (i instanceof e || - (((t.prototype = new e()).constructor = t), - d.merge(t.prototype, i)), - (t.$type = t.prototype.$type = this), - d.merge(t, e, !0), - (this.l = t), - 0); - n < this.fieldsArray.length; - ++n - ) - this.i[n].resolve(); - for (var r = {}, n = 0; n < this.oneofsArray.length; ++n) - r[this.a[n].resolve().name] = { - get: d.oneOfGetter(this.a[n].oneof), - set: d.oneOfSetter(this.a[n].oneof), - }; - n && Object.defineProperties(t.prototype, r); - }, - }, - }), - (w.generateConstructor = function (t) { - for ( - var i, n = d.codegen(['p'], t.name), r = 0; - r < t.fieldsArray.length; - ++r - ) - (i = t.i[r]).map - ? n('this%s={}', d.safeProp(i.name)) - : i.repeated && n('this%s=[]', d.safeProp(i.name)); - return n( - 'if(p)for(var ks=Object.keys(p),i=0;i>> 1, s = null, u = r; + return function (t) { + if (t < 1 || e < t) return i(t); + r < u + t && (s = i(r), u = 0); + t = n.call(s, u, u += t); + return 7 & u && (u = 1 + (7 | u)), t } - return []; - }), - (s.toObject = function (t) { - for (var i = {}, n = 0; n < t.length; ) { - var r = t[n++], - e = t[n++]; - e !== g && (i[r] = e); + } + }, {}], 10: [function (t, i, n) { + n.length = function (t) { + for (var i, n = 0, r = 0; r < t.length; ++r) (i = t.charCodeAt(r)) < 128 ? n += 1 : i < 2048 ? n += 2 : 55296 == (64512 & i) && 56320 == (64512 & t.charCodeAt(r + 1)) ? (++r, n += 4) : n += 3; + return n + }, n.read = function (t, i, n) { + if (n - i < 1) return ""; + for (var r, e = null, s = [], u = 0; i < n;) (r = t[i++]) < 128 ? s[u++] = r : 191 < r && r < 224 ? s[u++] = (31 & r) << 6 | 63 & t[i++] : 239 < r && r < 365 ? (r = ((7 & r) << 18 | (63 & t[i++]) << 12 | (63 & t[i++]) << 6 | 63 & t[i++]) - 65536, s[u++] = 55296 + (r >> 10), s[u++] = 56320 + (1023 & r)) : s[u++] = (15 & r) << 12 | (63 & t[i++]) << 6 | 63 & t[i++], 8191 < u && ((e = e || []).push(String.fromCharCode.apply(String, s)), u = 0); + return e ? (u && e.push(String.fromCharCode.apply(String, s.slice(0, u))), e.join("")) : String.fromCharCode.apply(String, s.slice(0, u)) + }, n.write = function (t, i, n) { + for (var r, e, s = n, u = 0; u < t.length; ++u) (r = t.charCodeAt(u)) < 128 ? i[n++] = r : (r < 2048 ? i[n++] = r >> 6 | 192 : (55296 == (64512 & r) && 56320 == (64512 & (e = t.charCodeAt(u + 1))) ? (++u, i[n++] = (r = 65536 + ((1023 & r) << 10) + (1023 & e)) >> 18 | 240, i[n++] = r >> 12 & 63 | 128) : i[n++] = r >> 12 | 224, i[n++] = r >> 6 & 63 | 128), i[n++] = 63 & r | 128); + return n - s + } + }, {}], 11: [function (t, i, n) { + var l = t(14), d = t(33); + + function u(t, i, n, r) { + var e = !1; + if (i.resolvedType) if (i.resolvedType instanceof l) { + t("switch(d%s){", r); + for (var s = i.resolvedType.values, u = Object.keys(s), o = 0; o < u.length; ++o) s[u[o]] !== i.typeDefault || e || (t("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', r, r, r), i.repeated || t("break"), e = !0), t("case%j:", u[o])("case %i:", s[u[o]])("m%s=%j", r, s[u[o]])("break"); + t("}") + } else t('if(typeof d%s!=="object")', r)("throw TypeError(%j)", i.fullName + ": object expected")("m%s=types[%i].fromObject(d%s)", r, n, r); else { + var h = !1; + switch (i.type) { + case"double": + case"float": + t("m%s=Number(d%s)", r, r); + break; + case"uint32": + case"fixed32": + t("m%s=d%s>>>0", r, r); + break; + case"int32": + case"sint32": + case"sfixed32": + t("m%s=d%s|0", r, r); + break; + case"uint64": + h = !0; + case"int64": + case"sint64": + case"fixed64": + case"sfixed64": + t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j", r, r, h)('else if(typeof d%s==="string")', r)("m%s=parseInt(d%s,10)", r, r)('else if(typeof d%s==="number")', r)("m%s=d%s", r, r)('else if(typeof d%s==="object")', r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", r, r, r, h ? "true" : ""); + break; + case"bytes": + t('if(typeof d%s==="string")', r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", r, r, r)("else if(d%s.length >= 0)", r)("m%s=d%s", r, r); + break; + case"string": + t("m%s=String(d%s)", r, r); + break; + case"bool": + t("m%s=Boolean(d%s)", r, r) + } } - return i; - }), - /\\/g), - h = /"/g, - f = - ((s.isReserved = function (t) { - return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test( - t - ); - }), - (s.safeProp = function (t) { - return !/^[$\w_]+$/.test(t) || s.isReserved(t) - ? '["' + t.replace(o, '\\\\').replace(h, '\\"') + '"]' - : '.' + t; - }), - (s.ucFirst = function (t) { - return (t[0] || '').toUpperCase() + t.substring(1); - }), - /_([a-z])/g), - c = - ((s.camelCase = function (t) { - return ( - t.substring(0, 1) + - t.substring(1).replace(f, function (t, i) { - return i.toUpperCase(); - }) - ); - }), - (s.compareFieldsById = function (t, i) { - return t.id - i.id; - }), - (s.decorateType = function (t, i) { - return t.$type - ? (i && - t.$type.name !== i && - (s.decorateRoot.remove(t.$type), - (t.$type.name = i), - s.decorateRoot.add(t.$type)), - t.$type) - : ((i = new (r = r || n(31))(i || t.name)), - s.decorateRoot.add(i), - (i.ctor = t), - Object.defineProperty(t, '$type', { - value: i, - enumerable: !1, - }), - Object.defineProperty(t.prototype, '$type', { - value: i, - enumerable: !1, - }), - i); - }), - 0); - (s.decorateEnum = function (t) { - var i; - return ( - t.$type || - ((i = new (e = e || n(14))('Enum' + c++, t)), - s.decorateRoot.add(i), - Object.defineProperty(t, '$type', { value: i, enumerable: !1 }), - i) - ); - }), - (s.setProperty = function (t, i, n) { - if ('object' != typeof t) - throw TypeError('dst must be an object'); - if (i) - return (function t(i, n, r) { - var e = n.shift(); - return ( - '__proto__' !== e && - (0 < n.length - ? (i[e] = t(i[e] || {}, n, r)) - : ((n = i[e]) && (r = [].concat(n).concat(r)), - (i[e] = r))), - i - ); - })(t, (i = i.split('.')), n); - throw TypeError('path must be specified'); - }), - Object.defineProperty(s, 'decorateRoot', { - get: function () { - return u.decorated || (u.decorated = new (n(26))()); - }, - }); - }, - { 14: 14, 26: 26, 27: 27, 3: 3, 31: 31, 35: 35, 5: 5, 8: 8 }, - ], - 34: [ - function (t, i, n) { - i.exports = e; - var r = t(35); - function e(t, i) { - (this.lo = t >>> 0), (this.hi = i >>> 0); - } - var s = (e.zero = new e(0, 0)), - u = - ((s.toNumber = function () { - return 0; - }), - (s.zzEncode = s.zzDecode = - function () { - return this; - }), - (s.length = function () { - return 1; - }), - (e.zeroHash = '\0\0\0\0\0\0\0\0'), - (e.fromNumber = function (t) { - var i, n; - return 0 === t - ? s - : ((n = (t = (i = t < 0) ? -t : t) >>> 0), - (t = ((t - n) / 4294967296) >>> 0), - i && - ((t = ~t >>> 0), - (n = ~n >>> 0), - 4294967295 < ++n && - ((n = 0), 4294967295 < ++t && (t = 0))), - new e(n, t)); - }), - (e.from = function (t) { - if ('number' == typeof t) return e.fromNumber(t); - if (r.isString(t)) { - if (!r.Long) return e.fromNumber(parseInt(t, 10)); - t = r.Long.fromString(t); + return t + } + + function v(t, i, n, r) { + if (i.resolvedType) i.resolvedType instanceof l ? t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s", r, n, r, r, n, r, r) : t("d%s=types[%i].toObject(m%s,o)", r, n, r); else { + var e = !1; + switch (i.type) { + case"double": + case"float": + t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s", r, r, r, r); + break; + case"uint64": + e = !0; + case"int64": + case"sint64": + case"fixed64": + case"sfixed64": + t('if(typeof m%s==="number")', r)("d%s=o.longs===String?String(m%s):m%s", r, r, r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", r, r, r, r, e ? "true" : "", r); + break; + case"bytes": + t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", r, r, r, r, r); + break; + default: + t("d%s=m%s", r, r) + } } - return t.low || t.high ? new e(t.low >>> 0, t.high >>> 0) : s; - }), - (e.prototype.toNumber = function (t) { - var i; - return !t && this.hi >>> 31 - ? ((t = (1 + ~this.lo) >>> 0), - (i = ~this.hi >>> 0), - -(t + 4294967296 * (i = t ? i : (i + 1) >>> 0))) - : this.lo + 4294967296 * this.hi; - }), - (e.prototype.toLong = function (t) { - return r.Long - ? new r.Long(0 | this.lo, 0 | this.hi, !!t) - : { low: 0 | this.lo, high: 0 | this.hi, unsigned: !!t }; - }), - String.prototype.charCodeAt); - (e.fromHash = function (t) { - return '\0\0\0\0\0\0\0\0' === t - ? s - : new e( - (u.call(t, 0) | - (u.call(t, 1) << 8) | - (u.call(t, 2) << 16) | - (u.call(t, 3) << 24)) >>> - 0, - (u.call(t, 4) | - (u.call(t, 5) << 8) | - (u.call(t, 6) << 16) | - (u.call(t, 7) << 24)) >>> - 0 - ); - }), - (e.prototype.toHash = function () { - return String.fromCharCode( - 255 & this.lo, - (this.lo >>> 8) & 255, - (this.lo >>> 16) & 255, - this.lo >>> 24, - 255 & this.hi, - (this.hi >>> 8) & 255, - (this.hi >>> 16) & 255, - this.hi >>> 24 - ); - }), - (e.prototype.zzEncode = function () { - var t = this.hi >> 31; - return ( - (this.hi = (((this.hi << 1) | (this.lo >>> 31)) ^ t) >>> 0), - (this.lo = ((this.lo << 1) ^ t) >>> 0), - this - ); - }), - (e.prototype.zzDecode = function () { - var t = -(1 & this.lo); - return ( - (this.lo = (((this.lo >>> 1) | (this.hi << 31)) ^ t) >>> 0), - (this.hi = ((this.hi >>> 1) ^ t) >>> 0), - this - ); - }), - (e.prototype.length = function () { - var t = this.lo, - i = ((this.lo >>> 28) | (this.hi << 4)) >>> 0, - n = this.hi >>> 24; - return 0 == n - ? 0 == i - ? t < 16384 - ? t < 128 - ? 1 - : 2 - : t < 2097152 - ? 3 - : 4 - : i < 16384 - ? i < 128 - ? 5 - : 6 - : i < 2097152 - ? 7 - : 8 - : n < 128 - ? 9 - : 10; - }); - }, - { 35: 35 }, - ], - 35: [ - function (t, i, n) { - var r = n; - function e(t, i, n) { - for (var r = Object.keys(i), e = 0; e < r.length; ++e) - (t[r[e]] !== g && n) || (t[r[e]] = i[r[e]]); - return t; - } - function s(t) { - function n(t, i) { - if (!(this instanceof n)) return new n(t, i); - Object.defineProperty(this, 'message', { + return t + } + + n.fromObject = function (t) { + var i = t.fieldsArray, + n = d.codegen(["d"], t.name + "$fromObject")("if(d instanceof this.ctor)")("return d"); + if (!i.length) return n("return new this.ctor"); + n("var m=new this.ctor"); + for (var r = 0; r < i.length; ++r) { + var e = i[r].resolve(), s = d.safeProp(e.name); + e.map ? (n("if(d%s){", s)('if(typeof d%s!=="object")', s)("throw TypeError(%j)", e.fullName + ": object expected")("m%s={}", s)("for(var ks=Object.keys(d%s),i=0;i>>3){"); + for (var n = 0; n < t.fieldsArray.length; ++n) { + var r = t.i[n].resolve(), e = r.resolvedType instanceof o ? "int32" : r.type, + s = "m" + f.safeProp(r.name); + i("case %i: {", r.id), r.map ? (i("if(%s===util.emptyObject)", s)("%s={}", s)("var c2 = r.uint32()+r.pos"), h.defaults[r.keyType] !== g ? i("k=%j", h.defaults[r.keyType]) : i("k=null"), h.defaults[e] !== g ? i("value=%j", h.defaults[e]) : i("value=null"), i("while(r.pos>>3){")("case 1: k=r.%s(); break", r.keyType)("case 2:"), h.basic[e] === g ? i("value=types[%i].decode(r,r.uint32())", n) : i("value=r.%s()", e), i("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"), h.long[r.keyType] !== g ? i('%s[typeof k==="object"?util.longToHash(k):k]=value', s) : i("%s[k]=value", s)) : r.repeated ? (i("if(!(%s&&%s.length))", s, s)("%s=[]", s), h.packed[e] !== g && i("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos>> 0, 8 | c.mapKey[s.keyType], s.keyType), h === g ? n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", u, i) : n(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | h, o, i), n("}")("}")) : s.repeated ? (n("if(%s!=null&&%s.length){", i, i), s.packed && c.packed[o] !== g ? n("w.uint32(%i).fork()", (s.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", i)("w.%s(%s[i])", o, i)("w.ldelim()") : (n("for(var i=0;i<%s.length;++i)", i), h === g ? l(n, s, u, i + "[i]") : n("w.uint32(%i).%s(%s[i])", (s.id << 3 | h) >>> 0, o, i)), n("}")) : (s.optional && n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", i, s.name), h === g ? l(n, s, u, i) : n("w.uint32(%i).%s(%s)", (s.id << 3 | h) >>> 0, o, i)) + } + return n("return w") + }; + var f = t(14), c = t(32), a = t(33); + + function l(t, i, n, r) { + i.resolvedType.group ? t("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", n, r, (i.id << 3 | 3) >>> 0, (i.id << 3 | 4) >>> 0) : t("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", n, r, (i.id << 3 | 2) >>> 0) + } + }, {14: 14, 32: 32, 33: 33}], 14: [function (t, i, n) { + i.exports = s; + var h = t(22), r = (((s.prototype = Object.create(h.prototype)).constructor = s).className = "Enum", t(21)), + e = t(33); + + function s(t, i, n, r, e, s) { + if (h.call(this, t, n), i && "object" != typeof i) throw TypeError("values must be an object"); + if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = r, this.comments = e || {}, this.valuesOptions = s, this.reserved = g, i) for (var u = Object.keys(i), o = 0; o < u.length; ++o) "number" == typeof i[u[o]] && (this.valuesById[this.values[u[o]] = i[u[o]]] = u[o]) + } + + s.fromJSON = function (t, i) { + t = new s(t, i.values, i.options, i.comment, i.comments); + return t.reserved = i.reserved, t + }, s.prototype.toJSON = function (t) { + t = !!t && !!t.keepComments; + return e.toObject(["options", this.options, "valuesOptions", this.valuesOptions, "values", this.values, "reserved", this.reserved && this.reserved.length ? this.reserved : g, "comment", t ? this.comment : g, "comments", t ? this.comments : g]) + }, s.prototype.add = function (t, i, n, r) { + if (!e.isString(t)) throw TypeError("name must be a string"); + if (!e.isInteger(i)) throw TypeError("id must be an integer"); + if (this.values[t] !== g) throw Error("duplicate name '" + t + "' in " + this); + if (this.isReservedId(i)) throw Error("id " + i + " is reserved in " + this); + if (this.isReservedName(t)) throw Error("name '" + t + "' is reserved in " + this); + if (this.valuesById[i] !== g) { + if (!this.options || !this.options.allow_alias) throw Error("duplicate id " + i + " in " + this); + this.values[t] = i + } else this.valuesById[this.values[t] = i] = t; + return r && (this.valuesOptions === g && (this.valuesOptions = {}), this.valuesOptions[t] = r || null), this.comments[t] = n || null, this + }, s.prototype.remove = function (t) { + if (!e.isString(t)) throw TypeError("name must be a string"); + var i = this.values[t]; + if (null == i) throw Error("name '" + t + "' does not exist in " + this); + return delete this.valuesById[i], delete this.values[t], delete this.comments[t], this.valuesOptions && delete this.valuesOptions[t], this + }, s.prototype.isReservedId = function (t) { + return r.isReservedId(this.reserved, t) + }, s.prototype.isReservedName = function (t) { + return r.isReservedName(this.reserved, t) + } + }, {21: 21, 22: 22, 33: 33}], 15: [function (t, i, n) { + i.exports = u; + var r, o = t(22), + e = (((u.prototype = Object.create(o.prototype)).constructor = u).className = "Field", t(14)), + h = t(32), f = t(33), c = /^required|optional|repeated$/; + + function u(t, i, n, r, e, s, u) { + if (f.isObject(r) ? (u = e, s = r, r = e = g) : f.isObject(e) && (u = s, s = e, e = g), o.call(this, t, s), !f.isInteger(i) || i < 0) throw TypeError("id must be a non-negative integer"); + if (!f.isString(n)) throw TypeError("type must be a string"); + if (r !== g && !c.test(r = r.toString().toLowerCase())) throw TypeError("rule must be a string rule"); + if (e !== g && !f.isString(e)) throw TypeError("extend must be a string"); + this.rule = (r = "proto3_optional" === r ? "optional" : r) && "optional" !== r ? r : g, this.type = n, this.id = i, this.extend = e || g, this.required = "required" === r, this.optional = !this.required, this.repeated = "repeated" === r, this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = !!f.Long && h.long[n] !== g, this.bytes = "bytes" === n, this.resolvedType = null, this.extensionField = null, this.declaringField = null, this.n = null, this.comment = u + } + + u.fromJSON = function (t, i) { + return new u(t, i.id, i.type, i.rule, i.extend, i.options, i.comment) + }, Object.defineProperty(u.prototype, "packed", { get: function () { - return t; - }, - }), - Error.captureStackTrace - ? Error.captureStackTrace(this, n) - : Object.defineProperty(this, 'stack', { - value: Error().stack || '', - }), - i && e(this, i); - } - return ( - (n.prototype = Object.create(Error.prototype, { - constructor: { - value: n, - writable: !0, - enumerable: !1, - configurable: !0, - }, - name: { - get() { - return t; - }, - set: g, - enumerable: !1, - configurable: !0, - }, - toString: { - value() { - return this.name + ': ' + this.message; - }, - writable: !0, - enumerable: !1, - configurable: !0, - }, - })), - n - ); - } - (r.asPromise = t(1)), - (r.base64 = t(2)), - (r.EventEmitter = t(4)), - (r.float = t(6)), - (r.inquire = t(7)), - (r.utf8 = t(10)), - (r.pool = t(9)), - (r.LongBits = t(34)), - (r.isNode = !!( - 'undefined' != typeof global && - global && - global.process && - global.process.versions && - global.process.versions.node - )), - (r.global = - (r.isNode && global) || - ('undefined' != typeof window && window) || - ('undefined' != typeof self && self) || - this), - (r.emptyArray = Object.freeze ? Object.freeze([]) : []), - (r.emptyObject = Object.freeze ? Object.freeze({}) : {}), - (r.isInteger = - Number.isInteger || - function (t) { - return ( - 'number' == typeof t && isFinite(t) && Math.floor(t) === t - ); - }), - (r.isString = function (t) { - return 'string' == typeof t || t instanceof String; - }), - (r.isObject = function (t) { - return t && 'object' == typeof t; - }), - (r.isset = r.isSet = - function (t, i) { - var n = t[i]; - return ( - null != n && - t.hasOwnProperty(i) && - ('object' != typeof n || - 0 < (Array.isArray(n) ? n : Object.keys(n)).length) - ); - }), - (r.Buffer = (function () { - try { - var t = r.inquire('buffer').Buffer; - return t.prototype.utf8Write ? t : null; - } catch (t) { - return null; - } - })()), - (r.v = null), - (r.b = null), - (r.newBuffer = function (t) { - return 'number' == typeof t - ? r.Buffer - ? r.b(t) - : new r.Array(t) - : r.Buffer - ? r.v(t) - : 'undefined' == typeof Uint8Array - ? t - : new Uint8Array(t); - }), - (r.Array = 'undefined' != typeof Uint8Array ? Uint8Array : Array), - (r.Long = - (r.global.dcodeIO && r.global.dcodeIO.Long) || - r.global.Long || - r.inquire('long')), - (r.key2Re = /^true|false|0|1$/), - (r.key32Re = /^-?(?:0|[1-9][0-9]*)$/), - (r.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/), - (r.longToHash = function (t) { - return t ? r.LongBits.from(t).toHash() : r.LongBits.zeroHash; - }), - (r.longFromHash = function (t, i) { - t = r.LongBits.fromHash(t); - return r.Long ? r.Long.fromBits(t.lo, t.hi, i) : t.toNumber(!!i); - }), - (r.merge = e), - (r.lcFirst = function (t) { - return (t[0] || '').toLowerCase() + t.substring(1); - }), - (r.newError = s), - (r.ProtocolError = s('ProtocolError')), - (r.oneOfGetter = function (t) { - for (var n = {}, i = 0; i < t.length; ++i) n[t[i]] = 1; - return function () { - for (var t = Object.keys(this), i = t.length - 1; -1 < i; --i) - if (1 === n[t[i]] && this[t[i]] !== g && null !== this[t[i]]) - return t[i]; - }; - }), - (r.oneOfSetter = function (n) { - return function (t) { - for (var i = 0; i < n.length; ++i) - n[i] !== t && delete this[n[i]]; - }; - }), - (r.toJSONOptions = { - longs: String, - enums: String, - bytes: String, - json: !0, - }), - (r.r = function () { - var n = r.Buffer; - n - ? ((r.v = - (n.from !== Uint8Array.from && n.from) || - function (t, i) { - return new n(t, i); - }), - (r.b = - n.allocUnsafe || - function (t) { - return new n(t); - })) - : (r.v = r.b = null); - }); - }, - { 1: 1, 10: 10, 2: 2, 34: 34, 4: 4, 6: 6, 7: 7, 9: 9 }, - ], - 36: [ - function (t, i, n) { - i.exports = function (t) { - var i = h.codegen( - ['m'], - t.name + '$verify' - )('if(typeof m!=="object"||m===null)')( - 'return%j', - 'object expected' - ), - n = t.oneofsArray, - r = {}; - n.length && i('var p={}'); - for (var e = 0; e < t.fieldsArray.length; ++e) { - var s, - u = t.i[e].resolve(), - o = 'm' + h.safeProp(u.name); - u.optional && i('if(%s!=null&&m.hasOwnProperty(%j)){', o, u.name), - u.map - ? (i('if(!util.isObject(%s))', o)('return%j', f(u, 'object'))( - 'var k=Object.keys(%s)', - o - )('for(var i=0;i>> 7) | (t.hi << 25)) >>> 0), - (t.hi >>>= 7); - for (; 127 < t.lo; ) - (i[n++] = (127 & t.lo) | 128), (t.lo = t.lo >>> 7); - i[n++] = t.lo; - } - function p(t, i, n) { - (i[n] = 255 & t), - (i[n + 1] = (t >>> 8) & 255), - (i[n + 2] = (t >>> 16) & 255), - (i[n + 3] = t >>> 24); - } - (a.create = l()), - (a.alloc = function (t) { - return new e.Array(t); - }), - e.Array !== Array && - (a.alloc = e.pool(a.alloc, e.Array.prototype.subarray)), - (a.prototype.p = function (t, i, n) { - return ( - (this.tail = this.tail.next = new h(t, i, n)), - (this.len += i), - this - ); - }), - ((v.prototype = Object.create(h.prototype)).fn = function ( - t, - i, - n - ) { - for (; 127 < t; ) (i[n++] = (127 & t) | 128), (t >>>= 7); - i[n] = t; - }), - (a.prototype.uint32 = function (t) { - return ( - (this.len += (this.tail = this.tail.next = - new v( - (t >>>= 0) < 128 - ? 1 - : t < 16384 - ? 2 - : t < 2097152 - ? 3 - : t < 268435456 - ? 4 - : 5, - t - )).len), - this - ); - }), - (a.prototype.int32 = function (t) { - return t < 0 ? this.p(b, 10, s.fromNumber(t)) : this.uint32(t); - }), - (a.prototype.sint32 = function (t) { - return this.uint32(((t << 1) ^ (t >> 31)) >>> 0); - }), - (a.prototype.int64 = a.prototype.uint64 = - function (t) { - t = s.from(t); - return this.p(b, t.length(), t); - }), - (a.prototype.sint64 = function (t) { - t = s.from(t).zzEncode(); - return this.p(b, t.length(), t); - }), - (a.prototype.bool = function (t) { - return this.p(d, 1, t ? 1 : 0); - }), - (a.prototype.sfixed32 = a.prototype.fixed32 = - function (t) { - return this.p(p, 4, t >>> 0); - }), - (a.prototype.sfixed64 = a.prototype.fixed64 = - function (t) { - t = s.from(t); - return this.p(p, 4, t.lo).p(p, 4, t.hi); - }), - (a.prototype.float = function (t) { - return this.p(e.float.writeFloatLE, 4, t); - }), - (a.prototype.double = function (t) { - return this.p(e.float.writeDoubleLE, 8, t); - }); - var y = e.Array.prototype.set - ? function (t, i, n) { - i.set(t, n); - } - : function (t, i, n) { - for (var r = 0; r < t.length; ++r) i[n + r] = t[r]; - }; - (a.prototype.bytes = function (t) { - var i, - n = t.length >>> 0; - return n - ? (e.isString(t) && - ((i = a.alloc((n = u.length(t)))), - u.decode(t, i, 0), - (t = i)), - this.uint32(n).p(y, n, t)) - : this.p(d, 1, 0); - }), - (a.prototype.string = function (t) { - var i = o.length(t); - return i ? this.uint32(i).p(o.write, i, t) : this.p(d, 1, 0); - }), - (a.prototype.fork = function () { - return ( - (this.states = new c(this)), - (this.head = this.tail = new h(f, 0, 0)), - (this.len = 0), - this - ); - }), - (a.prototype.reset = function () { - return ( - this.states - ? ((this.head = this.states.head), - (this.tail = this.states.tail), - (this.len = this.states.len), - (this.states = this.states.next)) - : ((this.head = this.tail = new h(f, 0, 0)), (this.len = 0)), - this - ); - }), - (a.prototype.ldelim = function () { - var t = this.head, - i = this.tail, - n = this.len; - return ( - this.reset().uint32(n), - n && - ((this.tail.next = t.next), (this.tail = i), (this.len += n)), - this - ); - }), - (a.prototype.finish = function () { - for ( - var t = this.head.next, - i = this.constructor.alloc(this.len), - n = 0; - t; + }), u.prototype.setOption = function (t, i, n) { + return "packed" === t && (this.n = null), o.prototype.setOption.call(this, t, i, n) + }, u.prototype.toJSON = function (t) { + t = !!t && !!t.keepComments; + return f.toObject(["rule", "optional" !== this.rule && this.rule || g, "type", this.type, "id", this.id, "extend", this.extend, "options", this.options, "comment", t ? this.comment : g]) + }, u.prototype.resolve = function () { + var t; + return this.resolved ? this : ((this.typeDefault = h.defaults[this.type]) === g ? (this.resolvedType = (this.declaringField || this).parent.lookupTypeOrEnum(this.type), this.resolvedType instanceof r ? this.typeDefault = null : this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]) : this.options && this.options.proto3_optional && (this.typeDefault = null), this.options && null != this.options.default && (this.typeDefault = this.options.default, this.resolvedType instanceof e && "string" == typeof this.typeDefault && (this.typeDefault = this.resolvedType.values[this.typeDefault])), this.options && (!0 !== this.options.packed && (this.options.packed === g || !this.resolvedType || this.resolvedType instanceof e) || delete this.options.packed, Object.keys(this.options).length || (this.options = g)), this.long ? (this.typeDefault = f.Long.fromNumber(this.typeDefault, "u" == (this.type[0] || "")), Object.freeze && Object.freeze(this.typeDefault)) : this.bytes && "string" == typeof this.typeDefault && (f.base64.test(this.typeDefault) ? f.base64.decode(this.typeDefault, t = f.newBuffer(f.base64.length(this.typeDefault)), 0) : f.utf8.write(this.typeDefault, t = f.newBuffer(f.utf8.length(this.typeDefault)), 0), this.typeDefault = t), this.map ? this.defaultValue = f.emptyObject : this.repeated ? this.defaultValue = f.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof r && (this.parent.ctor.prototype[this.name] = this.defaultValue), o.prototype.resolve.call(this)) + }, u.d = function (n, r, e, s) { + return "function" == typeof r ? r = f.decorateType(r).name : r && "object" == typeof r && (r = f.decorateEnum(r).name), function (t, i) { + f.decorateType(t.constructor).add(new u(i, n, r, e, {default: s})) + } + }, u.r = function (t) { + r = t + } + }, {14: 14, 22: 22, 32: 32, 33: 33}], 16: [function (t, i, n) { + var r = i.exports = t(17); + r.build = "light", r.load = function (t, i, n) { + return (i = "function" == typeof i ? (n = i, new r.Root) : i || new r.Root).load(t, n) + }, r.loadSync = function (t, i) { + return (i = i || new r.Root).loadSync(t) + }, r.encoder = t(13), r.decoder = t(12), r.verifier = t(36), r.converter = t(11), r.ReflectionObject = t(22), r.Namespace = t(21), r.Root = t(26), r.Enum = t(14), r.Type = t(31), r.Field = t(15), r.OneOf = t(23), r.MapField = t(18), r.Service = t(30), r.Method = t(20), r.Message = t(19), r.wrappers = t(37), r.types = t(32), r.util = t(33), r.ReflectionObject.r(r.Root), r.Namespace.r(r.Type, r.Service, r.Enum), r.Root.r(r.Type), r.Field.r(r.Type) + }, { + 11: 11, + 12: 12, + 13: 13, + 14: 14, + 15: 15, + 17: 17, + 18: 18, + 19: 19, + 20: 20, + 21: 21, + 22: 22, + 23: 23, + 26: 26, + 30: 30, + 31: 31, + 32: 32, + 33: 33, + 36: 36, + 37: 37 + }], 17: [function (t, i, n) { + var r = n; - ) - t.fn(t.val, i, n), (n += t.len), (t = t.next); - return i; - }), - (a.r = function (t) { - (r = t), (a.create = l()), r.r(); - }); - }, - { 35: 35 }, - ], - 39: [ - function (t, i, n) { - i.exports = s; - var r = t(38), - e = - (((s.prototype = Object.create(r.prototype)).constructor = s), - t(35)); - function s() { - r.call(this); - } - function u(t, i, n) { - t.length < 40 - ? e.utf8.write(t, i, n) - : i.utf8Write - ? i.utf8Write(t, n) - : i.write(t, n); - } - (s.r = function () { - (s.alloc = e.b), - (s.writeBytesBuffer = - e.Buffer && - e.Buffer.prototype instanceof Uint8Array && - 'set' === e.Buffer.prototype.set.name - ? function (t, i, n) { - i.set(t, n); + function e() { + r.util.r(), r.Writer.r(r.BufferWriter), r.Reader.r(r.BufferReader) + } + + r.build = "minimal", r.Writer = t(38), r.BufferWriter = t(39), r.Reader = t(24), r.BufferReader = t(25), r.util = t(35), r.rpc = t(28), r.roots = t(27), r.configure = e, e() + }, {24: 24, 25: 25, 27: 27, 28: 28, 35: 35, 38: 38, 39: 39}], 18: [function (t, i, n) { + i.exports = s; + var u = t(15), + r = (((s.prototype = Object.create(u.prototype)).constructor = s).className = "MapField", t(32)), + o = t(33); + + function s(t, i, n, r, e, s) { + if (u.call(this, t, i, r, g, g, e, s), !o.isString(n)) throw TypeError("keyType must be a string"); + this.keyType = n, this.resolvedKeyType = null, this.map = !0 + } + + s.fromJSON = function (t, i) { + return new s(t, i.id, i.keyType, i.type, i.options, i.comment) + }, s.prototype.toJSON = function (t) { + t = !!t && !!t.keepComments; + return o.toObject(["keyType", this.keyType, "type", this.type, "id", this.id, "extend", this.extend, "options", this.options, "comment", t ? this.comment : g]) + }, s.prototype.resolve = function () { + if (this.resolved) return this; + if (r.mapKey[this.keyType] === g) throw Error("invalid key type: " + this.keyType); + return u.prototype.resolve.call(this) + }, s.d = function (n, r, e) { + return "function" == typeof e ? e = o.decorateType(e).name : e && "object" == typeof e && (e = o.decorateEnum(e).name), function (t, i) { + o.decorateType(t.constructor).add(new s(i, n, r, e)) + } + } + }, {15: 15, 32: 32, 33: 33}], 19: [function (t, i, n) { + i.exports = e; + var r = t(35); + + function e(t) { + if (t) for (var i = Object.keys(t), n = 0; n < i.length; ++n) this[i[n]] = t[i[n]] + } + + e.create = function (t) { + return this.$type.create(t) + }, e.encode = function (t, i) { + return this.$type.encode(t, i) + }, e.encodeDelimited = function (t, i) { + return this.$type.encodeDelimited(t, i) + }, e.decode = function (t) { + return this.$type.decode(t) + }, e.decodeDelimited = function (t) { + return this.$type.decodeDelimited(t) + }, e.verify = function (t) { + return this.$type.verify(t) + }, e.fromObject = function (t) { + return this.$type.fromObject(t) + }, e.toObject = function (t, i) { + return this.$type.toObject(t, i) + }, e.prototype.toJSON = function () { + return this.$type.toObject(this, r.toJSONOptions) + } + }, {35: 35}], 20: [function (t, i, n) { + i.exports = r; + var f = t(22), + c = (((r.prototype = Object.create(f.prototype)).constructor = r).className = "Method", t(33)); + + function r(t, i, n, r, e, s, u, o, h) { + if (c.isObject(e) ? (u = e, e = s = g) : c.isObject(s) && (u = s, s = g), i !== g && !c.isString(i)) throw TypeError("type must be a string"); + if (!c.isString(n)) throw TypeError("requestType must be a string"); + if (!c.isString(r)) throw TypeError("responseType must be a string"); + f.call(this, t, u), this.type = i || "rpc", this.requestType = n, this.requestStream = !!e || g, this.responseType = r, this.responseStream = !!s || g, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = o, this.parsedOptions = h + } + + r.fromJSON = function (t, i) { + return new r(t, i.type, i.requestType, i.responseType, i.requestStream, i.responseStream, i.options, i.comment, i.parsedOptions) + }, r.prototype.toJSON = function (t) { + t = !!t && !!t.keepComments; + return c.toObject(["type", "rpc" !== this.type && this.type || g, "requestType", this.requestType, "requestStream", this.requestStream, "responseType", this.responseType, "responseStream", this.responseStream, "options", this.options, "comment", t ? this.comment : g, "parsedOptions", this.parsedOptions]) + }, r.prototype.resolve = function () { + return this.resolved ? this : (this.resolvedRequestType = this.parent.lookupType(this.requestType), this.resolvedResponseType = this.parent.lookupType(this.responseType), f.prototype.resolve.call(this)) + } + }, {22: 22, 33: 33}], 21: [function (t, i, n) { + i.exports = a; + var e, s, u, r = t(22), + o = (((a.prototype = Object.create(r.prototype)).constructor = a).className = "Namespace", t(15)), + h = t(33), f = t(23); + + function c(t, i) { + if (!t || !t.length) return g; + for (var n = {}, r = 0; r < t.length; ++r) n[t[r].name] = t[r].toJSON(i); + return n + } + + function a(t, i) { + r.call(this, t, i), this.nested = g, this.e = null + } + + function l(t) { + return t.e = null, t + } + + a.fromJSON = function (t, i) { + return new a(t, i.options).addJSON(i.nested) + }, a.arrayToJSON = c, a.isReservedId = function (t, i) { + if (t) for (var n = 0; n < t.length; ++n) if ("string" != typeof t[n] && t[n][0] <= i && t[n][1] > i) return !0; + return !1 + }, a.isReservedName = function (t, i) { + if (t) for (var n = 0; n < t.length; ++n) if (t[n] === i) return !0; + return !1 + }, Object.defineProperty(a.prototype, "nestedArray", { + get: function () { + return this.e || (this.e = h.toArray(this.nested)) + } + }), a.prototype.toJSON = function (t) { + return h.toObject(["options", this.options, "nested", c(this.nestedArray, t)]) + }, a.prototype.addJSON = function (t) { + if (t) for (var i, n = Object.keys(t), r = 0; r < n.length; ++r) i = t[n[r]], this.add((i.fields !== g ? e : i.values !== g ? u : i.methods !== g ? s : i.id !== g ? o : a).fromJSON(n[r], i)); + return this + }, a.prototype.get = function (t) { + return this.nested && this.nested[t] || null + }, a.prototype.getEnum = function (t) { + if (this.nested && this.nested[t] instanceof u) return this.nested[t].values; + throw Error("no such enum: " + t) + }, a.prototype.add = function (t) { + if (!(t instanceof o && t.extend !== g || t instanceof e || t instanceof f || t instanceof u || t instanceof s || t instanceof a)) throw TypeError("object must be a valid nested object"); + if (this.nested) { + var i = this.get(t.name); + if (i) { + if (!(i instanceof a && t instanceof a) || i instanceof e || i instanceof s) throw Error("duplicate name '" + t.name + "' in " + this); + for (var n = i.nestedArray, r = 0; r < n.length; ++r) t.add(n[r]); + this.remove(i), this.nested || (this.nested = {}), t.setOptions(i.options, !0) } - : function (t, i, n) { - if (t.copy) t.copy(i, n, 0, t.length); - else for (var r = 0; r < t.length; ) i[n++] = t[r++]; - }); - }), - (s.prototype.bytes = function (t) { - var i = (t = e.isString(t) ? e.v(t, 'base64') : t).length >>> 0; - return ( - this.uint32(i), i && this.p(s.writeBytesBuffer, i, t), this - ); - }), - (s.prototype.string = function (t) { - var i = e.Buffer.byteLength(t); - return this.uint32(i), i && this.p(u, i, t), this; - }), - s.r(); - }, - { 35: 35, 38: 38 }, - ], - }, - {}, - [16] - ); -})(); + } else this.nested = {}; + return (this.nested[t.name] = t).onAdd(this), l(this) + }, a.prototype.remove = function (t) { + if (!(t instanceof r)) throw TypeError("object must be a ReflectionObject"); + if (t.parent !== this) throw Error(t + " is not a member of " + this); + return delete this.nested[t.name], Object.keys(this.nested).length || (this.nested = g), t.onRemove(this), l(this) + }, a.prototype.define = function (t, i) { + if (h.isString(t)) t = t.split("."); else if (!Array.isArray(t)) throw TypeError("illegal path"); + if (t && t.length && "" === t[0]) throw Error("path must be relative"); + for (var n = this; 0 < t.length;) { + var r = t.shift(); + if (n.nested && n.nested[r]) { + if (!((n = n.nested[r]) instanceof a)) throw Error("path conflicts with non-namespace objects") + } else n.add(n = new a(r)) + } + return i && n.addJSON(i), n + }, a.prototype.resolveAll = function () { + for (var t = this.nestedArray, i = 0; i < t.length;) t[i] instanceof a ? t[i++].resolveAll() : t[i++].resolve(); + return this.resolve() + }, a.prototype.lookup = function (t, i, n) { + if ("boolean" == typeof i ? (n = i, i = g) : i && !Array.isArray(i) && (i = [i]), h.isString(t) && t.length) { + if ("." === t) return this.root; + t = t.split(".") + } else if (!t.length) return this; + if ("" === t[0]) return this.root.lookup(t.slice(1), i); + var r = this.get(t[0]); + if (r) { + if (1 === t.length) { + if (!i || ~i.indexOf(r.constructor)) return r + } else if (r instanceof a && (r = r.lookup(t.slice(1), i, !0))) return r + } else for (var e = 0; e < this.nestedArray.length; ++e) if (this.e[e] instanceof a && (r = this.e[e].lookup(t, i, !0))) return r; + return null === this.parent || n ? null : this.parent.lookup(t, i) + }, a.prototype.lookupType = function (t) { + var i = this.lookup(t, [e]); + if (i) return i; + throw Error("no such type: " + t) + }, a.prototype.lookupEnum = function (t) { + var i = this.lookup(t, [u]); + if (i) return i; + throw Error("no such Enum '" + t + "' in " + this) + }, a.prototype.lookupTypeOrEnum = function (t) { + var i = this.lookup(t, [e, u]); + if (i) return i; + throw Error("no such Type or Enum '" + t + "' in " + this) + }, a.prototype.lookupService = function (t) { + var i = this.lookup(t, [s]); + if (i) return i; + throw Error("no such Service '" + t + "' in " + this) + }, a.r = function (t, i, n) { + e = t, s = i, u = n + } + }, {15: 15, 22: 22, 23: 23, 33: 33}], 22: [function (t, i, n) { + (i.exports = e).className = "ReflectionObject"; + var r, u = t(33); + + function e(t, i) { + if (!u.isString(t)) throw TypeError("name must be a string"); + if (i && !u.isObject(i)) throw TypeError("options must be an object"); + this.options = i, this.parsedOptions = null, this.name = t, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null + } + + Object.defineProperties(e.prototype, { + root: { + get: function () { + for (var t = this; null !== t.parent;) t = t.parent; + return t + } + }, fullName: { + get: function () { + for (var t = [this.name], i = this.parent; i;) t.unshift(i.name), i = i.parent; + return t.join(".") + } + } + }), e.prototype.toJSON = function () { + throw Error() + }, e.prototype.onAdd = function (t) { + this.parent && this.parent !== t && this.parent.remove(this), this.parent = t, this.resolved = !1; + t = t.root; + t instanceof r && t.u(this) + }, e.prototype.onRemove = function (t) { + t = t.root; + t instanceof r && t.o(this), this.parent = null, this.resolved = !1 + }, e.prototype.resolve = function () { + return this.resolved || this.root instanceof r && (this.resolved = !0), this + }, e.prototype.getOption = function (t) { + return this.options ? this.options[t] : g + }, e.prototype.setOption = function (t, i, n) { + return n && this.options && this.options[t] !== g || ((this.options || (this.options = {}))[t] = i), this + }, e.prototype.setParsedOption = function (i, t, n) { + this.parsedOptions || (this.parsedOptions = []); + var r, e, s = this.parsedOptions; + return n ? (r = s.find(function (t) { + return Object.prototype.hasOwnProperty.call(t, i) + })) ? (e = r[i], u.setProperty(e, n, t)) : ((r = {})[i] = u.setProperty({}, n, t), s.push(r)) : ((e = {})[i] = t, s.push(e)), this + }, e.prototype.setOptions = function (t, i) { + if (t) for (var n = Object.keys(t), r = 0; r < n.length; ++r) this.setOption(n[r], t[n[r]], i); + return this + }, e.prototype.toString = function () { + var t = this.constructor.className, i = this.fullName; + return i.length ? t + " " + i : t + }, e.r = function (t) { + r = t + } + }, {33: 33}], 23: [function (t, i, n) { + i.exports = u; + var e = t(22), + r = (((u.prototype = Object.create(e.prototype)).constructor = u).className = "OneOf", t(15)), + s = t(33); + + function u(t, i, n, r) { + if (Array.isArray(i) || (n = i, i = g), e.call(this, t, n), i !== g && !Array.isArray(i)) throw TypeError("fieldNames must be an Array"); + this.oneof = i || [], this.fieldsArray = [], this.comment = r + } + + function o(t) { + if (t.parent) for (var i = 0; i < t.fieldsArray.length; ++i) t.fieldsArray[i].parent || t.parent.add(t.fieldsArray[i]) + } + + u.fromJSON = function (t, i) { + return new u(t, i.oneof, i.options, i.comment) + }, u.prototype.toJSON = function (t) { + t = !!t && !!t.keepComments; + return s.toObject(["options", this.options, "oneof", this.oneof, "comment", t ? this.comment : g]) + }, u.prototype.add = function (t) { + if (t instanceof r) return t.parent && t.parent !== this.parent && t.parent.remove(t), this.oneof.push(t.name), this.fieldsArray.push(t), o(t.partOf = this), this; + throw TypeError("field must be a Field") + }, u.prototype.remove = function (t) { + if (!(t instanceof r)) throw TypeError("field must be a Field"); + var i = this.fieldsArray.indexOf(t); + if (i < 0) throw Error(t + " is not a member of " + this); + return this.fieldsArray.splice(i, 1), -1 < (i = this.oneof.indexOf(t.name)) && this.oneof.splice(i, 1), t.partOf = null, this + }, u.prototype.onAdd = function (t) { + e.prototype.onAdd.call(this, t); + for (var i = 0; i < this.oneof.length; ++i) { + var n = t.get(this.oneof[i]); + n && !n.partOf && (n.partOf = this).fieldsArray.push(n) + } + o(this) + }, u.prototype.onRemove = function (t) { + for (var i, n = 0; n < this.fieldsArray.length; ++n) (i = this.fieldsArray[n]).parent && i.parent.remove(i); + e.prototype.onRemove.call(this, t) + }, u.d = function () { + for (var n = Array(arguments.length), t = 0; t < arguments.length;) n[t] = arguments[t++]; + return function (t, i) { + s.decorateType(t.constructor).add(new u(i, n)), Object.defineProperty(t, i, { + get: s.oneOfGetter(n), + set: s.oneOfSetter(n) + }) + } + } + }, {15: 15, 22: 22, 33: 33}], 24: [function (t, i, n) { + i.exports = h; + var r, e = t(35), s = e.LongBits, u = e.utf8; + + function o(t, i) { + return RangeError("index out of range: " + t.pos + " + " + (i || 1) + " > " + t.len) + } + + function h(t) { + this.buf = t, this.pos = 0, this.len = t.length + } + + function f() { + return e.Buffer ? function (t) { + return (h.create = function (t) { + return e.Buffer.isBuffer(t) ? new r(t) : a(t) + })(t) + } : a + } + + var c, a = "undefined" != typeof Uint8Array ? function (t) { + if (t instanceof Uint8Array || Array.isArray(t)) return new h(t); + throw Error("illegal buffer") + } : function (t) { + if (Array.isArray(t)) return new h(t); + throw Error("illegal buffer") + }; + + function l() { + var t = new s(0, 0), i = 0; + if (!(4 < this.len - this.pos)) { + for (; i < 3; ++i) { + if (this.pos >= this.len) throw o(this); + if (t.lo = (t.lo | (127 & this.buf[this.pos]) << 7 * i) >>> 0, this.buf[this.pos++] < 128) return t + } + return t.lo = (t.lo | (127 & this.buf[this.pos++]) << 7 * i) >>> 0, t + } + for (; i < 4; ++i) if (t.lo = (t.lo | (127 & this.buf[this.pos]) << 7 * i) >>> 0, this.buf[this.pos++] < 128) return t; + if (t.lo = (t.lo | (127 & this.buf[this.pos]) << 28) >>> 0, t.hi = (t.hi | (127 & this.buf[this.pos]) >> 4) >>> 0, this.buf[this.pos++] < 128) return t; + if (i = 0, 4 < this.len - this.pos) { + for (; i < 5; ++i) if (t.hi = (t.hi | (127 & this.buf[this.pos]) << 7 * i + 3) >>> 0, this.buf[this.pos++] < 128) return t + } else for (; i < 5; ++i) { + if (this.pos >= this.len) throw o(this); + if (t.hi = (t.hi | (127 & this.buf[this.pos]) << 7 * i + 3) >>> 0, this.buf[this.pos++] < 128) return t + } + throw Error("invalid varint encoding") + } + + function d(t, i) { + return (t[i - 4] | t[i - 3] << 8 | t[i - 2] << 16 | t[i - 1] << 24) >>> 0 + } + + function v() { + if (this.pos + 8 > this.len) throw o(this, 8); + return new s(d(this.buf, this.pos += 4), d(this.buf, this.pos += 4)) + } + + h.create = f(), h.prototype.h = e.Array.prototype.subarray || e.Array.prototype.slice, h.prototype.uint32 = (c = 4294967295, function () { + if (c = (127 & this.buf[this.pos]) >>> 0, this.buf[this.pos++] < 128 || (c = (c | (127 & this.buf[this.pos]) << 7) >>> 0, this.buf[this.pos++] < 128 || (c = (c | (127 & this.buf[this.pos]) << 14) >>> 0, this.buf[this.pos++] < 128 || (c = (c | (127 & this.buf[this.pos]) << 21) >>> 0, this.buf[this.pos++] < 128 || (c = (c | (15 & this.buf[this.pos]) << 28) >>> 0, this.buf[this.pos++] < 128 || !((this.pos += 5) > this.len)))))) return c; + throw this.pos = this.len, o(this, 10) + }), h.prototype.int32 = function () { + return 0 | this.uint32() + }, h.prototype.sint32 = function () { + var t = this.uint32(); + return t >>> 1 ^ -(1 & t) | 0 + }, h.prototype.bool = function () { + return 0 !== this.uint32() + }, h.prototype.fixed32 = function () { + if (this.pos + 4 > this.len) throw o(this, 4); + return d(this.buf, this.pos += 4) + }, h.prototype.sfixed32 = function () { + if (this.pos + 4 > this.len) throw o(this, 4); + return 0 | d(this.buf, this.pos += 4) + }, h.prototype.float = function () { + if (this.pos + 4 > this.len) throw o(this, 4); + var t = e.float.readFloatLE(this.buf, this.pos); + return this.pos += 4, t + }, h.prototype.double = function () { + if (this.pos + 8 > this.len) throw o(this, 4); + var t = e.float.readDoubleLE(this.buf, this.pos); + return this.pos += 8, t + }, h.prototype.bytes = function () { + var t = this.uint32(), i = this.pos, n = this.pos + t; + if (n > this.len) throw o(this, t); + return this.pos += t, Array.isArray(this.buf) ? this.buf.slice(i, n) : i === n ? new this.buf.constructor(0) : this.h.call(this.buf, i, n) + }, h.prototype.string = function () { + var t = this.bytes(); + return u.read(t, 0, t.length) + }, h.prototype.skip = function (t) { + if ("number" == typeof t) { + if (this.pos + t > this.len) throw o(this, t); + this.pos += t + } else do { + if (this.pos >= this.len) throw o(this) + } while (128 & this.buf[this.pos++]); + return this + }, h.prototype.skipType = function (t) { + switch (t) { + case 0: + this.skip(); + break; + case 1: + this.skip(8); + break; + case 2: + this.skip(this.uint32()); + break; + case 3: + for (; 4 != (t = 7 & this.uint32());) this.skipType(t); + break; + case 5: + this.skip(4); + break; + default: + throw Error("invalid wire type " + t + " at offset " + this.pos) + } + return this + }, h.r = function (t) { + r = t, h.create = f(), r.r(); + var i = e.Long ? "toLong" : "toNumber"; + e.merge(h.prototype, { + int64: function () { + return l.call(this)[i](!1) + }, uint64: function () { + return l.call(this)[i](!0) + }, sint64: function () { + return l.call(this).zzDecode()[i](!1) + }, fixed64: function () { + return v.call(this)[i](!0) + }, sfixed64: function () { + return v.call(this)[i](!1) + } + }) + } + }, {35: 35}], 25: [function (t, i, n) { + i.exports = s; + var r = t(24), e = ((s.prototype = Object.create(r.prototype)).constructor = s, t(35)); + + function s(t) { + r.call(this, t) + } + + s.r = function () { + e.Buffer && (s.prototype.h = e.Buffer.prototype.slice) + }, s.prototype.string = function () { + var t = this.uint32(); + return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + t, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + t, this.len)) + }, s.r() + }, {24: 24, 35: 35}], 26: [function (t, i, n) { + i.exports = h; + var r, d, v, e = t(21), + s = (((h.prototype = Object.create(e.prototype)).constructor = h).className = "Root", t(15)), u = t(14), + o = t(23), b = t(33); + + function h(t) { + e.call(this, "", t), this.deferred = [], this.files = [] + } + + function p() { + } + + h.fromJSON = function (t, i) { + return i = i || new h, t.options && i.setOptions(t.options), i.addJSON(t.nested) + }, h.prototype.resolvePath = b.path.resolve, h.prototype.fetch = b.fetch, h.prototype.load = function t(i, s, e) { + "function" == typeof s && (e = s, s = g); + var u = this; + if (!e) return b.asPromise(t, u, i, s); + var o = e === p; + + function h(t, i) { + if (e) { + var n = e; + if (e = null, o) throw t; + n(t, i) + } + } + + function f(t) { + var i = t.lastIndexOf("google/protobuf/"); + if (-1 < i) { + t = t.substring(i); + if (t in v) return t + } + return null + } + + function c(t, i) { + try { + if (b.isString(i) && "{" == (i[0] || "") && (i = JSON.parse(i)), b.isString(i)) { + d.filename = t; + var n, r = d(i, u, s), e = 0; + if (r.imports) for (; e < r.imports.length; ++e) (n = f(r.imports[e]) || u.resolvePath(t, r.imports[e])) && a(n); + if (r.weakImports) for (e = 0; e < r.weakImports.length; ++e) (n = f(r.weakImports[e]) || u.resolvePath(t, r.weakImports[e])) && a(n, !0) + } else u.setOptions(i.options).addJSON(i.nested) + } catch (t) { + h(t) + } + o || l || h(null, u) + } + + function a(n, r) { + if (!~u.files.indexOf(n)) if (u.files.push(n), n in v) o ? c(n, v[n]) : (++l, setTimeout(function () { + --l, c(n, v[n]) + })); else if (o) { + var t; + try { + t = b.fs.readFileSync(n).toString("utf8") + } catch (t) { + return void (r || h(t)) + } + c(n, t) + } else ++l, u.fetch(n, function (t, i) { + --l, e && (t ? r ? l || h(null, u) : h(t) : c(n, i)) + }) + } + + var l = 0; + b.isString(i) && (i = [i]); + for (var n, r = 0; r < i.length; ++r) (n = u.resolvePath("", i[r])) && a(n); + return o ? u : (l || h(null, u), g) + }, h.prototype.loadSync = function (t, i) { + if (b.isNode) return this.load(t, i, p); + throw Error("not supported") + }, h.prototype.resolveAll = function () { + if (this.deferred.length) throw Error("unresolvable extensions: " + this.deferred.map(function (t) { + return "'extend " + t.extend + "' in " + t.parent.fullName + }).join(", ")); + return e.prototype.resolveAll.call(this) + }; + var f = /^[A-Z]/; + + function c(t, i) { + var n, r = i.parent.lookup(i.extend); + if (r) return ((n = new s(i.fullName, i.id, i.type, i.rule, g, i.options)).declaringField = i).extensionField = n, r.add(n), 1 + } + + h.prototype.u = function (t) { + if (t instanceof s) t.extend === g || t.extensionField || c(0, t) || this.deferred.push(t); else if (t instanceof u) f.test(t.name) && (t.parent[t.name] = t.values); else if (!(t instanceof o)) { + if (t instanceof r) for (var i = 0; i < this.deferred.length;) c(0, this.deferred[i]) ? this.deferred.splice(i, 1) : ++i; + for (var n = 0; n < t.nestedArray.length; ++n) this.u(t.e[n]); + f.test(t.name) && (t.parent[t.name] = t) + } + }, h.prototype.o = function (t) { + var i; + if (t instanceof s) t.extend !== g && (t.extensionField ? (t.extensionField.parent.remove(t.extensionField), t.extensionField = null) : -1 < (i = this.deferred.indexOf(t)) && this.deferred.splice(i, 1)); else if (t instanceof u) f.test(t.name) && delete t.parent[t.name]; else if (t instanceof e) { + for (var n = 0; n < t.nestedArray.length; ++n) this.o(t.e[n]); + f.test(t.name) && delete t.parent[t.name] + } + }, h.r = function (t, i, n) { + r = t, d = i, v = n + } + }, {14: 14, 15: 15, 21: 21, 23: 23, 33: 33}], 27: [function (t, i, n) { + i.exports = {} + }, {}], 28: [function (t, i, n) { + n.Service = t(29) + }, {29: 29}], 29: [function (t, i, n) { + i.exports = r; + var o = t(35); + + function r(t, i, n) { + if ("function" != typeof t) throw TypeError("rpcImpl must be a function"); + o.EventEmitter.call(this), this.rpcImpl = t, this.requestDelimited = !!i, this.responseDelimited = !!n + } + + ((r.prototype = Object.create(o.EventEmitter.prototype)).constructor = r).prototype.rpcCall = function t(n, i, r, e, s) { + if (!e) throw TypeError("request must be specified"); + var u = this; + if (!s) return o.asPromise(t, u, n, i, r, e); + if (!u.rpcImpl) return setTimeout(function () { + s(Error("already ended")) + }, 0), g; + try { + return u.rpcImpl(n, i[u.requestDelimited ? "encodeDelimited" : "encode"](e).finish(), function (t, i) { + if (t) return u.emit("error", t, n), s(t); + if (null === i) return u.end(!0), g; + if (!(i instanceof r)) try { + i = r[u.responseDelimited ? "decodeDelimited" : "decode"](i) + } catch (t) { + return u.emit("error", t, n), s(t) + } + return u.emit("data", i, n), s(null, i) + }) + } catch (t) { + return u.emit("error", t, n), setTimeout(function () { + s(t) + }, 0), g + } + }, r.prototype.end = function (t) { + return this.rpcImpl && (t || this.rpcImpl(null, null, null), this.rpcImpl = null, this.emit("end").off()), this + } + }, {35: 35}], 30: [function (t, i, n) { + i.exports = u; + var r = t(21), + s = (((u.prototype = Object.create(r.prototype)).constructor = u).className = "Service", t(20)), + o = t(33), h = t(28); + + function u(t, i) { + r.call(this, t, i), this.methods = {}, this.f = null + } + + function e(t) { + return t.f = null, t + } + + u.fromJSON = function (t, i) { + var n = new u(t, i.options); + if (i.methods) for (var r = Object.keys(i.methods), e = 0; e < r.length; ++e) n.add(s.fromJSON(r[e], i.methods[r[e]])); + return i.nested && n.addJSON(i.nested), n.comment = i.comment, n + }, u.prototype.toJSON = function (t) { + var i = r.prototype.toJSON.call(this, t), n = !!t && !!t.keepComments; + return o.toObject(["options", i && i.options || g, "methods", r.arrayToJSON(this.methodsArray, t) || {}, "nested", i && i.nested || g, "comment", n ? this.comment : g]) + }, Object.defineProperty(u.prototype, "methodsArray", { + get: function () { + return this.f || (this.f = o.toArray(this.methods)) + } + }), u.prototype.get = function (t) { + return this.methods[t] || r.prototype.get.call(this, t) + }, u.prototype.resolveAll = function () { + for (var t = this.methodsArray, i = 0; i < t.length; ++i) t[i].resolve(); + return r.prototype.resolve.call(this) + }, u.prototype.add = function (t) { + if (this.get(t.name)) throw Error("duplicate name '" + t.name + "' in " + this); + return t instanceof s ? e((this.methods[t.name] = t).parent = this) : r.prototype.add.call(this, t) + }, u.prototype.remove = function (t) { + if (t instanceof s) { + if (this.methods[t.name] !== t) throw Error(t + " is not a member of " + this); + return delete this.methods[t.name], t.parent = null, e(this) + } + return r.prototype.remove.call(this, t) + }, u.prototype.create = function (t, i, n) { + for (var r, e = new h.Service(t, i, n), s = 0; s < this.methodsArray.length; ++s) { + var u = o.lcFirst((r = this.f[s]).resolve().name).replace(/[^$\w_]/g, ""); + e[u] = o.codegen(["r", "c"], o.isReserved(u) ? u + "_" : u)("return this.rpcCall(m,q,s,r,c)")({ + m: r, + q: r.resolvedRequestType.ctor, + s: r.resolvedResponseType.ctor + }) + } + return e + } + }, {20: 20, 21: 21, 28: 28, 33: 33}], 31: [function (t, i, n) { + i.exports = w; + var u = t(21), o = (((w.prototype = Object.create(u.prototype)).constructor = w).className = "Type", t(14)), + h = t(23), f = t(15), c = t(18), a = t(30), e = t(19), s = t(24), l = t(38), d = t(33), v = t(13), + b = t(12), p = t(36), y = t(11), m = t(37); + + function w(t, i) { + u.call(this, t, i), this.fields = {}, this.oneofs = g, this.extensions = g, this.reserved = g, this.group = g, this.c = null, this.i = null, this.a = null, this.l = null + } + + function r(t) { + return t.c = t.i = t.a = null, delete t.encode, delete t.decode, delete t.verify, t + } + + Object.defineProperties(w.prototype, { + fieldsById: { + get: function () { + if (!this.c) { + this.c = {}; + for (var t = Object.keys(this.fields), i = 0; i < t.length; ++i) { + var n = this.fields[t[i]], r = n.id; + if (this.c[r]) throw Error("duplicate id " + r + " in " + this); + this.c[r] = n + } + } + return this.c + } + }, fieldsArray: { + get: function () { + return this.i || (this.i = d.toArray(this.fields)) + } + }, oneofsArray: { + get: function () { + return this.a || (this.a = d.toArray(this.oneofs)) + } + }, ctor: { + get: function () { + return this.l || (this.ctor = w.generateConstructor(this)()) + }, set: function (t) { + for (var i = t.prototype, n = (i instanceof e || ((t.prototype = new e).constructor = t, d.merge(t.prototype, i)), t.$type = t.prototype.$type = this, d.merge(t, e, !0), this.l = t, 0); n < this.fieldsArray.length; ++n) this.i[n].resolve(); + for (var r = {}, n = 0; n < this.oneofsArray.length; ++n) r[this.a[n].resolve().name] = { + get: d.oneOfGetter(this.a[n].oneof), + set: d.oneOfSetter(this.a[n].oneof) + }; + n && Object.defineProperties(t.prototype, r) + } + } + }), w.generateConstructor = function (t) { + for (var i, n = d.codegen(["p"], t.name), r = 0; r < t.fieldsArray.length; ++r) (i = t.i[r]).map ? n("this%s={}", d.safeProp(i.name)) : i.repeated && n("this%s=[]", d.safeProp(i.name)); + return n("if(p)for(var ks=Object.keys(p),i=0;i>> 0, this.hi = i >>> 0 + } + + var s = e.zero = new e(0, 0), u = (s.toNumber = function () { + return 0 + }, s.zzEncode = s.zzDecode = function () { + return this + }, s.length = function () { + return 1 + }, e.zeroHash = "\0\0\0\0\0\0\0\0", e.fromNumber = function (t) { + var i, n; + return 0 === t ? s : (n = (t = (i = t < 0) ? -t : t) >>> 0, t = (t - n) / 4294967296 >>> 0, i && (t = ~t >>> 0, n = ~n >>> 0, 4294967295 < ++n && (n = 0, 4294967295 < ++t && (t = 0))), new e(n, t)) + }, e.from = function (t) { + if ("number" == typeof t) return e.fromNumber(t); + if (r.isString(t)) { + if (!r.Long) return e.fromNumber(parseInt(t, 10)); + t = r.Long.fromString(t) + } + return t.low || t.high ? new e(t.low >>> 0, t.high >>> 0) : s + }, e.prototype.toNumber = function (t) { + var i; + return !t && this.hi >>> 31 ? (t = 1 + ~this.lo >>> 0, i = ~this.hi >>> 0, -(t + 4294967296 * (i = t ? i : i + 1 >>> 0))) : this.lo + 4294967296 * this.hi + }, e.prototype.toLong = function (t) { + return r.Long ? new r.Long(0 | this.lo, 0 | this.hi, !!t) : { + low: 0 | this.lo, + high: 0 | this.hi, + unsigned: !!t + } + }, String.prototype.charCodeAt); + e.fromHash = function (t) { + return "\0\0\0\0\0\0\0\0" === t ? s : new e((u.call(t, 0) | u.call(t, 1) << 8 | u.call(t, 2) << 16 | u.call(t, 3) << 24) >>> 0, (u.call(t, 4) | u.call(t, 5) << 8 | u.call(t, 6) << 16 | u.call(t, 7) << 24) >>> 0) + }, e.prototype.toHash = function () { + return String.fromCharCode(255 & this.lo, this.lo >>> 8 & 255, this.lo >>> 16 & 255, this.lo >>> 24, 255 & this.hi, this.hi >>> 8 & 255, this.hi >>> 16 & 255, this.hi >>> 24) + }, e.prototype.zzEncode = function () { + var t = this.hi >> 31; + return this.hi = ((this.hi << 1 | this.lo >>> 31) ^ t) >>> 0, this.lo = (this.lo << 1 ^ t) >>> 0, this + }, e.prototype.zzDecode = function () { + var t = -(1 & this.lo); + return this.lo = ((this.lo >>> 1 | this.hi << 31) ^ t) >>> 0, this.hi = (this.hi >>> 1 ^ t) >>> 0, this + }, e.prototype.length = function () { + var t = this.lo, i = (this.lo >>> 28 | this.hi << 4) >>> 0, n = this.hi >>> 24; + return 0 == n ? 0 == i ? t < 16384 ? t < 128 ? 1 : 2 : t < 2097152 ? 3 : 4 : i < 16384 ? i < 128 ? 5 : 6 : i < 2097152 ? 7 : 8 : n < 128 ? 9 : 10 + } + }, {35: 35}], 35: [function (t, i, n) { + var r = n; + + function e(t, i, n) { + for (var r = Object.keys(i), e = 0; e < r.length; ++e) t[r[e]] !== g && n || (t[r[e]] = i[r[e]]); + return t + } + + function s(t) { + function n(t, i) { + if (!(this instanceof n)) return new n(t, i); + Object.defineProperty(this, "message", { + get: function () { + return t + } + }), Error.captureStackTrace ? Error.captureStackTrace(this, n) : Object.defineProperty(this, "stack", {value: Error().stack || ""}), i && e(this, i) + } + + return n.prototype = Object.create(Error.prototype, { + constructor: { + value: n, + writable: !0, + enumerable: !1, + configurable: !0 + }, name: { + get() { + return t + }, set: g, enumerable: !1, configurable: !0 + }, toString: { + value() { + return this.name + ": " + this.message + }, writable: !0, enumerable: !1, configurable: !0 + } + }), n + } + + r.asPromise = t(1), r.base64 = t(2), r.EventEmitter = t(4), r.float = t(6), r.inquire = t(7), r.utf8 = t(10), r.pool = t(9), r.LongBits = t(34), r.isNode = !!("undefined" != typeof global && global && global.process && global.process.versions && global.process.versions.node), r.global = r.isNode && global || "undefined" != typeof window && window || "undefined" != typeof self && self || this, r.emptyArray = Object.freeze ? Object.freeze([]) : [], r.emptyObject = Object.freeze ? Object.freeze({}) : {}, r.isInteger = Number.isInteger || function (t) { + return "number" == typeof t && isFinite(t) && Math.floor(t) === t + }, r.isString = function (t) { + return "string" == typeof t || t instanceof String + }, r.isObject = function (t) { + return t && "object" == typeof t + }, r.isset = r.isSet = function (t, i) { + var n = t[i]; + return null != n && t.hasOwnProperty(i) && ("object" != typeof n || 0 < (Array.isArray(n) ? n : Object.keys(n)).length) + }, r.Buffer = function () { + try { + var t = r.inquire("buffer").Buffer; + return t.prototype.utf8Write ? t : null + } catch (t) { + return null + } + }(), r.v = null, r.b = null, r.newBuffer = function (t) { + return "number" == typeof t ? r.Buffer ? r.b(t) : new r.Array(t) : r.Buffer ? r.v(t) : "undefined" == typeof Uint8Array ? t : new Uint8Array(t) + }, r.Array = "undefined" != typeof Uint8Array ? Uint8Array : Array, r.Long = r.global.dcodeIO && r.global.dcodeIO.Long || r.global.Long || r.inquire("long"), r.key2Re = /^true|false|0|1$/, r.key32Re = /^-?(?:0|[1-9][0-9]*)$/, r.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, r.longToHash = function (t) { + return t ? r.LongBits.from(t).toHash() : r.LongBits.zeroHash + }, r.longFromHash = function (t, i) { + t = r.LongBits.fromHash(t); + return r.Long ? r.Long.fromBits(t.lo, t.hi, i) : t.toNumber(!!i) + }, r.merge = e, r.lcFirst = function (t) { + return (t[0] || "").toLowerCase() + t.substring(1) + }, r.newError = s, r.ProtocolError = s("ProtocolError"), r.oneOfGetter = function (t) { + for (var n = {}, i = 0; i < t.length; ++i) n[t[i]] = 1; + return function () { + for (var t = Object.keys(this), i = t.length - 1; -1 < i; --i) if (1 === n[t[i]] && this[t[i]] !== g && null !== this[t[i]]) return t[i] + } + }, r.oneOfSetter = function (n) { + return function (t) { + for (var i = 0; i < n.length; ++i) n[i] !== t && delete this[n[i]] + } + }, r.toJSONOptions = {longs: String, enums: String, bytes: String, json: !0}, r.r = function () { + var n = r.Buffer; + n ? (r.v = n.from !== Uint8Array.from && n.from || function (t, i) { + return new n(t, i) + }, r.b = n.allocUnsafe || function (t) { + return new n(t) + }) : r.v = r.b = null + } + }, {1: 1, 10: 10, 2: 2, 34: 34, 4: 4, 6: 6, 7: 7, 9: 9}], 36: [function (t, i, n) { + i.exports = function (t) { + var i = h.codegen(["m"], t.name + "$verify")('if(typeof m!=="object"||m===null)')("return%j", "object expected"), + n = t.oneofsArray, r = {}; + n.length && i("var p={}"); + for (var e = 0; e < t.fieldsArray.length; ++e) { + var s, u = t.i[e].resolve(), o = "m" + h.safeProp(u.name); + u.optional && i("if(%s!=null&&m.hasOwnProperty(%j)){", o, u.name), u.map ? (i("if(!util.isObject(%s))", o)("return%j", f(u, "object"))("var k=Object.keys(%s)", o)("for(var i=0;i>> 7 | t.hi << 25) >>> 0, t.hi >>>= 7; + for (; 127 < t.lo;) i[n++] = 127 & t.lo | 128, t.lo = t.lo >>> 7; + i[n++] = t.lo + } + + function p(t, i, n) { + i[n] = 255 & t, i[n + 1] = t >>> 8 & 255, i[n + 2] = t >>> 16 & 255, i[n + 3] = t >>> 24 + } + + a.create = l(), a.alloc = function (t) { + return new e.Array(t) + }, e.Array !== Array && (a.alloc = e.pool(a.alloc, e.Array.prototype.subarray)), a.prototype.p = function (t, i, n) { + return this.tail = this.tail.next = new h(t, i, n), this.len += i, this + }, (v.prototype = Object.create(h.prototype)).fn = function (t, i, n) { + for (; 127 < t;) i[n++] = 127 & t | 128, t >>>= 7; + i[n] = t + }, a.prototype.uint32 = function (t) { + return this.len += (this.tail = this.tail.next = new v((t >>>= 0) < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5, t)).len, this + }, a.prototype.int32 = function (t) { + return t < 0 ? this.p(b, 10, s.fromNumber(t)) : this.uint32(t) + }, a.prototype.sint32 = function (t) { + return this.uint32((t << 1 ^ t >> 31) >>> 0) + }, a.prototype.int64 = a.prototype.uint64 = function (t) { + t = s.from(t); + return this.p(b, t.length(), t) + }, a.prototype.sint64 = function (t) { + t = s.from(t).zzEncode(); + return this.p(b, t.length(), t) + }, a.prototype.bool = function (t) { + return this.p(d, 1, t ? 1 : 0) + }, a.prototype.sfixed32 = a.prototype.fixed32 = function (t) { + return this.p(p, 4, t >>> 0) + }, a.prototype.sfixed64 = a.prototype.fixed64 = function (t) { + t = s.from(t); + return this.p(p, 4, t.lo).p(p, 4, t.hi) + }, a.prototype.float = function (t) { + return this.p(e.float.writeFloatLE, 4, t) + }, a.prototype.double = function (t) { + return this.p(e.float.writeDoubleLE, 8, t) + }; + var y = e.Array.prototype.set ? function (t, i, n) { + i.set(t, n) + } : function (t, i, n) { + for (var r = 0; r < t.length; ++r) i[n + r] = t[r] + }; + a.prototype.bytes = function (t) { + var i, n = t.length >>> 0; + return n ? (e.isString(t) && (i = a.alloc(n = u.length(t)), u.decode(t, i, 0), t = i), this.uint32(n).p(y, n, t)) : this.p(d, 1, 0) + }, a.prototype.string = function (t) { + var i = o.length(t); + return i ? this.uint32(i).p(o.write, i, t) : this.p(d, 1, 0) + }, a.prototype.fork = function () { + return this.states = new c(this), this.head = this.tail = new h(f, 0, 0), this.len = 0, this + }, a.prototype.reset = function () { + return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new h(f, 0, 0), this.len = 0), this + }, a.prototype.ldelim = function () { + var t = this.head, i = this.tail, n = this.len; + return this.reset().uint32(n), n && (this.tail.next = t.next, this.tail = i, this.len += n), this + }, a.prototype.finish = function () { + for (var t = this.head.next, i = this.constructor.alloc(this.len), n = 0; t;) t.fn(t.val, i, n), n += t.len, t = t.next; + return i + }, a.r = function (t) { + r = t, a.create = l(), r.r() + } + }, {35: 35}], 39: [function (t, i, n) { + i.exports = s; + var r = t(38), e = ((s.prototype = Object.create(r.prototype)).constructor = s, t(35)); + + function s() { + r.call(this) + } + + function u(t, i, n) { + t.length < 40 ? e.utf8.write(t, i, n) : i.utf8Write ? i.utf8Write(t, n) : i.write(t, n) + } + + s.r = function () { + s.alloc = e.b, s.writeBytesBuffer = e.Buffer && e.Buffer.prototype instanceof Uint8Array && "set" === e.Buffer.prototype.set.name ? function (t, i, n) { + i.set(t, n) + } : function (t, i, n) { + if (t.copy) t.copy(i, n, 0, t.length); else for (var r = 0; r < t.length;) i[n++] = t[r++] + } + }, s.prototype.bytes = function (t) { + var i = (t = e.isString(t) ? e.v(t, "base64") : t).length >>> 0; + return this.uint32(i), i && this.p(s.writeBytesBuffer, i, t), this + }, s.prototype.string = function (t) { + var i = e.Buffer.byteLength(t); + return this.uint32(i), i && this.p(u, i, t), this + }, s.r() + }, {35: 35, 38: 38}] + }, {}, [16]) +}(); // https://github.com/emn178/js-md5 做了修改 let md5 = null; (function () { - 'use strict'; - var ERROR = 'input is invalid type'; - var WINDOW = typeof window === 'object'; - var root = WINDOW ? window : {}; - if (root.JS_MD5_NO_WINDOW) { - WINDOW = false; - } - var WEB_WORKER = !WINDOW && typeof self === 'object'; - var NODE_JS = - !root.JS_MD5_NO_NODE_JS && - typeof process === 'object' && - process.versions && - process.versions.node; - if (NODE_JS) { - root = global; - } else if (WEB_WORKER) { - root = self; - } - var COMMON_JS = - !root.JS_MD5_NO_COMMON_JS && typeof module === 'object' && module.exports; - var AMD = typeof define === 'function' && define.amd; - var ARRAY_BUFFER = - !root.JS_MD5_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined'; - var HEX_CHARS = '0123456789abcdef'.split(''); - var EXTRA = [128, 32768, 8388608, -2147483648]; - var SHIFT = [0, 8, 16, 24]; - var OUTPUT_TYPES = [ - 'hex', - 'array', - 'digest', - 'buffer', - 'arrayBuffer', - 'base64', - ]; - var BASE64_ENCODE_CHAR = - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split( - '' - ); - var blocks = [], - buffer8; - if (ARRAY_BUFFER) { - var buffer = new ArrayBuffer(68); - buffer8 = new Uint8Array(buffer); - blocks = new Uint32Array(buffer); - } - if (root.JS_MD5_NO_NODE_JS || !Array.isArray) { - Array.isArray = function (obj) { - return Object.prototype.toString.call(obj) === '[object Array]'; - }; - } - if ( - ARRAY_BUFFER && - (root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView) - ) { - ArrayBuffer.isView = function (obj) { - return ( - typeof obj === 'object' && - obj.buffer && - obj.buffer.constructor === ArrayBuffer - ); - }; - } - var createOutputMethod = function (outputType) { - return function (message) { - return new Md5(true).update(message)[outputType](); - }; - }; - var createMethod = function () { - var method = createOutputMethod('hex'); + 'use strict'; + var ERROR = 'input is invalid type'; + var WINDOW = typeof window === 'object'; + var root = WINDOW ? window : {}; + if (root.JS_MD5_NO_WINDOW) { + WINDOW = false + } + var WEB_WORKER = !WINDOW && typeof self === 'object'; + var NODE_JS = !root.JS_MD5_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node; if (NODE_JS) { - method = nodeWrap(method); + root = global + } else if (WEB_WORKER) { + root = self } - method.create = function () { - return new Md5(); - }; - method.update = function (message) { - return method.create().update(message); - }; - for (var i = 0; i < OUTPUT_TYPES.length; ++i) { - var type = OUTPUT_TYPES[i]; - method[type] = createOutputMethod(type); - } - return method; - }; - var nodeWrap = function (method) { - var crypto = eval("require('crypto')"); - var Buffer = eval("require('buffer').Buffer"); - var nodeMethod = function (message) { - if (typeof message === 'string') { - return crypto.createHash('md5').update(message, 'utf8').digest('hex'); - } else { - if (message === null || message === undefined) { - throw ERROR; - } else if (message.constructor === ArrayBuffer) { - message = new Uint8Array(message); - } - } - if ( - Array.isArray(message) || - ArrayBuffer.isView(message) || - message.constructor === Buffer - ) { - return crypto - .createHash('md5') - .update(new Buffer(message)) - .digest('hex'); - } else { - return method(message); - } - }; - return nodeMethod; - }; - function Md5(sharedMemory) { - if (sharedMemory) { - blocks[0] = - blocks[16] = - blocks[1] = - blocks[2] = - blocks[3] = - blocks[4] = - blocks[5] = - blocks[6] = - blocks[7] = - blocks[8] = - blocks[9] = - blocks[10] = - blocks[11] = - blocks[12] = - blocks[13] = - blocks[14] = - blocks[15] = - 0; - this.blocks = blocks; - this.buffer8 = buffer8; - } else { - if (ARRAY_BUFFER) { + var COMMON_JS = !root.JS_MD5_NO_COMMON_JS && typeof module === 'object' && module.exports; + var AMD = typeof define === 'function' && define.amd; + var ARRAY_BUFFER = !root.JS_MD5_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined'; + var HEX_CHARS = '0123456789abcdef'.split(''); + var EXTRA = [128, 32768, 8388608, -2147483648]; + var SHIFT = [0, 8, 16, 24]; + var OUTPUT_TYPES = ['hex', 'array', 'digest', 'buffer', 'arrayBuffer', 'base64']; + var BASE64_ENCODE_CHAR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + var blocks = [], buffer8; + if (ARRAY_BUFFER) { var buffer = new ArrayBuffer(68); - this.buffer8 = new Uint8Array(buffer); - this.blocks = new Uint32Array(buffer); - } else { - this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - } + buffer8 = new Uint8Array(buffer); + blocks = new Uint32Array(buffer) } - this.h0 = - this.h1 = - this.h2 = - this.h3 = - this.start = - this.bytes = - this.hBytes = - 0; - this.finalized = this.hashed = false; - this.first = true; - } - Md5.prototype.update = function (message) { - if (this.finalized) { - return; - } - var notString, - type = typeof message; - if (type !== 'string') { - if (type === 'object') { - if (message === null) { - throw ERROR; - } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) { - message = new Uint8Array(message); - } else if (!Array.isArray(message)) { - if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) { - throw ERROR; - } + if (root.JS_MD5_NO_NODE_JS || !Array.isArray) { + Array.isArray = function (obj) { + return Object.prototype.toString.call(obj) === '[object Array]' } - } else { - throw ERROR; - } - notString = true; } - var code, - index = 0, - i, - length = message.length, - blocks = this.blocks; - var buffer8 = this.buffer8; - while (index < length) { - if (this.hashed) { - this.hashed = false; - blocks[0] = blocks[16]; - blocks[16] = - blocks[1] = - blocks[2] = - blocks[3] = - blocks[4] = - blocks[5] = - blocks[6] = - blocks[7] = - blocks[8] = - blocks[9] = - blocks[10] = - blocks[11] = - blocks[12] = - blocks[13] = - blocks[14] = - blocks[15] = - 0; - } - if (notString) { - if (ARRAY_BUFFER) { - for (i = this.start; index < length && i < 64; ++index) { - buffer8[i++] = message[index]; - } - } else { - for (i = this.start; index < length && i < 64; ++index) { - blocks[i >> 2] |= message[index] << SHIFT[i++ & 3]; - } + if (ARRAY_BUFFER && (root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) { + ArrayBuffer.isView = function (obj) { + return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer } - } else { - if (ARRAY_BUFFER) { - for (i = this.start; index < length && i < 64; ++index) { - code = message.charCodeAt(index); - if (code < 0x80) { - buffer8[i++] = code; - } else if (code < 0x800) { - buffer8[i++] = 0xc0 | (code >> 6); - buffer8[i++] = 0x80 | (code & 0x3f); - } else if (code < 0xd800 || code >= 0xe000) { - buffer8[i++] = 0xe0 | (code >> 12); - buffer8[i++] = 0x80 | ((code >> 6) & 0x3f); - buffer8[i++] = 0x80 | (code & 0x3f); + } + var createOutputMethod = function (outputType) { + return function (message) { + return new Md5(true).update(message)[outputType]() + } + }; + var createMethod = function () { + var method = createOutputMethod('hex'); + if (NODE_JS) { + method = nodeWrap(method) + } + method.create = function () { + return new Md5() + }; + method.update = function (message) { + return method.create().update(message) + }; + for (var i = 0; i < OUTPUT_TYPES.length; ++i) { + var type = OUTPUT_TYPES[i]; + method[type] = createOutputMethod(type) + } + return method + }; + var nodeWrap = function (method) { + var crypto = eval("require('crypto')"); + var Buffer = eval("require('buffer').Buffer"); + var nodeMethod = function (message) { + if (typeof message === 'string') { + return crypto.createHash('md5').update(message, 'utf8').digest('hex') } else { - code = - 0x10000 + - (((code & 0x3ff) << 10) | - (message.charCodeAt(++index) & 0x3ff)); - buffer8[i++] = 0xf0 | (code >> 18); - buffer8[i++] = 0x80 | ((code >> 12) & 0x3f); - buffer8[i++] = 0x80 | ((code >> 6) & 0x3f); - buffer8[i++] = 0x80 | (code & 0x3f); + if (message === null || message === undefined) { + throw ERROR; + } else if (message.constructor === ArrayBuffer) { + message = new Uint8Array(message) + } } - } - } else { - for (i = this.start; index < length && i < 64; ++index) { - code = message.charCodeAt(index); - if (code < 0x80) { - blocks[i >> 2] |= code << SHIFT[i++ & 3]; - } else if (code < 0x800) { - blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; - } else if (code < 0xd800 || code >= 0xe000) { - blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + if (Array.isArray(message) || ArrayBuffer.isView(message) || message.constructor === Buffer) { + return crypto.createHash('md5').update(new Buffer(message)).digest('hex') } else { - code = - 0x10000 + - (((code & 0x3ff) << 10) | - (message.charCodeAt(++index) & 0x3ff)); - blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= - (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + return method(message) + } + }; + return nodeMethod + }; + + function Md5(sharedMemory) { + if (sharedMemory) { + blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; + this.blocks = blocks; + this.buffer8 = buffer8 + } else { + if (ARRAY_BUFFER) { + var buffer = new ArrayBuffer(68); + this.buffer8 = new Uint8Array(buffer); + this.blocks = new Uint32Array(buffer) + } else { + this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] } - } } - } - this.lastByteIndex = i; - this.bytes += i - this.start; - if (i >= 64) { - this.start = i - 64; - this.hash(); - this.hashed = true; - } else { - this.start = i; - } + this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0; + this.finalized = this.hashed = false; + this.first = true } - if (this.bytes > 4294967295) { - this.hBytes += (this.bytes / 4294967296) << 0; - this.bytes = this.bytes % 4294967296; - } - return this; - }; - Md5.prototype.finalize = function () { - if (this.finalized) { - return; - } - this.finalized = true; - var blocks = this.blocks, - i = this.lastByteIndex; - blocks[i >> 2] |= EXTRA[i & 3]; - if (i >= 56) { - if (!this.hashed) { - this.hash(); - } - blocks[0] = blocks[16]; - blocks[16] = - blocks[1] = - blocks[2] = - blocks[3] = - blocks[4] = - blocks[5] = - blocks[6] = - blocks[7] = - blocks[8] = - blocks[9] = - blocks[10] = - blocks[11] = - blocks[12] = - blocks[13] = - blocks[14] = - blocks[15] = - 0; - } - blocks[14] = this.bytes << 3; - blocks[15] = (this.hBytes << 3) | (this.bytes >>> 29); - this.hash(); - }; - Md5.prototype.hash = function () { - var a, - b, - c, - d, - bc, - da, - blocks = this.blocks; - if (this.first) { - a = blocks[0] - 680876937; - a = (((a << 7) | (a >>> 25)) - 271733879) << 0; - d = (-1732584194 ^ (a & 2004318071)) + blocks[1] - 117830708; - d = (((d << 12) | (d >>> 20)) + a) << 0; - c = (-271733879 ^ (d & (a ^ -271733879))) + blocks[2] - 1126478375; - c = (((c << 17) | (c >>> 15)) + d) << 0; - b = (a ^ (c & (d ^ a))) + blocks[3] - 1316259209; - b = (((b << 22) | (b >>> 10)) + c) << 0; + + Md5.prototype.update = function (message) { + if (this.finalized) { + return + } + var notString, type = typeof message; + if (type !== 'string') { + if (type === 'object') { + if (message === null) { + throw ERROR; + } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) { + message = new Uint8Array(message) + } else if (!Array.isArray(message)) { + if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) { + throw ERROR; + } + } + } else { + throw ERROR; + } + notString = true + } + var code, index = 0, i, length = message.length, blocks = this.blocks; + var buffer8 = this.buffer8; + while (index < length) { + if (this.hashed) { + this.hashed = false; + blocks[0] = blocks[16]; + blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0 + } + if (notString) { + if (ARRAY_BUFFER) { + for (i = this.start; index < length && i < 64; ++index) { + buffer8[i++] = message[index] + } + } else { + for (i = this.start; index < length && i < 64; ++index) { + blocks[i >> 2] |= message[index] << SHIFT[i++ & 3] + } + } + } else { + if (ARRAY_BUFFER) { + for (i = this.start; index < length && i < 64; ++index) { + code = message.charCodeAt(index); + if (code < 0x80) { + buffer8[i++] = code + } else if (code < 0x800) { + buffer8[i++] = 0xc0 | (code >> 6); + buffer8[i++] = 0x80 | (code & 0x3f) + } else if (code < 0xd800 || code >= 0xe000) { + buffer8[i++] = 0xe0 | (code >> 12); + buffer8[i++] = 0x80 | ((code >> 6) & 0x3f); + buffer8[i++] = 0x80 | (code & 0x3f) + } else { + code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); + buffer8[i++] = 0xf0 | (code >> 18); + buffer8[i++] = 0x80 | ((code >> 12) & 0x3f); + buffer8[i++] = 0x80 | ((code >> 6) & 0x3f); + buffer8[i++] = 0x80 | (code & 0x3f) + } + } + } else { + for (i = this.start; index < length && i < 64; ++index) { + code = message.charCodeAt(index); + if (code < 0x80) { + blocks[i >> 2] |= code << SHIFT[i++ & 3] + } else if (code < 0x800) { + blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3] + } else if (code < 0xd800 || code >= 0xe000) { + blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3] + } else { + code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); + blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3] + } + } + } + } + this.lastByteIndex = i; + this.bytes += i - this.start; + if (i >= 64) { + this.start = i - 64; + this.hash(); + this.hashed = true + } else { + this.start = i + } + } + if (this.bytes > 4294967295) { + this.hBytes += this.bytes / 4294967296 << 0; + this.bytes = this.bytes % 4294967296 + } + return this + }; + Md5.prototype.finalize = function () { + if (this.finalized) { + return + } + this.finalized = true; + var blocks = this.blocks, i = this.lastByteIndex; + blocks[i >> 2] |= EXTRA[i & 3]; + if (i >= 56) { + if (!this.hashed) { + this.hash() + } + blocks[0] = blocks[16]; + blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0 + } + blocks[14] = this.bytes << 3; + blocks[15] = this.hBytes << 3 | this.bytes >>> 29; + this.hash() + }; + Md5.prototype.hash = function () { + var a, b, c, d, bc, da, blocks = this.blocks; + if (this.first) { + a = blocks[0] - 680876937; + a = (a << 7 | a >>> 25) - 271733879 << 0; + d = (-1732584194 ^ a & 2004318071) + blocks[1] - 117830708; + d = (d << 12 | d >>> 20) + a << 0; + c = (-271733879 ^ (d & (a ^ -271733879))) + blocks[2] - 1126478375; + c = (c << 17 | c >>> 15) + d << 0; + b = (a ^ (c & (d ^ a))) + blocks[3] - 1316259209; + b = (b << 22 | b >>> 10) + c << 0 + } else { + a = this.h0; + b = this.h1; + c = this.h2; + d = this.h3; + a += (d ^ (b & (c ^ d))) + blocks[0] - 680876936; + a = (a << 7 | a >>> 25) + b << 0; + d += (c ^ (a & (b ^ c))) + blocks[1] - 389564586; + d = (d << 12 | d >>> 20) + a << 0; + c += (b ^ (d & (a ^ b))) + blocks[2] + 606105819; + c = (c << 17 | c >>> 15) + d << 0; + b += (a ^ (c & (d ^ a))) + blocks[3] - 1044525330; + b = (b << 22 | b >>> 10) + c << 0 + } + a += (d ^ (b & (c ^ d))) + blocks[4] - 176418897; + a = (a << 7 | a >>> 25) + b << 0; + d += (c ^ (a & (b ^ c))) + blocks[5] + 1200080426; + d = (d << 12 | d >>> 20) + a << 0; + c += (b ^ (d & (a ^ b))) + blocks[6] - 1473231341; + c = (c << 17 | c >>> 15) + d << 0; + b += (a ^ (c & (d ^ a))) + blocks[7] - 45705983; + b = (b << 22 | b >>> 10) + c << 0; + a += (d ^ (b & (c ^ d))) + blocks[8] + 1770035416; + a = (a << 7 | a >>> 25) + b << 0; + d += (c ^ (a & (b ^ c))) + blocks[9] - 1958414417; + d = (d << 12 | d >>> 20) + a << 0; + c += (b ^ (d & (a ^ b))) + blocks[10] - 42063; + c = (c << 17 | c >>> 15) + d << 0; + b += (a ^ (c & (d ^ a))) + blocks[11] - 1990404162; + b = (b << 22 | b >>> 10) + c << 0; + a += (d ^ (b & (c ^ d))) + blocks[12] + 1804603682; + a = (a << 7 | a >>> 25) + b << 0; + d += (c ^ (a & (b ^ c))) + blocks[13] - 40341101; + d = (d << 12 | d >>> 20) + a << 0; + c += (b ^ (d & (a ^ b))) + blocks[14] - 1502002290; + c = (c << 17 | c >>> 15) + d << 0; + b += (a ^ (c & (d ^ a))) + blocks[15] + 1236535329; + b = (b << 22 | b >>> 10) + c << 0; + a += (c ^ (d & (b ^ c))) + blocks[1] - 165796510; + a = (a << 5 | a >>> 27) + b << 0; + d += (b ^ (c & (a ^ b))) + blocks[6] - 1069501632; + d = (d << 9 | d >>> 23) + a << 0; + c += (a ^ (b & (d ^ a))) + blocks[11] + 643717713; + c = (c << 14 | c >>> 18) + d << 0; + b += (d ^ (a & (c ^ d))) + blocks[0] - 373897302; + b = (b << 20 | b >>> 12) + c << 0; + a += (c ^ (d & (b ^ c))) + blocks[5] - 701558691; + a = (a << 5 | a >>> 27) + b << 0; + d += (b ^ (c & (a ^ b))) + blocks[10] + 38016083; + d = (d << 9 | d >>> 23) + a << 0; + c += (a ^ (b & (d ^ a))) + blocks[15] - 660478335; + c = (c << 14 | c >>> 18) + d << 0; + b += (d ^ (a & (c ^ d))) + blocks[4] - 405537848; + b = (b << 20 | b >>> 12) + c << 0; + a += (c ^ (d & (b ^ c))) + blocks[9] + 568446438; + a = (a << 5 | a >>> 27) + b << 0; + d += (b ^ (c & (a ^ b))) + blocks[14] - 1019803690; + d = (d << 9 | d >>> 23) + a << 0; + c += (a ^ (b & (d ^ a))) + blocks[3] - 187363961; + c = (c << 14 | c >>> 18) + d << 0; + b += (d ^ (a & (c ^ d))) + blocks[8] + 1163531501; + b = (b << 20 | b >>> 12) + c << 0; + a += (c ^ (d & (b ^ c))) + blocks[13] - 1444681467; + a = (a << 5 | a >>> 27) + b << 0; + d += (b ^ (c & (a ^ b))) + blocks[2] - 51403784; + d = (d << 9 | d >>> 23) + a << 0; + c += (a ^ (b & (d ^ a))) + blocks[7] + 1735328473; + c = (c << 14 | c >>> 18) + d << 0; + b += (d ^ (a & (c ^ d))) + blocks[12] - 1926607734; + b = (b << 20 | b >>> 12) + c << 0; + bc = b ^ c; + a += (bc ^ d) + blocks[5] - 378558; + a = (a << 4 | a >>> 28) + b << 0; + d += (bc ^ a) + blocks[8] - 2022574463; + d = (d << 11 | d >>> 21) + a << 0; + da = d ^ a; + c += (da ^ b) + blocks[11] + 1839030562; + c = (c << 16 | c >>> 16) + d << 0; + b += (da ^ c) + blocks[14] - 35309556; + b = (b << 23 | b >>> 9) + c << 0; + bc = b ^ c; + a += (bc ^ d) + blocks[1] - 1530992060; + a = (a << 4 | a >>> 28) + b << 0; + d += (bc ^ a) + blocks[4] + 1272893353; + d = (d << 11 | d >>> 21) + a << 0; + da = d ^ a; + c += (da ^ b) + blocks[7] - 155497632; + c = (c << 16 | c >>> 16) + d << 0; + b += (da ^ c) + blocks[10] - 1094730640; + b = (b << 23 | b >>> 9) + c << 0; + bc = b ^ c; + a += (bc ^ d) + blocks[13] + 681279174; + a = (a << 4 | a >>> 28) + b << 0; + d += (bc ^ a) + blocks[0] - 358537222; + d = (d << 11 | d >>> 21) + a << 0; + da = d ^ a; + c += (da ^ b) + blocks[3] - 722521979; + c = (c << 16 | c >>> 16) + d << 0; + b += (da ^ c) + blocks[6] + 76029189; + b = (b << 23 | b >>> 9) + c << 0; + bc = b ^ c; + a += (bc ^ d) + blocks[9] - 640364487; + a = (a << 4 | a >>> 28) + b << 0; + d += (bc ^ a) + blocks[12] - 421815835; + d = (d << 11 | d >>> 21) + a << 0; + da = d ^ a; + c += (da ^ b) + blocks[15] + 530742520; + c = (c << 16 | c >>> 16) + d << 0; + b += (da ^ c) + blocks[2] - 995338651; + b = (b << 23 | b >>> 9) + c << 0; + a += (c ^ (b | ~d)) + blocks[0] - 198630844; + a = (a << 6 | a >>> 26) + b << 0; + d += (b ^ (a | ~c)) + blocks[7] + 1126891415; + d = (d << 10 | d >>> 22) + a << 0; + c += (a ^ (d | ~b)) + blocks[14] - 1416354905; + c = (c << 15 | c >>> 17) + d << 0; + b += (d ^ (c | ~a)) + blocks[5] - 57434055; + b = (b << 21 | b >>> 11) + c << 0; + a += (c ^ (b | ~d)) + blocks[12] + 1700485571; + a = (a << 6 | a >>> 26) + b << 0; + d += (b ^ (a | ~c)) + blocks[3] - 1894986606; + d = (d << 10 | d >>> 22) + a << 0; + c += (a ^ (d | ~b)) + blocks[10] - 1051523; + c = (c << 15 | c >>> 17) + d << 0; + b += (d ^ (c | ~a)) + blocks[1] - 2054922799; + b = (b << 21 | b >>> 11) + c << 0; + a += (c ^ (b | ~d)) + blocks[8] + 1873313359; + a = (a << 6 | a >>> 26) + b << 0; + d += (b ^ (a | ~c)) + blocks[15] - 30611744; + d = (d << 10 | d >>> 22) + a << 0; + c += (a ^ (d | ~b)) + blocks[6] - 1560198380; + c = (c << 15 | c >>> 17) + d << 0; + b += (d ^ (c | ~a)) + blocks[13] + 1309151649; + b = (b << 21 | b >>> 11) + c << 0; + a += (c ^ (b | ~d)) + blocks[4] - 145523070; + a = (a << 6 | a >>> 26) + b << 0; + d += (b ^ (a | ~c)) + blocks[11] - 1120210379; + d = (d << 10 | d >>> 22) + a << 0; + c += (a ^ (d | ~b)) + blocks[2] + 718787259; + c = (c << 15 | c >>> 17) + d << 0; + b += (d ^ (c | ~a)) + blocks[9] - 343485551; + b = (b << 21 | b >>> 11) + c << 0; + if (this.first) { + this.h0 = a + 1732584193 << 0; + this.h1 = b - 271733879 << 0; + this.h2 = c - 1732584194 << 0; + this.h3 = d + 271733878 << 0; + this.first = false + } else { + this.h0 = this.h0 + a << 0; + this.h1 = this.h1 + b << 0; + this.h2 = this.h2 + c << 0; + this.h3 = this.h3 + d << 0 + } + }; + Md5.prototype.hex = function () { + this.finalize(); + var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3; + return HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] + HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] + HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] + HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] + HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] + HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] + HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] + HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] + HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] + HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] + HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] + HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] + HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] + HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] + HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] + HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F] + }; + Md5.prototype.toString = Md5.prototype.hex; + Md5.prototype.digest = function () { + this.finalize(); + var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3; + return [h0 & 0xFF, (h0 >> 8) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 24) & 0xFF, h1 & 0xFF, (h1 >> 8) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 24) & 0xFF, h2 & 0xFF, (h2 >> 8) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 24) & 0xFF, h3 & 0xFF, (h3 >> 8) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 24) & 0xFF] + }; + Md5.prototype.array = Md5.prototype.digest; + Md5.prototype.arrayBuffer = function () { + this.finalize(); + var buffer = new ArrayBuffer(16); + var blocks = new Uint32Array(buffer); + blocks[0] = this.h0; + blocks[1] = this.h1; + blocks[2] = this.h2; + blocks[3] = this.h3; + return buffer + }; + Md5.prototype.buffer = Md5.prototype.arrayBuffer; + Md5.prototype.base64 = function () { + var v1, v2, v3, base64Str = '', bytes = this.array(); + for (var i = 0; i < 15;) { + v1 = bytes[i++]; + v2 = bytes[i++]; + v3 = bytes[i++]; + base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] + BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] + BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] + BASE64_ENCODE_CHAR[v3 & 63] + } + v1 = bytes[i]; + base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] + BASE64_ENCODE_CHAR[(v1 << 4) & 63] + '=='; + return base64Str + }; + var exports = createMethod(); + if (COMMON_JS) { + module.exports = exports } else { - a = this.h0; - b = this.h1; - c = this.h2; - d = this.h3; - a += (d ^ (b & (c ^ d))) + blocks[0] - 680876936; - a = (((a << 7) | (a >>> 25)) + b) << 0; - d += (c ^ (a & (b ^ c))) + blocks[1] - 389564586; - d = (((d << 12) | (d >>> 20)) + a) << 0; - c += (b ^ (d & (a ^ b))) + blocks[2] + 606105819; - c = (((c << 17) | (c >>> 15)) + d) << 0; - b += (a ^ (c & (d ^ a))) + blocks[3] - 1044525330; - b = (((b << 22) | (b >>> 10)) + c) << 0; + root.md5 = exports; + md5 = exports; + if (AMD) { + define(function () { + return exports + }) + } } - a += (d ^ (b & (c ^ d))) + blocks[4] - 176418897; - a = (((a << 7) | (a >>> 25)) + b) << 0; - d += (c ^ (a & (b ^ c))) + blocks[5] + 1200080426; - d = (((d << 12) | (d >>> 20)) + a) << 0; - c += (b ^ (d & (a ^ b))) + blocks[6] - 1473231341; - c = (((c << 17) | (c >>> 15)) + d) << 0; - b += (a ^ (c & (d ^ a))) + blocks[7] - 45705983; - b = (((b << 22) | (b >>> 10)) + c) << 0; - a += (d ^ (b & (c ^ d))) + blocks[8] + 1770035416; - a = (((a << 7) | (a >>> 25)) + b) << 0; - d += (c ^ (a & (b ^ c))) + blocks[9] - 1958414417; - d = (((d << 12) | (d >>> 20)) + a) << 0; - c += (b ^ (d & (a ^ b))) + blocks[10] - 42063; - c = (((c << 17) | (c >>> 15)) + d) << 0; - b += (a ^ (c & (d ^ a))) + blocks[11] - 1990404162; - b = (((b << 22) | (b >>> 10)) + c) << 0; - a += (d ^ (b & (c ^ d))) + blocks[12] + 1804603682; - a = (((a << 7) | (a >>> 25)) + b) << 0; - d += (c ^ (a & (b ^ c))) + blocks[13] - 40341101; - d = (((d << 12) | (d >>> 20)) + a) << 0; - c += (b ^ (d & (a ^ b))) + blocks[14] - 1502002290; - c = (((c << 17) | (c >>> 15)) + d) << 0; - b += (a ^ (c & (d ^ a))) + blocks[15] + 1236535329; - b = (((b << 22) | (b >>> 10)) + c) << 0; - a += (c ^ (d & (b ^ c))) + blocks[1] - 165796510; - a = (((a << 5) | (a >>> 27)) + b) << 0; - d += (b ^ (c & (a ^ b))) + blocks[6] - 1069501632; - d = (((d << 9) | (d >>> 23)) + a) << 0; - c += (a ^ (b & (d ^ a))) + blocks[11] + 643717713; - c = (((c << 14) | (c >>> 18)) + d) << 0; - b += (d ^ (a & (c ^ d))) + blocks[0] - 373897302; - b = (((b << 20) | (b >>> 12)) + c) << 0; - a += (c ^ (d & (b ^ c))) + blocks[5] - 701558691; - a = (((a << 5) | (a >>> 27)) + b) << 0; - d += (b ^ (c & (a ^ b))) + blocks[10] + 38016083; - d = (((d << 9) | (d >>> 23)) + a) << 0; - c += (a ^ (b & (d ^ a))) + blocks[15] - 660478335; - c = (((c << 14) | (c >>> 18)) + d) << 0; - b += (d ^ (a & (c ^ d))) + blocks[4] - 405537848; - b = (((b << 20) | (b >>> 12)) + c) << 0; - a += (c ^ (d & (b ^ c))) + blocks[9] + 568446438; - a = (((a << 5) | (a >>> 27)) + b) << 0; - d += (b ^ (c & (a ^ b))) + blocks[14] - 1019803690; - d = (((d << 9) | (d >>> 23)) + a) << 0; - c += (a ^ (b & (d ^ a))) + blocks[3] - 187363961; - c = (((c << 14) | (c >>> 18)) + d) << 0; - b += (d ^ (a & (c ^ d))) + blocks[8] + 1163531501; - b = (((b << 20) | (b >>> 12)) + c) << 0; - a += (c ^ (d & (b ^ c))) + blocks[13] - 1444681467; - a = (((a << 5) | (a >>> 27)) + b) << 0; - d += (b ^ (c & (a ^ b))) + blocks[2] - 51403784; - d = (((d << 9) | (d >>> 23)) + a) << 0; - c += (a ^ (b & (d ^ a))) + blocks[7] + 1735328473; - c = (((c << 14) | (c >>> 18)) + d) << 0; - b += (d ^ (a & (c ^ d))) + blocks[12] - 1926607734; - b = (((b << 20) | (b >>> 12)) + c) << 0; - bc = b ^ c; - a += (bc ^ d) + blocks[5] - 378558; - a = (((a << 4) | (a >>> 28)) + b) << 0; - d += (bc ^ a) + blocks[8] - 2022574463; - d = (((d << 11) | (d >>> 21)) + a) << 0; - da = d ^ a; - c += (da ^ b) + blocks[11] + 1839030562; - c = (((c << 16) | (c >>> 16)) + d) << 0; - b += (da ^ c) + blocks[14] - 35309556; - b = (((b << 23) | (b >>> 9)) + c) << 0; - bc = b ^ c; - a += (bc ^ d) + blocks[1] - 1530992060; - a = (((a << 4) | (a >>> 28)) + b) << 0; - d += (bc ^ a) + blocks[4] + 1272893353; - d = (((d << 11) | (d >>> 21)) + a) << 0; - da = d ^ a; - c += (da ^ b) + blocks[7] - 155497632; - c = (((c << 16) | (c >>> 16)) + d) << 0; - b += (da ^ c) + blocks[10] - 1094730640; - b = (((b << 23) | (b >>> 9)) + c) << 0; - bc = b ^ c; - a += (bc ^ d) + blocks[13] + 681279174; - a = (((a << 4) | (a >>> 28)) + b) << 0; - d += (bc ^ a) + blocks[0] - 358537222; - d = (((d << 11) | (d >>> 21)) + a) << 0; - da = d ^ a; - c += (da ^ b) + blocks[3] - 722521979; - c = (((c << 16) | (c >>> 16)) + d) << 0; - b += (da ^ c) + blocks[6] + 76029189; - b = (((b << 23) | (b >>> 9)) + c) << 0; - bc = b ^ c; - a += (bc ^ d) + blocks[9] - 640364487; - a = (((a << 4) | (a >>> 28)) + b) << 0; - d += (bc ^ a) + blocks[12] - 421815835; - d = (((d << 11) | (d >>> 21)) + a) << 0; - da = d ^ a; - c += (da ^ b) + blocks[15] + 530742520; - c = (((c << 16) | (c >>> 16)) + d) << 0; - b += (da ^ c) + blocks[2] - 995338651; - b = (((b << 23) | (b >>> 9)) + c) << 0; - a += (c ^ (b | ~d)) + blocks[0] - 198630844; - a = (((a << 6) | (a >>> 26)) + b) << 0; - d += (b ^ (a | ~c)) + blocks[7] + 1126891415; - d = (((d << 10) | (d >>> 22)) + a) << 0; - c += (a ^ (d | ~b)) + blocks[14] - 1416354905; - c = (((c << 15) | (c >>> 17)) + d) << 0; - b += (d ^ (c | ~a)) + blocks[5] - 57434055; - b = (((b << 21) | (b >>> 11)) + c) << 0; - a += (c ^ (b | ~d)) + blocks[12] + 1700485571; - a = (((a << 6) | (a >>> 26)) + b) << 0; - d += (b ^ (a | ~c)) + blocks[3] - 1894986606; - d = (((d << 10) | (d >>> 22)) + a) << 0; - c += (a ^ (d | ~b)) + blocks[10] - 1051523; - c = (((c << 15) | (c >>> 17)) + d) << 0; - b += (d ^ (c | ~a)) + blocks[1] - 2054922799; - b = (((b << 21) | (b >>> 11)) + c) << 0; - a += (c ^ (b | ~d)) + blocks[8] + 1873313359; - a = (((a << 6) | (a >>> 26)) + b) << 0; - d += (b ^ (a | ~c)) + blocks[15] - 30611744; - d = (((d << 10) | (d >>> 22)) + a) << 0; - c += (a ^ (d | ~b)) + blocks[6] - 1560198380; - c = (((c << 15) | (c >>> 17)) + d) << 0; - b += (d ^ (c | ~a)) + blocks[13] + 1309151649; - b = (((b << 21) | (b >>> 11)) + c) << 0; - a += (c ^ (b | ~d)) + blocks[4] - 145523070; - a = (((a << 6) | (a >>> 26)) + b) << 0; - d += (b ^ (a | ~c)) + blocks[11] - 1120210379; - d = (((d << 10) | (d >>> 22)) + a) << 0; - c += (a ^ (d | ~b)) + blocks[2] + 718787259; - c = (((c << 15) | (c >>> 17)) + d) << 0; - b += (d ^ (c | ~a)) + blocks[9] - 343485551; - b = (((b << 21) | (b >>> 11)) + c) << 0; - if (this.first) { - this.h0 = (a + 1732584193) << 0; - this.h1 = (b - 271733879) << 0; - this.h2 = (c - 1732584194) << 0; - this.h3 = (d + 271733878) << 0; - this.first = false; - } else { - this.h0 = (this.h0 + a) << 0; - this.h1 = (this.h1 + b) << 0; - this.h2 = (this.h2 + c) << 0; - this.h3 = (this.h3 + d) << 0; - } - }; - Md5.prototype.hex = function () { - this.finalize(); - var h0 = this.h0, - h1 = this.h1, - h2 = this.h2, - h3 = this.h3; - return ( - HEX_CHARS[(h0 >> 4) & 0x0f] + - HEX_CHARS[h0 & 0x0f] + - HEX_CHARS[(h0 >> 12) & 0x0f] + - HEX_CHARS[(h0 >> 8) & 0x0f] + - HEX_CHARS[(h0 >> 20) & 0x0f] + - HEX_CHARS[(h0 >> 16) & 0x0f] + - HEX_CHARS[(h0 >> 28) & 0x0f] + - HEX_CHARS[(h0 >> 24) & 0x0f] + - HEX_CHARS[(h1 >> 4) & 0x0f] + - HEX_CHARS[h1 & 0x0f] + - HEX_CHARS[(h1 >> 12) & 0x0f] + - HEX_CHARS[(h1 >> 8) & 0x0f] + - HEX_CHARS[(h1 >> 20) & 0x0f] + - HEX_CHARS[(h1 >> 16) & 0x0f] + - HEX_CHARS[(h1 >> 28) & 0x0f] + - HEX_CHARS[(h1 >> 24) & 0x0f] + - HEX_CHARS[(h2 >> 4) & 0x0f] + - HEX_CHARS[h2 & 0x0f] + - HEX_CHARS[(h2 >> 12) & 0x0f] + - HEX_CHARS[(h2 >> 8) & 0x0f] + - HEX_CHARS[(h2 >> 20) & 0x0f] + - HEX_CHARS[(h2 >> 16) & 0x0f] + - HEX_CHARS[(h2 >> 28) & 0x0f] + - HEX_CHARS[(h2 >> 24) & 0x0f] + - HEX_CHARS[(h3 >> 4) & 0x0f] + - HEX_CHARS[h3 & 0x0f] + - HEX_CHARS[(h3 >> 12) & 0x0f] + - HEX_CHARS[(h3 >> 8) & 0x0f] + - HEX_CHARS[(h3 >> 20) & 0x0f] + - HEX_CHARS[(h3 >> 16) & 0x0f] + - HEX_CHARS[(h3 >> 28) & 0x0f] + - HEX_CHARS[(h3 >> 24) & 0x0f] - ); - }; - Md5.prototype.toString = Md5.prototype.hex; - Md5.prototype.digest = function () { - this.finalize(); - var h0 = this.h0, - h1 = this.h1, - h2 = this.h2, - h3 = this.h3; - return [ - h0 & 0xff, - (h0 >> 8) & 0xff, - (h0 >> 16) & 0xff, - (h0 >> 24) & 0xff, - h1 & 0xff, - (h1 >> 8) & 0xff, - (h1 >> 16) & 0xff, - (h1 >> 24) & 0xff, - h2 & 0xff, - (h2 >> 8) & 0xff, - (h2 >> 16) & 0xff, - (h2 >> 24) & 0xff, - h3 & 0xff, - (h3 >> 8) & 0xff, - (h3 >> 16) & 0xff, - (h3 >> 24) & 0xff, - ]; - }; - Md5.prototype.array = Md5.prototype.digest; - Md5.prototype.arrayBuffer = function () { - this.finalize(); - var buffer = new ArrayBuffer(16); - var blocks = new Uint32Array(buffer); - blocks[0] = this.h0; - blocks[1] = this.h1; - blocks[2] = this.h2; - blocks[3] = this.h3; - return buffer; - }; - Md5.prototype.buffer = Md5.prototype.arrayBuffer; - Md5.prototype.base64 = function () { - var v1, - v2, - v3, - base64Str = '', - bytes = this.array(); - for (var i = 0; i < 15; ) { - v1 = bytes[i++]; - v2 = bytes[i++]; - v3 = bytes[i++]; - base64Str += - BASE64_ENCODE_CHAR[v1 >>> 2] + - BASE64_ENCODE_CHAR[((v1 << 4) | (v2 >>> 4)) & 63] + - BASE64_ENCODE_CHAR[((v2 << 2) | (v3 >>> 6)) & 63] + - BASE64_ENCODE_CHAR[v3 & 63]; - } - v1 = bytes[i]; - base64Str += - BASE64_ENCODE_CHAR[v1 >>> 2] + BASE64_ENCODE_CHAR[(v1 << 4) & 63] + '=='; - return base64Str; - }; - var exports = createMethod(); - if (COMMON_JS) { - module.exports = exports; - } else { - root.md5 = exports; - md5 = exports; - if (AMD) { - define(function () { - return exports; - }); - } - } })(); const baiduMapJson = { - options: { java_package: 'com.smile.baidumap.model' }, - nested: { - RepHead: { - fields: { - md5: { type: 'string', id: 1 }, - range: { type: 'string', id: 2 }, - messageHead: { rule: 'repeated', type: 'MessageHead', id: 3 }, - }, - }, - MessageHead: { - fields: { - offset: { type: 'int32', id: 1 }, - length: { type: 'int32', id: 2 }, - name: { type: 'string', id: 3 }, - }, - }, - Result: { - fields: { - type: { type: 'int32', id: 1 }, - error: { type: 'int32', id: 2 }, - }, - }, - Ads: { - fields: { - option: { type: 'Option', id: 1 }, - content: { rule: 'repeated', type: 'Content', id: 2 }, - }, - }, - Option: { - fields: { - lasttime: { type: 'int32', id: 1 }, - checkcode: { type: 'string', id: 2 }, - errmsg: { type: 'string', id: 3 }, - }, - }, - Content: { - fields: { - type: { type: 'string', id: 1 }, - data: { type: 'string', id: 2 }, - intval: { type: 'int32', id: 3 }, - start: { type: 'int32', id: 4 }, - end: { type: 'int32', id: 5 }, - id: { type: 'int32', id: 6 }, - updatetime: { type: 'int32', id: 7 }, - order: { type: 'int32', id: 8 }, - ctrlMode: { type: 'string', id: 9 }, - dayTimes: { type: 'int32', id: 10 }, - }, - }, - }, + "options": {"java_package": "com.smile.baidumap.model"}, + "nested": { + "RepHead": { + "fields": { + "md5": {"type": "string", "id": 1}, + "range": {"type": "string", "id": 2}, + "messageHead": {"rule": "repeated", "type": "MessageHead", "id": 3} + } + }, + "MessageHead": { + "fields": { + "offset": {"type": "int32", "id": 1}, + "length": {"type": "int32", "id": 2}, + "name": {"type": "string", "id": 3} + } + }, + "Result": {"fields": {"type": {"type": "int32", "id": 1}, "error": {"type": "int32", "id": 2}}}, + "Ads": { + "fields": { + "option": {"type": "Option", "id": 1}, + "content": {"rule": "repeated", "type": "Content", "id": 2} + } + }, + "Option": { + "fields": { + "lasttime": {"type": "int32", "id": 1}, + "checkcode": {"type": "string", "id": 2}, + "errmsg": {"type": "string", "id": 3} + } + }, + "Content": { + "fields": { + "type": {"type": "string", "id": 1}, + "data": {"type": "string", "id": 2}, + "intval": {"type": "int32", "id": 3}, + "start": {"type": "int32", "id": 4}, + "end": {"type": "int32", "id": 5}, + "id": {"type": "int32", "id": 6}, + "updatetime": {"type": "int32", "id": 7}, + "order": {"type": "int32", "id": 8}, + "ctrlMode": {"type": "string", "id": 9}, + "dayTimes": {"type": "int32", "id": 10} + } + } + } }; const baiduMapRoot = protobuf.Root.fromJSON(baiduMapJson); -const isQuanX = typeof $task != 'undefined'; -const binaryBody = isQuanX - ? new Uint8Array($response.bodyBytes) - : $response.body; +const isQuanX = typeof $task != "undefined"; +const binaryBody = isQuanX ? new Uint8Array($response.bodyBytes) : $response.body; //console.log(`原始数据总长度:${binaryBody.byteLength}`); const beginOffset = 4; -const prefixLength = new DataView( - binaryBody.slice(0, beginOffset).buffer -).getInt32(0); +const prefixLength = new DataView(binaryBody.slice(0, beginOffset).buffer).getInt32(0); //console.log(`前缀给定的RepHead长度:${prefixLength}`); // 解析RepHead const repHeadData = binaryBody.slice(beginOffset, beginOffset + prefixLength); -const repHeadType = baiduMapRoot.lookupType('RepHead'); +const repHeadType = baiduMapRoot.lookupType("RepHead"); const repHeadMessage = repHeadType.decode(repHeadData); const originMd5 = repHeadMessage.md5; //console.log(`解析出的原始repHead长度:${repHeadType.encode(repHeadMessage).finish().length}`); @@ -4546,46 +2189,39 @@ let newResult = null; let newAds = null; const dataBeginOffset = beginOffset + prefixLength; for (let i = 0; i < repHeadMessage.messageHead.length; i++) { - let messageHead = repHeadMessage.messageHead[i]; - const name = messageHead.name; - const targetDataLength = messageHead.length; - //console.log("messageHead:" + JSON.stringify(messageHead)); + let messageHead = repHeadMessage.messageHead[i]; + const name = messageHead.name; + const targetDataLength = messageHead.length; + //console.log("messageHead:" + JSON.stringify(messageHead)); - // 开始解析 Result和Ads - const currentOffset = dataBeginOffset + messageHead.offset; - //console.log(`开始解析${name}数据,起始offset:${currentOffset},读取长度为:${targetDataLength}`); - const targetData = binaryBody.slice( - currentOffset, - currentOffset + targetDataLength - ); + // 开始解析 Result和Ads + const currentOffset = dataBeginOffset + messageHead.offset; + //console.log(`开始解析${name}数据,起始offset:${currentOffset},读取长度为:${targetDataLength}`); + const targetData = binaryBody.slice(currentOffset, currentOffset + targetDataLength); - if (name === 'Result') { - // Result我们无需修改 - const resultType = baiduMapRoot.lookupType(name); - const resultMessage = resultType.decode(targetData); - const parseMd5 = md5(binaryBody.slice(currentOffset)); - console.log(`解析出的md5和原始md5相同?:${parseMd5 === originMd5}`); - newResult = resultType.encode(resultMessage).finish(); - //console.log(`解析出的Result:${JSON.stringify(resultMessage)}`); - } else if (name === 'Ads') { - // 对Ads进行修改 - const adsType = baiduMapRoot.lookupType(name); - let adsMessage = adsType.decode(targetData); - for (let j = 0; j < adsMessage.content.length; j++) { - let item = adsMessage.content[j]; - if ( - (item.type.indexOf('_banner') !== -1 || - item.type.indexOf('splash_screen1040') !== -1) && - item.hasOwnProperty('start') && - item.hasOwnProperty('end') - ) { - adsMessage.content[j].start = 1648746061; - adsMessage.content[j].end = 1648832461; - console.log(`设置${item.type}时间为过期`); - } + if (name === 'Result') { + // Result我们无需修改 + const resultType = baiduMapRoot.lookupType(name); + const resultMessage = resultType.decode(targetData); + const parseMd5 = md5(binaryBody.slice(currentOffset)); + console.log(`解析出的md5和原始md5相同?:${parseMd5 === originMd5}`); + newResult = resultType.encode(resultMessage).finish(); + //console.log(`解析出的Result:${JSON.stringify(resultMessage)}`); + } else if (name === 'Ads') { + // 对Ads进行修改 + const adsType = baiduMapRoot.lookupType(name); + let adsMessage = adsType.decode(targetData); + for (let j = 0; j < adsMessage.content.length; j++) { + let item = adsMessage.content[j]; + if ((item.type.indexOf('_banner') !== -1 || item.type.indexOf('splash_screen1040') !== -1) + && item.hasOwnProperty('start') && item.hasOwnProperty('end')) { + adsMessage.content[j].start = 1648746061; + adsMessage.content[j].end = 1648832461; + console.log(`设置${item.type}时间为过期`); + } + } + newAds = adsType.encode(adsMessage).finish(); } - newAds = adsType.encode(adsMessage).finish(); - } } // 生成新RepHead @@ -4601,33 +2237,18 @@ repHeadMessage.messageHead[1].length = newAds.byteLength; const newRepHead = repHeadType.encode(repHeadMessage).finish(); -const totalLength = - beginOffset + - newRepHead.byteLength + - newResult.byteLength + - newAds.byteLength; + +const totalLength = beginOffset + newRepHead.byteLength + newResult.byteLength + newAds.byteLength; //console.log(`totalLength:${totalLength}`); let body = new Uint8Array(totalLength); -body.set( - Uint8Array.from([ - (newRepHead.byteLength >> 24) & 0xff, - (newRepHead.byteLength >> 16) & 0xff, - (newRepHead.byteLength >> 8) & 0xff, - newRepHead.byteLength & 0xff, - ]) -); +body.set(Uint8Array.from([(newRepHead.byteLength >> 24) & 0xff, (newRepHead.byteLength >> 16) & 0xff, (newRepHead.byteLength >> 8) & 0xff, newRepHead.byteLength & 0xff])); body.set(newRepHead, beginOffset); body.set(newResult, beginOffset + newRepHead.byteLength); body.set(newAds, beginOffset + newRepHead.byteLength + newResult.byteLength); console.log(`${body.byteLength}---${body.buffer.byteLength}`); if (isQuanX) { - $done({ - bodyBytes: body.buffer.slice( - body.byteOffset, - body.byteLength + body.byteOffset - ), - }); + $done({bodyBytes: body.buffer.slice(body.byteOffset, body.byteLength + body.byteOffset)}); } else { - $done({ body }); -} + $done({body}); +} \ No newline at end of file diff --git a/Scripts/AdBlock/Other/CoolApk.js b/Scripts/AdBlock/Other/CoolApk.js index bff201e..2444336 100644 --- a/Scripts/AdBlock/Other/CoolApk.js +++ b/Scripts/AdBlock/Other/CoolApk.js @@ -1,54 +1,18 @@ -/*********************************** -> 应用名称:酷安净化 -> 脚本作者:ddgksf2013 -> 微信账号:墨鱼手记 -> 更新时间:2023-01-21 -> 通知频道:https://t.me/ddgksf2021 -> 贡献投稿:https://t.me/ddgksf2013_bot -> 问题反馈:ddgksf2013@163.com -> 特别提醒:如需转载请注明出处,谢谢合作! -> 特别说明:⚠️⚠️⚠️ - 本脚本仅供学习交流使用,禁止转载、售卖 - ⚠️⚠️⚠️ - -***********************************/ - -const version = "V1.0.9"; +const version = 'V1.0.10'; if (-1 != $request.url.indexOf("replyList")) { - var t = JSON.parse($response.body); - t.data.length && (t.data = t.data.filter((t) => t.id)), - $done({ body: JSON.stringify(t) }); + var t = JSON.parse($response.body); + t.data.length && (t.data = t.data.filter(t => t.id)), $done({body: JSON.stringify(t)}) +} else if (-1 != $request.url.indexOf("main/init")) { + var t = JSON.parse($response.body); + t.data.length && (t.data = t.data.filter(t => !(945 == t.entityId || 6390 == t.entityId))), $done({body: JSON.stringify(t)}) } else if (-1 != $request.url.indexOf("indexV8")) { - var t = JSON.parse($response.body); - (t.data = t.data.filter( - (t) => - !( - "sponsorCard" == t.entityTemplate || - 8639 == t.entityId || - 29349 == t.entityId || - 33006 == t.entityId || - 32557 == t.entityId || - -1 != t.title.indexOf("值得买") || - -1 != t.title.indexOf("红包") - ) - )), - $done({ body: JSON.stringify(t) }); + var t = JSON.parse($response.body); + t.data = t.data.filter(t => !("sponsorCard" == t.entityTemplate || 8639 == t.entityId || 29349 == t.entityId || 33006 == t.entityId || 32557 == t.entityId || -1 != t.title.indexOf("值得买") || -1 != t.title.indexOf("红包"))), $done({body: JSON.stringify(t)}) } else if (-1 != $request.url.indexOf("dataList")) { - var t = JSON.parse($response.body); - (t.data = t.data.filter( - (t) => - !("sponsorCard" == t.entityTemplate || -1 != t.title.indexOf("精选配件")) - )), - $done({ body: JSON.stringify(t) }); + var t = JSON.parse($response.body); + t.data = t.data.filter(t => !("sponsorCard" == t.entityTemplate || -1 != t.title.indexOf("精选配件"))), $done({body: JSON.stringify(t)}) } else if (-1 != $request.url.indexOf("detail")) { - var t = JSON.parse($response.body); - t.data?.hotReplyRows?.length && - (t.data.hotReplyRows = t.data.hotReplyRows.filter((t) => t.id)), - t.data?.topReplyRows?.length && - (t.data.topReplyRows = t.data.topReplyRows.filter((t) => t.id)), - t.data?.include_goods_ids && (t.data.include_goods_ids = []), - t.data?.include_goods && (t.data.include_goods = []), - t.data?.detailSponsorCard && (t.data.detailSponsorCard = []), - $done({ body: JSON.stringify(t) }); -} else $done($response); + var t = JSON.parse($response.body); + t.data?.hotReplyRows?.length && (t.data.hotReplyRows = t.data.hotReplyRows.filter(t => t.id)), t.data?.topReplyRows?.length && (t.data.topReplyRows = t.data.topReplyRows.filter(t => t.id)), t.data?.include_goods_ids && (t.data.include_goods_ids = []), t.data?.include_goods && (t.data.include_goods = []), t.data?.detailSponsorCard && (t.data.detailSponsorCard = []), $done({body: JSON.stringify(t)}) +} else $done($response); \ No newline at end of file diff --git a/Scripts/AdBlock/Other/CoolApk.min.js b/Scripts/AdBlock/Other/CoolApk.min.js new file mode 100644 index 0000000..53b9397 --- /dev/null +++ b/Scripts/AdBlock/Other/CoolApk.min.js @@ -0,0 +1,3 @@ +const version = 'V1.0.10'; + +if(-1!=$request.url.indexOf("replyList")){var t=JSON.parse($response.body);t.data.length&&(t.data=t.data.filter(t=>t.id)),$done({body:JSON.stringify(t)})}else if(-1!=$request.url.indexOf("main/init")){var t=JSON.parse($response.body);t.data.length&&(t.data=t.data.filter(t=>!(945==t.entityId||6390==t.entityId))),$done({body:JSON.stringify(t)})}else if(-1!=$request.url.indexOf("indexV8")){var t=JSON.parse($response.body);t.data=t.data.filter(t=>!("sponsorCard"==t.entityTemplate||8639==t.entityId||29349==t.entityId||33006==t.entityId||32557==t.entityId||-1!=t.title.indexOf("值得买")||-1!=t.title.indexOf("红包"))),$done({body:JSON.stringify(t)})}else if(-1!=$request.url.indexOf("dataList")){var t=JSON.parse($response.body);t.data=t.data.filter(t=>!("sponsorCard"==t.entityTemplate||-1!=t.title.indexOf("精选配件"))),$done({body:JSON.stringify(t)})}else if(-1!=$request.url.indexOf("detail")){var t=JSON.parse($response.body);t.data?.hotReplyRows?.length&&(t.data.hotReplyRows=t.data.hotReplyRows.filter(t=>t.id)),t.data?.topReplyRows?.length&&(t.data.topReplyRows=t.data.topReplyRows.filter(t=>t.id)),t.data?.include_goods_ids&&(t.data.include_goods_ids=[]),t.data?.include_goods&&(t.data.include_goods=[]),t.data?.detailSponsorCard&&(t.data.detailSponsorCard=[]),$done({body:JSON.stringify(t)})}else $done($response); \ No newline at end of file diff --git a/Scripts/AdBlock/Other/Quark.js b/Scripts/AdBlock/Other/Quark.js index a9a6a9b..7ac86ac 100644 --- a/Scripts/AdBlock/Other/Quark.js +++ b/Scripts/AdBlock/Other/Quark.js @@ -1,714 +1,317 @@ var version_ = 'jsjiami.com.v7'; var _0x412946 = _0xd235; -((function ( - _0x1e6c3f, - _0x1ff154, - _0x15328a, - _0x1d3fed, - _0x33d093, - _0x21ad39, - _0xd358b -) { - return ( - (_0x1e6c3f = _0x1e6c3f >> 0x4), - (_0x21ad39 = 'hs'), - (_0xd358b = 'hs'), - (function (_0x4ad759, _0x4be1a3, _0xa0871e, _0x5d549c, _0x1faed9) { - var _0x39032c = _0xd235; - (_0x5d549c = 'tfi'), - (_0x21ad39 = _0x5d549c + _0x21ad39), - (_0x1faed9 = 'up'), - (_0xd358b += _0x1faed9), - (_0x21ad39 = _0xa0871e(_0x21ad39)), - (_0xd358b = _0xa0871e(_0xd358b)), - (_0xa0871e = 0x0); - var _0x28002c = _0x4ad759(); - while (!![] && --_0x1d3fed + _0x4be1a3) { - try { - _0x5d549c = - -parseInt(_0x39032c(0x1aa, 'YMkj')) / 0x1 + - -parseInt(_0x39032c(0x19c, '#)mD')) / 0x2 + - (-parseInt(_0x39032c(0x1b9, '8!ZH')) / 0x3) * - (parseInt(_0x39032c(0x1db, 'l)%1')) / 0x4) + - (-parseInt(_0x39032c(0x175, ']89@')) / 0x5) * - (-parseInt(_0x39032c(0x1d1, '2[Ac')) / 0x6) + - parseInt(_0x39032c(0x18e, '8!ZH')) / 0x7 + - (-parseInt(_0x39032c(0x1b6, 'vViI')) / 0x8) * - (parseInt(_0x39032c(0x1bf, 'J8iM')) / 0x9) + - parseInt(_0x39032c(0x180, 't9W!')) / 0xa; - } catch (_0x405dab) { - _0x5d549c = _0xa0871e; - } finally { - _0x1faed9 = _0x28002c[_0x21ad39](); - if (_0x1e6c3f <= _0x1d3fed) - _0xa0871e - ? _0x33d093 - ? (_0x5d549c = _0x1faed9) - : (_0x33d093 = _0x1faed9) - : (_0xa0871e = _0x1faed9); - else { - if ( - _0xa0871e == _0x33d093['replace'](/[YrxdfWVUFDyBIuHbKLhX=]/g, '') - ) { - if (_0x5d549c === _0x4be1a3) { - _0x28002c['un' + _0x21ad39](_0x1faed9); - break; - } - _0x28002c[_0xd358b](_0x1faed9); +(function (_0x1e6c3f, _0x1ff154, _0x15328a, _0x1d3fed, _0x33d093, _0x21ad39, _0xd358b) { + return _0x1e6c3f = _0x1e6c3f >> 0x4, _0x21ad39 = 'hs', _0xd358b = 'hs', function (_0x4ad759, _0x4be1a3, _0xa0871e, _0x5d549c, _0x1faed9) { + var _0x39032c = _0xd235; + _0x5d549c = 'tfi', _0x21ad39 = _0x5d549c + _0x21ad39, _0x1faed9 = 'up', _0xd358b += _0x1faed9, _0x21ad39 = _0xa0871e(_0x21ad39), _0xd358b = _0xa0871e(_0xd358b), _0xa0871e = 0x0; + var _0x28002c = _0x4ad759(); + while (!![] && --_0x1d3fed + _0x4be1a3) { + try { + _0x5d549c = -parseInt(_0x39032c(0x1aa, 'YMkj')) / 0x1 + -parseInt(_0x39032c(0x19c, '#)mD')) / 0x2 + -parseInt(_0x39032c(0x1b9, '8!ZH')) / 0x3 * (parseInt(_0x39032c(0x1db, 'l)%1')) / 0x4) + -parseInt(_0x39032c(0x175, ']89@')) / 0x5 * (-parseInt(_0x39032c(0x1d1, '2[Ac')) / 0x6) + parseInt(_0x39032c(0x18e, '8!ZH')) / 0x7 + -parseInt(_0x39032c(0x1b6, 'vViI')) / 0x8 * (parseInt(_0x39032c(0x1bf, 'J8iM')) / 0x9) + parseInt(_0x39032c(0x180, 't9W!')) / 0xa; + } catch (_0x405dab) { + _0x5d549c = _0xa0871e; + } finally { + _0x1faed9 = _0x28002c[_0x21ad39](); + if (_0x1e6c3f <= _0x1d3fed) _0xa0871e ? _0x33d093 ? _0x5d549c = _0x1faed9 : _0x33d093 = _0x1faed9 : _0xa0871e = _0x1faed9; else { + if (_0xa0871e == _0x33d093['replace'](/[YrxdfWVUFDyBIuHbKLhX=]/g, '')) { + if (_0x5d549c === _0x4be1a3) { + _0x28002c['un' + _0x21ad39](_0x1faed9); + break; + } + _0x28002c[_0xd358b](_0x1faed9); + } + } } - } } - } - })( - _0x15328a, - _0x1ff154, - function ( - _0xe541ea, - _0x194479, - _0x37c1d2, - _0x314e54, - _0x4e79dc, - _0x4d0927, - _0x183b22 - ) { - return ( - (_0x194479 = '\x73\x70\x6c\x69\x74'), - (_0xe541ea = arguments[0x0]), - (_0xe541ea = _0xe541ea[_0x194479]('')), - (_0x37c1d2 = `\x72\x65\x76\x65\x72\x73\x65`), - (_0xe541ea = _0xe541ea[_0x37c1d2]('\x76')), - (_0x314e54 = `\x6a\x6f\x69\x6e`), - (0x12823c, _0xe541ea[_0x314e54]('')) - ); - } - ) - ); -})(0xc10, 0x73cc9, _0x582a, 0xc3), -_0x582a) && (version_ = _0x582a); + }(_0x15328a, _0x1ff154, function (_0xe541ea, _0x194479, _0x37c1d2, _0x314e54, _0x4e79dc, _0x4d0927, _0x183b22) { + return _0x194479 = '\x73\x70\x6c\x69\x74', _0xe541ea = arguments[0x0], _0xe541ea = _0xe541ea[_0x194479](''), _0x37c1d2 = `\x72\x65\x76\x65\x72\x73\x65`, _0xe541ea = _0xe541ea[_0x37c1d2]('\x76'), _0x314e54 = `\x6a\x6f\x69\x6e`, (0x12823c, _0xe541ea[_0x314e54]('')); + }); +}(0xc10, 0x73cc9, _0x582a, 0xc3), _0x582a) && (version_ = _0x582a); (function () { - var _0x444e62 = _0xd235, - _0x56675b = { - RwhUB: function (_0x591197, _0x5c04eb) { - return _0x591197 !== _0x5c04eb; - }, - jrrBm: function (_0x52de88, _0x2a0fea) { - return _0x52de88 === _0x2a0fea; - }, - IYPUM: _0x444e62(0x1bb, 'FS2M'), - ZpSWE: _0x444e62(0x183, 'l)%1'), - mlSrt: function (_0x4f9b8f, _0x447348) { - return _0x4f9b8f === _0x447348; - }, - }, - _0x4be2a6 = _0x56675b[_0x444e62(0x185, 'Q!qj')]( - typeof window, - _0x444e62(0x1b0, '2Rbe') - ) - ? window - : _0x56675b[_0x444e62(0x17c, 'Bm[$')]( - typeof process, - _0x56675b['IYPUM'] - ) && - typeof require === _0x56675b[_0x444e62(0x17b, 'ENXP')] && - _0x56675b[_0x444e62(0x1ca, 'ST6i')]( - typeof global, - _0x56675b[_0x444e62(0x16d, '*KK6')] - ) - ? global - : this; - _0x4be2a6['setInterval'](_0x54e194, 0x7d0); -})(); + var _0x444e62 = _0xd235, _0x56675b = { + 'RwhUB': function (_0x591197, _0x5c04eb) { + return _0x591197 !== _0x5c04eb; + }, + 'jrrBm': function (_0x52de88, _0x2a0fea) { + return _0x52de88 === _0x2a0fea; + }, + 'IYPUM': _0x444e62(0x1bb, 'FS2M'), + 'ZpSWE': _0x444e62(0x183, 'l)%1'), + 'mlSrt': function (_0x4f9b8f, _0x447348) { + return _0x4f9b8f === _0x447348; + } + }, + _0x4be2a6 = _0x56675b[_0x444e62(0x185, 'Q!qj')](typeof window, _0x444e62(0x1b0, '2Rbe')) ? window : _0x56675b[_0x444e62(0x17c, 'Bm[$')](typeof process, _0x56675b['IYPUM']) && typeof require === _0x56675b[_0x444e62(0x17b, 'ENXP')] && _0x56675b[_0x444e62(0x1ca, 'ST6i')](typeof global, _0x56675b[_0x444e62(0x16d, '*KK6')]) ? global : this; + _0x4be2a6['setInterval'](_0x54e194, 0x7d0); +}()); + function _0xd235(_0x881cfd, _0x31c139) { - var _0x52bf78 = _0x582a(); - return ( - (_0xd235 = function (_0x24e5b1, _0x16a5e2) { - _0x24e5b1 = _0x24e5b1 - 0x16a; - var _0xb8c7de = _0x52bf78[_0x24e5b1]; - if (_0xd235['pTCaYN'] === undefined) { - var _0x54e194 = function (_0x54d668) { - var _0x42dd97 = - 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/='; - var _0x3a2582 = '', - _0x3eb3bd = ''; - for ( - var _0x31ec84 = 0x0, _0x2560e4, _0xa95f06, _0x4cf6be = 0x0; - (_0xa95f06 = _0x54d668['charAt'](_0x4cf6be++)); - ~_0xa95f06 && - ((_0x2560e4 = - _0x31ec84 % 0x4 ? _0x2560e4 * 0x40 + _0xa95f06 : _0xa95f06), - _0x31ec84++ % 0x4) - ? (_0x3a2582 += String['fromCharCode']( - 0xff & (_0x2560e4 >> ((-0x2 * _0x31ec84) & 0x6)) - )) - : 0x0 - ) { - _0xa95f06 = _0x42dd97['indexOf'](_0xa95f06); - } - for ( - var _0x3234b8 = 0x0, _0x2746b8 = _0x3a2582['length']; - _0x3234b8 < _0x2746b8; - _0x3234b8++ - ) { - _0x3eb3bd += - '%' + - ('00' + _0x3a2582['charCodeAt'](_0x3234b8)['toString'](0x10))[ - 'slice' - ](-0x2); - } - return decodeURIComponent(_0x3eb3bd); - }; - var _0xd235ef = function (_0x2653c6, _0x559a20) { - var _0x4463d7 = [], - _0x1ab425 = 0x0, - _0x3a076c, - _0x4180ba = ''; - _0x2653c6 = _0x54e194(_0x2653c6); - var _0x5b0acc; - for (_0x5b0acc = 0x0; _0x5b0acc < 0x100; _0x5b0acc++) { - _0x4463d7[_0x5b0acc] = _0x5b0acc; - } - for (_0x5b0acc = 0x0; _0x5b0acc < 0x100; _0x5b0acc++) { - (_0x1ab425 = - (_0x1ab425 + - _0x4463d7[_0x5b0acc] + - _0x559a20['charCodeAt'](_0x5b0acc % _0x559a20['length'])) % - 0x100), - (_0x3a076c = _0x4463d7[_0x5b0acc]), - (_0x4463d7[_0x5b0acc] = _0x4463d7[_0x1ab425]), - (_0x4463d7[_0x1ab425] = _0x3a076c); - } - (_0x5b0acc = 0x0), (_0x1ab425 = 0x0); - for ( - var _0x2085e7 = 0x0; - _0x2085e7 < _0x2653c6['length']; - _0x2085e7++ - ) { - (_0x5b0acc = (_0x5b0acc + 0x1) % 0x100), - (_0x1ab425 = (_0x1ab425 + _0x4463d7[_0x5b0acc]) % 0x100), - (_0x3a076c = _0x4463d7[_0x5b0acc]), - (_0x4463d7[_0x5b0acc] = _0x4463d7[_0x1ab425]), - (_0x4463d7[_0x1ab425] = _0x3a076c), - (_0x4180ba += String['fromCharCode']( - _0x2653c6['charCodeAt'](_0x2085e7) ^ - _0x4463d7[ - (_0x4463d7[_0x5b0acc] + _0x4463d7[_0x1ab425]) % 0x100 - ] - )); - } - return _0x4180ba; - }; - (_0xd235['MRVxhq'] = _0xd235ef), - (_0x881cfd = arguments), - (_0xd235['pTCaYN'] = !![]); - } - var _0x1e7890 = _0x52bf78[0x0], - _0x2da6d7 = _0x24e5b1 + _0x1e7890, - _0x582a8f = _0x881cfd[_0x2da6d7]; - return ( - !_0x582a8f - ? (_0xd235['cKenCw'] === undefined && (_0xd235['cKenCw'] = !![]), - (_0xb8c7de = _0xd235['MRVxhq'](_0xb8c7de, _0x16a5e2)), - (_0x881cfd[_0x2da6d7] = _0xb8c7de)) - : (_0xb8c7de = _0x582a8f), - _0xb8c7de - ); - }), - _0xd235(_0x881cfd, _0x31c139) - ); + var _0x52bf78 = _0x582a(); + return _0xd235 = function (_0x24e5b1, _0x16a5e2) { + _0x24e5b1 = _0x24e5b1 - 0x16a; + var _0xb8c7de = _0x52bf78[_0x24e5b1]; + if (_0xd235['pTCaYN'] === undefined) { + var _0x54e194 = function (_0x54d668) { + var _0x42dd97 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/='; + var _0x3a2582 = '', _0x3eb3bd = ''; + for (var _0x31ec84 = 0x0, _0x2560e4, _0xa95f06, _0x4cf6be = 0x0; _0xa95f06 = _0x54d668['charAt'](_0x4cf6be++); ~_0xa95f06 && (_0x2560e4 = _0x31ec84 % 0x4 ? _0x2560e4 * 0x40 + _0xa95f06 : _0xa95f06, _0x31ec84++ % 0x4) ? _0x3a2582 += String['fromCharCode'](0xff & _0x2560e4 >> (-0x2 * _0x31ec84 & 0x6)) : 0x0) { + _0xa95f06 = _0x42dd97['indexOf'](_0xa95f06); + } + for (var _0x3234b8 = 0x0, _0x2746b8 = _0x3a2582['length']; _0x3234b8 < _0x2746b8; _0x3234b8++) { + _0x3eb3bd += '%' + ('00' + _0x3a2582['charCodeAt'](_0x3234b8)['toString'](0x10))['slice'](-0x2); + } + return decodeURIComponent(_0x3eb3bd); + }; + var _0xd235ef = function (_0x2653c6, _0x559a20) { + var _0x4463d7 = [], _0x1ab425 = 0x0, _0x3a076c, _0x4180ba = ''; + _0x2653c6 = _0x54e194(_0x2653c6); + var _0x5b0acc; + for (_0x5b0acc = 0x0; _0x5b0acc < 0x100; _0x5b0acc++) { + _0x4463d7[_0x5b0acc] = _0x5b0acc; + } + for (_0x5b0acc = 0x0; _0x5b0acc < 0x100; _0x5b0acc++) { + _0x1ab425 = (_0x1ab425 + _0x4463d7[_0x5b0acc] + _0x559a20['charCodeAt'](_0x5b0acc % _0x559a20['length'])) % 0x100, _0x3a076c = _0x4463d7[_0x5b0acc], _0x4463d7[_0x5b0acc] = _0x4463d7[_0x1ab425], _0x4463d7[_0x1ab425] = _0x3a076c; + } + _0x5b0acc = 0x0, _0x1ab425 = 0x0; + for (var _0x2085e7 = 0x0; _0x2085e7 < _0x2653c6['length']; _0x2085e7++) { + _0x5b0acc = (_0x5b0acc + 0x1) % 0x100, _0x1ab425 = (_0x1ab425 + _0x4463d7[_0x5b0acc]) % 0x100, _0x3a076c = _0x4463d7[_0x5b0acc], _0x4463d7[_0x5b0acc] = _0x4463d7[_0x1ab425], _0x4463d7[_0x1ab425] = _0x3a076c, _0x4180ba += String['fromCharCode'](_0x2653c6['charCodeAt'](_0x2085e7) ^ _0x4463d7[(_0x4463d7[_0x5b0acc] + _0x4463d7[_0x1ab425]) % 0x100]); + } + return _0x4180ba; + }; + _0xd235['MRVxhq'] = _0xd235ef, _0x881cfd = arguments, _0xd235['pTCaYN'] = !![]; + } + var _0x1e7890 = _0x52bf78[0x0], _0x2da6d7 = _0x24e5b1 + _0x1e7890, _0x582a8f = _0x881cfd[_0x2da6d7]; + return !_0x582a8f ? (_0xd235['cKenCw'] === undefined && (_0xd235['cKenCw'] = !![]), _0xb8c7de = _0xd235['MRVxhq'](_0xb8c7de, _0x16a5e2), _0x881cfd[_0x2da6d7] = _0xb8c7de) : _0xb8c7de = _0x582a8f, _0xb8c7de; + }, _0xd235(_0x881cfd, _0x31c139); } + var _0x1e7890 = (function () { - var _0x3a5e73 = { - sarsz: function (_0x23875d, _0x36e8a8) { - return _0x23875d !== _0x36e8a8; - }, - vtLPT: 'cGCJn', - }, - _0x283469 = !![]; - return function (_0x1e081b, _0x4c38df) { - var _0x8a912c = _0xd235; - if ( - _0x3a5e73[_0x8a912c(0x1ba, 'vnO)')]( - 'cGCJn', - _0x3a5e73[_0x8a912c(0x1d9, 'v7R8')] - ) - ) - _0x142377[_0x8a912c(0x186, 'l)%1')](_0x8a912c(0x1ab, 'S@V6')) && - delete _0x12b5d2[_0x8a912c(0x1a0, 'l)%1')][_0x51d64d]; - else { - var _0x1c80af = _0x283469 - ? function () { - var _0x1fec6b = _0x8a912c; - if (_0x4c38df) { - var _0x4e74ec = _0x4c38df[_0x1fec6b(0x1cc, 'zXvO')]( - _0x1e081b, - arguments - ); - return (_0x4c38df = null), _0x4e74ec; - } - } - : function () {}; - return (_0x283469 = ![]), _0x1c80af; - } - }; -})(); + var _0x3a5e73 = { + 'sarsz': function (_0x23875d, _0x36e8a8) { + return _0x23875d !== _0x36e8a8; + }, 'vtLPT': 'cGCJn' + }, _0x283469 = !![]; + return function (_0x1e081b, _0x4c38df) { + var _0x8a912c = _0xd235; + if (_0x3a5e73[_0x8a912c(0x1ba, 'vnO)')]('cGCJn', _0x3a5e73[_0x8a912c(0x1d9, 'v7R8')])) _0x142377[_0x8a912c(0x186, 'l)%1')](_0x8a912c(0x1ab, 'S@V6')) && delete _0x12b5d2[_0x8a912c(0x1a0, 'l)%1')][_0x51d64d]; else { + var _0x1c80af = _0x283469 ? function () { + var _0x1fec6b = _0x8a912c; + if (_0x4c38df) { + var _0x4e74ec = _0x4c38df[_0x1fec6b(0x1cc, 'zXvO')](_0x1e081b, arguments); + return _0x4c38df = null, _0x4e74ec; + } + } : function () { + }; + return _0x283469 = ![], _0x1c80af; + } + }; +}()); (function () { - var _0x3c329e = _0xd235, - _0x5db9bc = { - fcGSY: function (_0x1dee61, _0x58ac6d) { - return _0x1dee61(_0x58ac6d); - }, - DzeBa: 'DipIl', - KKMhI: _0x3c329e(0x16f, '%%*F'), - mQqFh: function (_0x5d39ee, _0x324e2a) { - return _0x5d39ee(_0x324e2a); - }, - mVEkh: _0x3c329e(0x1ce, '2Rbe'), - irZDF: function (_0x4f2be6, _0x2aca1d) { - return _0x4f2be6 + _0x2aca1d; - }, - KwKxw: 'chain', - cWvRF: 'input', - dcIRK: function (_0x295552, _0x2875af) { - return _0x295552 === _0x2875af; - }, - iAOhW: 'AbSeu', - pvOzY: function (_0x5abd7f) { - return _0x5abd7f(); - }, - TsXVT: function (_0x3522eb, _0x3b7f60, _0x27bcef) { - return _0x3522eb(_0x3b7f60, _0x27bcef); - }, + var _0x3c329e = _0xd235, _0x5db9bc = { + 'fcGSY': function (_0x1dee61, _0x58ac6d) { + return _0x1dee61(_0x58ac6d); + }, 'DzeBa': 'DipIl', 'KKMhI': _0x3c329e(0x16f, '%%*F'), 'mQqFh': function (_0x5d39ee, _0x324e2a) { + return _0x5d39ee(_0x324e2a); + }, 'mVEkh': _0x3c329e(0x1ce, '2Rbe'), 'irZDF': function (_0x4f2be6, _0x2aca1d) { + return _0x4f2be6 + _0x2aca1d; + }, 'KwKxw': 'chain', 'cWvRF': 'input', 'dcIRK': function (_0x295552, _0x2875af) { + return _0x295552 === _0x2875af; + }, 'iAOhW': 'AbSeu', 'pvOzY': function (_0x5abd7f) { + return _0x5abd7f(); + }, 'TsXVT': function (_0x3522eb, _0x3b7f60, _0x27bcef) { + return _0x3522eb(_0x3b7f60, _0x27bcef); + } }; - _0x5db9bc[_0x3c329e(0x1d5, '9*mh')](_0x1e7890, this, function () { - var _0x5da4be = _0x3c329e; - if (_0x5da4be(0x19e, 'vnO)') === _0x5db9bc[_0x5da4be(0x1be, 'z8Qg')]) - _0x5db9bc[_0x5da4be(0x1a1, '!Ue2')](_0x45b28d, '0'); - else { - var _0x16d056 = new RegExp(_0x5db9bc[_0x5da4be(0x181, '&i&*')]), - _0xc42230 = new RegExp( - '\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)', - 'i' - ), - _0x301c33 = _0x5db9bc[_0x5da4be(0x1a6, '8!ZH')]( - _0x54e194, - _0x5db9bc[_0x5da4be(0x17f, 'vViI')] - ); - if ( - !_0x16d056[_0x5da4be(0x1c7, 't9W!')]( - _0x5db9bc[_0x5da4be(0x196, '8UA]')]( - _0x301c33, - _0x5db9bc[_0x5da4be(0x18b, 'ST6i')] - ) - ) || - !_0xc42230[_0x5da4be(0x199, '82DE')]( - _0x5db9bc['irZDF'](_0x301c33, _0x5db9bc[_0x5da4be(0x18c, 'vViI')]) - ) - ) - _0x301c33('0'); - else { - if ( - _0x5db9bc['dcIRK']( - _0x5da4be(0x16e, 'ST6i'), - _0x5db9bc[_0x5da4be(0x1cb, 'vBfx')] - ) - ) - _0x5db9bc[_0x5da4be(0x172, 'h8[n')](_0x54e194); - else return _0x103ebd; - } - } - })(); -})(); -var _0x16a5e2 = (function () { - var _0x123e18 = _0xd235, - _0x5a7f23 = { - AxlNj: function (_0x339d6c, _0x4e41e9) { - return _0x339d6c === _0x4e41e9; - }, - URQrD: _0x123e18(0x177, '8!ZH'), - }, - _0x8a2e69 = !![]; - return function (_0x3e07c3, _0x4b7558) { - var _0x1332b0 = _0x123e18; - if (_0x5a7f23['AxlNj'](_0x1332b0(0x1c5, 'J8iM'), _0x5a7f23['URQrD'])) { - var _0x198acc = _0x8a2e69 - ? function () { - if (_0x4b7558) { - var _0x2b4f70 = _0x4b7558['apply'](_0x3e07c3, arguments); - return (_0x4b7558 = null), _0x2b4f70; - } + _0x5db9bc[_0x3c329e(0x1d5, '9*mh')](_0x1e7890, this, function () { + var _0x5da4be = _0x3c329e; + if (_0x5da4be(0x19e, 'vnO)') === _0x5db9bc[_0x5da4be(0x1be, 'z8Qg')]) _0x5db9bc[_0x5da4be(0x1a1, '!Ue2')](_0x45b28d, '0'); else { + var _0x16d056 = new RegExp(_0x5db9bc[_0x5da4be(0x181, '&i&*')]), + _0xc42230 = new RegExp('\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)', 'i'), + _0x301c33 = _0x5db9bc[_0x5da4be(0x1a6, '8!ZH')](_0x54e194, _0x5db9bc[_0x5da4be(0x17f, 'vViI')]); + if (!_0x16d056[_0x5da4be(0x1c7, 't9W!')](_0x5db9bc[_0x5da4be(0x196, '8UA]')](_0x301c33, _0x5db9bc[_0x5da4be(0x18b, 'ST6i')])) || !_0xc42230[_0x5da4be(0x199, '82DE')](_0x5db9bc['irZDF'](_0x301c33, _0x5db9bc[_0x5da4be(0x18c, 'vViI')]))) _0x301c33('0'); else { + if (_0x5db9bc['dcIRK'](_0x5da4be(0x16e, 'ST6i'), _0x5db9bc[_0x5da4be(0x1cb, 'vBfx')])) _0x5db9bc[_0x5da4be(0x172, 'h8[n')](_0x54e194); else return _0x103ebd; } - : function () {}; - return (_0x8a2e69 = ![]), _0x198acc; - } else { - var _0xb80552 = - _0x5091ac[_0x1332b0(0x1dd, 'Q!qj')][_0x1332b0(0x17a, ']A(A')][ - _0x1332b0(0x1d7, 't9W!') - ](_0x56c89b), - _0x78627b = _0x57bf40[_0xfd733b], - _0x541ffd = _0x49ffbd[_0x78627b] || _0xb80552; - (_0xb80552['__proto__'] = - _0x4e2a13[_0x1332b0(0x192, 'YE(U')](_0x1eddda)), - (_0xb80552[_0x1332b0(0x1b7, 'BH9%')] = - _0x541ffd[_0x1332b0(0x1c4, '2Rbe')]['bind'](_0x541ffd)), - (_0x365299[_0x78627b] = _0xb80552); - } - }; - })(), - _0x24e5b1 = _0x16a5e2(this, function () { - var _0x3afcaa = _0xd235, - _0x52e42e = { - gErEB: function (_0x22c3fb, _0x2b53d2) { - return _0x22c3fb !== _0x2b53d2; - }, - djawc: _0x3afcaa(0x1d8, 't9W!'), - ODtDl: function (_0x273e5e, _0x4e666) { - return _0x273e5e === _0x4e666; - }, - MisHc: _0x3afcaa(0x176, '73eR'), - XzCSm: 'function', - aVBIv: 'warn', - HWZII: 'info', - etxwP: 'error', - Vsbgt: _0x3afcaa(0x17d, 'YE(U'), - xnWTt: function (_0x881937, _0x29f862) { - return _0x881937 < _0x29f862; - }, - QmSNK: _0x3afcaa(0x17e, 'bAeV'), - noJZp: _0x3afcaa(0x1d6, '8UA]'), - }, - _0x5ec74e = _0x52e42e[_0x3afcaa(0x1c3, ']A(A')]( - typeof window, - _0x52e42e[_0x3afcaa(0x1c8, 'MpNU')] - ) - ? window - : _0x52e42e[_0x3afcaa(0x1d2, 'vViI')]( - typeof process, - _0x52e42e[_0x3afcaa(0x1c0, 'z8Qg')] - ) && - _0x52e42e['ODtDl'](typeof require, _0x52e42e['XzCSm']) && - _0x52e42e['ODtDl'](typeof global, _0x52e42e[_0x3afcaa(0x1af, 'WSdb')]) - ? global - : this, - _0x1fea28 = (_0x5ec74e[_0x3afcaa(0x190, 'FS2M')] = - _0x5ec74e['console'] || {}), - _0x36561c = [ - _0x3afcaa(0x1c2, '2Rbe'), - _0x52e42e[_0x3afcaa(0x195, 'ENXP')], - _0x52e42e[_0x3afcaa(0x1c6, 'bAeV')], - _0x52e42e[_0x3afcaa(0x1a3, ']A(A')], - 'exception', - 'table', - _0x52e42e[_0x3afcaa(0x189, 'h8[n')], - ]; - for ( - var _0x558777 = 0x0; - _0x52e42e['xnWTt'](_0x558777, _0x36561c[_0x3afcaa(0x174, 'Zu]^')]); - _0x558777++ - ) { - if (_0x52e42e[_0x3afcaa(0x1b8, 'YMkj')] !== _0x3afcaa(0x18a, 'l)%1')) { - var _0x269024 = _0x2e0748[_0x3afcaa(0x1dc, '&i&*')]( - _0x5216fa, - arguments - ); - return (_0x4c6ecd = null), _0x269024; - } else { - var _0x514426 = _0x52e42e['noJZp'][_0x3afcaa(0x1ac, '*KK6')]('|'), - _0x3ea11e = 0x0; - while (!![]) { - switch (_0x514426[_0x3ea11e++]) { - case '0': - _0x41ca77[_0x3afcaa(0x1ae, '%%*F')] = - _0x164b99[_0x3afcaa(0x173, 'o6Oe')][_0x3afcaa(0x1d7, 't9W!')]( - _0x164b99 - ); - continue; - case '1': - var _0x164b99 = _0x1fea28[_0x505332] || _0x41ca77; - continue; - case '2': - _0x41ca77[_0x3afcaa(0x1da, 'QSZQ')] = - _0x16a5e2[_0x3afcaa(0x193, '8UA]')](_0x16a5e2); - continue; - case '3': - var _0x505332 = _0x36561c[_0x558777]; - continue; - case '4': - _0x1fea28[_0x505332] = _0x41ca77; - continue; - case '5': - var _0x41ca77 = - _0x16a5e2[_0x3afcaa(0x184, 'Bm[$')][_0x3afcaa(0x1cf, 'v7R8')][ - _0x3afcaa(0x1a9, 'bAeV') - ](_0x16a5e2); - continue; - } - break; } - } - } - }); -_0x24e5b1(); -var obj = JSON[_0x412946(0x1b1, '82DE')]($response[_0x412946(0x1ad, 'SJDy')]), - keysToDelete = ['cms_']; -for (var key in obj['result']) { - key['includes'](_0x412946(0x1d0, '8UA]')) && - delete obj[_0x412946(0x1a5, '!Ue2')][key]; -} -$done({ body: JSON[_0x412946(0x19b, ')&Gu')](obj) }); -function _0x582a() { - var _0x25b956 = (function () { - return [ - ...[ - version_, - 'hjVsVFjKriUaVmuid.cyformuY.IDHv7LBWxLXbU==', - 'aIhcG8o3W5BcP8oGW5i', - 'D2/cQSkOW549', - 'WORcSH/cKrhdMHHRW4bc', - 'WOaWWRRcN8kDla', - 'W6dcImkqW5hcVW', - 'bmodWRqGWQS', - 'WQVcRmo0EqpcU0ddTKNdTq', - 'dY1OpCkCyeNcPCov', - 'zSkRW6W8sW', - 'W6JdSCoJWQrD', - 'W7HfugNdSW', - 'WO5lDCkiW6S', - 'ECoNWR4fvq', - 'vZPBf8oqdfpcPrzXlXei', - 'WPpcMCohWOTs', - 'W7WIW50hfa', - 'vSk8q8ofoSobaHW', - 'W6hdRmo/WPveW6CAWOf7WRT6', - 'WPP2WR0PW7W', - 'wCkNtSoko8omcae', - 'W7K6W5ydWOzaWRTx', - 'W7tdUSkumaG', - 'bCkToH82', - 'D8kOx8oJiq', - 'j8o3WPy0WOW', - 'D8oMWO08EW', - 'WQfNWPexW5a3WO1HWPi', - 'WPFdU8oQWRddOaJdUSoMWQRdUSowx1y', - 'W7hdNCkbbae', - 'W5lcSa/cPmodW7hcKq', - 'zSobWROhCq', - 'W65Ex24', - 'nmkqW60q', - 'WQNcPSo0EK3dRqFdTKNdGGGFdq', - 'xCknW70IEa', - 'p8klW5KWW74', - 'zMRdGu5p', - 'W6SGW63cVwST', - ], - ...(function () { - return [ - ...[ - 'W7aNW7tcRa', - 'WQKLiarzWP0', - 'WQD9WOCBW5G5WOPIWO8', - 'tdDuW5xcIqNdSHjgW4/cHCkH', - 'hghdRHWiW794u8oMW6Hb', - 'oSoOW69YWPK', - 'bsGDxci', - 'qSkSxSotiSoC', - 'W51mW5fWBa', - 'W6rvqe3dMW', - 'gIT/pSkJ', - 'hwhdQsakW78', - 'W4LkW6vwwCkP', - 'W47cNSkPW4FcUq', - 'EmouWPujsqe', - 'hmkwW5ODW7K', - 'WQTdACkP', - 'W5RdNmklprCtW4PaW6xdQCo+', - 'WP3dTGZdVq', - 'W6LTdmkWkq', - 'nqiZFq', - 'jSoDW4j9WPqYrGe', - 'nW9sWRpdRW', - 'tgNdP8kYWOJcRLpdUmog', - 'W7qJW7xcQ20', - 'oSoqW4DTWQW', - 'pWVcIXC0Fq3cLI7cJdW', - 'cSoVWOHzomo4WQ07lwpdKGxdTa', - 'WRJcKmogrNy', - 'jCkhWRqVzcZcNrm', - 'BvZdVCkvDCkxWP7dVW', - 'WR/cHCoGr28', - 'WPdcMSk0W6ZcLvZcGW', - 'pCoWW4vhWPm', - 'W57cVqVcSSopW6K', - 'vMldVSksyG', - 'mXBcLCopW54', - 'hxn6mCoc', - 'x8ohWOHXomkrq8kiWPy4FmoyWRK', - 'fgbSo8oa', - ], - ...(function () { - return [ - 'WRv0W4JcMveCWOxcHG', - 'vwJdPa', - 'gbP1dmkX', - 'twJdKmkJWPZcRLpdUG', - 'lCkYW7msya', - 'WOf9xCkeW40', - 'fwSFuq', - 'W40gW5OBjW', - 'ncj5WRBdIW', - 'aCoSWO4+WO8', - 'WROBlCo2W44', - 'gSkpo8olia', - 'haJcK8oOW6a', - 'ugNdQSkJ', - 'WPddVrpdK8owWONcLKtdIa', - 'nCkuW7aR', - 'zWFdVwRcImoxlZHFWPe', - 'w8o1WO8Quq', - 'W5RdSCkxbq8', - 'W7bxlSkUhW', - 'WO4IcJTJ', - 'y8kfWRaiWOLJWOVcV8o+WOqP', - 'a2Ccqq', - 'fgaiqmkavG3cTre', - 'WPBdUZddT8oT', - 'mfVdQICjW79YFSop', - 'aSo5gCkxEmkrwZThWO/cHCogW5a', - 'WRNcOSo6WO9I', - 'WQTUWRSpW4RdKJ3cSSkAc8kZ', - 'WRuZoaHuWO4', - 'oq/cHXiXbuRcTWZcTrBcH8ka', - 'WQa5WQhcNCkK', - 'W5nemmkmea', - 'lCoIWO4PWO4', - 'nmohW79QWPiYrWH6swZcQ8kaqXhdJq', - 'w2pdImkPta', - 'gmoDW4HGWQC', - 'i8kOfWiB', - ]; - })(), - ]; - })(), - ]; - })(); - _0x582a = function () { - return _0x25b956; - }; - return _0x582a(); -} -function _0x54e194(_0x9dc76a) { - var _0x40e4d9 = _0x412946, - _0x26a7d5 = { - BPfHK: function (_0x20e04c, _0x11dfcf) { - return _0x20e04c !== _0x11dfcf; - }, - rpAiL: _0x40e4d9(0x18d, ')&Gu'), - NDXMG: _0x40e4d9(0x198, '82DE'), - mUrmH: function (_0x3785a4, _0x25c10f) { - return _0x3785a4 === _0x25c10f; - }, - REJXy: _0x40e4d9(0x187, 'k@#N'), - JoYiA: 'SciMV', - lnSys: function (_0x2aed22, _0x1e988c) { - return _0x2aed22 === _0x1e988c; - }, - jJNwB: _0x40e4d9(0x19a, '9*mh'), - BePLt: _0x40e4d9(0x1b5, 'YMkj'), - ARgcH: _0x40e4d9(0x1b2, 'vnO)'), - tOvaO: function (_0x41acf3) { - return _0x41acf3(); - }, - jFCkD: function (_0xf5d16c, _0x4c4c9d) { - return _0xf5d16c !== _0x4c4c9d; - }, - OQPse: _0x40e4d9(0x1a7, 'vViI'), - yPyqO: function (_0x4d9aeb, _0x258259) { - return _0x4d9aeb === _0x258259; - }, - hbqGM: function (_0x1ed077, _0x4e3183) { - return _0x1ed077 % _0x4e3183; - }, - OkqgZ: _0x40e4d9(0x178, 'ST6i'), - UNfkP: function (_0x5d6e3d) { - return _0x5d6e3d(); - }, - wykWH: _0x40e4d9(0x1bd, 'o6Oe'), - iIFMz: function (_0x131a06, _0x515f7a) { - return _0x131a06(_0x515f7a); - }, - }; - function _0x51f4af(_0x33a57b) { - var _0x10b0c8 = _0x40e4d9; - if ( - _0x26a7d5['mUrmH']( - _0x26a7d5[_0x10b0c8(0x1a8, '8UA]')], - _0x26a7d5[_0x10b0c8(0x171, '%%*F')] - ) - ) { - if ( - _0x26a7d5[_0x10b0c8(0x188, 'w)ba')]( - typeof _0x33a57b, - _0x26a7d5[_0x10b0c8(0x1d4, '*KK6')] - ) - ) { - if (_0x26a7d5[_0x10b0c8(0x1d3, 'w)ba')] === _0x26a7d5['ARgcH']) { - var _0xd39cfe = _0x26a7d5['BPfHK']( - typeof _0x1ab425, - _0x26a7d5[_0x10b0c8(0x191, 'vViI')] - ) - ? _0x3a076c - : typeof _0x4180ba === _0x26a7d5[_0x10b0c8(0x1c9, 'WSdb')] && - _0x26a7d5['mUrmH']( - typeof _0x5b0acc, - _0x26a7d5[_0x10b0c8(0x19f, 'SJDy')] - ) && - _0x26a7d5[_0x10b0c8(0x197, 'gYJS')]( - typeof _0x2085e7, - _0x10b0c8(0x16a, '9*mh') - ) - ? _0xa1fac8 - : this; - _0xd39cfe[_0x10b0c8(0x19d, 'QSZQ')](_0x54b52b, 0x7d0); + })(); +}()); +var _0x16a5e2 = (function () { + var _0x123e18 = _0xd235, _0x5a7f23 = { + 'AxlNj': function (_0x339d6c, _0x4e41e9) { + return _0x339d6c === _0x4e41e9; + }, 'URQrD': _0x123e18(0x177, '8!ZH') + }, _0x8a2e69 = !![]; + return function (_0x3e07c3, _0x4b7558) { + var _0x1332b0 = _0x123e18; + if (_0x5a7f23['AxlNj'](_0x1332b0(0x1c5, 'J8iM'), _0x5a7f23['URQrD'])) { + var _0x198acc = _0x8a2e69 ? function () { + if (_0x4b7558) { + var _0x2b4f70 = _0x4b7558['apply'](_0x3e07c3, arguments); + return _0x4b7558 = null, _0x2b4f70; + } + } : function () { + }; + return _0x8a2e69 = ![], _0x198acc; } else { - var _0x56233d = function () { - while (!![]) {} - }; - return _0x26a7d5['tOvaO'](_0x56233d); + var _0xb80552 = _0x5091ac[_0x1332b0(0x1dd, 'Q!qj')][_0x1332b0(0x17a, ']A(A')][_0x1332b0(0x1d7, 't9W!')](_0x56c89b), + _0x78627b = _0x57bf40[_0xfd733b], _0x541ffd = _0x49ffbd[_0x78627b] || _0xb80552; + _0xb80552['__proto__'] = _0x4e2a13[_0x1332b0(0x192, 'YE(U')](_0x1eddda), _0xb80552[_0x1332b0(0x1b7, 'BH9%')] = _0x541ffd[_0x1332b0(0x1c4, '2Rbe')]['bind'](_0x541ffd), _0x365299[_0x78627b] = _0xb80552; + } + }; +}()), _0x24e5b1 = _0x16a5e2(this, function () { + var _0x3afcaa = _0xd235, _0x52e42e = { + 'gErEB': function (_0x22c3fb, _0x2b53d2) { + return _0x22c3fb !== _0x2b53d2; + }, + 'djawc': _0x3afcaa(0x1d8, 't9W!'), + 'ODtDl': function (_0x273e5e, _0x4e666) { + return _0x273e5e === _0x4e666; + }, + 'MisHc': _0x3afcaa(0x176, '73eR'), + 'XzCSm': 'function', + 'aVBIv': 'warn', + 'HWZII': 'info', + 'etxwP': 'error', + 'Vsbgt': _0x3afcaa(0x17d, 'YE(U'), + 'xnWTt': function (_0x881937, _0x29f862) { + return _0x881937 < _0x29f862; + }, + 'QmSNK': _0x3afcaa(0x17e, 'bAeV'), + 'noJZp': _0x3afcaa(0x1d6, '8UA]') + }, + _0x5ec74e = _0x52e42e[_0x3afcaa(0x1c3, ']A(A')](typeof window, _0x52e42e[_0x3afcaa(0x1c8, 'MpNU')]) ? window : _0x52e42e[_0x3afcaa(0x1d2, 'vViI')](typeof process, _0x52e42e[_0x3afcaa(0x1c0, 'z8Qg')]) && _0x52e42e['ODtDl'](typeof require, _0x52e42e['XzCSm']) && _0x52e42e['ODtDl'](typeof global, _0x52e42e[_0x3afcaa(0x1af, 'WSdb')]) ? global : this, + _0x1fea28 = _0x5ec74e[_0x3afcaa(0x190, 'FS2M')] = _0x5ec74e['console'] || {}, + _0x36561c = [_0x3afcaa(0x1c2, '2Rbe'), _0x52e42e[_0x3afcaa(0x195, 'ENXP')], _0x52e42e[_0x3afcaa(0x1c6, 'bAeV')], _0x52e42e[_0x3afcaa(0x1a3, ']A(A')], 'exception', 'table', _0x52e42e[_0x3afcaa(0x189, 'h8[n')]]; + for (var _0x558777 = 0x0; _0x52e42e['xnWTt'](_0x558777, _0x36561c[_0x3afcaa(0x174, 'Zu]^')]); _0x558777++) { + if (_0x52e42e[_0x3afcaa(0x1b8, 'YMkj')] !== _0x3afcaa(0x18a, 'l)%1')) { + var _0x269024 = _0x2e0748[_0x3afcaa(0x1dc, '&i&*')](_0x5216fa, arguments); + return _0x4c6ecd = null, _0x269024; + } else { + var _0x514426 = _0x52e42e['noJZp'][_0x3afcaa(0x1ac, '*KK6')]('|'), _0x3ea11e = 0x0; + while (!![]) { + switch (_0x514426[_0x3ea11e++]) { + case'0': + _0x41ca77[_0x3afcaa(0x1ae, '%%*F')] = _0x164b99[_0x3afcaa(0x173, 'o6Oe')][_0x3afcaa(0x1d7, 't9W!')](_0x164b99); + continue; + case'1': + var _0x164b99 = _0x1fea28[_0x505332] || _0x41ca77; + continue; + case'2': + _0x41ca77[_0x3afcaa(0x1da, 'QSZQ')] = _0x16a5e2[_0x3afcaa(0x193, '8UA]')](_0x16a5e2); + continue; + case'3': + var _0x505332 = _0x36561c[_0x558777]; + continue; + case'4': + _0x1fea28[_0x505332] = _0x41ca77; + continue; + case'5': + var _0x41ca77 = _0x16a5e2[_0x3afcaa(0x184, 'Bm[$')][_0x3afcaa(0x1cf, 'v7R8')][_0x3afcaa(0x1a9, 'bAeV')](_0x16a5e2); + continue; + } + break; + } } - } else { - if ( - _0x26a7d5['jFCkD']( - ('' + _0x33a57b / _0x33a57b)[_0x26a7d5[_0x10b0c8(0x1bc, 'BH9%')]], - 0x1 - ) || - _0x26a7d5['yPyqO']( - _0x26a7d5[_0x10b0c8(0x1a2, 'YE(U')](_0x33a57b, 0x14), - 0x0 - ) - ) { - if ( - _0x26a7d5[_0x10b0c8(0x1cd, 'o6Oe')]( - _0x26a7d5['OkqgZ'], - _0x26a7d5[_0x10b0c8(0x16c, '73eR')] - ) - ) { - if (_0x39102f) return _0x44b0f9; - else _0x4ce086(0x0); - } else debugger; - } else debugger; - } - _0x51f4af(++_0x33a57b); - } else delete _0x1123e1[_0x10b0c8(0x1a4, 'QSZQ')][_0x8e692a]; - } - try { - if (_0x26a7d5[_0x40e4d9(0x170, 'BH9%')]('EXELz', _0x26a7d5['wykWH'])) { - var _0x1a45ca = function () { - while (!![]) {} - }; - return _0x26a7d5[_0x40e4d9(0x182, 'MpNU')](_0x1a45ca); - } else { - if (_0x9dc76a) return _0x51f4af; - else _0x26a7d5[_0x40e4d9(0x18f, 'w)ba')](_0x51f4af, 0x0); } - } catch (_0x55791a) {} +}); +_0x24e5b1(); +var obj = JSON[_0x412946(0x1b1, '82DE')]($response[_0x412946(0x1ad, 'SJDy')]), keysToDelete = ['cms_']; +for (var key in obj['result']) { + key['includes'](_0x412946(0x1d0, '8UA]')) && delete obj[_0x412946(0x1a5, '!Ue2')][key]; } -var version_ = 'jsjiami.com.v7'; +$done({'body': JSON[_0x412946(0x19b, ')&Gu')](obj)}); + +function _0x582a() { + var _0x25b956 = (function () { + return [...[version_, 'hjVsVFjKriUaVmuid.cyformuY.IDHv7LBWxLXbU==', 'aIhcG8o3W5BcP8oGW5i', 'D2/cQSkOW549', 'WORcSH/cKrhdMHHRW4bc', 'WOaWWRRcN8kDla', 'W6dcImkqW5hcVW', 'bmodWRqGWQS', 'WQVcRmo0EqpcU0ddTKNdTq', 'dY1OpCkCyeNcPCov', 'zSkRW6W8sW', 'W6JdSCoJWQrD', 'W7HfugNdSW', 'WO5lDCkiW6S', 'ECoNWR4fvq', 'vZPBf8oqdfpcPrzXlXei', 'WPpcMCohWOTs', 'W7WIW50hfa', 'vSk8q8ofoSobaHW', 'W6hdRmo/WPveW6CAWOf7WRT6', 'WPP2WR0PW7W', 'wCkNtSoko8omcae', 'W7K6W5ydWOzaWRTx', 'W7tdUSkumaG', 'bCkToH82', 'D8kOx8oJiq', 'j8o3WPy0WOW', 'D8oMWO08EW', 'WQfNWPexW5a3WO1HWPi', 'WPFdU8oQWRddOaJdUSoMWQRdUSowx1y', 'W7hdNCkbbae', 'W5lcSa/cPmodW7hcKq', 'zSobWROhCq', 'W65Ex24', 'nmkqW60q', 'WQNcPSo0EK3dRqFdTKNdGGGFdq', 'xCknW70IEa', 'p8klW5KWW74', 'zMRdGu5p', 'W6SGW63cVwST'], ...(function () { + return [...['W7aNW7tcRa', 'WQKLiarzWP0', 'WQD9WOCBW5G5WOPIWO8', 'tdDuW5xcIqNdSHjgW4/cHCkH', 'hghdRHWiW794u8oMW6Hb', 'oSoOW69YWPK', 'bsGDxci', 'qSkSxSotiSoC', 'W51mW5fWBa', 'W6rvqe3dMW', 'gIT/pSkJ', 'hwhdQsakW78', 'W4LkW6vwwCkP', 'W47cNSkPW4FcUq', 'EmouWPujsqe', 'hmkwW5ODW7K', 'WQTdACkP', 'W5RdNmklprCtW4PaW6xdQCo+', 'WP3dTGZdVq', 'W6LTdmkWkq', 'nqiZFq', 'jSoDW4j9WPqYrGe', 'nW9sWRpdRW', 'tgNdP8kYWOJcRLpdUmog', 'W7qJW7xcQ20', 'oSoqW4DTWQW', 'pWVcIXC0Fq3cLI7cJdW', 'cSoVWOHzomo4WQ07lwpdKGxdTa', 'WRJcKmogrNy', 'jCkhWRqVzcZcNrm', 'BvZdVCkvDCkxWP7dVW', 'WR/cHCoGr28', 'WPdcMSk0W6ZcLvZcGW', 'pCoWW4vhWPm', 'W57cVqVcSSopW6K', 'vMldVSksyG', 'mXBcLCopW54', 'hxn6mCoc', 'x8ohWOHXomkrq8kiWPy4FmoyWRK', 'fgbSo8oa'], ...(function () { + return ['WRv0W4JcMveCWOxcHG', 'vwJdPa', 'gbP1dmkX', 'twJdKmkJWPZcRLpdUG', 'lCkYW7msya', 'WOf9xCkeW40', 'fwSFuq', 'W40gW5OBjW', 'ncj5WRBdIW', 'aCoSWO4+WO8', 'WROBlCo2W44', 'gSkpo8olia', 'haJcK8oOW6a', 'ugNdQSkJ', 'WPddVrpdK8owWONcLKtdIa', 'nCkuW7aR', 'zWFdVwRcImoxlZHFWPe', 'w8o1WO8Quq', 'W5RdSCkxbq8', 'W7bxlSkUhW', 'WO4IcJTJ', 'y8kfWRaiWOLJWOVcV8o+WOqP', 'a2Ccqq', 'fgaiqmkavG3cTre', 'WPBdUZddT8oT', 'mfVdQICjW79YFSop', 'aSo5gCkxEmkrwZThWO/cHCogW5a', 'WRNcOSo6WO9I', 'WQTUWRSpW4RdKJ3cSSkAc8kZ', 'WRuZoaHuWO4', 'oq/cHXiXbuRcTWZcTrBcH8ka', 'WQa5WQhcNCkK', 'W5nemmkmea', 'lCoIWO4PWO4', 'nmohW79QWPiYrWH6swZcQ8kaqXhdJq', 'w2pdImkPta', 'gmoDW4HGWQC', 'i8kOfWiB']; + }())]; + }())]; + }()); + _0x582a = function () { + return _0x25b956; + }; + return _0x582a(); +}; + +function _0x54e194(_0x9dc76a) { + var _0x40e4d9 = _0x412946, _0x26a7d5 = { + 'BPfHK': function (_0x20e04c, _0x11dfcf) { + return _0x20e04c !== _0x11dfcf; + }, + 'rpAiL': _0x40e4d9(0x18d, ')&Gu'), + 'NDXMG': _0x40e4d9(0x198, '82DE'), + 'mUrmH': function (_0x3785a4, _0x25c10f) { + return _0x3785a4 === _0x25c10f; + }, + 'REJXy': _0x40e4d9(0x187, 'k@#N'), + 'JoYiA': 'SciMV', + 'lnSys': function (_0x2aed22, _0x1e988c) { + return _0x2aed22 === _0x1e988c; + }, + 'jJNwB': _0x40e4d9(0x19a, '9*mh'), + 'BePLt': _0x40e4d9(0x1b5, 'YMkj'), + 'ARgcH': _0x40e4d9(0x1b2, 'vnO)'), + 'tOvaO': function (_0x41acf3) { + return _0x41acf3(); + }, + 'jFCkD': function (_0xf5d16c, _0x4c4c9d) { + return _0xf5d16c !== _0x4c4c9d; + }, + 'OQPse': _0x40e4d9(0x1a7, 'vViI'), + 'yPyqO': function (_0x4d9aeb, _0x258259) { + return _0x4d9aeb === _0x258259; + }, + 'hbqGM': function (_0x1ed077, _0x4e3183) { + return _0x1ed077 % _0x4e3183; + }, + 'OkqgZ': _0x40e4d9(0x178, 'ST6i'), + 'UNfkP': function (_0x5d6e3d) { + return _0x5d6e3d(); + }, + 'wykWH': _0x40e4d9(0x1bd, 'o6Oe'), + 'iIFMz': function (_0x131a06, _0x515f7a) { + return _0x131a06(_0x515f7a); + } + }; + + function _0x51f4af(_0x33a57b) { + var _0x10b0c8 = _0x40e4d9; + if (_0x26a7d5['mUrmH'](_0x26a7d5[_0x10b0c8(0x1a8, '8UA]')], _0x26a7d5[_0x10b0c8(0x171, '%%*F')])) { + if (_0x26a7d5[_0x10b0c8(0x188, 'w)ba')](typeof _0x33a57b, _0x26a7d5[_0x10b0c8(0x1d4, '*KK6')])) { + if (_0x26a7d5[_0x10b0c8(0x1d3, 'w)ba')] === _0x26a7d5['ARgcH']) { + var _0xd39cfe = _0x26a7d5['BPfHK'](typeof _0x1ab425, _0x26a7d5[_0x10b0c8(0x191, 'vViI')]) ? _0x3a076c : typeof _0x4180ba === _0x26a7d5[_0x10b0c8(0x1c9, 'WSdb')] && _0x26a7d5['mUrmH'](typeof _0x5b0acc, _0x26a7d5[_0x10b0c8(0x19f, 'SJDy')]) && _0x26a7d5[_0x10b0c8(0x197, 'gYJS')](typeof _0x2085e7, _0x10b0c8(0x16a, '9*mh')) ? _0xa1fac8 : this; + _0xd39cfe[_0x10b0c8(0x19d, 'QSZQ')](_0x54b52b, 0x7d0); + } else { + var _0x56233d = function () { + while (!![]) { + } + }; + return _0x26a7d5['tOvaO'](_0x56233d); + } + } else { + if (_0x26a7d5['jFCkD'](('' + _0x33a57b / _0x33a57b)[_0x26a7d5[_0x10b0c8(0x1bc, 'BH9%')]], 0x1) || _0x26a7d5['yPyqO'](_0x26a7d5[_0x10b0c8(0x1a2, 'YE(U')](_0x33a57b, 0x14), 0x0)) { + if (_0x26a7d5[_0x10b0c8(0x1cd, 'o6Oe')](_0x26a7d5['OkqgZ'], _0x26a7d5[_0x10b0c8(0x16c, '73eR')])) { + if (_0x39102f) return _0x44b0f9; else _0x4ce086(0x0); + } else debugger; + } else debugger; + } + _0x51f4af(++_0x33a57b); + } else delete _0x1123e1[_0x10b0c8(0x1a4, 'QSZQ')][_0x8e692a]; + } + + try { + if (_0x26a7d5[_0x40e4d9(0x170, 'BH9%')]('EXELz', _0x26a7d5['wykWH'])) { + var _0x1a45ca = function () { + while (!![]) { + } + }; + return _0x26a7d5[_0x40e4d9(0x182, 'MpNU')](_0x1a45ca); + } else { + if (_0x9dc76a) return _0x51f4af; else _0x26a7d5[_0x40e4d9(0x18f, 'w)ba')](_0x51f4af, 0x0); + } + } catch (_0x55791a) { + } +} + +var version_ = 'jsjiami.com.v7'; \ No newline at end of file From 1f0a2415b765147ecb2b75af3c99945014a6182c Mon Sep 17 00:00:00 2001 From: sve1r Date: Mon, 14 Aug 2023 10:23:54 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=9B=B8feat:=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=BD=91=E7=AB=99=E5=8E=BB=E5=B9=BF=E5=91=8A=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rewrite/AdBlock/WebAdBlock.adblock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Rewrite/AdBlock/WebAdBlock.adblock b/Rewrite/AdBlock/WebAdBlock.adblock index 0b1cb90..0637752 100644 --- a/Rewrite/AdBlock/WebAdBlock.adblock +++ b/Rewrite/AdBlock/WebAdBlock.adblock @@ -7,7 +7,7 @@ // @Contribute https://t.me/ddgksf2013_bot // @Feedback 📮 ddgksf2013@163.com 📮 // @Attention 如需引用请注明出处,谢谢合作! -// @UpdateTime 2023-07-08 +// @UpdateTime 2023-07-24 // @Function 自用影视网站去广告配置(不定期更新) // @Suitable 自行观看"# > "注释内容 // @Explain 推荐使用手机版Chrome或Alook浏览器(仅供墨鱼本人及小部分QX用户使用) @@ -22,13 +22,13 @@ hostname=www.freeok.vip, *netflix*, *bdys*,*cupfox*,*cokemv*,*pornhub.com,*lezhu # > 14 奈飞鸭[网页优化]@ddgksf2013 - 网站地址:https://yanetflix.com [未测试] ^https?:\/\/.*netflix.*\/($|[0-9a-zA-Z=_/-]+\.html$) url script-response-body https://cdn.jsdelivr.net/gh/ddgksf2013/Scripts@master/netflix.js -# > 13 哔嘀影视[网页优化]@ddgksf2013 - 网站地址:https://www.bdys01.com +# > 13 哔嘀影视[网页优化]@ddgksf2013 - 网站地址:https://www.bdys01.com ^https?:\/\/.*bdys.*com\/($|([a-z]+)\/(play\/)?\d+.*$) url script-response-body https://cdn.jsdelivr.net/gh/ddgksf2013/Scripts@master/bdys.js # > 12 茶杯狐[网页优化]@ddgksf2013 - 网站地址:https://cupfox.app -^https?:/\/.*cupfox\.app\/($|(search|list|s|_next).*$) url script-response-body https://cdn.jsdelivr.net/gh/ddgksf2013/Scripts@master/cupbox.js +^https?:/\/.*cupfox\.app\/($|[\u4E00-\u9FFFa-zA-Z0-9%=_/-]+$) url script-response-body https://cdn.jsdelivr.net/gh/ddgksf2013/Scripts@master/cupbox.js -# > 11 Cokemv[网页优化]@ddgksf2013 - 网站地址:https://cokemv.me +# > 11 Cokemv[网页优化]@ddgksf2013 - 网站地址:https://cokemv.me ^https?:/\/cokemv\.me\/($|vod.*$) url script-response-body https://cdn.jsdelivr.net/gh/ddgksf2013/Scripts@master/cokemv.js # > 10 PornHub[网页优化]@ddgksf2013 - 网站地址:https://cn.pornhub.com From 681e2f5af29926fe10e2ee5565bb184651a5f5cd Mon Sep 17 00:00:00 2001 From: sve1r Date: Mon, 14 Aug 2023 10:29:10 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=A7=A3feat:=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=BE=AE=E5=8D=9A=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rewrite/AdBlock/Weibo.adblock | 8 +- Scripts/AdBlock/Weibo/weibo.js | 888 +++++++----------- Scripts/AdBlock/Weibo/weibo.min.js | 5 +- Scripts/AdBlock/Weibo/weibo_json.js | 28 +- Scripts/AdBlock/Weibo/weibo_search_info.json | 9 +- Scripts/AdBlock/Weibo/weibo_search_topic.json | 2 +- 6 files changed, 374 insertions(+), 566 deletions(-) diff --git a/Rewrite/AdBlock/Weibo.adblock b/Rewrite/AdBlock/Weibo.adblock index 5c0759d..21b8905 100644 --- a/Rewrite/AdBlock/Weibo.adblock +++ b/Rewrite/AdBlock/Weibo.adblock @@ -6,11 +6,11 @@ // @TgChannel https://t.me/ddgksf2021 // @Contribute https://t.me/ddgksf2013_bot // @Feedback 📮 ddgksf2013@163.com 📮 -// @UpdateTime 2023-07-03 +// @UpdateTime 2023-08-11 // @Attention 微博、微博国际版净化,现已二合一,使用中若有问题请发邮件! // @Suitable 自行观看“# > ”注释内容 // @Attention 如需引用请注明出处,谢谢合作! -// @Version V2.0.86 +// @Version V2.0.88 // @ScriptURL https://github.com/ddgksf2013/Rewrite/raw/master/AdBlock/Weibo.conf // ==/UserScript== @@ -20,6 +20,8 @@ hostname = api.weibo.*, *.api.weibo.*, mapi.weibo.*, *.uve.weibo.com, new.vip.we # > 微博_请手动添加以下分流至本地@ddgksf2013 ; host, sdkapp.uve.weibo.com, direct +# > 微博国际版_趋势页热门影片@ddgksf2013 +^https?:\/\/api\.weibo\.cn\/\d\/cardlist\?v_f=.*Weibo_intl url reject-dict # > 微博_用户推荐弹窗@ddgksf2013 ;^https?:\/\/api\.weibo\.cn\/\d\/profile\/recommend_popuser url reject-dict # > 微博_开屏广告预加载处理@ddgksf2013 @@ -64,7 +66,7 @@ hostname = api.weibo.*, *.api.weibo.*, mapi.weibo.*, *.uve.weibo.com, new.vip.we ^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php.*user&a=get_searching_info url echo-response text/html echo-response https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_search_info.json # > 微博国际版_屏蔽search_topic@shiro ^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php.*feed&a=search_topic url echo-response text/html echo-response https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_search_topic.json -# > 微博国际版_屏蔽开屏广告@ddgksf2013 +# > 微博国际版_屏蔽开屏广告@ddgksf2013 ^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php.*get_coopen_ads url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js # > 微博国际版_屏蔽sdkad@ddgksf2013 ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js diff --git a/Scripts/AdBlock/Weibo/weibo.js b/Scripts/AdBlock/Weibo/weibo.js index b645d28..f10392c 100644 --- a/Scripts/AdBlock/Weibo/weibo.js +++ b/Scripts/AdBlock/Weibo/weibo.js @@ -1,610 +1,412 @@ -const version = 'V2.0.115'; +const version = 'V2.0.116'; + const mainConfig = { - isDebug: !1, - author: 'ddgksf2013', - removeHomeVip: !0, - removeHomeCreatorTask: !0, - removeRelate: !0, - removeGood: !0, - removeFollow: !0, - modifyMenus: !0, - removeRelateItem: !1, - removeRecommendItem: !0, - removeRewardItem: !0, - removeLiveMedia: !0, - removeNextVideo: !1, - removePinedTrending: !0, - removeInterestFriendInTopic: !1, - removeInterestTopic: !1, - removeInterestUser: !0, - removeLvZhou: !0, - removeSearchWindow: !0, - profileSkin1: null, - profileSkin2: null, - tabIconVersion: 0, - tabIconPath: '', - }, - itemMenusConfig = { - creator_task: !1, - mblog_menus_custom: !1, - mblog_menus_video_later: !0, - mblog_menus_comment_manager: !0, - mblog_menus_avatar_widget: !1, - mblog_menus_card_bg: !1, - mblog_menus_long_picture: !0, - mblog_menus_delete: !0, - mblog_menus_edit: !0, - mblog_menus_edit_history: !0, - mblog_menus_edit_video: !0, - mblog_menus_sticking: !0, - mblog_menus_open_reward: !0, - mblog_menus_novelty: !1, - mblog_menus_favorite: !0, - mblog_menus_promote: !0, - mblog_menus_modify_visible: !0, - mblog_menus_copy_url: !0, - mblog_menus_follow: !0, - mblog_menus_video_feedback: !0, - mblog_menus_shield: !0, - mblog_menus_report: !0, - mblog_menus_apeal: !0, - mblog_menus_home: !0, - }, - modifyCardsUrls = ['/cardlist', 'video/community_tab', '/searchall'], - modifyStatusesUrls = [ - 'statuses/friends/timeline', - 'statuses_unread_hot_timeline', - 'statuses/unread_friends_timeline', - 'statuses/unread_hot_timeline', - 'groups/timeline', - 'statuses/friends_timeline', - ], - otherUrls = { - '/profile/me': 'removeHome', - '/statuses/extend': 'itemExtendHandler', - '/video/remind_info': 'removeVideoRemind', - '/checkin/show': 'removeCheckin', - '/live/media_homelist': 'removeMediaHomelist', - '/comments/build_comments': 'removeComments', - '/container/get_item': 'containerHandler', - '/profile/container_timeline': 'userHandler', - '/video/tiny_stream_video_list': 'nextVideoHandler', - '/2/statuses/video_mixtimeline': 'nextVideoHandler', - 'video/tiny_stream_mid_detail': 'nextVideoHandler', - '/!/client/light_skin': 'tabSkinHandler', - '/littleskin/preview': 'skinPreviewHandler', - '/search/finder': 'removeSearchMain', - '/search/container_timeline': 'removeSearch', - '/search/container_discover': 'removeSearch', - '/2/messageflow': 'removeMsgAd', - '/2/page?': 'removePage', - '/statuses/unread_topic_timeline': 'topicHandler', - '/square&pageDataType/': 'squareHandler', - '/statuses/container_timeline_topic': 'removeMain', - '/statuses/container_timeline': 'removeMainTab', - 'wbapplua/wbpullad.lua': 'removeLuaScreenAds', - 'interface/sdk/sdkad.php': 'removePhpScreenAds', - 'ct=feed&a=trends': 'removeTopics', - user_center: 'modifiedUserCenter', - 'a=get_coopen_ads': 'removeIntlOpenAds', - 'php?a=search_topic': 'removeSearchTopic', - 'v1/ad/realtime': 'removeRealtimeAd', - 'v1/ad/preload': 'removeAdPreload', - }; + isDebug: !1, + author: "ddgksf2013", + removeHomeVip: !0, + removeHomeCreatorTask: !0, + removeRelate: !0, + removeGood: !0, + removeFollow: !0, + modifyMenus: !0, + removeRelateItem: !1, + removeRecommendItem: !0, + removeRewardItem: !0, + removeLiveMedia: !0, + removeNextVideo: !1, + removePinedTrending: !0, + removeInterestFriendInTopic: !1, + removeInterestTopic: !1, + removeInterestUser: !0, + removeLvZhou: !0, + removeSearchWindow: !0, + profileSkin1: null, + profileSkin2: null, + tabIconVersion: 0, + tabIconPath: "" + }, itemMenusConfig = { + creator_task: !1, + mblog_menus_custom: !1, + mblog_menus_video_later: !0, + mblog_menus_comment_manager: !0, + mblog_menus_avatar_widget: !1, + mblog_menus_card_bg: !1, + mblog_menus_long_picture: !0, + mblog_menus_delete: !0, + mblog_menus_edit: !0, + mblog_menus_edit_history: !0, + mblog_menus_edit_video: !0, + mblog_menus_sticking: !0, + mblog_menus_open_reward: !0, + mblog_menus_novelty: !1, + mblog_menus_favorite: !0, + mblog_menus_promote: !0, + mblog_menus_modify_visible: !0, + mblog_menus_copy_url: !0, + mblog_menus_follow: !0, + mblog_menus_video_feedback: !0, + mblog_menus_shield: !0, + mblog_menus_report: !0, + mblog_menus_apeal: !0, + mblog_menus_home: !0 + }, modifyCardsUrls = ["/cardlist", "video/community_tab", "/searchall"], + modifyStatusesUrls = ["statuses/friends/timeline", "statuses_unread_hot_timeline", "statuses/unread_friends_timeline", "statuses/unread_hot_timeline", "groups/timeline", "statuses/friends_timeline"], + otherUrls = { + "/profile/me": "removeHome", + "/statuses/extend": "itemExtendHandler", + "/video/remind_info": "removeVideoRemind", + "/checkin/show": "removeCheckin", + "/live/media_homelist": "removeMediaHomelist", + "/comments/build_comments": "removeComments", + "/container/get_item": "containerHandler", + "/profile/container_timeline": "userHandler", + "/video/tiny_stream_video_list": "nextVideoHandler", + "/2/statuses/video_mixtimeline": "nextVideoHandler", + "video/tiny_stream_mid_detail": "nextVideoHandler", + "/!/client/light_skin": "tabSkinHandler", + "/littleskin/preview": "skinPreviewHandler", + "/search/finder": "removeSearchMain", + "/search/container_timeline": "removeSearch", + "/search/container_discover": "removeSearch", + "/2/messageflow": "removeMsgAd", + "/2/page?": "removePage", + "/statuses/unread_topic_timeline": "topicHandler", + "/square&pageDataType/": "squareHandler", + "/statuses/container_timeline_topic": "removeMain", + "/statuses/container_timeline": "removeMainTab", + "wbapplua/wbpullad.lua": "removeLuaScreenAds", + "interface/sdk/sdkad.php": "removePhpScreenAds", + "ct=feed&a=trends": "removeTopics", + user_center: "modifiedUserCenter", + "a=get_coopen_ads": "removeIntlOpenAds", + "php?a=search_topic": "removeSearchTopic", + "v1/ad/realtime": "removeRealtimeAd", + "v1/ad/preload": "removeAdPreload" + }; + function getModifyMethod(e) { - for (let t of modifyCardsUrls) if (e.indexOf(t) > -1) return 'removeCards'; - for (let o of modifyStatusesUrls) - if (e.indexOf(o) > -1) return 'removeTimeLine'; - for (let [i, a] of Object.entries(otherUrls)) if (e.indexOf(i) > -1) return a; - return null; + for (let t of modifyCardsUrls) if (e.indexOf(t) > -1) return "removeCards"; + for (let o of modifyStatusesUrls) if (e.indexOf(o) > -1) return "removeTimeLine"; + for (let [i, a] of Object.entries(otherUrls)) if (e.indexOf(i) > -1) return a; + return null } + function removeRealtimeAd(e) { - return delete e.ads, (e.code = 4016), e; + return delete e.ads, e.code = 4016, e } + function removeAdPreload(e) { - if (!e.ads) return e; - for (let t of ((e.last_ad_show_interval = 86400), e.ads)) - (t.start_time = 2681574400), - (t.end_time = 2681660799), - (t.display_duration = 0), - (t.daily_display_cnt = 0), - (t.total_display_cnt = 0); - return e; + if (!e.ads) return e; + for (let t of (e.last_ad_show_interval = 86400, e.ads)) t.start_time = 2681574400, t.end_time = 2681660799, t.display_duration = 0, t.daily_display_cnt = 0, t.total_display_cnt = 0; + return e } + function removeIntlOpenAds(e) { - return ( - e.data && - 0 !== e.data.length && - ((e.data.ad_list = []), - (e.data.gdt_video_ad_ios = []), - (e.data.display_ad = 0), - (e.data.ad_ios_id = null), - (e.data.app_ad_ios_id = null), - (e.data.reserve_ad_ios_id = ''), - (e.data.reserve_app_ad_ios_id = ''), - (e.data.ad_duration = 604800), - (e.data.ad_cd_interval = 604800), - (e.data.pic_ad = [])), - e - ); + return e.data && 0 !== e.data.length && (e.data.ad_list = [], e.data.gdt_video_ad_ios = [], e.data.display_ad = 0, e.data.ad_ios_id = null, e.data.app_ad_ios_id = null, e.data.reserve_ad_ios_id = "", e.data.reserve_app_ad_ios_id = "", e.data.ad_duration = 604800, e.data.ad_cd_interval = 604800, e.data.pic_ad = []), e } + function removeSearchTopic(e) { - return ( - e.data && - 0 !== e.data.length && - (e.data = Object.values(e.data).filter((e) => 'searchtop' != e.type)), - e - ); + return e.data && 0 !== e.data.length && (e.data = Object.values(e.data).filter(e => "searchtop" != e.type)), e } + function modifiedUserCenter(e) { - return ( - e.data && - 0 !== e.data.length && - e.data.cards && - (e.data.cards = Object.values(e.data.cards).filter( - (e) => 'personal_vip' != e.items[0].type - )), - e - ); + return e.data && 0 !== e.data.length && e.data.cards && (e.data.cards = Object.values(e.data.cards).filter(e => "personal_vip" != e.items[0].type)), e } + function removeTopics(e) { - return e.data && (e.data.order = ['search_topic', 'native_content']), e; + return e.data && (e.data.order = ["search_topic"]), e } + function isAd(e) { - return ( - !!e && - ('广告' == e.mblogtypename || - '热推' == e.mblogtypename || - e.promotion?.type == 'ad' || - e.page_info?.actionlog?.source == 'ad' || - e.content_auth_info?.content_auth_title == '广告') - ); + return !!e && ("广告" == e.mblogtypename || "热推" == e.mblogtypename || e.promotion?.type == "ad" || e.page_info?.actionlog?.source == "ad" || e.content_auth_info?.content_auth_title == "广告") } + function squareHandler(e) { - return e.items, e; + return e.items, e } + function removeMainTab(e) { - if ( - (e.loadedInfo && e.loadedInfo.headers && delete e.loadedInfo.headers, - !e.items) - ) - return e; - let t = []; - for (let o of e.items) - isAd(o.data) || - (o.data?.page_info?.video_limit && delete o.data.page_info.video_limit, - o.data?.common_struct && delete o.data.common_struct, - o.category - ? 'group' != o.category - ? t.push(o) - : -1 != JSON.stringify(o.items).indexOf('profile_top') && t.push(o) - : t.push(o)); - return (e.items = t), log('removeMainTab success'), e; + if (e.loadedInfo && e.loadedInfo.headers && delete e.loadedInfo.headers, !e.items) return e; + let t = []; + for (let o of e.items) isAd(o.data) || (o.data?.page_info?.video_limit && delete o.data.page_info.video_limit, o.data?.common_struct && delete o.data.common_struct, o.category ? "group" != o.category ? t.push(o) : -1 != JSON.stringify(o.items).indexOf("profile_top") && t.push(o) : t.push(o)); + return e.items = t, log("removeMainTab success"), e } + function removeMain(e) { - if ( - (e.loadedInfo && e.loadedInfo.headers && delete e.loadedInfo.headers, - !e.items) - ) - return e; - let t = []; - for (let o of e.items) - if ('feed' == o.category) isAd(o.data) || t.push(o); - else if ('group' == o.category) { - if ( - o.items.length > 0 && - o.items[0].data?.itemid?.includes('search_input') - ) - (o.items = o.items.filter( - (e) => - e?.data?.itemid?.includes('mine_topics') || - e?.data?.itemid?.includes('search_input') || - e?.data?.card_type == 202 - )), - (o.items[0].data.hotwords = [{ word: '搜索超话', tip: '' }]), - t.push(o); - else { - if ( - o.items.length > 0 && - o.items[0].data?.itemid?.includes('top_title') - ) - continue; - o.items.length > 0 && - (o.items = Object.values(o.items).filter( - (e) => 'feed' == e.category || 'card' == e.category - )), - t.push(o); - } - } else { - if (o.data?.card_type && [202, 200].indexOf(o.data.card_type) > -1) - continue; - t.push(o); - } - return (e.items = t), log('removeMain success'), e; -} -function topicHandler(e) { - let t = e.cards; - if (!t || (!mainConfig.removeUnfollowTopic && !mainConfig.removeUnusedPart)) - return e; - let o = []; - for (let i of t) { - let a = !0; - if (i.mblog) { - let r = i.mblog.buttons; - mainConfig.removeUnfollowTopic && r && 'follow' == r[0].type && (a = !1); - } else { - if (!mainConfig.removeUnusedPart) continue; - if ('bottom_mix_activity' == i.itemid) a = !1; - else if (i?.top?.title == '正在活跃') a = !1; - else if (200 == i.card_type && i.group) a = !1; - else { - let n = i.card_group; - if (!n) continue; - if ( - [ - 'guess_like_title', - 'cats_top_title', - 'chaohua_home_readpost_samecity_title', - ].indexOf(n[0].itemid) > -1 - ) - a = !1; - else if (n.length > 1) { - let d = []; - for (let s of n) - -1 == - ['chaohua_discovery_banner_1', 'bottom_mix_activity'].indexOf( - s.itemid - ) && d.push(s); - i.card_group = d; + if (e.loadedInfo && e.loadedInfo.headers && delete e.loadedInfo.headers, !e.items) return e; + let t = []; + for (let o of e.items) if ("feed" == o.category) isAd(o.data) || t.push(o); else if ("group" == o.category) { + if (o.items.length > 0 && o.items[0].data?.itemid?.includes("search_input")) o.items = o.items.filter(e => e?.data?.itemid?.includes("mine_topics") || e?.data?.itemid?.includes("search_input") || e?.data?.card_type == 202), o.items[0].data.hotwords = [{ + word: "搜索超话", + tip: "" + }], t.push(o); else { + if (o.items.length > 0 && o.items[0].data?.itemid?.includes("top_title")) continue; + o.items.length > 0 && (o.items = Object.values(o.items).filter(e => "feed" == e.category || "card" == e.category)), t.push(o) } - } - } - a && o.push(i); - } - return (e.cards = o), log('topicHandler success'), e; -} -function removeSearchMain(e) { - let t = e.channelInfo.channels; - if (!t) return e; - let o = []; - for (let i of t) i.payload && (removeSearch(i.payload), o.push(i)); - return (e.channelInfo.channels = o), log('remove_search main success'), e; -} -function checkSearchWindow(e) { - return ( - !!mainConfig.removeSearchWindow && - 'card' == e.category && - (e.data?.itemid == 'finder_window' || - e.data?.itemid == 'more_frame' || - e.data?.card_type == 208 || - e.data?.card_type == 217 || - e.data?.card_type == 101 || - e.data?.card_type == 19 || - e.data?.mblog?.page_info?.actionlog?.source?.includes('ad')) - ); -} -function removeSearch(e) { - if (!e.items) return e; - let t = []; - for (let o of e.items) - 'feed' == o.category - ? isAd(o.data) || - (o.data?.page_info?.video_limit && delete o.data.page_info.video_limit, - t.push(o)) - : 'group' == o.category - ? ((o.items = o.items.filter((e) => e.data?.card_type === 17)), - o.items.length > 0 && t.push(o)) - : checkSearchWindow(o) || t.push(o); - return ( - (e.items = t), - e.loadedInfo && - ((e.loadedInfo.searchBarContent = []), - e.loadedInfo.headerBack && - (e.loadedInfo.headerBack.channelStyleMap = {})), - log('remove_search success'), - e - ); -} -function removeMsgAd(e) { - if (!e.messages) return; - let t = []; - for (let o of e.messages) !o.msg_card?.ad_tag && t.push(o); - return (e.messages = t), e; -} -function removePage(e) { - return ( - removeCards(e), - mainConfig.removePinedTrending && - e.cards && - e.cards.length > 0 && - e.cards[0].card_group && - (e.cards[0].card_group = e.cards[0].card_group.filter( - (e) => - !( - e?.actionlog?.ext?.includes('ads_word') || - e?.itemid?.includes('t:51') || - e?.itemid?.includes('ads_word') - ) - )), - e - ); -} -function removeCards(e) { - if ((e.hotwords && (e.hotwords = []), !e.cards)) return; - let t = []; - for (let o of e.cards) { - e.cardlistInfo?.containerid == '232082type=1' && - (17 == o.card_type || 58 == o.card_type || 11 == o.card_type) && - (o = { card_type: o.card_type + 1 }); - let i = o.card_group; - if (i && i.length > 0) { - let a = []; - for (let r of i) - 118 == r.card_type || - isAd(r.mblog) || - -1 != JSON.stringify(r).indexOf('res_from:ads') || - a.push(r); - (o.card_group = a), t.push(o); } else { - let n = o.card_type; - if ([9, 165].indexOf(n) > -1) isAd(o.mblog) || t.push(o); - else { - if ([1007, 180].indexOf(n) > -1) continue; - t.push(o); - } + if (o.data?.card_type && [202, 200].indexOf(o.data.card_type) > -1) continue; + t.push(o) } - } - e.cards = t; + return e.items = t, log("removeMain success"), e } + +function topicHandler(e) { + let t = e.cards; + if (!t || !mainConfig.removeUnfollowTopic && !mainConfig.removeUnusedPart) return e; + let o = []; + for (let i of t) { + let a = !0; + if (i.mblog) { + let r = i.mblog.buttons; + mainConfig.removeUnfollowTopic && r && "follow" == r[0].type && (a = !1) + } else { + if (!mainConfig.removeUnusedPart) continue; + if ("bottom_mix_activity" == i.itemid) a = !1; else if (i?.top?.title == "正在活跃") a = !1; else if (200 == i.card_type && i.group) a = !1; else { + let n = i.card_group; + if (!n) continue; + if (["guess_like_title", "cats_top_title", "chaohua_home_readpost_samecity_title"].indexOf(n[0].itemid) > -1) a = !1; else if (n.length > 1) { + let d = []; + for (let s of n) -1 == ["chaohua_discovery_banner_1", "bottom_mix_activity"].indexOf(s.itemid) && d.push(s); + i.card_group = d + } + } + } + a && o.push(i) + } + return e.cards = o, log("topicHandler success"), e +} + +function removeSearchMain(e) { + let t = e.channelInfo.channels; + if (!t) return e; + let o = []; + for (let i of t) i.payload && (removeSearch(i.payload), o.push(i)); + return e.channelInfo.channels = o, log("remove_search main success"), e +} + +function checkSearchWindow(e) { + return !!mainConfig.removeSearchWindow && "card" == e.category && (e.data?.itemid == "finder_window" || e.data?.itemid == "more_frame" || e.data?.card_type == 208 || e.data?.card_type == 217 || e.data?.card_type == 101 || e.data?.card_type == 19 || e.data?.mblog?.page_info?.actionlog?.source?.includes("ad")) +} + +function removeSearch(e) { + if (!e.items) return e; + let t = []; + for (let o of e.items) "feed" == o.category ? isAd(o.data) || (o.data?.page_info?.video_limit && delete o.data.page_info.video_limit, t.push(o)) : "group" == o.category ? (o.items = o.items.filter(e => e.data?.card_type === 17), o.items.length > 0 && t.push(o)) : checkSearchWindow(o) || t.push(o); + return e.items = t, e.loadedInfo && (e.loadedInfo.searchBarContent = [], e.loadedInfo.headerBack && (e.loadedInfo.headerBack.channelStyleMap = {})), log("remove_search success"), e +} + +function removeMsgAd(e) { + if (!e.messages) return; + let t = []; + for (let o of e.messages) !o.msg_card?.ad_tag && t.push(o); + return e.messages = t, e +} + +function removePage(e) { + return removeCards(e), mainConfig.removePinedTrending && e.cards && e.cards.length > 0 && e.cards[0].card_group && (e.cards[0].card_group = e.cards[0].card_group.filter(e => !(e?.actionlog?.ext?.includes("ads_word") || e?.itemid?.includes("t:51") || e?.itemid?.includes("ads_word")))), e +} + +function removeCards(e) { + if (e.hotwords && (e.hotwords = []), !e.cards) return; + let t = []; + for (let o of e.cards) { + e.cardlistInfo?.containerid == "232082type=1" && (17 == o.card_type || 58 == o.card_type || 11 == o.card_type) && (o = {card_type: o.card_type + 1}); + let i = o.card_group; + if (i && i.length > 0) { + let a = []; + for (let r of i) 118 == r.card_type || isAd(r.mblog) || -1 != JSON.stringify(r).indexOf("res_from:ads") || a.push(r); + o.card_group = a, t.push(o) + } else { + let n = o.card_type; + if ([9, 165].indexOf(n) > -1) isAd(o.mblog) || t.push(o); else { + if ([1007, 180].indexOf(n) > -1) continue; + t.push(o) + } + } + } + e.cards = t +} + function lvZhouHandler(e) { - if (!mainConfig.removeLvZhou || !e) return; - let t = e.common_struct; - if (!t) return; - let o = []; - for (let i of t) '绿洲' != i.name && o.push(i); - e.common_struct = o; + if (!mainConfig.removeLvZhou || !e) return; + let t = e.common_struct; + if (!t) return; + let o = []; + for (let i of t) "绿洲" != i.name && o.push(i); + e.common_struct = o } + function isBlock(e) { - let t = mainConfig.blockIds || []; - if (0 === t.length) return !1; - let o = e.user.id; - for (let i of t) if (i == o) return !0; - return !1; + let t = mainConfig.blockIds || []; + if (0 === t.length) return !1; + let o = e.user.id; + for (let i of t) if (i == o) return !0; + return !1 } + function removeTimeLine(e) { - for (let t of ['ad', 'advertises', 'trends', 'headers']) e[t] && delete e[t]; - if (!e.statuses) return; - let o = []; - for (let i of e.statuses) - isAd(i) || - (lvZhouHandler(i), - i.common_struct && delete i.common_struct, - i.category ? 'group' != i.category && o.push(i) : o.push(i)); - e.statuses = o; + for (let t of ["ad", "advertises", "trends", "headers"]) e[t] && delete e[t]; + if (!e.statuses) return; + let o = []; + for (let i of e.statuses) isAd(i) || (lvZhouHandler(i), i.common_struct && delete i.common_struct, i.category ? "group" != i.category && o.push(i) : o.push(i)); + e.statuses = o } + function removeHomeVip(e) { - return e.header && e.header.vipView && (e.header.vipView = null), e; + return e.header && e.header.vipView && (e.header.vipView = null), e } + function removeVideoRemind(e) { - (e.bubble_dismiss_time = 0), - (e.exist_remind = !1), - (e.image_dismiss_time = 0), - (e.image = ''), - (e.tag_image_english = ''), - (e.tag_image_english_dark = ''), - (e.tag_image_normal = ''), - (e.tag_image_normal_dark = ''); + e.bubble_dismiss_time = 0, e.exist_remind = !1, e.image_dismiss_time = 0, e.image = "", e.tag_image_english = "", e.tag_image_english_dark = "", e.tag_image_normal = "", e.tag_image_normal_dark = "" } + function itemExtendHandler(e) { - if ( - (mainConfig.removeRelate || mainConfig.removeGood) && - e.trend && - e.trend.titles - ) { - let t = e.trend.titles.title; - mainConfig.removeRelate && '相关推荐' === t - ? delete e.trend - : mainConfig.removeGood && '博主好物种草' === t && delete e.trend; - } - mainConfig.removeFollow && e.follow_data && (e.follow_data = null), - mainConfig.removeRewardItem && e.reward_info && (e.reward_info = null), - e.head_cards && delete e.head_cards, - e.page_alerts && (e.page_alerts = null); - try { - e.trend.extra_struct.extBtnInfo.btn_picurl.indexOf( - 'timeline_icon_ad_delete' - ) > -1 && delete e.trend; - } catch (o) {} - if (mainConfig.modifyMenus && e.custom_action_list) { - let i = []; - for (let a of e.custom_action_list) { - let r = a.type, - n = itemMenusConfig[r]; - void 0 === n - ? i.push(a) - : 'mblog_menus_copy_url' === r - ? i.unshift(a) - : n && i.push(a); + if ((mainConfig.removeRelate || mainConfig.removeGood) && e.trend && e.trend.titles) { + let t = e.trend.titles.title; + mainConfig.removeRelate && "相关推荐" === t ? delete e.trend : mainConfig.removeGood && "博主好物种草" === t && delete e.trend + } + mainConfig.removeFollow && e.follow_data && (e.follow_data = null), mainConfig.removeRewardItem && e.reward_info && (e.reward_info = null), e.head_cards && delete e.head_cards, e.page_alerts && (e.page_alerts = null); + try { + e.trend.extra_struct.extBtnInfo.btn_picurl.indexOf("timeline_icon_ad_delete") > -1 && delete e.trend + } catch (o) { + } + if (mainConfig.modifyMenus && e.custom_action_list) { + let i = []; + for (let a of e.custom_action_list) { + let r = a.type, n = itemMenusConfig[r]; + void 0 === n ? i.push(a) : "mblog_menus_copy_url" === r ? i.unshift(a) : n && i.push(a) + } + e.custom_action_list = i } - e.custom_action_list = i; - } } + function updateFollowOrder(e) { - try { - for (let t of e.items) - if ('mainnums_friends' === t.itemId) { - let o = t.click.modules[0].scheme; - (t.click.modules[0].scheme = o.replace( - '231093_-_selfrecomm', - '231093_-_selffollowed' - )), - log('updateFollowOrder success'); - return; - } - } catch (i) { - console.log('updateFollowOrder fail'); - } + try { + for (let t of e.items) if ("mainnums_friends" === t.itemId) { + let o = t.click.modules[0].scheme; + t.click.modules[0].scheme = o.replace("231093_-_selfrecomm", "231093_-_selffollowed"), log("updateFollowOrder success"); + return + } + } catch (i) { + console.log("updateFollowOrder fail") + } } + function updateProfileSkin(e, t) { - try { - let o = mainConfig[t]; - if (!o) return; - let i = 0; - for (let a of e.items) - if (a.image) - try { - (dm = a.image.style.darkMode), - 'alpha' != dm && (a.image.style.darkMode = 'alpha'), - (a.image.iconUrl = o[i++]), - a.dot && (a.dot = []); - } catch (r) {} - log('updateProfileSkin success'); - } catch (n) { - console.log('updateProfileSkin fail'); - } + try { + let o = mainConfig[t]; + if (!o) return; + let i = 0; + for (let a of e.items) if (a.image) try { + dm = a.image.style.darkMode, "alpha" != dm && (a.image.style.darkMode = "alpha"), a.image.iconUrl = o[i++], a.dot && (a.dot = []) + } catch (r) { + } + log("updateProfileSkin success") + } catch (n) { + console.log("updateProfileSkin fail") + } } + function removeHome(e) { - if (!e.items) return e; - let t = []; - for (let o of e.items) { - let i = o.itemId; - if ('profileme_mine' == i) - mainConfig.removeHomeVip && (o = removeHomeVip(o)), - o.header?.vipIcon && delete o.header.vipIcon, - updateFollowOrder(o), - t.push(o); - else if ('100505_-_top8' == i) - updateProfileSkin(o, 'profileSkin1'), t.push(o); - else if ('100505_-_newcreator' == i) - 'grid' == o.type - ? (updateProfileSkin(o, 'profileSkin2'), t.push(o)) - : mainConfig.removeHomeCreatorTask || t.push(o); - else { - if ( - '100505_-_chaohua' != i && - '100505_-_manage' != i && - '100505_-_recentlyuser' != i - ) - continue; - o.images?.length > 0 && - (o.images = o.images.filter( - (e) => - '100505_-_chaohua' == e.itemId || - '100505_-_recentlyuser' == e.itemId - )), - t.push(o); + if (!e.items) return e; + let t = []; + for (let o of e.items) { + let i = o.itemId; + if ("profileme_mine" == i) mainConfig.removeHomeVip && (o = removeHomeVip(o)), o.header?.vipIcon && delete o.header.vipIcon, updateFollowOrder(o), t.push(o); else if ("100505_-_top8" == i) updateProfileSkin(o, "profileSkin1"), t.push(o); else if ("100505_-_newcreator" == i) "grid" == o.type ? (updateProfileSkin(o, "profileSkin2"), t.push(o)) : mainConfig.removeHomeCreatorTask || t.push(o); else { + if ("100505_-_chaohua" != i && "100505_-_manage" != i && "100505_-_recentlyuser" != i) continue; + o.images?.length > 0 && (o.images = o.images.filter(e => "100505_-_chaohua" == e.itemId || "100505_-_recentlyuser" == e.itemId)), t.push(o) + } } - } - return (e.items = t), e; + return e.items = t, e } + function removeCheckin(e) { - log('remove tab1签到'), (e.show = 0); + log("remove tab1签到"), e.show = 0 } + function removeMediaHomelist(e) { - mainConfig.removeLiveMedia && (log('remove 首页直播'), (e.data = {})); + mainConfig.removeLiveMedia && (log("remove 首页直播"), e.data = {}) } + function removeComments(e) { - let t = ['广告', '廣告', '相关内容', '推荐', '热推', '推薦'], - o = e.datas || []; - if (0 === o.length) return; - let i = []; - for (let a of o) { - let r = a.adType || ''; - -1 == t.indexOf(r) && 6 != a.type && i.push(a); - } - log('remove 评论区相关和推荐内容'), - (e.datas = i), - e.tip_msg && delete e.tip_msg; -} -function containerHandler(e) { - mainConfig.removeInterestFriendInTopic && - '超话里的好友' === e.card_type_name && - (log('remove 超话里的好友'), (e.card_group = [])), - mainConfig.removeInterestTopic && - e.itemid && - (e.itemid.indexOf('infeed_may_interest_in') > -1 - ? (log('remove 感兴趣的超话'), (e.card_group = [])) - : e.itemid.indexOf('infeed_friends_recommend') > -1 && - (log('remove 超话好友关注'), (e.card_group = []))); -} -function userHandler(e) { - if (((e = removeMainTab(e)), !mainConfig.removeInterestUser || !e.items)) - return e; - let t = []; - for (let o of e.items) { - let i = !0; - if ('group' == o.category) - try { - '可能感兴趣的人' == o.items[0].data.desc && (i = !1); - } catch (a) {} - i && (o.data?.common_struct && delete o.data.common_struct, t.push(o)); - } - return (e.items = t), log('removeMain sub success'), e; -} -function nextVideoHandler(e) { - if (!e.statuses) return e; - let t = []; - for (let o of e.statuses) - if (!isAd(o)) { - let i = ['forward_redpacket_info', 'shopping', 'float_info', 'tags']; - for (let a of i) o.video_info?.[a] && delete o.video_info[a]; - t.push(o); + let t = ["广告", "廣告", "相关内容", "推荐", "热推", "推薦"], o = e.datas || []; + if (0 === o.length) return; + let i = []; + for (let a of o) { + let r = a.adType || ""; + -1 == t.indexOf(r) && 6 != a.type && i.push(a) } - return (e.statuses = t), log('removeMainTab Success'), e; + log("remove 评论区相关和推荐内容"), e.datas = i, e.tip_msg && delete e.tip_msg } + +function containerHandler(e) { + mainConfig.removeInterestFriendInTopic && "超话里的好友" === e.card_type_name && (log("remove 超话里的好友"), e.card_group = []), mainConfig.removeInterestTopic && e.itemid && (e.itemid.indexOf("infeed_may_interest_in") > -1 ? (log("remove 感兴趣的超话"), e.card_group = []) : e.itemid.indexOf("infeed_friends_recommend") > -1 && (log("remove 超话好友关注"), e.card_group = [])) +} + +function userHandler(e) { + if (e = removeMainTab(e), !mainConfig.removeInterestUser || !e.items) return e; + let t = []; + for (let o of e.items) { + let i = !0; + if ("group" == o.category) try { + "可能感兴趣的人" == o.items[0].data.desc && (i = !1) + } catch (a) { + } + i && (o.data?.common_struct && delete o.data.common_struct, t.push(o)) + } + return e.items = t, log("removeMain sub success"), e +} + +function nextVideoHandler(e) { + if (!e.statuses) return e; + let t = []; + for (let o of e.statuses) if (!isAd(o)) { + let i = ["forward_redpacket_info", "shopping", "float_info", "tags"]; + for (let a of i) o.video_info?.[a] && delete o.video_info[a]; + t.push(o) + } + return e.statuses = t, log("removeMainTab Success"), e +} + function tabSkinHandler(e) { - try { - let t = mainConfig.tabIconVersion; - if (((e.data.canUse = 1), !t || !mainConfig.tabIconPath || t < 100)) return; - let o = e.data.list; - for (let i of o) (i.version = t), (i.downloadlink = mainConfig.tabIconPath); - log('tabSkinHandler success'); - } catch (a) { - log('tabSkinHandler fail'); - } + try { + let t = mainConfig.tabIconVersion; + if (e.data.canUse = 1, !t || !mainConfig.tabIconPath || t < 100) return; + let o = e.data.list; + for (let i of o) i.version = t, i.downloadlink = mainConfig.tabIconPath; + log("tabSkinHandler success") + } catch (a) { + log("tabSkinHandler fail") + } } + function skinPreviewHandler(e) { - e.data.skin_info.status = 1; + e.data.skin_info.status = 1 } + function removeLuaScreenAds(e) { - if (!e.cached_ad) return e; - for (let t of e.cached_ad.ads) - (t.start_date = 1893254400), - (t.show_count = 0), - (t.duration = 0), - (t.end_date = 1893340799); - return e; + if (!e.cached_ad) return e; + for (let t of e.cached_ad.ads) t.start_date = 1893254400, t.show_count = 0, t.duration = 0, t.end_date = 1893340799; + return e } + function removePhpScreenAds(e) { - if (!e.ads) return e; - for (let t of ((e.show_push_splash_ad = !1), - (e.background_delay_display_time = 0), - (e.lastAdShow_delay_display_time = 0), - (e.realtime_ad_video_stall_time = 0), - (e.realtime_ad_timeout_duration = 0), - e.ads)) - (t.displaytime = 0), - (t.displayintervel = 86400), - (t.allowdaydisplaynum = 0), - (t.displaynum = 0), - (t.displaytime = 1), - (t.begintime = '2029-12-30 00:00:00'), - (t.endtime = '2029-12-30 23:59:59'); - return e; + if (!e.ads) return e; + for (let t of (e.show_push_splash_ad = !1, e.background_delay_display_time = 0, e.lastAdShow_delay_display_time = 0, e.realtime_ad_video_stall_time = 0, e.realtime_ad_timeout_duration = 0, e.ads)) t.displaytime = 0, t.displayintervel = 86400, t.allowdaydisplaynum = 0, t.displaynum = 0, t.displaytime = 1, t.begintime = "2029-12-30 00:00:00", t.endtime = "2029-12-30 23:59:59"; + return e } + function log(e) { - mainConfig.isDebug && console.log(e); + mainConfig.isDebug && console.log(e) } -var body = $response.body, - url = $request.url; + +var body = $response.body, url = $request.url; let method = getModifyMethod(url); if (method) { - log(method); - var func = eval(method); - let data = JSON.parse(body.match(/\{.*\}/)[0]); - new func(data), - (body = JSON.stringify(data)), - 'removePhpScreenAds' == method && (body = JSON.stringify(data) + 'OK'); + log(method); + var func = eval(method); + let data = JSON.parse(body.match(/\{.*\}/)[0]); + new func(data), body = JSON.stringify(data), "removePhpScreenAds" == method && (body = JSON.stringify(data) + "OK") } -$done({ body }); +$done({body}); \ No newline at end of file diff --git a/Scripts/AdBlock/Weibo/weibo.min.js b/Scripts/AdBlock/Weibo/weibo.min.js index ef35690..0fab1ac 100644 --- a/Scripts/AdBlock/Weibo/weibo.min.js +++ b/Scripts/AdBlock/Weibo/weibo.min.js @@ -1,4 +1,3 @@ -const version = 'V2.0.115'; +const version = 'V2.0.116'; - -const mainConfig={isDebug:!1,author:"ddgksf2013",removeHomeVip:!0,removeHomeCreatorTask:!0,removeRelate:!0,removeGood:!0,removeFollow:!0,modifyMenus:!0,removeRelateItem:!1,removeRecommendItem:!0,removeRewardItem:!0,removeLiveMedia:!0,removeNextVideo:!1,removePinedTrending:!0,removeInterestFriendInTopic:!1,removeInterestTopic:!1,removeInterestUser:!0,removeLvZhou:!0,removeSearchWindow:!0,profileSkin1:null,profileSkin2:null,tabIconVersion:0,tabIconPath:""},itemMenusConfig={creator_task:!1,mblog_menus_custom:!1,mblog_menus_video_later:!0,mblog_menus_comment_manager:!0,mblog_menus_avatar_widget:!1,mblog_menus_card_bg:!1,mblog_menus_long_picture:!0,mblog_menus_delete:!0,mblog_menus_edit:!0,mblog_menus_edit_history:!0,mblog_menus_edit_video:!0,mblog_menus_sticking:!0,mblog_menus_open_reward:!0,mblog_menus_novelty:!1,mblog_menus_favorite:!0,mblog_menus_promote:!0,mblog_menus_modify_visible:!0,mblog_menus_copy_url:!0,mblog_menus_follow:!0,mblog_menus_video_feedback:!0,mblog_menus_shield:!0,mblog_menus_report:!0,mblog_menus_apeal:!0,mblog_menus_home:!0},modifyCardsUrls=["/cardlist","video/community_tab","/searchall"],modifyStatusesUrls=["statuses/friends/timeline","statuses_unread_hot_timeline","statuses/unread_friends_timeline","statuses/unread_hot_timeline","groups/timeline","statuses/friends_timeline"],otherUrls={"/profile/me":"removeHome","/statuses/extend":"itemExtendHandler","/video/remind_info":"removeVideoRemind","/checkin/show":"removeCheckin","/live/media_homelist":"removeMediaHomelist","/comments/build_comments":"removeComments","/container/get_item":"containerHandler","/profile/container_timeline":"userHandler","/video/tiny_stream_video_list":"nextVideoHandler","/2/statuses/video_mixtimeline":"nextVideoHandler","video/tiny_stream_mid_detail":"nextVideoHandler","/!/client/light_skin":"tabSkinHandler","/littleskin/preview":"skinPreviewHandler","/search/finder":"removeSearchMain","/search/container_timeline":"removeSearch","/search/container_discover":"removeSearch","/2/messageflow":"removeMsgAd","/2/page?":"removePage","/statuses/unread_topic_timeline":"topicHandler","/square&pageDataType/":"squareHandler","/statuses/container_timeline_topic":"removeMain","/statuses/container_timeline":"removeMainTab","wbapplua/wbpullad.lua":"removeLuaScreenAds","interface/sdk/sdkad.php":"removePhpScreenAds","ct=feed&a=trends":"removeTopics",user_center:"modifiedUserCenter","a=get_coopen_ads":"removeIntlOpenAds","php?a=search_topic":"removeSearchTopic","v1/ad/realtime":"removeRealtimeAd","v1/ad/preload":"removeAdPreload"};function getModifyMethod(e){for(let t of modifyCardsUrls)if(e.indexOf(t)>-1)return"removeCards";for(let o of modifyStatusesUrls)if(e.indexOf(o)>-1)return"removeTimeLine";for(let[i,a]of Object.entries(otherUrls))if(e.indexOf(i)>-1)return a;return null}function removeRealtimeAd(e){return delete e.ads,e.code=4016,e}function removeAdPreload(e){if(!e.ads)return e;for(let t of(e.last_ad_show_interval=86400,e.ads))t.start_time=2681574400,t.end_time=2681660799,t.display_duration=0,t.daily_display_cnt=0,t.total_display_cnt=0;return e}function removeIntlOpenAds(e){return e.data&&0!==e.data.length&&(e.data.ad_list=[],e.data.gdt_video_ad_ios=[],e.data.display_ad=0,e.data.ad_ios_id=null,e.data.app_ad_ios_id=null,e.data.reserve_ad_ios_id="",e.data.reserve_app_ad_ios_id="",e.data.ad_duration=604800,e.data.ad_cd_interval=604800,e.data.pic_ad=[]),e}function removeSearchTopic(e){return e.data&&0!==e.data.length&&(e.data=Object.values(e.data).filter(e=>"searchtop"!=e.type)),e}function modifiedUserCenter(e){return e.data&&0!==e.data.length&&e.data.cards&&(e.data.cards=Object.values(e.data.cards).filter(e=>"personal_vip"!=e.items[0].type)),e}function removeTopics(e){return e.data&&(e.data.order=["search_topic","native_content"]),e}function isAd(e){return!!e&&("广告"==e.mblogtypename||"热推"==e.mblogtypename||e.promotion?.type=="ad"||e.page_info?.actionlog?.source=="ad"||e.content_auth_info?.content_auth_title=="广告")}function squareHandler(e){return e.items,e}function removeMainTab(e){if(e.loadedInfo&&e.loadedInfo.headers&&delete e.loadedInfo.headers,!e.items)return e;let t=[];for(let o of e.items)isAd(o.data)||(o.data?.page_info?.video_limit&&delete o.data.page_info.video_limit,o.data?.common_struct&&delete o.data.common_struct,o.category?"group"!=o.category?t.push(o):-1!=JSON.stringify(o.items).indexOf("profile_top")&&t.push(o):t.push(o));return e.items=t,log("removeMainTab success"),e}function removeMain(e){if(e.loadedInfo&&e.loadedInfo.headers&&delete e.loadedInfo.headers,!e.items)return e;let t=[];for(let o of e.items)if("feed"==o.category)isAd(o.data)||t.push(o);else if("group"==o.category){if(o.items.length>0&&o.items[0].data?.itemid?.includes("search_input"))o.items=o.items.filter(e=>e?.data?.itemid?.includes("mine_topics")||e?.data?.itemid?.includes("search_input")||e?.data?.card_type==202),o.items[0].data.hotwords=[{word:"搜索超话",tip:""}],t.push(o);else{if(o.items.length>0&&o.items[0].data?.itemid?.includes("top_title"))continue;o.items.length>0&&(o.items=Object.values(o.items).filter(e=>"feed"==e.category||"card"==e.category)),t.push(o)}}else{if(o.data?.card_type&&[202,200].indexOf(o.data.card_type)>-1)continue;t.push(o)}return e.items=t,log("removeMain success"),e}function topicHandler(e){let t=e.cards;if(!t||!mainConfig.removeUnfollowTopic&&!mainConfig.removeUnusedPart)return e;let o=[];for(let i of t){let a=!0;if(i.mblog){let r=i.mblog.buttons;mainConfig.removeUnfollowTopic&&r&&"follow"==r[0].type&&(a=!1)}else{if(!mainConfig.removeUnusedPart)continue;if("bottom_mix_activity"==i.itemid)a=!1;else if(i?.top?.title=="正在活跃")a=!1;else if(200==i.card_type&&i.group)a=!1;else{let n=i.card_group;if(!n)continue;if(["guess_like_title","cats_top_title","chaohua_home_readpost_samecity_title"].indexOf(n[0].itemid)>-1)a=!1;else if(n.length>1){let d=[];for(let s of n)-1==["chaohua_discovery_banner_1","bottom_mix_activity"].indexOf(s.itemid)&&d.push(s);i.card_group=d}}}a&&o.push(i)}return e.cards=o,log("topicHandler success"),e}function removeSearchMain(e){let t=e.channelInfo.channels;if(!t)return e;let o=[];for(let i of t)i.payload&&(removeSearch(i.payload),o.push(i));return e.channelInfo.channels=o,log("remove_search main success"),e}function checkSearchWindow(e){return!!mainConfig.removeSearchWindow&&"card"==e.category&&(e.data?.itemid=="finder_window"||e.data?.itemid=="more_frame"||e.data?.card_type==208||e.data?.card_type==217||e.data?.card_type==101||e.data?.card_type==19||e.data?.mblog?.page_info?.actionlog?.source?.includes("ad"))}function removeSearch(e){if(!e.items)return e;let t=[];for(let o of e.items)"feed"==o.category?isAd(o.data)||(o.data?.page_info?.video_limit&&delete o.data.page_info.video_limit,t.push(o)):"group"==o.category?(o.items=o.items.filter(e=>e.data?.card_type===17),o.items.length>0&&t.push(o)):checkSearchWindow(o)||t.push(o);return e.items=t,e.loadedInfo&&(e.loadedInfo.searchBarContent=[],e.loadedInfo.headerBack&&(e.loadedInfo.headerBack.channelStyleMap={})),log("remove_search success"),e}function removeMsgAd(e){if(!e.messages)return;let t=[];for(let o of e.messages)!o.msg_card?.ad_tag&&t.push(o);return e.messages=t,e}function removePage(e){return removeCards(e),mainConfig.removePinedTrending&&e.cards&&e.cards.length>0&&e.cards[0].card_group&&(e.cards[0].card_group=e.cards[0].card_group.filter(e=>!(e?.actionlog?.ext?.includes("ads_word")||e?.itemid?.includes("t:51")||e?.itemid?.includes("ads_word")))),e}function removeCards(e){if(e.hotwords&&(e.hotwords=[]),!e.cards)return;let t=[];for(let o of e.cards){e.cardlistInfo?.containerid=="232082type=1"&&(17==o.card_type||58==o.card_type||11==o.card_type)&&(o={card_type:o.card_type+1});let i=o.card_group;if(i&&i.length>0){let a=[];for(let r of i)118==r.card_type||isAd(r.mblog)||-1!=JSON.stringify(r).indexOf("res_from:ads")||a.push(r);o.card_group=a,t.push(o)}else{let n=o.card_type;if([9,165].indexOf(n)>-1)isAd(o.mblog)||t.push(o);else{if([1007,180].indexOf(n)>-1)continue;t.push(o)}}}e.cards=t}function lvZhouHandler(e){if(!mainConfig.removeLvZhou||!e)return;let t=e.common_struct;if(!t)return;let o=[];for(let i of t)"绿洲"!=i.name&&o.push(i);e.common_struct=o}function isBlock(e){let t=mainConfig.blockIds||[];if(0===t.length)return!1;let o=e.user.id;for(let i of t)if(i==o)return!0;return!1}function removeTimeLine(e){for(let t of["ad","advertises","trends","headers"])e[t]&&delete e[t];if(!e.statuses)return;let o=[];for(let i of e.statuses)isAd(i)||(lvZhouHandler(i),i.common_struct&&delete i.common_struct,i.category?"group"!=i.category&&o.push(i):o.push(i));e.statuses=o}function removeHomeVip(e){return e.header&&e.header.vipView&&(e.header.vipView=null),e}function removeVideoRemind(e){e.bubble_dismiss_time=0,e.exist_remind=!1,e.image_dismiss_time=0,e.image="",e.tag_image_english="",e.tag_image_english_dark="",e.tag_image_normal="",e.tag_image_normal_dark=""}function itemExtendHandler(e){if((mainConfig.removeRelate||mainConfig.removeGood)&&e.trend&&e.trend.titles){let t=e.trend.titles.title;mainConfig.removeRelate&&"相关推荐"===t?delete e.trend:mainConfig.removeGood&&"博主好物种草"===t&&delete e.trend}mainConfig.removeFollow&&e.follow_data&&(e.follow_data=null),mainConfig.removeRewardItem&&e.reward_info&&(e.reward_info=null),e.head_cards&&delete e.head_cards,e.page_alerts&&(e.page_alerts=null);try{e.trend.extra_struct.extBtnInfo.btn_picurl.indexOf("timeline_icon_ad_delete")>-1&&delete e.trend}catch(o){}if(mainConfig.modifyMenus&&e.custom_action_list){let i=[];for(let a of e.custom_action_list){let r=a.type,n=itemMenusConfig[r];void 0===n?i.push(a):"mblog_menus_copy_url"===r?i.unshift(a):n&&i.push(a)}e.custom_action_list=i}}function updateFollowOrder(e){try{for(let t of e.items)if("mainnums_friends"===t.itemId){let o=t.click.modules[0].scheme;t.click.modules[0].scheme=o.replace("231093_-_selfrecomm","231093_-_selffollowed"),log("updateFollowOrder success");return}}catch(i){console.log("updateFollowOrder fail")}}function updateProfileSkin(e,t){try{let o=mainConfig[t];if(!o)return;let i=0;for(let a of e.items)if(a.image)try{dm=a.image.style.darkMode,"alpha"!=dm&&(a.image.style.darkMode="alpha"),a.image.iconUrl=o[i++],a.dot&&(a.dot=[])}catch(r){}log("updateProfileSkin success")}catch(n){console.log("updateProfileSkin fail")}}function removeHome(e){if(!e.items)return e;let t=[];for(let o of e.items){let i=o.itemId;if("profileme_mine"==i)mainConfig.removeHomeVip&&(o=removeHomeVip(o)),o.header?.vipIcon&&delete o.header.vipIcon,updateFollowOrder(o),t.push(o);else if("100505_-_top8"==i)updateProfileSkin(o,"profileSkin1"),t.push(o);else if("100505_-_newcreator"==i)"grid"==o.type?(updateProfileSkin(o,"profileSkin2"),t.push(o)):mainConfig.removeHomeCreatorTask||t.push(o);else{if("100505_-_chaohua"!=i&&"100505_-_manage"!=i&&"100505_-_recentlyuser"!=i)continue;o.images?.length>0&&(o.images=o.images.filter(e=>"100505_-_chaohua"==e.itemId||"100505_-_recentlyuser"==e.itemId)),t.push(o)}}return e.items=t,e}function removeCheckin(e){log("remove tab1签到"),e.show=0}function removeMediaHomelist(e){mainConfig.removeLiveMedia&&(log("remove 首页直播"),e.data={})}function removeComments(e){let t=["广告","廣告","相关内容","推荐","热推","推薦"],o=e.datas||[];if(0===o.length)return;let i=[];for(let a of o){let r=a.adType||"";-1==t.indexOf(r)&&6!=a.type&&i.push(a)}log("remove 评论区相关和推荐内容"),e.datas=i,e.tip_msg&&delete e.tip_msg}function containerHandler(e){mainConfig.removeInterestFriendInTopic&&"超话里的好友"===e.card_type_name&&(log("remove 超话里的好友"),e.card_group=[]),mainConfig.removeInterestTopic&&e.itemid&&(e.itemid.indexOf("infeed_may_interest_in")>-1?(log("remove 感兴趣的超话"),e.card_group=[]):e.itemid.indexOf("infeed_friends_recommend")>-1&&(log("remove 超话好友关注"),e.card_group=[]))}function userHandler(e){if(e=removeMainTab(e),!mainConfig.removeInterestUser||!e.items)return e;let t=[];for(let o of e.items){let i=!0;if("group"==o.category)try{"可能感兴趣的人"==o.items[0].data.desc&&(i=!1)}catch(a){}i&&(o.data?.common_struct&&delete o.data.common_struct,t.push(o))}return e.items=t,log("removeMain sub success"),e}function nextVideoHandler(e){if(!e.statuses)return e;let t=[];for(let o of e.statuses)if(!isAd(o)){let i=["forward_redpacket_info","shopping","float_info","tags"];for(let a of i)o.video_info?.[a]&&delete o.video_info[a];t.push(o)}return e.statuses=t,log("removeMainTab Success"),e}function tabSkinHandler(e){try{let t=mainConfig.tabIconVersion;if(e.data.canUse=1,!t||!mainConfig.tabIconPath||t<100)return;let o=e.data.list;for(let i of o)i.version=t,i.downloadlink=mainConfig.tabIconPath;log("tabSkinHandler success")}catch(a){log("tabSkinHandler fail")}}function skinPreviewHandler(e){e.data.skin_info.status=1}function removeLuaScreenAds(e){if(!e.cached_ad)return e;for(let t of e.cached_ad.ads)t.start_date=1893254400,t.show_count=0,t.duration=0,t.end_date=1893340799;return e}function removePhpScreenAds(e){if(!e.ads)return e;for(let t of(e.show_push_splash_ad=!1,e.background_delay_display_time=0,e.lastAdShow_delay_display_time=0,e.realtime_ad_video_stall_time=0,e.realtime_ad_timeout_duration=0,e.ads))t.displaytime=0,t.displayintervel=86400,t.allowdaydisplaynum=0,t.displaynum=0,t.displaytime=1,t.begintime="2029-12-30 00:00:00",t.endtime="2029-12-30 23:59:59";return e}function log(e){mainConfig.isDebug&&console.log(e)}var body=$response.body,url=$request.url;let method=getModifyMethod(url);if(method){log(method);var func=eval(method);let data=JSON.parse(body.match(/\{.*\}/)[0]);new func(data),body=JSON.stringify(data),"removePhpScreenAds"==method&&(body=JSON.stringify(data)+"OK")}$done({body}); \ No newline at end of file +const mainConfig={isDebug:!1,author:"ddgksf2013",removeHomeVip:!0,removeHomeCreatorTask:!0,removeRelate:!0,removeGood:!0,removeFollow:!0,modifyMenus:!0,removeRelateItem:!1,removeRecommendItem:!0,removeRewardItem:!0,removeLiveMedia:!0,removeNextVideo:!1,removePinedTrending:!0,removeInterestFriendInTopic:!1,removeInterestTopic:!1,removeInterestUser:!0,removeLvZhou:!0,removeSearchWindow:!0,profileSkin1:null,profileSkin2:null,tabIconVersion:0,tabIconPath:""},itemMenusConfig={creator_task:!1,mblog_menus_custom:!1,mblog_menus_video_later:!0,mblog_menus_comment_manager:!0,mblog_menus_avatar_widget:!1,mblog_menus_card_bg:!1,mblog_menus_long_picture:!0,mblog_menus_delete:!0,mblog_menus_edit:!0,mblog_menus_edit_history:!0,mblog_menus_edit_video:!0,mblog_menus_sticking:!0,mblog_menus_open_reward:!0,mblog_menus_novelty:!1,mblog_menus_favorite:!0,mblog_menus_promote:!0,mblog_menus_modify_visible:!0,mblog_menus_copy_url:!0,mblog_menus_follow:!0,mblog_menus_video_feedback:!0,mblog_menus_shield:!0,mblog_menus_report:!0,mblog_menus_apeal:!0,mblog_menus_home:!0},modifyCardsUrls=["/cardlist","video/community_tab","/searchall"],modifyStatusesUrls=["statuses/friends/timeline","statuses_unread_hot_timeline","statuses/unread_friends_timeline","statuses/unread_hot_timeline","groups/timeline","statuses/friends_timeline"],otherUrls={"/profile/me":"removeHome","/statuses/extend":"itemExtendHandler","/video/remind_info":"removeVideoRemind","/checkin/show":"removeCheckin","/live/media_homelist":"removeMediaHomelist","/comments/build_comments":"removeComments","/container/get_item":"containerHandler","/profile/container_timeline":"userHandler","/video/tiny_stream_video_list":"nextVideoHandler","/2/statuses/video_mixtimeline":"nextVideoHandler","video/tiny_stream_mid_detail":"nextVideoHandler","/!/client/light_skin":"tabSkinHandler","/littleskin/preview":"skinPreviewHandler","/search/finder":"removeSearchMain","/search/container_timeline":"removeSearch","/search/container_discover":"removeSearch","/2/messageflow":"removeMsgAd","/2/page?":"removePage","/statuses/unread_topic_timeline":"topicHandler","/square&pageDataType/":"squareHandler","/statuses/container_timeline_topic":"removeMain","/statuses/container_timeline":"removeMainTab","wbapplua/wbpullad.lua":"removeLuaScreenAds","interface/sdk/sdkad.php":"removePhpScreenAds","ct=feed&a=trends":"removeTopics",user_center:"modifiedUserCenter","a=get_coopen_ads":"removeIntlOpenAds","php?a=search_topic":"removeSearchTopic","v1/ad/realtime":"removeRealtimeAd","v1/ad/preload":"removeAdPreload"};function getModifyMethod(e){for(let t of modifyCardsUrls)if(e.indexOf(t)>-1)return"removeCards";for(let o of modifyStatusesUrls)if(e.indexOf(o)>-1)return"removeTimeLine";for(let[i,a]of Object.entries(otherUrls))if(e.indexOf(i)>-1)return a;return null}function removeRealtimeAd(e){return delete e.ads,e.code=4016,e}function removeAdPreload(e){if(!e.ads)return e;for(let t of(e.last_ad_show_interval=86400,e.ads))t.start_time=2681574400,t.end_time=2681660799,t.display_duration=0,t.daily_display_cnt=0,t.total_display_cnt=0;return e}function removeIntlOpenAds(e){return e.data&&0!==e.data.length&&(e.data.ad_list=[],e.data.gdt_video_ad_ios=[],e.data.display_ad=0,e.data.ad_ios_id=null,e.data.app_ad_ios_id=null,e.data.reserve_ad_ios_id="",e.data.reserve_app_ad_ios_id="",e.data.ad_duration=604800,e.data.ad_cd_interval=604800,e.data.pic_ad=[]),e}function removeSearchTopic(e){return e.data&&0!==e.data.length&&(e.data=Object.values(e.data).filter(e=>"searchtop"!=e.type)),e}function modifiedUserCenter(e){return e.data&&0!==e.data.length&&e.data.cards&&(e.data.cards=Object.values(e.data.cards).filter(e=>"personal_vip"!=e.items[0].type)),e}function removeTopics(e){return e.data&&(e.data.order=["search_topic"]),e}function isAd(e){return!!e&&("广告"==e.mblogtypename||"热推"==e.mblogtypename||e.promotion?.type=="ad"||e.page_info?.actionlog?.source=="ad"||e.content_auth_info?.content_auth_title=="广告")}function squareHandler(e){return e.items,e}function removeMainTab(e){if(e.loadedInfo&&e.loadedInfo.headers&&delete e.loadedInfo.headers,!e.items)return e;let t=[];for(let o of e.items)isAd(o.data)||(o.data?.page_info?.video_limit&&delete o.data.page_info.video_limit,o.data?.common_struct&&delete o.data.common_struct,o.category?"group"!=o.category?t.push(o):-1!=JSON.stringify(o.items).indexOf("profile_top")&&t.push(o):t.push(o));return e.items=t,log("removeMainTab success"),e}function removeMain(e){if(e.loadedInfo&&e.loadedInfo.headers&&delete e.loadedInfo.headers,!e.items)return e;let t=[];for(let o of e.items)if("feed"==o.category)isAd(o.data)||t.push(o);else if("group"==o.category){if(o.items.length>0&&o.items[0].data?.itemid?.includes("search_input"))o.items=o.items.filter(e=>e?.data?.itemid?.includes("mine_topics")||e?.data?.itemid?.includes("search_input")||e?.data?.card_type==202),o.items[0].data.hotwords=[{word:"搜索超话",tip:""}],t.push(o);else{if(o.items.length>0&&o.items[0].data?.itemid?.includes("top_title"))continue;o.items.length>0&&(o.items=Object.values(o.items).filter(e=>"feed"==e.category||"card"==e.category)),t.push(o)}}else{if(o.data?.card_type&&[202,200].indexOf(o.data.card_type)>-1)continue;t.push(o)}return e.items=t,log("removeMain success"),e}function topicHandler(e){let t=e.cards;if(!t||!mainConfig.removeUnfollowTopic&&!mainConfig.removeUnusedPart)return e;let o=[];for(let i of t){let a=!0;if(i.mblog){let r=i.mblog.buttons;mainConfig.removeUnfollowTopic&&r&&"follow"==r[0].type&&(a=!1)}else{if(!mainConfig.removeUnusedPart)continue;if("bottom_mix_activity"==i.itemid)a=!1;else if(i?.top?.title=="正在活跃")a=!1;else if(200==i.card_type&&i.group)a=!1;else{let n=i.card_group;if(!n)continue;if(["guess_like_title","cats_top_title","chaohua_home_readpost_samecity_title"].indexOf(n[0].itemid)>-1)a=!1;else if(n.length>1){let d=[];for(let s of n)-1==["chaohua_discovery_banner_1","bottom_mix_activity"].indexOf(s.itemid)&&d.push(s);i.card_group=d}}}a&&o.push(i)}return e.cards=o,log("topicHandler success"),e}function removeSearchMain(e){let t=e.channelInfo.channels;if(!t)return e;let o=[];for(let i of t)i.payload&&(removeSearch(i.payload),o.push(i));return e.channelInfo.channels=o,log("remove_search main success"),e}function checkSearchWindow(e){return!!mainConfig.removeSearchWindow&&"card"==e.category&&(e.data?.itemid=="finder_window"||e.data?.itemid=="more_frame"||e.data?.card_type==208||e.data?.card_type==217||e.data?.card_type==101||e.data?.card_type==19||e.data?.mblog?.page_info?.actionlog?.source?.includes("ad"))}function removeSearch(e){if(!e.items)return e;let t=[];for(let o of e.items)"feed"==o.category?isAd(o.data)||(o.data?.page_info?.video_limit&&delete o.data.page_info.video_limit,t.push(o)):"group"==o.category?(o.items=o.items.filter(e=>e.data?.card_type===17),o.items.length>0&&t.push(o)):checkSearchWindow(o)||t.push(o);return e.items=t,e.loadedInfo&&(e.loadedInfo.searchBarContent=[],e.loadedInfo.headerBack&&(e.loadedInfo.headerBack.channelStyleMap={})),log("remove_search success"),e}function removeMsgAd(e){if(!e.messages)return;let t=[];for(let o of e.messages)!o.msg_card?.ad_tag&&t.push(o);return e.messages=t,e}function removePage(e){return removeCards(e),mainConfig.removePinedTrending&&e.cards&&e.cards.length>0&&e.cards[0].card_group&&(e.cards[0].card_group=e.cards[0].card_group.filter(e=>!(e?.actionlog?.ext?.includes("ads_word")||e?.itemid?.includes("t:51")||e?.itemid?.includes("ads_word")))),e}function removeCards(e){if(e.hotwords&&(e.hotwords=[]),!e.cards)return;let t=[];for(let o of e.cards){e.cardlistInfo?.containerid=="232082type=1"&&(17==o.card_type||58==o.card_type||11==o.card_type)&&(o={card_type:o.card_type+1});let i=o.card_group;if(i&&i.length>0){let a=[];for(let r of i)118==r.card_type||isAd(r.mblog)||-1!=JSON.stringify(r).indexOf("res_from:ads")||a.push(r);o.card_group=a,t.push(o)}else{let n=o.card_type;if([9,165].indexOf(n)>-1)isAd(o.mblog)||t.push(o);else{if([1007,180].indexOf(n)>-1)continue;t.push(o)}}}e.cards=t}function lvZhouHandler(e){if(!mainConfig.removeLvZhou||!e)return;let t=e.common_struct;if(!t)return;let o=[];for(let i of t)"绿洲"!=i.name&&o.push(i);e.common_struct=o}function isBlock(e){let t=mainConfig.blockIds||[];if(0===t.length)return!1;let o=e.user.id;for(let i of t)if(i==o)return!0;return!1}function removeTimeLine(e){for(let t of["ad","advertises","trends","headers"])e[t]&&delete e[t];if(!e.statuses)return;let o=[];for(let i of e.statuses)isAd(i)||(lvZhouHandler(i),i.common_struct&&delete i.common_struct,i.category?"group"!=i.category&&o.push(i):o.push(i));e.statuses=o}function removeHomeVip(e){return e.header&&e.header.vipView&&(e.header.vipView=null),e}function removeVideoRemind(e){e.bubble_dismiss_time=0,e.exist_remind=!1,e.image_dismiss_time=0,e.image="",e.tag_image_english="",e.tag_image_english_dark="",e.tag_image_normal="",e.tag_image_normal_dark=""}function itemExtendHandler(e){if((mainConfig.removeRelate||mainConfig.removeGood)&&e.trend&&e.trend.titles){let t=e.trend.titles.title;mainConfig.removeRelate&&"相关推荐"===t?delete e.trend:mainConfig.removeGood&&"博主好物种草"===t&&delete e.trend}mainConfig.removeFollow&&e.follow_data&&(e.follow_data=null),mainConfig.removeRewardItem&&e.reward_info&&(e.reward_info=null),e.head_cards&&delete e.head_cards,e.page_alerts&&(e.page_alerts=null);try{e.trend.extra_struct.extBtnInfo.btn_picurl.indexOf("timeline_icon_ad_delete")>-1&&delete e.trend}catch(o){}if(mainConfig.modifyMenus&&e.custom_action_list){let i=[];for(let a of e.custom_action_list){let r=a.type,n=itemMenusConfig[r];void 0===n?i.push(a):"mblog_menus_copy_url"===r?i.unshift(a):n&&i.push(a)}e.custom_action_list=i}}function updateFollowOrder(e){try{for(let t of e.items)if("mainnums_friends"===t.itemId){let o=t.click.modules[0].scheme;t.click.modules[0].scheme=o.replace("231093_-_selfrecomm","231093_-_selffollowed"),log("updateFollowOrder success");return}}catch(i){console.log("updateFollowOrder fail")}}function updateProfileSkin(e,t){try{let o=mainConfig[t];if(!o)return;let i=0;for(let a of e.items)if(a.image)try{dm=a.image.style.darkMode,"alpha"!=dm&&(a.image.style.darkMode="alpha"),a.image.iconUrl=o[i++],a.dot&&(a.dot=[])}catch(r){}log("updateProfileSkin success")}catch(n){console.log("updateProfileSkin fail")}}function removeHome(e){if(!e.items)return e;let t=[];for(let o of e.items){let i=o.itemId;if("profileme_mine"==i)mainConfig.removeHomeVip&&(o=removeHomeVip(o)),o.header?.vipIcon&&delete o.header.vipIcon,updateFollowOrder(o),t.push(o);else if("100505_-_top8"==i)updateProfileSkin(o,"profileSkin1"),t.push(o);else if("100505_-_newcreator"==i)"grid"==o.type?(updateProfileSkin(o,"profileSkin2"),t.push(o)):mainConfig.removeHomeCreatorTask||t.push(o);else{if("100505_-_chaohua"!=i&&"100505_-_manage"!=i&&"100505_-_recentlyuser"!=i)continue;o.images?.length>0&&(o.images=o.images.filter(e=>"100505_-_chaohua"==e.itemId||"100505_-_recentlyuser"==e.itemId)),t.push(o)}}return e.items=t,e}function removeCheckin(e){log("remove tab1签到"),e.show=0}function removeMediaHomelist(e){mainConfig.removeLiveMedia&&(log("remove 首页直播"),e.data={})}function removeComments(e){let t=["广告","廣告","相关内容","推荐","热推","推薦"],o=e.datas||[];if(0===o.length)return;let i=[];for(let a of o){let r=a.adType||"";-1==t.indexOf(r)&&6!=a.type&&i.push(a)}log("remove 评论区相关和推荐内容"),e.datas=i,e.tip_msg&&delete e.tip_msg}function containerHandler(e){mainConfig.removeInterestFriendInTopic&&"超话里的好友"===e.card_type_name&&(log("remove 超话里的好友"),e.card_group=[]),mainConfig.removeInterestTopic&&e.itemid&&(e.itemid.indexOf("infeed_may_interest_in")>-1?(log("remove 感兴趣的超话"),e.card_group=[]):e.itemid.indexOf("infeed_friends_recommend")>-1&&(log("remove 超话好友关注"),e.card_group=[]))}function userHandler(e){if(e=removeMainTab(e),!mainConfig.removeInterestUser||!e.items)return e;let t=[];for(let o of e.items){let i=!0;if("group"==o.category)try{"可能感兴趣的人"==o.items[0].data.desc&&(i=!1)}catch(a){}i&&(o.data?.common_struct&&delete o.data.common_struct,t.push(o))}return e.items=t,log("removeMain sub success"),e}function nextVideoHandler(e){if(!e.statuses)return e;let t=[];for(let o of e.statuses)if(!isAd(o)){let i=["forward_redpacket_info","shopping","float_info","tags"];for(let a of i)o.video_info?.[a]&&delete o.video_info[a];t.push(o)}return e.statuses=t,log("removeMainTab Success"),e}function tabSkinHandler(e){try{let t=mainConfig.tabIconVersion;if(e.data.canUse=1,!t||!mainConfig.tabIconPath||t<100)return;let o=e.data.list;for(let i of o)i.version=t,i.downloadlink=mainConfig.tabIconPath;log("tabSkinHandler success")}catch(a){log("tabSkinHandler fail")}}function skinPreviewHandler(e){e.data.skin_info.status=1}function removeLuaScreenAds(e){if(!e.cached_ad)return e;for(let t of e.cached_ad.ads)t.start_date=1893254400,t.show_count=0,t.duration=0,t.end_date=1893340799;return e}function removePhpScreenAds(e){if(!e.ads)return e;for(let t of(e.show_push_splash_ad=!1,e.background_delay_display_time=0,e.lastAdShow_delay_display_time=0,e.realtime_ad_video_stall_time=0,e.realtime_ad_timeout_duration=0,e.ads))t.displaytime=0,t.displayintervel=86400,t.allowdaydisplaynum=0,t.displaynum=0,t.displaytime=1,t.begintime="2029-12-30 00:00:00",t.endtime="2029-12-30 23:59:59";return e}function log(e){mainConfig.isDebug&&console.log(e)}var body=$response.body,url=$request.url;let method=getModifyMethod(url);if(method){log(method);var func=eval(method);let data=JSON.parse(body.match(/\{.*\}/)[0]);new func(data),body=JSON.stringify(data),"removePhpScreenAds"==method&&(body=JSON.stringify(data)+"OK")}$done({body}); \ No newline at end of file diff --git a/Scripts/AdBlock/Weibo/weibo_json.js b/Scripts/AdBlock/Weibo/weibo_json.js index ac09bc1..9e9b7b5 100644 --- a/Scripts/AdBlock/Weibo/weibo_json.js +++ b/Scripts/AdBlock/Weibo/weibo_json.js @@ -1,16 +1,16 @@ /*********************************************** -> 应用名称:墨鱼自用微博&微博国际版净化脚本 -> 脚本作者:@ddgksf2013, @Zmqcherish -> 微信账号:墨鱼手记 -> 更新时间:2022-04-11 -> 通知频道:https://t.me/ddgksf2021 -> 贡献投稿:https://t.me/ddgksf2013_bot -> 原作者库:https://github.com/zmqcherish -> 问题反馈:ddgksf2013@163.com -> 特别提醒:如需转载请注明出处,谢谢合作! -> 脚本声明:本脚本是在Zmqcherish原创基础上优化自用 -> 脚本声明:若有侵犯原作者权利,请邮箱联系删除 -***********************************************/ + > 应用名称:墨鱼自用微博&微博国际版净化脚本 + > 脚本作者:@ddgksf2013, @Zmqcherish + > 微信账号:墨鱼手记 + > 更新时间:2022-08-11 + > 通知频道:https://t.me/ddgksf2021 + > 贡献投稿:https://t.me/ddgksf2013_bot + > 原作者库:https://github.com/zmqcherish + > 问题反馈:ddgksf2013@163.com + > 特别提醒:如需转载请注明出处,谢谢合作! + > 脚本声明:本脚本是在Zmqcherish原创基础上优化自用 + > 脚本声明:若有侵犯原作者权利,请邮箱联系删除 + ***********************************************/ @@ -21,7 +21,7 @@ -const version = 'V2.0.107'; +const version = 'V2.0.116'; -const mainConfig={isDebug:!1,author:"ddgksf2013",removeHomeVip:!0,removeHomeCreatorTask:!0,removeRelate:!0,removeGood:!0,removeFollow:!0,modifyMenus:!0,removeRelateItem:!1,removeRecommendItem:!0,removeRewardItem:!0,removeLiveMedia:!0,removeNextVideo:!1,removePinedTrending:!0,removeInterestFriendInTopic:!1,removeInterestTopic:!1,removeInterestUser:!0,removeLvZhou:!0,removeSearchWindow:!0,profileSkin1:null,profileSkin2:null,tabIconVersion:0,tabIconPath:""},itemMenusConfig={creator_task:!1,mblog_menus_custom:!1,mblog_menus_video_later:!0,mblog_menus_comment_manager:!0,mblog_menus_avatar_widget:!1,mblog_menus_card_bg:!1,mblog_menus_long_picture:!0,mblog_menus_delete:!0,mblog_menus_edit:!0,mblog_menus_edit_history:!0,mblog_menus_edit_video:!0,mblog_menus_sticking:!0,mblog_menus_open_reward:!0,mblog_menus_novelty:!1,mblog_menus_favorite:!0,mblog_menus_promote:!0,mblog_menus_modify_visible:!0,mblog_menus_copy_url:!0,mblog_menus_follow:!0,mblog_menus_video_feedback:!0,mblog_menus_shield:!0,mblog_menus_report:!0,mblog_menus_apeal:!0,mblog_menus_home:!0},modifyCardsUrls=["/cardlist","video/community_tab","/searchall"],modifyStatusesUrls=["statuses/friends/timeline","statuses_unread_hot_timeline","statuses/unread_friends_timeline","statuses/unread_hot_timeline","groups/timeline","statuses/friends_timeline"],otherUrls={"/profile/me":"removeHome","/statuses/extend":"itemExtendHandler","/video/remind_info":"removeVideoRemind","/checkin/show":"removeCheckin","/live/media_homelist":"removeMediaHomelist","/comments/build_comments":"removeComments","/container/get_item":"containerHandler","/profile/container_timeline":"userHandler","/video/tiny_stream_video_list":"nextVideoHandler","/2/statuses/video_mixtimeline":"nextVideoHandler","video/tiny_stream_mid_detail":"nextVideoHandler","/!/client/light_skin":"tabSkinHandler","/littleskin/preview":"skinPreviewHandler","/search/finder":"removeSearchMain","/search/container_timeline":"removeSearch","/search/container_discover":"removeSearch","/2/messageflow":"removeMsgAd","/2/page?":"removePage","/statuses/unread_topic_timeline":"topicHandler","/square&pageDataType/":"squareHandler","/statuses/container_timeline_topic":"removeMain","/statuses/container_timeline":"removeMainTab","wbapplua/wbpullad.lua":"removeLuaScreenAds","interface/sdk/sdkad.php":"removePhpScreenAds","ct=feed&a=trends":"removeTopics",user_center:"modifiedUserCenter","a=get_coopen_ads":"removeIntlOpenAds","php?a=search_topic":"removeSearchTopic","v1/ad/realtime":"removeRealtimeAd"};function getModifyMethod(e){for(let t of modifyCardsUrls)if(e.indexOf(t)>-1)return"removeCards";for(let o of modifyStatusesUrls)if(e.indexOf(o)>-1)return"removeTimeLine";for(let[i,a]of Object.entries(otherUrls))if(e.indexOf(i)>-1)return a;return null}function removeRealtimeAd(e){return delete e.ads,e.code=4016,e}function removeIntlOpenAds(e){return e.data&&0!==e.data.length&&(e.data.ad_list=[],e.data.gdt_video_ad_ios=[],e.data.display_ad=0,e.data.ad_ios_id=null,e.data.app_ad_ios_id=null,e.data.reserve_ad_ios_id="",e.data.reserve_app_ad_ios_id="",e.data.ad_duration=604800,e.data.ad_cd_interval=604800,e.data.pic_ad=[]),e}function removeSearchTopic(e){return e.data&&0!==e.data.length&&(e.data=Object.values(e.data).filter(e=>"searchtop"!=e.type)),e}function modifiedUserCenter(e){return e.data&&0!==e.data.length&&e.data.cards&&(e.data.cards=Object.values(e.data.cards).filter(e=>"personal_vip"!=e.items[0].type)),e}function removeTopics(e){return e.data&&(e.data.order=["search_topic","native_content"]),e}function isAd(e){return!!e&&("广告"==e.mblogtypename||"热推"==e.mblogtypename||e.promotion?.type=="ad"||e.page_info?.actionlog?.source=="ad"||e.content_auth_info?.content_auth_title=="广告")}function squareHandler(e){return e.items,e}function removeMainTab(e){if(e.loadedInfo&&e.loadedInfo.headers&&delete e.loadedInfo.headers,!e.items)return e;let t=[];for(let o of e.items)isAd(o.data)||(o.data?.common_struct&&delete o.data.common_struct,o.category?"group"!=o.category?t.push(o):-1!=JSON.stringify(o.items).indexOf("profile_top")&&t.push(o):t.push(o));return e.items=t,log("removeMainTab success"),e}function removeMain(e){if(e.loadedInfo&&e.loadedInfo.headers&&delete e.loadedInfo.headers,!e.items)return e;let t=[];for(let o of e.items)if("feed"==o.category)isAd(o.data)||t.push(o);else if("group"==o.category){if(o.items.length>0&&o.items[0].data?.itemid?.includes("search_input"))o.items=o.items.filter(e=>e?.data?.itemid?.includes("mine_topics")||e?.data?.itemid?.includes("search_input")||e?.data?.card_type==202),o.items[0].data.hotwords=[{word:"搜索超话",tip:""}],t.push(o);else{if(o.items.length>0&&o.items[0].data?.itemid?.includes("top_title"))continue;o.items.length>0&&(o.items=Object.values(o.items).filter(e=>"feed"==e.category||"card"==e.category)),t.push(o)}}else -1==[202,200].indexOf(o.data.card_type)&&t.push(o);return e.items=t,log("removeMain success"),e}function topicHandler(e){let t=e.cards;if(!t||!mainConfig.removeUnfollowTopic&&!mainConfig.removeUnusedPart)return e;let o=[];for(let i of t){let a=!0;if(i.mblog){let r=i.mblog.buttons;mainConfig.removeUnfollowTopic&&r&&"follow"==r[0].type&&(a=!1)}else{if(!mainConfig.removeUnusedPart)continue;if("bottom_mix_activity"==i.itemid)a=!1;else if(i?.top?.title=="正在活跃")a=!1;else if(200==i.card_type&&i.group)a=!1;else{let n=i.card_group;if(!n)continue;if(["guess_like_title","cats_top_title","chaohua_home_readpost_samecity_title"].indexOf(n[0].itemid)>-1)a=!1;else if(n.length>1){let d=[];for(let s of n)-1==["chaohua_discovery_banner_1","bottom_mix_activity"].indexOf(s.itemid)&&d.push(s);i.card_group=d}}}a&&o.push(i)}return e.cards=o,log("topicHandler success"),e}function removeSearchMain(e){let t=e.channelInfo.channels;if(!t)return e;let o=[];for(let i of t)i.payload&&(removeSearch(i.payload),o.push(i));return e.channelInfo.channels=o,log("remove_search main success"),e}function checkSearchWindow(e){return!!mainConfig.removeSearchWindow&&"card"==e.category&&(e.data?.itemid=="finder_window"||e.data?.itemid=="more_frame"||e.data?.card_type==208||e.data?.card_type==217||e.data?.card_type==101||e.data?.card_type==19||e.data?.mblog?.page_info?.actionlog?.source?.includes("ad"))}function removeSearch(e){if(!e.items)return e;let t=[];for(let o of e.items)if("feed"==o.category)isAd(o.data)||(o.data?.page_info?.video_limit&&delete o.data.page_info.video_limit,t.push(o));else{if("group"==o.category)continue;checkSearchWindow(o)||t.push(o)}return e.items=t,e.loadedInfo&&(e.loadedInfo.searchBarContent=[],e.loadedInfo.headerBack&&(e.loadedInfo.headerBack.channelStyleMap={})),log("remove_search success"),e}function removeMsgAd(e){if(!e.messages)return;let t=[];for(let o of e.messages)!o.msg_card?.ad_tag&&t.push(o);return e.messages=t,e}function removePage(e){return removeCards(e),mainConfig.removePinedTrending&&e.cards&&e.cards.length>0&&e.cards[0].card_group&&(e.cards[0].card_group=e.cards[0].card_group.filter(e=>!(e?.actionlog?.ext?.includes("ads_word")||e?.itemid?.includes("t:51")||e?.itemid?.includes("ads_word")))),e}function removeCards(e){if(e.hotwords&&(e.hotwords=[]),!e.cards)return;let t=[];for(let o of e.cards){if(e.cardlistInfo?.page_type=="08"&&(17==o.card_type||58==o.card_type||11==o.card_type))continue;let i=o.card_group;if(i&&i.length>0){let a=[];for(let r of i)118==r.card_type||isAd(r.mblog)||-1!=JSON.stringify(r).indexOf("res_from:ads")||a.push(r);o.card_group=a,t.push(o)}else{let n=o.card_type;if([9,165].indexOf(n)>-1)isAd(o.mblog)||t.push(o);else{if([1007,180].indexOf(n)>-1)continue;t.push(o)}}}e.cards=t}function lvZhouHandler(e){if(!mainConfig.removeLvZhou||!e)return;let t=e.common_struct;if(!t)return;let o=[];for(let i of t)"绿洲"!=i.name&&o.push(i);e.common_struct=o}function isBlock(e){let t=mainConfig.blockIds||[];if(0===t.length)return!1;let o=e.user.id;for(let i of t)if(i==o)return!0;return!1}function removeTimeLine(e){for(let t of["ad","advertises","trends","headers"])e[t]&&delete e[t];if(!e.statuses)return;let o=[];for(let i of e.statuses)isAd(i)||(lvZhouHandler(i),i.common_struct&&delete i.common_struct,i.category?"group"!=i.category&&o.push(i):o.push(i));e.statuses=o}function removeHomeVip(e){return e.header&&e.header.vipView&&(e.header.vipView=null),e}function removeVideoRemind(e){e.bubble_dismiss_time=0,e.exist_remind=!1,e.image_dismiss_time=0,e.image="",e.tag_image_english="",e.tag_image_english_dark="",e.tag_image_normal="",e.tag_image_normal_dark=""}function itemExtendHandler(e){if((mainConfig.removeRelate||mainConfig.removeGood)&&e.trend&&e.trend.titles){let t=e.trend.titles.title;mainConfig.removeRelate&&"相关推荐"===t?delete e.trend:mainConfig.removeGood&&"博主好物种草"===t&&delete e.trend}mainConfig.removeFollow&&e.follow_data&&(e.follow_data=null),mainConfig.removeRewardItem&&e.reward_info&&(e.reward_info=null),e.page_alerts&&(e.page_alerts=null);try{e.trend.extra_struct.extBtnInfo.btn_picurl.indexOf("timeline_icon_ad_delete")>-1&&delete e.trend}catch(o){}if(mainConfig.modifyMenus&&e.custom_action_list){let i=[];for(let a of e.custom_action_list){let r=a.type,n=itemMenusConfig[r];void 0===n?i.push(a):"mblog_menus_copy_url"===r?i.unshift(a):n&&i.push(a)}e.custom_action_list=i}}function updateFollowOrder(e){try{for(let t of e.items)if("mainnums_friends"===t.itemId){let o=t.click.modules[0].scheme;t.click.modules[0].scheme=o.replace("231093_-_selfrecomm","231093_-_selffollowed"),log("updateFollowOrder success");return}}catch(i){console.log("updateFollowOrder fail")}}function updateProfileSkin(e,t){try{let o=mainConfig[t];if(!o)return;let i=0;for(let a of e.items)if(a.image)try{dm=a.image.style.darkMode,"alpha"!=dm&&(a.image.style.darkMode="alpha"),a.image.iconUrl=o[i++],a.dot&&(a.dot=[])}catch(r){}log("updateProfileSkin success")}catch(n){console.log("updateProfileSkin fail")}}function removeHome(e){if(!e.items)return e;let t=[];for(let o of e.items){let i=o.itemId;if("profileme_mine"==i)mainConfig.removeHomeVip&&(o=removeHomeVip(o)),o.header?.vipIcon&&delete o.header.vipIcon,updateFollowOrder(o),t.push(o);else if("100505_-_top8"==i)updateProfileSkin(o,"profileSkin1"),t.push(o);else if("100505_-_newcreator"==i)"grid"==o.type?(updateProfileSkin(o,"profileSkin2"),t.push(o)):mainConfig.removeHomeCreatorTask||t.push(o);else{if("100505_-_chaohua"!=i&&"100505_-_manage"!=i&&"100505_-_recentlyuser"!=i)continue;o.images?.length>0&&(o.images=o.images.filter(e=>"100505_-_chaohua"==e.itemId||"100505_-_recentlyuser"==e.itemId)),t.push(o)}}return e.items=t,e}function removeCheckin(e){log("remove tab1签到"),e.show=0}function removeMediaHomelist(e){mainConfig.removeLiveMedia&&(log("remove 首页直播"),e.data={})}function removeComments(e){let t=["广告","廣告","相关内容","推荐","热推","推薦"],o=e.datas||[];if(0===o.length)return;let i=[];for(let a of o){let r=a.adType||"";-1==t.indexOf(r)&&6!=a.type&&i.push(a)}log("remove 评论区相关和推荐内容"),e.datas=i}function containerHandler(e){mainConfig.removeInterestFriendInTopic&&"超话里的好友"===e.card_type_name&&(log("remove 超话里的好友"),e.card_group=[]),mainConfig.removeInterestTopic&&e.itemid&&(e.itemid.indexOf("infeed_may_interest_in")>-1?(log("remove 感兴趣的超话"),e.card_group=[]):e.itemid.indexOf("infeed_friends_recommend")>-1&&(log("remove 超话好友关注"),e.card_group=[]))}function userHandler(e){if(e=removeMainTab(e),!mainConfig.removeInterestUser||!e.items)return e;let t=[];for(let o of e.items){let i=!0;if("group"==o.category)try{"可能感兴趣的人"==o.items[0].data.desc&&(i=!1)}catch(a){}i&&(o.data?.common_struct&&delete o.data.common_struct,t.push(o))}return e.items=t,log("removeMain sub success"),e}function nextVideoHandler(e){if(!e.statuses)return e;let t=[];for(let o of e.statuses)if(!isAd(o)){let i=["forward_redpacket_info","shopping","float_info","tags"];for(let a of i)o.video_info?.[a]&&delete o.video_info[a];t.push(o)}return e.statuses=t,log("removeMainTab Success"),e}function tabSkinHandler(e){try{let t=mainConfig.tabIconVersion;if(e.data.canUse=1,!t||!mainConfig.tabIconPath||t<100)return;let o=e.data.list;for(let i of o)i.version=t,i.downloadlink=mainConfig.tabIconPath;log("tabSkinHandler success")}catch(a){log("tabSkinHandler fail")}}function skinPreviewHandler(e){e.data.skin_info.status=1}function removeLuaScreenAds(e){if(!e.cached_ad)return e;for(let t of e.cached_ad.ads)t.start_date=1893254400,t.show_count=0,t.duration=0,t.end_date=1893340799;return e}function removePhpScreenAds(e){if(!e.ads)return e;for(let t of(e.show_push_splash_ad=!1,e.background_delay_display_time=0,e.lastAdShow_delay_display_time=0,e.realtime_ad_video_stall_time=0,e.realtime_ad_timeout_duration=0,e.ads))t.displaytime=0,t.displayintervel=86400,t.allowdaydisplaynum=0,t.displaynum=0,t.displaytime=1,t.begintime="2029-12-30 00:00:00",t.endtime="2029-12-30 23:59:59";return e}function log(e){mainConfig.isDebug&&console.log(e)}var body=$response.body,url=$request.url;let method=getModifyMethod(url);if(method){log(method);var func=eval(method);let data=JSON.parse(body.match(/\{.*\}/)[0]);new func(data),body=JSON.stringify(data),"removePhpScreenAds"==method&&(body=JSON.stringify(data)+"OK")}$done({body}); \ No newline at end of file +const mainConfig={isDebug:!1,author:"ddgksf2013",removeHomeVip:!0,removeHomeCreatorTask:!0,removeRelate:!0,removeGood:!0,removeFollow:!0,modifyMenus:!0,removeRelateItem:!1,removeRecommendItem:!0,removeRewardItem:!0,removeLiveMedia:!0,removeNextVideo:!1,removePinedTrending:!0,removeInterestFriendInTopic:!1,removeInterestTopic:!1,removeInterestUser:!0,removeLvZhou:!0,removeSearchWindow:!0,profileSkin1:null,profileSkin2:null,tabIconVersion:0,tabIconPath:""},itemMenusConfig={creator_task:!1,mblog_menus_custom:!1,mblog_menus_video_later:!0,mblog_menus_comment_manager:!0,mblog_menus_avatar_widget:!1,mblog_menus_card_bg:!1,mblog_menus_long_picture:!0,mblog_menus_delete:!0,mblog_menus_edit:!0,mblog_menus_edit_history:!0,mblog_menus_edit_video:!0,mblog_menus_sticking:!0,mblog_menus_open_reward:!0,mblog_menus_novelty:!1,mblog_menus_favorite:!0,mblog_menus_promote:!0,mblog_menus_modify_visible:!0,mblog_menus_copy_url:!0,mblog_menus_follow:!0,mblog_menus_video_feedback:!0,mblog_menus_shield:!0,mblog_menus_report:!0,mblog_menus_apeal:!0,mblog_menus_home:!0},modifyCardsUrls=["/cardlist","video/community_tab","/searchall"],modifyStatusesUrls=["statuses/friends/timeline","statuses_unread_hot_timeline","statuses/unread_friends_timeline","statuses/unread_hot_timeline","groups/timeline","statuses/friends_timeline"],otherUrls={"/profile/me":"removeHome","/statuses/extend":"itemExtendHandler","/video/remind_info":"removeVideoRemind","/checkin/show":"removeCheckin","/live/media_homelist":"removeMediaHomelist","/comments/build_comments":"removeComments","/container/get_item":"containerHandler","/profile/container_timeline":"userHandler","/video/tiny_stream_video_list":"nextVideoHandler","/2/statuses/video_mixtimeline":"nextVideoHandler","video/tiny_stream_mid_detail":"nextVideoHandler","/!/client/light_skin":"tabSkinHandler","/littleskin/preview":"skinPreviewHandler","/search/finder":"removeSearchMain","/search/container_timeline":"removeSearch","/search/container_discover":"removeSearch","/2/messageflow":"removeMsgAd","/2/page?":"removePage","/statuses/unread_topic_timeline":"topicHandler","/square&pageDataType/":"squareHandler","/statuses/container_timeline_topic":"removeMain","/statuses/container_timeline":"removeMainTab","wbapplua/wbpullad.lua":"removeLuaScreenAds","interface/sdk/sdkad.php":"removePhpScreenAds","ct=feed&a=trends":"removeTopics",user_center:"modifiedUserCenter","a=get_coopen_ads":"removeIntlOpenAds","php?a=search_topic":"removeSearchTopic","v1/ad/realtime":"removeRealtimeAd","v1/ad/preload":"removeAdPreload"};function getModifyMethod(e){for(let t of modifyCardsUrls)if(e.indexOf(t)>-1)return"removeCards";for(let o of modifyStatusesUrls)if(e.indexOf(o)>-1)return"removeTimeLine";for(let[i,a]of Object.entries(otherUrls))if(e.indexOf(i)>-1)return a;return null}function removeRealtimeAd(e){return delete e.ads,e.code=4016,e}function removeAdPreload(e){if(!e.ads)return e;for(let t of(e.last_ad_show_interval=86400,e.ads))t.start_time=2681574400,t.end_time=2681660799,t.display_duration=0,t.daily_display_cnt=0,t.total_display_cnt=0;return e}function removeIntlOpenAds(e){return e.data&&0!==e.data.length&&(e.data.ad_list=[],e.data.gdt_video_ad_ios=[],e.data.display_ad=0,e.data.ad_ios_id=null,e.data.app_ad_ios_id=null,e.data.reserve_ad_ios_id="",e.data.reserve_app_ad_ios_id="",e.data.ad_duration=604800,e.data.ad_cd_interval=604800,e.data.pic_ad=[]),e}function removeSearchTopic(e){return e.data&&0!==e.data.length&&(e.data=Object.values(e.data).filter(e=>"searchtop"!=e.type)),e}function modifiedUserCenter(e){return e.data&&0!==e.data.length&&e.data.cards&&(e.data.cards=Object.values(e.data.cards).filter(e=>"personal_vip"!=e.items[0].type)),e}function removeTopics(e){return e.data&&(e.data.order=["search_topic"]),e}function isAd(e){return!!e&&("广告"==e.mblogtypename||"热推"==e.mblogtypename||e.promotion?.type=="ad"||e.page_info?.actionlog?.source=="ad"||e.content_auth_info?.content_auth_title=="广告")}function squareHandler(e){return e.items,e}function removeMainTab(e){if(e.loadedInfo&&e.loadedInfo.headers&&delete e.loadedInfo.headers,!e.items)return e;let t=[];for(let o of e.items)isAd(o.data)||(o.data?.page_info?.video_limit&&delete o.data.page_info.video_limit,o.data?.common_struct&&delete o.data.common_struct,o.category?"group"!=o.category?t.push(o):-1!=JSON.stringify(o.items).indexOf("profile_top")&&t.push(o):t.push(o));return e.items=t,log("removeMainTab success"),e}function removeMain(e){if(e.loadedInfo&&e.loadedInfo.headers&&delete e.loadedInfo.headers,!e.items)return e;let t=[];for(let o of e.items)if("feed"==o.category)isAd(o.data)||t.push(o);else if("group"==o.category){if(o.items.length>0&&o.items[0].data?.itemid?.includes("search_input"))o.items=o.items.filter(e=>e?.data?.itemid?.includes("mine_topics")||e?.data?.itemid?.includes("search_input")||e?.data?.card_type==202),o.items[0].data.hotwords=[{word:"搜索超话",tip:""}],t.push(o);else{if(o.items.length>0&&o.items[0].data?.itemid?.includes("top_title"))continue;o.items.length>0&&(o.items=Object.values(o.items).filter(e=>"feed"==e.category||"card"==e.category)),t.push(o)}}else{if(o.data?.card_type&&[202,200].indexOf(o.data.card_type)>-1)continue;t.push(o)}return e.items=t,log("removeMain success"),e}function topicHandler(e){let t=e.cards;if(!t||!mainConfig.removeUnfollowTopic&&!mainConfig.removeUnusedPart)return e;let o=[];for(let i of t){let a=!0;if(i.mblog){let r=i.mblog.buttons;mainConfig.removeUnfollowTopic&&r&&"follow"==r[0].type&&(a=!1)}else{if(!mainConfig.removeUnusedPart)continue;if("bottom_mix_activity"==i.itemid)a=!1;else if(i?.top?.title=="正在活跃")a=!1;else if(200==i.card_type&&i.group)a=!1;else{let n=i.card_group;if(!n)continue;if(["guess_like_title","cats_top_title","chaohua_home_readpost_samecity_title"].indexOf(n[0].itemid)>-1)a=!1;else if(n.length>1){let d=[];for(let s of n)-1==["chaohua_discovery_banner_1","bottom_mix_activity"].indexOf(s.itemid)&&d.push(s);i.card_group=d}}}a&&o.push(i)}return e.cards=o,log("topicHandler success"),e}function removeSearchMain(e){let t=e.channelInfo.channels;if(!t)return e;let o=[];for(let i of t)i.payload&&(removeSearch(i.payload),o.push(i));return e.channelInfo.channels=o,log("remove_search main success"),e}function checkSearchWindow(e){return!!mainConfig.removeSearchWindow&&"card"==e.category&&(e.data?.itemid=="finder_window"||e.data?.itemid=="more_frame"||e.data?.card_type==208||e.data?.card_type==217||e.data?.card_type==101||e.data?.card_type==19||e.data?.mblog?.page_info?.actionlog?.source?.includes("ad"))}function removeSearch(e){if(!e.items)return e;let t=[];for(let o of e.items)"feed"==o.category?isAd(o.data)||(o.data?.page_info?.video_limit&&delete o.data.page_info.video_limit,t.push(o)):"group"==o.category?(o.items=o.items.filter(e=>e.data?.card_type===17),o.items.length>0&&t.push(o)):checkSearchWindow(o)||t.push(o);return e.items=t,e.loadedInfo&&(e.loadedInfo.searchBarContent=[],e.loadedInfo.headerBack&&(e.loadedInfo.headerBack.channelStyleMap={})),log("remove_search success"),e}function removeMsgAd(e){if(!e.messages)return;let t=[];for(let o of e.messages)!o.msg_card?.ad_tag&&t.push(o);return e.messages=t,e}function removePage(e){return removeCards(e),mainConfig.removePinedTrending&&e.cards&&e.cards.length>0&&e.cards[0].card_group&&(e.cards[0].card_group=e.cards[0].card_group.filter(e=>!(e?.actionlog?.ext?.includes("ads_word")||e?.itemid?.includes("t:51")||e?.itemid?.includes("ads_word")))),e}function removeCards(e){if(e.hotwords&&(e.hotwords=[]),!e.cards)return;let t=[];for(let o of e.cards){e.cardlistInfo?.containerid=="232082type=1"&&(17==o.card_type||58==o.card_type||11==o.card_type)&&(o={card_type:o.card_type+1});let i=o.card_group;if(i&&i.length>0){let a=[];for(let r of i)118==r.card_type||isAd(r.mblog)||-1!=JSON.stringify(r).indexOf("res_from:ads")||a.push(r);o.card_group=a,t.push(o)}else{let n=o.card_type;if([9,165].indexOf(n)>-1)isAd(o.mblog)||t.push(o);else{if([1007,180].indexOf(n)>-1)continue;t.push(o)}}}e.cards=t}function lvZhouHandler(e){if(!mainConfig.removeLvZhou||!e)return;let t=e.common_struct;if(!t)return;let o=[];for(let i of t)"绿洲"!=i.name&&o.push(i);e.common_struct=o}function isBlock(e){let t=mainConfig.blockIds||[];if(0===t.length)return!1;let o=e.user.id;for(let i of t)if(i==o)return!0;return!1}function removeTimeLine(e){for(let t of["ad","advertises","trends","headers"])e[t]&&delete e[t];if(!e.statuses)return;let o=[];for(let i of e.statuses)isAd(i)||(lvZhouHandler(i),i.common_struct&&delete i.common_struct,i.category?"group"!=i.category&&o.push(i):o.push(i));e.statuses=o}function removeHomeVip(e){return e.header&&e.header.vipView&&(e.header.vipView=null),e}function removeVideoRemind(e){e.bubble_dismiss_time=0,e.exist_remind=!1,e.image_dismiss_time=0,e.image="",e.tag_image_english="",e.tag_image_english_dark="",e.tag_image_normal="",e.tag_image_normal_dark=""}function itemExtendHandler(e){if((mainConfig.removeRelate||mainConfig.removeGood)&&e.trend&&e.trend.titles){let t=e.trend.titles.title;mainConfig.removeRelate&&"相关推荐"===t?delete e.trend:mainConfig.removeGood&&"博主好物种草"===t&&delete e.trend}mainConfig.removeFollow&&e.follow_data&&(e.follow_data=null),mainConfig.removeRewardItem&&e.reward_info&&(e.reward_info=null),e.head_cards&&delete e.head_cards,e.page_alerts&&(e.page_alerts=null);try{e.trend.extra_struct.extBtnInfo.btn_picurl.indexOf("timeline_icon_ad_delete")>-1&&delete e.trend}catch(o){}if(mainConfig.modifyMenus&&e.custom_action_list){let i=[];for(let a of e.custom_action_list){let r=a.type,n=itemMenusConfig[r];void 0===n?i.push(a):"mblog_menus_copy_url"===r?i.unshift(a):n&&i.push(a)}e.custom_action_list=i}}function updateFollowOrder(e){try{for(let t of e.items)if("mainnums_friends"===t.itemId){let o=t.click.modules[0].scheme;t.click.modules[0].scheme=o.replace("231093_-_selfrecomm","231093_-_selffollowed"),log("updateFollowOrder success");return}}catch(i){console.log("updateFollowOrder fail")}}function updateProfileSkin(e,t){try{let o=mainConfig[t];if(!o)return;let i=0;for(let a of e.items)if(a.image)try{dm=a.image.style.darkMode,"alpha"!=dm&&(a.image.style.darkMode="alpha"),a.image.iconUrl=o[i++],a.dot&&(a.dot=[])}catch(r){}log("updateProfileSkin success")}catch(n){console.log("updateProfileSkin fail")}}function removeHome(e){if(!e.items)return e;let t=[];for(let o of e.items){let i=o.itemId;if("profileme_mine"==i)mainConfig.removeHomeVip&&(o=removeHomeVip(o)),o.header?.vipIcon&&delete o.header.vipIcon,updateFollowOrder(o),t.push(o);else if("100505_-_top8"==i)updateProfileSkin(o,"profileSkin1"),t.push(o);else if("100505_-_newcreator"==i)"grid"==o.type?(updateProfileSkin(o,"profileSkin2"),t.push(o)):mainConfig.removeHomeCreatorTask||t.push(o);else{if("100505_-_chaohua"!=i&&"100505_-_manage"!=i&&"100505_-_recentlyuser"!=i)continue;o.images?.length>0&&(o.images=o.images.filter(e=>"100505_-_chaohua"==e.itemId||"100505_-_recentlyuser"==e.itemId)),t.push(o)}}return e.items=t,e}function removeCheckin(e){log("remove tab1签到"),e.show=0}function removeMediaHomelist(e){mainConfig.removeLiveMedia&&(log("remove 首页直播"),e.data={})}function removeComments(e){let t=["广告","廣告","相关内容","推荐","热推","推薦"],o=e.datas||[];if(0===o.length)return;let i=[];for(let a of o){let r=a.adType||"";-1==t.indexOf(r)&&6!=a.type&&i.push(a)}log("remove 评论区相关和推荐内容"),e.datas=i,e.tip_msg&&delete e.tip_msg}function containerHandler(e){mainConfig.removeInterestFriendInTopic&&"超话里的好友"===e.card_type_name&&(log("remove 超话里的好友"),e.card_group=[]),mainConfig.removeInterestTopic&&e.itemid&&(e.itemid.indexOf("infeed_may_interest_in")>-1?(log("remove 感兴趣的超话"),e.card_group=[]):e.itemid.indexOf("infeed_friends_recommend")>-1&&(log("remove 超话好友关注"),e.card_group=[]))}function userHandler(e){if(e=removeMainTab(e),!mainConfig.removeInterestUser||!e.items)return e;let t=[];for(let o of e.items){let i=!0;if("group"==o.category)try{"可能感兴趣的人"==o.items[0].data.desc&&(i=!1)}catch(a){}i&&(o.data?.common_struct&&delete o.data.common_struct,t.push(o))}return e.items=t,log("removeMain sub success"),e}function nextVideoHandler(e){if(!e.statuses)return e;let t=[];for(let o of e.statuses)if(!isAd(o)){let i=["forward_redpacket_info","shopping","float_info","tags"];for(let a of i)o.video_info?.[a]&&delete o.video_info[a];t.push(o)}return e.statuses=t,log("removeMainTab Success"),e}function tabSkinHandler(e){try{let t=mainConfig.tabIconVersion;if(e.data.canUse=1,!t||!mainConfig.tabIconPath||t<100)return;let o=e.data.list;for(let i of o)i.version=t,i.downloadlink=mainConfig.tabIconPath;log("tabSkinHandler success")}catch(a){log("tabSkinHandler fail")}}function skinPreviewHandler(e){e.data.skin_info.status=1}function removeLuaScreenAds(e){if(!e.cached_ad)return e;for(let t of e.cached_ad.ads)t.start_date=1893254400,t.show_count=0,t.duration=0,t.end_date=1893340799;return e}function removePhpScreenAds(e){if(!e.ads)return e;for(let t of(e.show_push_splash_ad=!1,e.background_delay_display_time=0,e.lastAdShow_delay_display_time=0,e.realtime_ad_video_stall_time=0,e.realtime_ad_timeout_duration=0,e.ads))t.displaytime=0,t.displayintervel=86400,t.allowdaydisplaynum=0,t.displaynum=0,t.displaytime=1,t.begintime="2029-12-30 00:00:00",t.endtime="2029-12-30 23:59:59";return e}function log(e){mainConfig.isDebug&&console.log(e)}var body=$response.body,url=$request.url;let method=getModifyMethod(url);if(method){log(method);var func=eval(method);let data=JSON.parse(body.match(/\{.*\}/)[0]);new func(data),body=JSON.stringify(data),"removePhpScreenAds"==method&&(body=JSON.stringify(data)+"OK")}$done({body}); \ No newline at end of file diff --git a/Scripts/AdBlock/Weibo/weibo_search_info.json b/Scripts/AdBlock/Weibo/weibo_search_info.json index b3b5163..6ad4fef 100644 --- a/Scripts/AdBlock/Weibo/weibo_search_info.json +++ b/Scripts/AdBlock/Weibo/weibo_search_info.json @@ -1,8 +1,13 @@ { "data": { "expiration_time": "86400", - "cards": [{ "tip": "\u641c\u7d22\u5fae\u535a", "word": "" }] + "cards": [ + { + "tip": "\u641c\u7d22\u5fae\u535a", + "word": "" + } + ] }, "info": "", "retcode": 0 -} +} \ No newline at end of file diff --git a/Scripts/AdBlock/Weibo/weibo_search_topic.json b/Scripts/AdBlock/Weibo/weibo_search_topic.json index 36fd753..41b672f 100644 --- a/Scripts/AdBlock/Weibo/weibo_search_topic.json +++ b/Scripts/AdBlock/Weibo/weibo_search_topic.json @@ -19,4 +19,4 @@ "more": "" } } -} +} \ No newline at end of file From db6134b565b63831075475a67ee6155e22d728e3 Mon Sep 17 00:00:00 2001 From: sve1r Date: Mon, 14 Aug 2023 10:30:02 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=94=A7=20=E6=B7=BB=E5=8A=A0=E6=96=B0?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E7=A4=BA=E4=BE=8B=E6=96=87=E4=BB=B6=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E6=9B=B4=E6=96=B0=E4=B8=AD=E6=96=AD=E6=80=A7=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 11 +++- Sample_v1.4.0.conf | 136 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 Sample_v1.4.0.conf diff --git a/README.md b/README.md index 714cb3d..773976a 100644 --- a/README.md +++ b/README.md @@ -52,8 +52,15 @@ - [7️⃣ 许可与说明](#7️⃣许可与说明) ----- -# **中断性变更提醒** -由于脚本数量的增多以及复杂性的提高,冗余文件影响到仓库内数据分析, 兹定于 **4月30日** 对仓库内部分 *脚本* 或 *分流文件* 进行包括文件名\文件后缀名\目录格式等重构, 届时,如果发生脚本无法找到的情况,请根据发布的 WiKi 等相关指引进行修改操作. +# **🛠️ 中断性变更提醒** +由于仓库内容过于久远,历史数据归档较为困难。兹定于 2023年9月30日晚对仓库中内容及仓库分支结构进行切换并清理。 +包括但不限于以下所列内容 +``` +1. 删除现有但早已不使用的 **main** 分支 +2. 将现有 **develop** 分支的内容 迁移至 **新main** 分支 +3. 调整 **main** 分支为保护分支, 今后所有更新应当符合 **GitFlow** 风格 +``` +如果对您日常使用带来了不便,请见谅,并提前做好更新准备。 # **🉑 简要说明** diff --git a/Sample_v1.4.0.conf b/Sample_v1.4.0.conf new file mode 100644 index 0000000..0afd762 --- /dev/null +++ b/Sample_v1.4.0.conf @@ -0,0 +1,136 @@ +# 基于 Quantumult X 官方标准 Sample V1.1.0 +# +# 以 ';' 或 '#' 或 '//' 开头的配置文件行为注释行 +# +# 最后更新时间: 2023年8月14日 +# +# ================ + +# 基础部分 +[general] +// > 配置文件图标 +profile_img_url = https://img.sveir.xyz/static/favicon%40trs.png +// > 网络测试链接 +network_check_url = http://www.bing.com +// > 服务器测试链接 +server_check_url = http://www.gstatic.com/generate_204 +// > 服务器测试超时时间 (毫秒) +server_check_timeout = 3000 +// > 节点 GEO 位置信息检测 +// 如果不需识别节点地区为中文和显示国旗,请将下面行 geo_location_checker 进行注释ß +geo_location_checker = http://ip-api.com/json/?lang=zh-CN,https://cdn.jsdelivr.net/gh/KOP-XIAO/QuantumultX@master/Scripts/IP_API.js +// > 指定 WiFi SSID 下的运行模式 +// 如果需要指定 对应 SSID 的运行模式,请取消下列注释并自定配置 +;running_mode_trigger = filter, filter, asus-5g:all_direct, asus:all_proxy +// > 资源解析器 +resource_parser_url = https://cdn.jsdelivr.net/gh/KOP-XIAO/QuantumultX@master/Scripts/resource-parser.js +// > DNS 排除列表 +// 不使用 fakeip 映射,可一定程度防止检测到使用代理 +dns_exclusion_list = *.lan, cable.auth.com, *.msftconnecttest.com, *.msftncsi.com, network-test.debian.org, detectportal.firefox.com, resolver1.opendns.com, *.srv.nintendo.net, *.stun.playstation.net, xbox.*.microsoft.com, *.xboxlive.com, stun.*, *.qq.com, localhost.*.qq.com, *.logon.battlenet.com.cn, *.logon.battle.net, *.blzstatic.cn, *.cmpassport.com, id6.me, open.e.189.cn, mdn.open.wo.cn, auth.wosms.cn, *.jegotrip.com.cn, *.icitymobile.mobi, *.pingan.com.cn, *.cmbchina.com, *?miwifi.com, pool.ntp.org, *.pool.ntp.org, ntp.*.com, time.*.com, ntp?.*.com, time?.*.com, time.*.gov, time.*.edu.cn, *.ntp.org.cn, time.*.apple.com, PDC._msDCS.*.*, DC._msDCS.*.*, GC._msDCS.*.* +// > 排除路由 +// 以下 ip-cidr 中的路由将不经由 QuantumultX 进行处理 +excluded_routes = 192.168.0.0/16, 172.16.0.0/12, 100.64.0.0/10, 10.0.0.0/8, 239.255.255.250/32 + +# 域名解析部分 +[dns] +// 如果您需要禁用系统 DNS(no-system), 请取消下行注释 +;no-system +// 如果您需要禁用 IPv6, 请取消下行注释 +;no-ipv6 +// 如需使用 DNS over HTTP/3,请取消下行注释 +;prefer-doh3 + +// 指定 DNS 服务器,并发响应选取最优结果 +server = 119.29.29.29 +server = 182.254.116.116 +server = 223.5.5.5 +server = 223.6.6.6 +server = 119.28.28.28 + +# ⚠️ 注意 不建议在此对 微信以及QQ等即时通讯工具进行 指定域名分配DNS +# 此操作将可能导致微信消息延迟推送 + +// 如果需要指定 DNS over HTTP 服务,则上列指定的 DNS 服务器 *均将失效* ,在特定网络下禁用该 doh +;doh-server = https://doh.pub/dns-query, https://223.5.5.5/dns-query, https://223.6.6.6/dns-query + +# 分流策略组 +[policy] +static = OutSide, Hong Kong, Singapore, Taiwan, United States, Japan, Korea, Other, direct, img-url=https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Airport.png +static = Final, OutSide, direct, img-url=https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Final.png +// 分流 +static = DomesticMedia, direct, OutSide, img-url= https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Domestic.png +static = Domestic, direct, OutSide, img-url= https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Back.png +static = Apple, direct, OutSide, img-url= https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Apple.png +static = Apple Domestic, direct, OutSide, img-url= https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Apple_Update.png +static = Google, OutSide, img-url=https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Google.png +static = Google Domestic, direct, OutSide, img-url= https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Google_Search.png +static = Hijacking, reject, direct, img-url=https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Hijacking.png +static = Advertising, reject, img-url= https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Advertising.png +static = Unbreak, direct, OutSide, img-url= https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Auto.png +// 按地区分类 +static = Hong Kong, resource-tag-regex=🧁 我的订阅, server-tag-regex=香港|Hong Kong|HK|hk, img-url=https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Hong_Kong.png +static = Singapore, resource-tag-regex=🧁 我的订阅, server-tag-regex=新加坡|Singapore|SG|sg, img-url=https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Singapore.png +static = Taiwan, resource-tag-regex=🧁 我的订阅, server-tag-regex=台湾|Taiwan|TW|tw|台北, img-url=https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Taiwan.png +static = United States, resource-tag-regex=🧁 我的订阅, server-tag-regex=美国|United States|US|us, img-url=https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/United_States.png +static = Japan, resource-tag-regex=🧁 我的订阅, server-tag-regex=日本|Japan|JP|jp, img-url=https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Japan.png +static = Korea, resource-tag-regex=🧁 我的订阅, server-tag-regex=韩国|Korea|KR|kr, img-url=https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Korea.png +static = Other, resource-tag-regex=🧁 我的订阅, server-tag-regex=印度|巴西|阿根廷|英国|澳门|土耳其|挪威|瑞士|俄罗斯|瑞典|爱尔兰|法国|菲律宾|越南|泰国|印度尼西亚|德国|英国|荷兰|乌克兰, img-url=https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/AIA.png + + +[server_local] + +[server_remote] +https://example.com/subscribe.snippet,tag=🧁 我的订阅,enabled=true, img-url= https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Heart.png + + +[filter_local] +#本地分流规则(对于完全相同的某条规则,本地的将优先生效) +ip-cidr, 10.0.0.0/8, direct +ip-cidr, 127.0.0.0/8, direct +ip-cidr, 172.16.0.0/12, direct +ip-cidr, 192.168.0.0/16, direct +ip-cidr, 224.0.0.0/24, direct +# 已采用 ip 池数据,因此注释掉 geoip cn +;geoip, cn, direct +final, Final + +[filter_remote] +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rules/Services/Unbreak.list, tag=Unbreak, force-policy=direct, enabled=true +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rules/Advertising/Hijacking.list, tag=Hijacking, enabled=true +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rules/Advertising/AdReject.list, tag=Advertising, enabled=true +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rules/Services/Google.list, tag=Google, enabled=true +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rules/Services/Microsoft.list, tag=Microsoft, enabled=true +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rules/Media/DomesticMedia.list, tag=DomesticMedia, force-policy=direct, enabled=true +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rules/Media/ForeignMedia.list, tag=ForeignMedia, force-policy=OutSide, enabled=true +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rules/Region/Global.list, tag=Global, force-policy=OutSide, enabled=true +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rules/Services/Apple.list, tag=Apple, force-policy=direct, enabled=true +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rules/Region/China.list, tag=Domestic, force-policy=direct, enabled=true + +[rewrite_local] + +[rewrite_remote] +# 网页去广告 +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rewrite/AdBlock/WebAdBlock.conf, tag=常用网页去广告 + +# 知乎去广告 +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rewrite/AdBlock/Zhihu.conf, tag=知乎去广告 + +# 微博去广告 +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rewrite/AdBlock/Weibo.conf, tag=微博去广告 + +# Youtube 去广告 +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rewrite/AdBlock/Youtube.conf, tag=Youtube 去广告 + +# TestFlight复写 +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rewrite/Services/Apple/TestFlight/TestFlightDownload.conf,tag=TestFlight + +# Rewrite 复写远程订阅 +https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Rewrite/Rewrite.conf, tag=Rewrite + +[task_local] +# 流媒体查询脚本 +event-interaction https://cdn.jsdelivr.net/gh/KOP-XIAO/QuantumultX@master/Scripts/streaming-ui-check.js, tag = 流媒体 - 解锁查询,img-url=checkmark.seal.system, enabled=true + +[http_backend] + +[mitm]