diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 030147e..9ff9b3a 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -21,11 +21,9 @@ jobs: uses: softprops/action-gh-release@v1 with: prerelease: false - tag_name: v4.2.23 - name: 4.2.23 - body: |- - - Keyhub反屏蔽ADB - - Keyhub任务识别优化 + tag_name: v4.2.24 + name: 4.2.24 + body: '- GiveeClub新增Twitter任务识别' files: |- dist/auto-task-v4-for-giveawaysu.user.js dist/auto-task-v4.compatibility.user.js diff --git a/dist/auto-task-v4-for-giveawaysu.all.user.js b/dist/auto-task-v4-for-giveawaysu.all.user.js index 5d4b9fb..8619de1 100644 --- a/dist/auto-task-v4-for-giveawaysu.all.user.js +++ b/dist/auto-task-v4-for-giveawaysu.all.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name auto-task-v4-for-giveawaysu // @namespace auto-task-v4-for-giveawaysu -// @version 4.2.23 +// @version 4.2.24 // @description 赠Key站自动任务 // @author HCLonely // @license MIT @@ -104,4 +104,4 @@ console.log('%c%s', 'color:blue', 'Auto Task GS特供脚本开始加载'); `+s.stack)}async function i(s){var t=1{s.dataType&&(s.responseType=s.dataType);var t={timeout:3e4,ontimeout(t){e({result:"Error",statusText:"Timeout",status:601,data:t,options:s})},onabort(t){e({result:"Error",statusText:"Aborted",status:602,data:t,options:s})},onerror(t){e({result:"Error",statusText:"Error",status:603,data:t,options:s})},onload(t){e({result:"Success",statusText:"Load",status:600,data:t,options:s})},...s};GM_xmlhttpRequest(t)});return window.DEBUG&&console.log("%cAuto-Task[httpRequest]:","color:blue",JSON.stringify(e)),600!==e.status&&t<2?await i(s,t+1):e}catch(t){return console.log("%cAuto-Task[httpRequest]:","color:red",JSON.stringify({errorMsg:t,options:s})),D(t,"httpRequest"),{result:"JsError",statusText:"Error",status:604,error:t,options:s}}}const I=i;function U(){let e=0{setTimeout(()=>{t(!0)},e)})}const F=t=>{let{type:e,text:s,html:i,id:n}=t;const a={success:()=>a,error:()=>a,warning:()=>a,info:()=>a,view:()=>a};try{var o;let t;if(e)switch(e){case"joiningSteamGroup":case"leavingSteamGroup":case"gettingSteamGroupId":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"joiningSteamOfficialGroup":case"leavingSteamOfficialGroup":case"gettingSteamOfficialGroupId":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"subscribingForum":case"unsubscribingForum":case"gettingForumId":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"followingCurator":case"unfollowingCurator":case"gettingCuratorId":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"addingToWishlist":case"removingFromWishlist":case"followingGame":case"unfollowingGame":case"gettingSubid":case"addingFreeLicense":case"requestingPlayTestAccess":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"addingFreeLicenseSubid":t=$(`
  • ${j("addingFreeLicense")}[${s}]...
  • `);break;case"favoritingWorkshop":case"unfavoritingWorkshop":case"gettingWorkshopAppId":case"votingUpWorkshop":t=$(`
  • ${j(e)}[ ${s}]...
  • `);break;case"gettingAnnouncementParams":case"likingAnnouncement":t=$(`
  • ${j(e)}[ ${n}]...
  • `);break;case"joiningDiscordServer":case"gettingDiscordGuild":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"leavingDiscordServer":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"updateDiscordAuth":t=$(`
  • ${j("updateDiscordAuth")}
  • `);break;case"followingTwitchChannel":case"unfollowingTwitchChannel":case"gettingTwitchChannelId":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"gettingInsUserId":case"followingIns":case"unfollowingIns":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"gettingTwitterUserId":case"followingTwitterUser":case"unfollowingTwitterUser":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"retweetting":case"unretweetting":t=$(`
  • ${j(e)}${s}...
  • `);break;case"joiningReddit":case"leavingReddit":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"followingRedditUser":case"unfollowingRedditUser":t=$(`
  • ${j(e)}[ - ${null===s||void 0===s?void 0:s.replace("u_","")}]...
  • `);break;case"followingYtbChannel":case"unfollowingYtbChannel":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"likingYtbVideo":case"unlikingYtbVideo":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"gettingVkId":case"joiningVkGroup":case"leavingVkGroup":case"joiningVkPublic":case"leavingVkPublic":case"sendingVkWall":case"deletingVkWall":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"visitingLink":t=$(`
  • ${j("visitingLink")}[${s}]...
  • `);break;case"verifyingInsAuth":case"text":t=$(`
  • ${j(s)}
  • `);break;case"html":t=$(s||i);break;case"whiteList":t=$(`
  • ${j("skipTask")}[${s}(${n})](${j("whiteList")})
  • `);break;case"globalOptionsSkip":t=$(`
  • ${j("skipTaskOption")}${s}
  • `);break;default:t=$(`
  • ${j("unKnown")}:${e}(${s})...
  • `)}else t=s?$(`
  • ${j(s)}
  • `):i?$(i):$("
  • ");return t.addClass("card-text"),$("#auto-task-info").append(t),null!==(o=t[0])&&void 0!==o&&o.scrollIntoView(),{font:t.find("font"),success(){var t,e,s=0{try{return[...new Set(t)]}catch(t){return D(t,"unique"),[]}},l=async e=>{try{if(!e)return null;const s=GM_getValue("redirectLinks")||{};return s[e]&&s[e],await I({url:e,method:"GET"}).then(t=>{t=t.data;return null!=t&&t.finalUrl?(s[e]=t.finalUrl,GM_setValue("redirectLinks",s),t.finalUrl):null})}catch(t){return D(t,"getRedirectLink"),null}};const r={doTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0,workshopVotes:!0,announcements:!0,licenses:!0,playtests:!0}},undoTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0}},position:{buttonSideX:"right",buttonSideY:"top",buttonDistance:"15,30",showButtonSideX:"right",showButtonSideY:"top",showButtonDistance:"15,30",logSideX:"right",logSideY:"bottom",logDistance:"10,10"},hotKey:{doTaskKey:"alt + d",undoTaskKey:"alt + u",toggleLogKey:"alt + l"},other:{twitterVerifyId:"783214",youtubeVerifyChannel:"UCrXUsMBcfTVqwAS7DKg9C0Q",autoUpdateSource:"jsdelivr",language:"zh",checkLogin:!0,checkLeftKey:!0,defaultShowButton:!0,defaultShowLog:!0,debug:!1,receivePreview:!0}};t=GM_getValue("globalOptions")||{};const u=(t,e)=>{try{const n={};for(var[s,i]of Object.entries(t))"[object Object]"===Object.prototype.toString.call(i)&&"[object Object]"===Object.prototype.toString.call(e[s])?n[s]=u(i,e[s]):n[s]=e[s]??i;return n}catch(t){return D(t,"assignObject"),r}},N=u(r,t);const c={zh:{website:"网站",type:"类型",edit:"编辑",whiteList:"白名单",skipTask:"跳过撤销任务",whiteListOptions:"白名单设置",changeWhiteListOption:"设置白名单(%0)",whiteListNotFound:"找不到此项白名单: %0",changeWhiteListSuccess:"白名单修改成功,刷新生效!",changeWebsiteOptions:"网站设置",changeGlobalOptions:"全局设置",ok:"是",save:"保存",close:"关闭",return:"返回",option:"选项",value:"值",websiteOptions:"当前网站设置",changeWebsiteOptionsSuccess:"更改当前网站设置成功,刷新生效!",changeGlobalOptionsSuccess:"更改全局设置成功,刷新生效!",needLogin:"请先登录!",getTasksInfo:"正在获取并处理任务信息...",gettingKey:"正在获取Key...",verifyingTask:"正在验证任务",notice:"自动任务脚本提醒",noKeysLeft:"此页面已经没有剩余key了,是否关闭?",giveawayEnded:"此活动已结束,是否关闭?",giveawayNotWork:"此活动因某些原因(已结束/暂停/未开始...)不可用(如果是脚本误判请及时反馈),是否关闭?",confirm:"确定",cancel:"取消",unKnown:"未知",unKnownTaskType:"未识别的任务",doing:"正在做任务",allTasksComplete:"所有任务已完成!",getTaskIdFailed:"获取任务Id失败!",initSuccess:"%0 初始化成功!",initFailed:"%0 初始化失败!",errorLink:"链接错误: %0",needInit:"请先初始化",verifyingAuth:"正在验证%0凭证...",updatingAuth:"正在更新%0凭证...",initing:"正在初始化...",getFailed:"获取%0失败!",checkLoginFailed:"检测登录状态失败!",checkLeftKeyFailed:"检测剩余Key失败!",userId:"用户Id",joiningGiveaway:"正在加入赠Key",needJoinGiveaway:"需要先加入赠Key",cannotUndo:"此网站不支持取消任务",verifyAuth:"正在验证 %0 凭证...",closePageNotice:"如果此页面没有自动关闭,请自行关闭本页面。",errorReport:"检测到脚本报错,是否前往反馈BUG?",visitingLink:"正在访问链接: ",doTask:"做任务",undoTask:"撤销任务",verifyTask:"验证任务",getKey:"获取Key",selectAll:"全选",selectNone:"全不选",invertSelect:"反选",doFreeTask:"加入免费赠品",doPointTask:"加入点数赠品",skipTaskOption:"设置中已配置跳过任务",other:"其他",globalOptions:"全局设置",checkLogin:"登录检测
    需要登录的网站自动登录,部分本网站支持",checkLeftKey:"剩余Key检测
    赠Key活动结束提示是否关闭,部分本网站支持",twitterVerifyId:"通过尝试关注该账号验证Twitter凭证
    默认为Twitter官方帐号 783214
    不想关注官方账号可以改为自己的帐号",youtubeVerifyChannel:"通过尝试订阅该频道验证YouTube凭证
    默认为YouTube官方频道 UCrXUsMBcfTVqwAS7DKg9C0Q
    不想关注官方频道可以改为自己的频道",autoUpdateSource:"更新源
    github: 需代理,实时更新
    jsdelivr: 可不用代理,更新有延迟
    standby: 备用
    auto: 依次使用github, jsdelivr, standby源进行尝试更新",saveGlobalOptions:"保存全局设置",settingPage:"设置页面",name:"名称",version:"版本",scriptManager:"脚本管理器",script:"脚本",environment:"环境",os:"系统",browser:"浏览器",getId:"获取 %0 id",getTwitterUserId:"获取Twitter用户id(获取id功能仅在设置页面可用)",getYoutubeChannelId:"获取Youtube频道id(获取id功能仅在设置页面可用)",showButton:"显示按钮",hideButton:"隐藏按钮",showLog:"显示日志",hideLog:"隐藏日志",defaultShowButton:"默认显示按钮",defaultShowLog:"默认显示日志",debug:"输出调试日志,不要开启此选项!",receivePreview:"接收预览版更新",position:"组件位置",buttonSideX:"按钮区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",buttonSideY:"按钮区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",buttonDistance:"按钮区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",showButtonSideX:"显示按钮水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",showButtonSideY:"显示按钮垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",showButtonDistance:"显示按钮距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",logSideX:"日志区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",logSideY:"日志区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",logDistance:"日志区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",hotKey:"快捷键",doTaskKey:"做任务快捷键
    (实时预览功能仅在设置页面可用)",undoTaskKey:"撤销任务快捷键
    (实时预览功能仅在设置页面可用)",toggleLogKey:"显示/隐藏日志快捷键
    (实时预览功能仅在设置页面可用)",tasksHistory:"任务历史",clearHistory:"清空历史",clearHistoryFinished:"已清空任务历史!",deleteTask:"删除任务",lastChangeTime:"最后一次修改时间",clearTaskFinished:"删除以下任务完成!",clearTaskFailed:"删除任务失败,没有找到任务名!",syncData:"数据同步",settingData:"正在上传数据...",gettingData:"正在获取数据...",help:"帮助",fileName:"文件名",upload2gist:"同步到Gist",downloadFromGist:"从Gist同步",saveAndTest:"保存配置并测试",testSuccess:"测试成功!",testFailed:"测试失败!",saveAndTestNotice:"请先保存配置并测试!",processingData:"正在处理数据...",updatingData:"正在上传数据...",syncDataSuccess:"同步数据成功!",syncDataFailed:"同步数据失败,请在控制台查看错误信息!",downloadingData:"正在下载数据...",checkedNoData:"没有检测到远程数据,请确认配置是否正确!",savingData:"正在保存数据...",syncHistory:"同步任务历史",checkUpdateFailed:"检测更新失败",newVersionNotice:'检测到新版本V%0, 点此更新',language:"语言
    目前仅支持zh: 中文, en: 英文",gistOptions:"Gist 设置",swalNotice:"检测到您第一次安装V4版本脚本,请前往阅读用前必读内容!",echoNotice:'检测到您第一次安装V4版本脚本,请点此前往阅读用前必读内容!',noticeLink:"https://auto-task-doc.js.org/guide/#用前必读",toGithub:"前往Github反馈",toKeylol:"前往其乐论坛反馈",copySuccess:"错误信息已复制到剪切板,是否前往其乐论坛反馈?",copyFailed:"请复制下方错误信息后前往Keylol论坛反馈!",updateText:"%0 版本更新内容:",Active:"进行中",Ended:"已结束",Banned:"已封禁",Paused:"已暂停",notStart:"未开始",noRemoteData:"检测到远程无数据",errorRemoteDataFormat:"远程数据格式错误",updateHistory:'历史更新记录点此查看',groups:"组",officialGroups:"官方组",wishlists:"愿望单",follows:"游戏关注",forums:"论坛",workshops:"创意工坊收藏",curators:"鉴赏家",workshopVotes:"创意工坊点赞",announcements:"社区通知",steamCommunity:"Steam社区",steamStore:"Steam商店",licenses:"入库免费游戏",playtests:"请求访问权限",needLoginSteamStore:'请先登录Steam商店',needLoginSteamCommunity:'请先登录Steam社区',joiningSteamGroup:"正在加入Steam组",leavingSteamGroup:"正在退出Steam组",gettingSteamGroupId:"正在获取Steam组Id",joiningSteamOfficialGroup:"正在加入Steam官方组",leavingSteamOfficialGroup:"正在退出Steam官方组",gettingSteamOfficialGroupId:"正在获取Steam官方组Id",subscribingForum:"正在订阅Steam论坛",unsubscribingForum:"正在取消订阅Steam论坛",gettingForumId:"正在获取Steam论坛Id",followingCurator:"正在关注Steam鉴赏家",unfollowingCurator:"正在取关Steam鉴赏家",gettingCuratorId:"正在获取Steam鉴赏家Id",addingToWishlist:"正在添加游戏到Steam愿望单",removingFromWishlist:"正在从Steam愿望单移除游戏",followingGame:"正在关注Steam游戏",unfollowingGame:"正在取关Steam游戏",favoritingWorkshop:"正在收藏Steam创意工坊物品",unfavoritingWorkshop:"正在取消收藏Steam创意工坊物品",gettingWorkshopAppId:"正在获取Steam创意工坊物品Id",votingUpWorkshop:"正在点赞Steam创意工坊物品",gettingAnnouncementParams:"正在获取Steam通知信息",likingAnnouncement:"正在点赞Steam通知",changingArea:"正在更换Steam地区: %0...",notNeededChangeArea:"当前地区不需要更换",noAnotherArea:"请检测是否开启正确开启代理",gettingAreaInfo:"正在获取Steam地区信息...",changeAreaNotice:"疑似锁区游戏,尝试换区执行",steamFinishNotice:"Steam任务完成,尝试将购物车地区换回CN",gettingSubid:"正在获取游戏subid",addingFreeLicense:"正在入库",missParams:"缺少参数",gettingLicenses:"正在获取Licenses...",requestingPlayTestAccess:"正在请求访问权限",tryChangeAreaNotice:"此功能无法检测游戏是否限区,因此会尝试换区后再入库,换区失败也不影响后续入库",servers:"服务器",joiningDiscordServer:"正在加入Discord服务器",leavingDiscordServer:"正在退出Discord服务器",gettingDiscordGuild:"正在获取Discord服务器Id",getDiscordAuthFailed:"获取Discord凭证失败,请检测Discord帐号是否已登录",discordImportantNotice:"重要提醒!!!",discordImportantNoticeText:"由于Discord网站后台更新,目前使用此脚本加组后可能会导致Discord帐号被强制退出,且需要两步验证才能正常登录,请谨慎使用!!!",continue:"继续",skipDiscordTask:"跳过Discord任务",continueAndDontRemindAgain:"继续且不再提醒",users:"用户",loginIns:'请先登录Instagram',insBanned:"您的Instagram账户已被封禁",verifyingInsAuth:"正在验证Instagram凭证...",gettingInsUserId:"正在获取Instagram用户Id",followingIns:"正在关注Instagram用户",unfollowingIns:"正在取关Instagram用户",reddits:"社区/用户",loginReddit:'请先登录Reddit',changingRedditVersion:"正在切换Reddit为新版页面...",joiningReddit:"正在加入Reddit社区",leavingReddit:"正在退出Reddit社区",followingRedditUser:"正在关注Reddit用户",unfollowingRedditUser:"正在取关Reddit用户",channels:"频道",followingTwitchChannel:"正在关注Twitch频道",unfollowingTwitchChannel:"正在取关Twitch频道",gettingTwitchChannelId:"正在获取Twitch频道Id",checkingTwitchIntegrity:"正在检查Twitch完整性...",twitterUser:"推特用户",retweets:"转推",gettingTwitterUserId:"正在获取推特用户Id",followingTwitterUser:"正在关注推特用户",unfollowingTwitterUser:"正在取关推特用户",retweetting:"正在转推",unretweetting:"正在撤销转推",names:"组/社区/动态",loginVk:'请先登录Vk',gettingVkId:"正在获取Vk任务Id",joiningVkGroup:"正在加入Vk组",leavingVkGroup:"正在退出Vk组",joiningVkPublic:"正在加入Vk社区",leavingVkPublic:"正在退出Vk社区",sendingVkWall:"正在转发Vk动态",deletingVkWall:"正在撤销转发Vk动态",youtubeChannel:"YouTube频道",likes:"点赞",loginYtb:'请先登录YouTube',tryUpdateYtbAuth:'请尝试更新YouTube凭证',gettingYtbToken:"正在获取YouTube Token...",followingYtbChannel:"正在订阅YouTube频道",unfollowingYtbChannel:"正在退订YouTube频道",likingYtbVideo:"正在点赞YouTube视频",unlikingYtbVideo:"正在取消点赞YouTube视频",giveKeyNoticeBefore:"每次验证间隔15s",giveKeyNoticeAfter:'如果没有key, 请在https://givekey.ru/profile查看',noPoints:"点数不够,跳过抽奖",getNeedPointsFailed:"获取所需点数失败,跳过抽奖",joiningLottery:"正在加入抽奖",doingGleamTask:"正在做Gleam任务...",gettingGleamLink:"正在获取Gleam任务链接...",gleamTaskNotice:"如果此页面长时间未关闭,请完成任一任务后自行关闭!",verifiedGleamTasks:"已尝试验证所有任务,验证失败的任务请尝试手动验证或完成!",gsNotice:'为避免得到"0000-0000-0000"key, 已自动屏蔽"Grab Key"按钮,获取key时请关闭脚本!',giveeClubVerifyNotice:"正在验证任务...",giveeClubVerifyFinished:"请等待验证完成后自行加入赠Key",doingKeyhubTask:"正在做Keyhub任务...",SweepWidgetNotice:"正在处理并验证任务,每次验证任务有1~3s间隔防止触发验证过快警告..."},en:{website:"Website",type:"Type",edit:"Edit",whiteList:"Whitelist",skipTask:"Skip undo task",whiteListOptions:"Whitelist options",changeWhiteListOption:"Whitelist option(%0)",whiteListNotFound:"Cannot find this whitelist: %0",changeWhiteListSuccess:"The whitelist is successfully modified, and the page refresh will take effect!",changeWebsiteOptions:"Website options",changeGlobalOptions:"Global options",ok:"OK",save:"Save",close:"Close",return:"Return",option:"Option",value:"Value",websiteOptions:"Current website settings",changeWebsiteOptionsSuccess:"The current website setting is changed successfully, and the page refresh will take effect!",changeGlobalOptionsSuccess:"The global setting is changed successfully, and the refresh will take effect!",needLogin:"Please log in first!",getTasksInfo:"Obtaining and processing task information...",gettingKey:"Getting Key...",verifyingTask:"Verifying task",notice:"Automatic task script notice",noKeysLeft:"There are no more keys left on this page. Do you want to close it?",giveawayEnded:"This event has ended, do you want to close it?",giveawayNotWork:"This activity is unavailable for some reasons (banned/ended/paused/not started...) (if it is a script misjudgment, please give us feedback in time), is it closed?",confirm:"Confirm",cancel:"Cancel",unKnown:"Unknown",unKnownTaskType:"Unrecognized task",doing:"Doing a task",allTasksComplete:"All tasks have been completed!",getTaskIdFailed:"Failed to obtain task Id!",initSuccess:"%0 was initialized successfully!",initFailed:"%0 initialization failed!",errorLink:"Link error: %0",needInit:"Please initialize first",verifyingAuth:"Verifying %0 token...",updatingAuth:"Update %0 token...",initing:"Initializing...",getFailed:"Failed to get %0!",checkLoginFailed:"Failed to detect login status!",checkLeftKeyFailed:"Failed to detect the remaining keys!",userId:"User Id",joiningGiveaway:"Joining giveaway",needJoinGiveaway:"Need to join the giveaway first",cannotUndo:"This website does not support canceling tasks",verifyAuth:"Verifying %0 token...",closePageNotice:"f this page does not close automatically, please close this page yourself.",errorReport:"A script error is detected, do you want to report the BUG?",visitingLink:"Visiting link: ",doTask:"DoTask",undoTask:"UndoTask",verifyTask:"Verify",getKey:"GetKey",selectAll:"SelectAll",selectNone:"SelectNone",invertSelect:"InvertSelect",doFreeTask:"FreeTask",doPointTask:"PointTask",skipTaskOption:"Skip task has been configured in the settings",other:"Other",globalOptions:"Global Options",checkLogin:"Login detection
    Need to log in to the website automatically log in, part of this website supports.",checkLeftKey:"Key remaining detection
    The end of the giveaway event prompts whether to close or not, part of this website supports.",twitterVerifyId:"Verify Twitter token by trying to follow the account.
    The default is the official Twitter account 783214.
    If you don't want to follow the official account, you can change it to your own account.",youtubeVerifyChannel:"Verify YouTube token by trying to subscribe to the channel.
    The default is the official YouTube channel UCrXUsMBcfTVqwAS7DKg9C0Q.
    If you don't want to follow the official channel, you can change it to your own channel.",autoUpdateSource:"The source to update
    github: Fast update.
    jsdelivr: Update is delayed.
    standby: Standby source.
    auto: Try to update using github, jsdelivr, standby sources in turn.",saveGlobalOptions:"SaveSettings",settingPage:"Setting Page",name:"Name",version:"Version",scriptManager:"Script Manager",script:"Script",environment:"Environment",os:"OS",browser:"Browser",getId:"Get %0 id",getTwitterUserId:"Get Twitter user id (Get id function is only available on the settings page).",getYoutubeChannelId:"Get Youtube channel id (Get id function is only available on the settings page).",showButton:"ShowButton",hideButton:"HideButton",showLog:"ShowLog",hideLog:"HideLog",defaultShowButton:"Default display button",defaultShowLog:"Display log by default",debug:"Output debug log, do not enable this option!",receivePreview:"Receive preview updates",position:"Component position",buttonSideX:"Horizontal positioning of the button area (real-time preview function is only available on the setting page).
    left: left | right: right",buttonSideY:"The button area is positioned in the vertical direction (real-time preview function is only available on the settings page).
    top: top | bottom: bottom",buttonDistance:"The distance between the button area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",showButtonSideX:"ShowButton horizontal positioning (real-time preview function is only available on the setting page).
    left: left | right: right",showButtonSideY:"ShowButton vertical positioning (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",showButtonDistance:"The distance between the ShowButton and the edge (real-time preview function is only available on the setting page).
    Format: X distance, Y distance",logSideX:"Horizontal positioning of the log area (real-time preview function is only available on the setting page).
    left: left | right: right",logSideY:"Vertical positioning of the log area (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",logDistance:"The distance between the log area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",hotKey:"Shortcut key",doTaskKey:"DoTask shortcut keys
    (real-time preview function is only available on the settings page).",undoTaskKey:"UndoTask shortcut keys
    (real-time preview function is only available on the settings page).",toggleLogKey:"ShowLog/HideLog shortcut keys
    (real-time preview function is only available on the settings page).",tasksHistory:"TasksHistory",clearHistory:"Clear history",clearHistoryFinished:"The mission history has been cleared!",deleteTask:"Delete task",lastChangeTime:"Last Change Time",clearTaskFinished:"Delete the following tasks completed!",clearTaskFailed:"Failed to delete the task, the task name was not found!",syncData:"DataSync",settingData:"Uploading data...",gettingData:"Getting data...",help:"Help",fileName:"Filename",upload2gist:"Sync to Gist",downloadFromGist:"Sync from Gist",saveAndTest:"Save configuration and test",testSuccess:"Test success!",testFailed:"Test failed!",saveAndTestNotice:"Please save the configuration and test first!",processingData:"Processing data...",updatingData:"Uploading data...",syncDataSuccess:"Synchronized data successfully!",syncDataFailed:"Failed to synchronize data, please check the error message on the console!",downloadingData:"Downloading data...",checkedNoData:"No remote data is detected, please confirm whether the configuration is correct!",savingData:"Saving data...",syncHistory:"Synchronize tasks history",checkUpdateFailed:"Check update failed",newVersionNotice:'Checked a new version V%0, click to update',language:"Language
    Currently only supports zh: Chinese, en: English",gistOptions:"Gist Settings",swalNotice:"It is detected that you are installing the V4 version script for the first time, please go to read the READ ME FIRST content before use!",echoNotice:'It is detected that you are installing the V4 version script for the first time, please click here to read the READ ME FIRST content before use!',noticeLink:"https://auto-task-doc.js.org/en/guide/#read-me-first",toGithub:"Feedback(Github)",toKeylol:"Feedback(Keylol)",copySuccess:"The error message has been copied to the clipboard. Do you want to go to the Keylol forum to give feedback?",copyFailed:"Please copy the error information below and report back to the Keylol forum!",updateText:"Updates in version %0:",Active:"Active",Ended:"Ended",Banned:"Banned",Paused:"Paused",notStart:"notStart",noRemoteData:"No data remotely",errorRemoteDataFormat:"Remote data has wrong format",updateHistory:'Click here to view the historical update record.',groups:"Group",officialGroups:"Official Group",wishlists:"Wishlist",follows:"Follow Game",forums:"Forum",workshops:"Favorite Workshop",curators:"Curator",workshopVotes:"Voteup Workshop",announcements:"Announcement",steamCommunity:"Steam Community",steamStore:"Steam Store",licenses:"Add License",playtests:"Playtest Access",needLoginSteamStore:'Please log in to the Steam Store',needLoginSteamCommunity:'Please log in to the Steam Community',joiningSteamGroup:"Joining Steam Group",leavingSteamGroup:"Leaving Steam Group",gettingSteamGroupId:"Getting Steam Group Id",joiningSteamOfficialGroup:"Joining Steam Official Group",leavingSteamOfficialGroup:"Leaving Steam Official Group",gettingSteamOfficialGroupId:"Getting Steam Official Group Id",subscribingForum:"Subscribing the Steam Forum",unsubscribingForum:"Unsubscribing the Steam Forum",gettingForumId:"Getting Steam Forum Id",followingCurator:"Following Steam Curator",unfollowingCurator:"Unfollowing Steam Curator",gettingCuratorId:"Getting Steam Curator Id",addingToWishlist:"Adding the game to the Steam wishlist",removingFromWishlist:"Removing the game from the Steam wishlist",followingGame:"Following Steam games",unfollowingGame:"Unfollowing Steam games",favoritingWorkshop:"Favouring Steam Workshop Items",unfavoritingWorkshop:"Unfavoriting Steam Workshop Items",gettingWorkshopAppId:"Getting Steam Workshop Item Id",votingUpWorkshop:"Liking Steam workshop items",gettingAnnouncementParams:"Getting Steam announcement information",likingAnnouncement:"Liking Steam announcement",changingArea:"Changing Steam area: %0...",notNeededChangeArea:"The current area does not need to be changed",noAnotherArea:"Please check whether the proxy is turned on correctly",gettingAreaInfo:"Getting Steam area information...",changeAreaNotice:"Suspected of a locked zone game, try to change the zone to execute",steamFinishNotice:"Steam task completed, try to change the shopping cart area back to CN",gettingSubid:"Getting subid",addingFreeLicense:"Adding free license",missParams:"Missing parameters",gettingLicenses:"Getting licenses...",requestingPlayTestAccess:"Requesting play test access",tryChangeAreaNotice:"This function cannot detect whether the game is limited, so it will try to change the area before entering the library. Failure to change the area will not affect the subsequent storage.",servers:"Server",joiningDiscordServer:"Joining Discord Server",leavingDiscordServer:"Leaving Discord Server",gettingDiscordGuild:"Getting Discord server Id",getDiscordAuthFailed:"Failed to get Discord token, please check whether the Discord account is logged in",discordImportantNotice:"Important Reminder! ! !",discordImportantNoticeText:"Due to the background update of the Discord website, currently using this script to join a group may cause the Discord account to be forcibly logged out, and two-step verification is required to log in normally, please use it with caution! ! !",continue:"Continue",skipDiscordTask:"Skip",continueAndDontRemindAgain:"Continue without Reminders",users:"User",loginIns:'Please log in to Instagram',insBanned:"Your Instagram account has been banned",verifyingInsAuth:"Verifying Instagram token...",gettingInsUserId:"Getting Instagram user Id",followingIns:"Following Instagram user",unfollowingIns:"Unfollowing Instagram user",reddits:"Reddit/User",loginReddit:'Please log in to Reddit',changingRedditVersion:"Switching Reddit to a new version page...",joiningReddit:"Joining the Reddit",leavingReddit:"Leaving the Reddit",followingRedditUser:"Following Reddit User",unfollowingRedditUser:"Unfollowing Reddit User",channels:"Channel",followingTwitchChannel:"Following Twitch Channel",unfollowingTwitchChannel:"Unfollowing Twitch Channel",gettingTwitchChannelId:"Getting Twitch Channel Id",checkingTwitchIntegrity:"Checking Twitch integrity...",twitterUser:"Twitter User",retweets:"Retweet",gettingTwitterUserId:"Getting Twitter User Id",followingTwitterUser:"Following Twitter User",unfollowingTwitterUser:"Unfollowing Twitter User",retweetting:"Retweetting",unretweetting:"Unretweetting",names:"Group/Public/Wall",loginVk:'Please log in to Vk',gettingVkId:"Getting Vk task Id",joiningVkGroup:"Joining Vk Group",leavingVkGroup:"Leaving Vk Group",joiningVkPublic:"Joining Vk Public",leavingVkPublic:"Leaving Vk Public",sendingVkWall:"Sending Vk Wall",deletingVkWall:"Deleting Vk Wall",youtubeChannel:"YouTube Channel",likes:"Like",loginYtb:'Please log in to YouTube',tryUpdateYtbAuth:'Please try to update YouTube token',gettingYtbToken:"Getting YouTube Token...",followingYtbChannel:"Subscribing to YouTube channel",unfollowingYtbChannel:"Unsubscribing to YouTube channel",likingYtbVideo:"Liking YouTube video",unlikingYtbVideo:"Unliking YouTube video",giveKeyNoticeBefore:"Each verification interval is 15s",giveKeyNoticeAfter:'If there is no key, please check at https://givekey.ru/profile',noPoints:"Not enough points, skip the lottery",getNeedPointsFailed:"ailed to obtain the required points, skip the lottery",joiningLottery:"Joining the lottery",doingGleamTask:"Doing Gleam Task...",gettingGleamLink:"Getting Gleam task link...",gleamTaskNotice:"If this page has not been closed for a long time, please close it yourself after completing any task!",verifiedGleamTasks:"Attempted to verify all tasks. If the verification fails, please try to verify manually or complete it!",gsNotice:'In order to avoid getting the "0000-0000-0000" key, the "Grab Key" button has been hidden, please close the script when obtaining the key!',giveeClubVerifyNotice:"Verifying task...",giveeClubVerifyFinished:"Wait for the verification to complete and join it by yourself",doingKeyhubTask:"Doing Keyhub Task...",SweepWidgetNotice:"The task is being processed and verified. There is an interval of 1~3s for each verification task to prevent the triggering of too fast verification warning..."}},d=["zh","en"].includes(N.other.language)?N.other.language:"en";const j=function(t){for(var e,s=arguments.length,i=new Array(1i[parseInt(e,10)]):t};t=class{constructor(){var t,e,s;s=void 0,(e="tasks")in(t=this)?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s}getRealParams(e,s,i,n){try{let t=[];return 0n(t)).filter(t=>t)]),!i&&0{const t=GM_openInTab("https://discord.com/channels/@me#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=null===(t=GM_getValue("discordAuth"))||void 0===t?void 0:t.auth;t?(w(this,k,{auth:t}),s.success(),e(await g(this,T,A).call(this))):(s.error("Error: Update discord auth failed!"),e(!1))}})}catch(t){return D(t,"Discord.updateAuth"),!1}}async function V(t){try{const l=F({type:"joiningDiscordServer",text:t});var e,s,{result:i,statusText:n,status:a,data:o}=await I({url:"https://discord.com/api/v9/invites/"+t,method:"POST",dataType:"json",headers:{authorization:f(this,k).auth,origin:"https://discord.com",referer:"https://discord.com/invite/"+t}});if("Success"!==i||200!==(null==o?void 0:o.status))return l.error(i+`:${n}(${a})`),!1;l.success();var r=String(null===(e=o.response)||void 0===e||null===(s=e.guild)||void 0===s?void 0:s.id);return r&&(g(this,_,W).call(this,t,r),this.tasks.servers=G([...this.tasks.servers,t])),!0}catch(t){return D(t,"Discord.joinServer"),!1}}async function O(t){try{if(this.whiteList.servers.includes(t))return F({type:"whiteList",text:"Discord.leaveServer",id:t}),!0;var e=await g(this,L,P).call(this,t);if(!e)return!1;const o=F({type:"leavingDiscordServer",text:e});var{result:s,statusText:i,status:n,data:a}=await I({url:"https://discord.com/api/v9/users/@me/guilds/"+e,method:"DELETE",headers:{authorization:f(this,k).auth}});return"Success"===s&&204===(null==a?void 0:a.status)?(o.success(),!0):(o.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Discord.leaveServer"),!1}}async function P(t){try{const u=F({type:"gettingDiscordGuild",text:t});var e=f(this,y)[t];if(e)return u.success(),e;var{result:s,statusText:i,status:n,data:a}=await I({url:"https://discord.com/api/v9/invites/"+t,responseType:"json",method:"GET"});if("Success"!==s||200!==(null==a?void 0:a.status))return u.error(s+`:${i}(${n})`),!1;var o,r,l=null===(o=a.response)||void 0===o||null===(r=o.guild)||void 0===r?void 0:r.id;return l?(u.success(),g(this,_,W).call(this,t,l),l):(u.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Discord.getGuild"),!1}}function W(t,e){try{f(this,y)[t]=e,GM_setValue("discordCache",f(this,y))}catch(t){D(t,"Discord.setCache")}}const R=class extends t{constructor(){var t;super(...arguments),e(this,_),e(this,L),e(this,C),e(this,x),e(this,S),e(this,T),p(this,"tasks",JSON.parse(v)),p(this,"whiteList",{...JSON.parse(v),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.discord}),s(this,k,{writable:!0,value:GM_getValue("discordAuth")||{}}),s(this,y,{writable:!0,value:GM_getValue("discordCache")||{}}),s(this,b,{writable:!0,value:!1})}async init(){try{if(!GM_getValue("dontRemindDiscordAgain"))if(!await a().fire({title:j("discordImportantNotice"),text:j("discordImportantNoticeText"),showCancelButton:!0,showDenyButton:!0,confirmButtonText:j("continue"),cancelButtonText:j("skipDiscordTask"),denyButtonText:j("continueAndDontRemindAgain")}).then(t=>{var{isConfirmed:e,isDenied:t}=t;return!!e||!!t&&(GM_setValue("dontRemindDiscordAgain",!0),!0)}))return w(this,b,!1),"skip";return f(this,b)?!0:f(this,k).auth?await g(this,T,A).call(this)?(F({}).success(j("initSuccess","Discord")),w(this,b,!0),!0):(GM_setValue("discordAuth",{auth:null}),await g(this,S,E).call(this)?(F({}).success(j("initSuccess","Discord")),w(this,b,!0),!0):(F({}).error(j("initFailed","Discord")),!1)):!!await g(this,S,E).call(this)&&(w(this,b,!0),!0)}catch(t){return D(t,"Discord.init"),!1}}async toggle(t){var{doTask:e=!0,serverLinks:t=[]}=t;try{if(!f(this,b))return F({text:j("needInit")}),!1;const i=[];if(e&&!N.doTask.discord.servers||!e&&!N.undoTask.discord.servers)F({type:"globalOptionsSkip",text:"discord.servers"});else{var s=this.getRealParams("servers",t,e,t=>{return null===(t=t.match(/invite\/(.+)/))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return D(t,"Discord.toggleServers"),!1}}};function M(t,e){K(t,e),e.add(t)}function Y(t,e,s){K(t,e),e.set(t,s)}function K(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function B(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function z(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,H(t,e,"set"),s),s}function q(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function J(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,H(t,e,"get"))}function H(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const X=JSON.stringify({users:[]});var Q=new WeakMap,Z=new WeakMap,tt=new WeakMap,et=new WeakSet,st=new WeakSet,it=new WeakSet,nt=new WeakSet;async function at(){var t=0{return null===(t=t.match(/https:\/\/www\.instagram\.com\/(.+)?\//))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return D(t,"Instagram.toggleUsers"),!1}}};function ct(t,e){ht(t,e),e.add(t)}function dt(t,e,s){ht(t,e),e.set(t,s)}function ht(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pt(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function gt(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,mt(t,e,"set"),s),s}function ft(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function wt(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,mt(t,e,"get"))}function mt(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const vt=JSON.stringify({reddits:[]});var kt=new WeakMap,yt=new WeakMap,bt=new WeakSet,Tt=new WeakSet;async function St(){try{const s=F({text:j("changingRedditVersion")});return GM_setValue("redditAuth",null),await new Promise(t=>{const e=GM_openInTab("https://www.reddit.com/#auth",{active:!0,insert:!0,setParent:!0});e.onclose=async()=>{s.success(),t(await ft(this,Tt,xt).call(this,!0))}})}catch(t){return D(t,"Reddit.useBeta"),!1}}async function xt(){var t,e=0{var e=null===(e=t.match(/https?:\/\/www\.reddit\.com\/r\/([^/]*)/))||void 0===e?void 0:e[1],t=null===(t=t.match(/https?:\/\/www\.reddit\.com\/user\/([^/]*)/))||void 0===t?void 0:t[1];return t?e||t:e});if(0!0)}catch(t){return D(t,"Reddit.toggle"),!1}}};function It(t,e){Ct(t,e),e.add(t)}function Gt(t,e,s){Ct(t,e),e.set(t,s)}function Ct(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Lt(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function _t(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,Vt(t,e,"set"),s),s}function At(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function Et(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,Vt(t,e,"get"))}function Vt(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const Ot=JSON.stringify({channels:[]});var Pt=new WeakMap,Wt=new WeakMap,Dt=new WeakMap,Ut=new WeakMap,Ft=new WeakSet,Nt=new WeakSet,jt=new WeakSet,Rt=new WeakSet,Mt=new WeakSet,Yt=new WeakSet;async function Kt(){try{const r=F({text:j("verifyingAuth","Twitch")});var t,e,s,{result:i,statusText:n,status:a,data:o}=await I({url:"https://gql.twitch.tv/gql",method:"POST",dataType:"json",headers:{Authorization:"OAuth "+Et(this,Pt).authToken,"Client-Id":Et(this,Pt).clientId},data:'[{"operationName":"FrontPageNew_User","variables":{"limit":1},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"64bd07a2cbaca80699d62636d966cf6395a5d14a1f0a14282067dcb28b13eb11"}}}]'});return"Success"===i?200===(null==o?void 0:o.status)&&null!==(t=o.response)&&void 0!==t&&null!==(e=t[0])&&void 0!==e&&null!==(s=e.data)&&void 0!==s&&s.currentUser?(await At(this,Nt,Bt).call(this),r.success(),!0):(r.error(`Error:${null==o?void 0:o.statusText}(${null==o?void 0:o.status})`),!1):(r.error(i+`:${n}(${a})`),!1)}catch(t){return D(t,"Twitch.verifyAuth"),!1}}async function Bt(){var t=0{const t=GM_openInTab("https://www.twitch.tv/#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=GM_getValue("twitchAuth");t?(_t(this,Pt,t),s.success(),e(await At(this,Ft,Kt).call(this))):(s.error("Error: Update twitch auth failed!"),e(!1))}})}catch(t){return D(t,"Twitch.updateAuth"),!1}}async function qt(t){var{name:e,doTask:t=!0}=t;try{if(!t&&this.whiteList.channels.includes(e))return F({type:"whiteList",text:"Twitch.unfollowChannel",id:e}),!0;var s=await At(this,Mt,Jt).call(this,e);if(!s)return!1;const p=F({type:`${t?"":"un"}followingTwitchChannel`,text:e});var i,n,a,o,r='[{"operationName":"FollowButton_FollowUser","variables":{"input":{"disableNotifications":false,"targetID":"'+s+'"}},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"800e7346bdf7e5278a3c1d3f21b2b56e2639928f86815677a7126b093b2fdd08"}}}]',l=`[{"operationName":"FollowButton_UnfollowUser","variables":{"input":{"targetID":"${s}"}},`+'"extensions":{"persistedQuery":{"version":1,"sha256Hash":"f7dae976ebf41c755ae2d758546bfd176b4eeb856656098bb40e0a672ca0d880"}}}]',{result:u,statusText:c,status:d,data:h}=await I({url:"https://gql.twitch.tv/gql",method:"POST",dataType:"json",anonymous:!0,headers:{Origin:"https://www.twitch.tv",Referer:"https://www.twitch.tv/",Authorization:"OAuth "+Et(this,Pt).authToken,"Client-Id":Et(this,Pt).clientId,"Client-Version":Et(this,Pt).clientVersion,"X-Device-Id":Et(this,Pt).deviceId,"Client-Session-Id":Et(this,Pt).clientSessionId,"Client-Integrity":Et(this,Ut)},data:t?r:l});return"Success"===u?200===(null==h?void 0:h.status)&&null!==(i=h.response)&&void 0!==i&&i[0]&&!h.response[0].errors?(p.success(),t&&(this.tasks.channels=G([...this.tasks.channels,e])),!0):(p.error("Error:"+((null==h||null===(n=h.response)||void 0===n||null===(a=n[0].errors)||void 0===a||null===(o=a[0])||void 0===o?void 0:o.message)||`${null==h?void 0:h.statusText}(${null==h?void 0:h.status})`)),!1):(p.error(u+`:${c}(${d})`),!1)}catch(t){return D(t,"Twitch.toggleChannel"),!1}}async function Jt(t){try{const d=F({type:"gettingTwitchChannelId",text:t});var e=Et(this,Wt)[t];if(e)return d.success(),e;var{result:s,statusText:i,status:n,data:a}=await I({url:"https://gql.twitch.tv/gql",method:"POST",headers:{Authorization:"OAuth "+Et(this,Pt).authToken,"Client-Id":Et(this,Pt).clientId},responseType:"json",data:`[{"operationName":"ActiveWatchParty","variables":{"channelLogin":"${t}"},`+'"extensions":{"persistedQuery":{"version":1,"sha256Hash":"4a8156c97b19e3a36e081cf6d6ddb5dbf9f9b02ae60e4d2ff26ed70aebc80a30"}}}]'});if("Success"!==s)return d.error(s+`:${i}(${n})`),!1;if(200!==(null==a?void 0:a.status))return d.error(`Error:${null==a?void 0:a.statusText}(${null==a?void 0:a.status})`),!1;var o,r,l,u,c=null===(o=a.response)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l||null===(u=l.user)||void 0===u?void 0:u.id;return c?(At(this,Yt,Ht).call(this,t,String(c)),d.success(),c):(d.error(`Error:${a.statusText}(${a.status})`),!1)}catch(t){return D(t,"Twitch.getChannelId"),!1}}function Ht(t,e){try{Et(this,Wt)[t]=e,GM_setValue("twitchCache",Et(this,Wt))}catch(t){D(t,"Twitch.setCache")}}const Xt=class extends t{constructor(){var t;super(...arguments),It(this,Yt),It(this,Mt),It(this,Rt),It(this,jt),It(this,Nt),It(this,Ft),Lt(this,"tasks",JSON.parse(Ot)),Lt(this,"whiteList",{...JSON.parse(Ot),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.twitch}),Gt(this,Pt,{writable:!0,value:GM_getValue("twitchAuth")||{}}),Gt(this,Wt,{writable:!0,value:GM_getValue("twitchCache")||{}}),Gt(this,Dt,{writable:!0,value:!1}),Gt(this,Ut,{writable:!0,value:void 0})}async init(){try{return Et(this,Dt)?!0:Et(this,Pt).authToken&&Et(this,Pt).clientId&&Et(this,Pt).clientVersion&&Et(this,Pt).deviceId&&Et(this,Pt).clientSessionId?await At(this,Ft,Kt).call(this)?(F({}).success(j("initSuccess","Twitch")),_t(this,Dt,!0),!0):(GM_setValue("twitchAuth",null),await At(this,jt,zt).call(this)?(F({}).success(j("initSuccess","Twitch")),_t(this,Dt,!0),!0):(F({}).error(j("initFailed","Twitch")),!1)):!!await At(this,jt,zt).call(this)&&(_t(this,Dt,!0),!0)}catch(t){return D(t,"Twitch.init"),!1}}async toggle(t){var{doTask:e=!0,channelLinks:t=[]}=t;try{if(!Et(this,Dt))return F({text:j("needInit")}),!1;const i=[];if(e&&!N.doTask.twitch.channels||!e&&!N.undoTask.twitch.channels)F({type:"globalOptionsSkip",text:"twitch.channels"});else{var s=this.getRealParams("channels",t,e,t=>{return null===(t=t.match(/https:\/\/(www\.)?twitch\.tv\/(.+)/))||void 0===t?void 0:t[2]});if(0!0)}catch(t){return D(t,"Twitch.toggle"),!1}}};function Qt(t,e){te(t,e),e.add(t)}function Zt(t,e,s){te(t,e),e.set(t,s)}function te(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ee(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function se(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,ae(t,e,"set"),s),s}function ie(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function ne(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,ae(t,e,"get"))}function ae(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const oe=JSON.stringify({names:[]});var re=new WeakMap,le=new WeakMap,ue=new WeakMap,ce=new WeakSet,de=new WeakSet,he=new WeakSet,pe=new WeakSet,ge=new WeakSet,fe=new WeakSet,we=new WeakSet,me=new WeakSet;async function ve(){try{const e=F({text:j("verifyAuth","Vk")}),{result:s,statusText:i,status:n,data:a}=await I({url:"https://vk.com/im",method:"GET"});var t;return"Success"===s?null!==a&&void 0!==a&&a.finalUrl.includes("vk.com/login")?(e.error("Error:"+j("loginVk"),!0),!1):200===(null===a||void 0===a?void 0:a.status)?(se(this,re,(null===(t=a.responseText.match(/TopNavBtn__profileLink" href="\/(.*?)"/))||void 0===t?void 0:t[1])||""),e.success(),!0):(e.error(`Error:${null===a||void 0===a?void 0:a.statusText}(${null===a||void 0===a?void 0:a.status})`),!1):(e.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Vk.verifyAuth"),!1}}async function ke(t,e){var s=!(2{return null===(t=t.match(/https:\/\/vk\.com\/([^/]+)/))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return D(t,"Vk.toggle"),!1}}};function Ge(t,e){Le(t,e),e.add(t)}function Ce(t,e,s){Le(t,e),e.set(t,s)}function Le(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _e(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Ae(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,Oe(t,e,"set"),s),s}function Ee(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function Ve(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,Oe(t,e,"get"))}function Oe(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const Pe=JSON.stringify({channels:[],likes:[]}),We=async function(t,e){try{const h=F({text:j("gettingYtbToken")}),{result:p,statusText:g,status:f,data:w}=await I({url:t,method:"GET"});if("Success"!==p)return h.error(p+`:${g}(${f})`),{};if(200!==(null===w||void 0===w?void 0:w.status))return h.error(`Error:${null===w||void 0===w?void 0:w.statusText}(${null===w||void 0===w?void 0:w.status})`),{};{var s,i;if(w.responseText.includes("accounts.google.com/ServiceLogin?service=youtube"))return h.error("Error:"+j("loginYtb"),!0),{needLogin:!0};var n=null===(s=w.responseText.match(/"INNERTUBE_API_KEY":"(.*?)"/))||void 0===s?void 0:s[1],a=(null===(i=w.responseText.match(/\(\{"INNERTUBE_CONTEXT":([\w\W]*?)\}\)/)||w.responseText.match(/"INNERTUBE_CONTEXT":([\w\W]*?\}),"INNERTUBE/))||void 0===i?void 0:i[1])||"{}";const{client:m,request:v}=JSON.parse(a);if(n&&m&&v){if(m.hl="en","channel"===e){var o,r=null===(o=w.responseText.match(//))||void 0===o?void 0:o[1];return r?(h.success(),{params:{apiKey:n,client:m,request:v,channelId:r}}):(h.error('Error: Get "channelId" failed!'),{})}if("likeVideo"!==e)return h.error("Error: Unknown type"),{};var l,u,c=null===(l=w.responseText.match(//))||void 0===l?void 0:l[1],d=null===(u=w.responseText.match(/"likeParams":"(.*?)"/))||void 0===u?void 0:u[1];return c?(h.success(),{params:{apiKey:n,client:m,request:v,videoId:c,likeParams:d}}):(h.error('Error: Get "videoId" failed!'),{})}return h.error('Error: Parameter "apiKey" not found!'),{}}}catch(t){return D(t,"Youtube.getInfo"),{}}};var De=new WeakMap,Ue=new WeakMap,Fe=new WeakMap,Ne=new WeakSet,je=new WeakSet,Re=new WeakSet,Me=new WeakSet,Ye=new WeakSet;class Ke extends t{constructor(){var t;super(...arguments),Ge(this,Ye),Ge(this,Me),Ge(this,Re),Ge(this,je),Ge(this,Ne),_e(this,"tasks",JSON.parse(Pe)),_e(this,"whiteList",{...JSON.parse(Pe),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.youtube}),Ce(this,De,{writable:!0,value:GM_getValue("youtubeAuth")||{}}),Ce(this,Ue,{writable:!0,value:!1}),Ce(this,Fe,{writable:!0,value:"https://www.youtube.com/channel/"+N.other.youtubeVerifyChannel})}async init(){try{return Ve(this,Ue)?!0:Ve(this,De).PAPISID?await Ee(this,Ne,Be).call(this)?(F({}).success(j("initSuccess","Youtube")),Ae(this,Ue,!0),!0):(GM_setValue("youtubeAuth",null),await Ee(this,je,ze).call(this)?(F({}).success(j("initSuccess","Youtube")),Ae(this,Ue,!0),!0):(F({}).error(j("initFailed","Youtube")),!1)):!!await Ee(this,je,ze).call(this)&&(Ae(this,Ue,!0),!0)}catch(t){return D(t,"Youtube.init"),!1}}async toggle(t){var{doTask:e=!0,channelLinks:s=[],videoLinks:t=[]}=t;try{if(!Ve(this,Ue))return F({text:j("needInit")}),!1;const a=[];if(e&&!N.doTask.youtube.channels||!e&&!N.undoTask.youtube.channels)F({type:"globalOptionsSkip",text:"youtube.channels"});else{var i=this.getRealParams("channels",s,e,t=>{var e;return/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(t)?null===(e=t.match(/url=(https:\/\/www\.youtube\.com\/.*)/))||void 0===e?void 0:e[1]:t});if(0{var e;return/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(t)?null===(e=t.match(/url=(https:\/\/www\.youtube\.com\/.*)/))||void 0===e?void 0:e[1]:t});if(0!0)}catch(t){return D(t,"Youtube.toggle"),!1}}}async function Be(){try{return await Ee(this,Me,Je).call(this,{link:Ve(this,Fe),doTask:!0,verify:!0})}catch(t){return D(t,"Youtube.verifyAuth"),!1}}async function ze(){try{const s=F({text:j("updatingAuth","Youtube")});return await new Promise(e=>{const t=GM_openInTab("https://www.youtube.com/#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=GM_getValue("youtubeAuth");t?(Ae(this,De,t),s.success(),Ee(this,Ne,Be).call(this).then(t=>{e(t)})):(s.error("Error: Update youtube auth failed!"),e(!1))}})}catch(t){return D(t,"Discord.updateAuth"),!1}}function qe(t,e){return We(t,e)}async function Je(t){var{link:e,doTask:s=!0,verify:t=!1}=t;try{var{params:i,needLogin:n}=await Ee(this,Re,qe).call(this,e,"channel"),{apiKey:a,client:o,request:r,channelId:l}=i||{};if(n)return F({html:j("loginYtb")}),!1;if(!(a&&o&&r&&l))return F({text:'"getYtbToken" failed'}),!1;if(!s&&!t&&this.whiteList.channels.includes(l))return F({type:"whiteList",text:"Youtube.unfollowChannel",id:l}),!0;const c=t?F({text:j("verifyingAuth","Youtube")}):F({type:s?"followingYtbChannel":"unfollowingYtbChannel",text:l});var u=parseInt(String((new Date).getTime()/1e3),10);const{result:d,statusText:h,status:p,data:g}=await I({url:`https://www.youtube.com/youtubei/v1/subscription/${s?"":"un"}subscribe?key=`+a,method:"POST",headers:{origin:"https://www.youtube.com",referer:"https://www.youtube.com/channel/"+l,"content-type":"application/json","x-goog-authuser":"0","x-goog-visitor-id":null==o?void 0:o.visitorData,"x-origin":"https://www.youtube.com",authorization:`SAPISIDHASH ${u}_`+sha1(`${u} ${Ve(this,De).PAPISID} https://www.youtube.com`)},data:JSON.stringify({context:{client:o,request:{sessionId:null==r?void 0:r.sessionId,internalExperimentFlags:[],consistencyTokenJars:[]},user:{}},channelIds:[l],params:s?"EgIIAhgA":"CgIIAhgA"})});return"Success"===d?200===(null===g||void 0===g?void 0:g.status)?s&&(/"subscribed": true/.test(g.responseText)||g.responseText.includes("The subscription already exists"))||!s&&/"subscribed": false/.test(g.responseText)?(c.success(),s&&!t&&(this.tasks.channels=G([...this.tasks.channels,e])),!0):t&&g.responseText.includes("You may not subscribe to yourself")?(c.success(),!0):(c.error(j("tryUpdateYtbAuth"),!0),!1):(c.error(`Error:${null===g||void 0===g?void 0:g.statusText}(${null===g||void 0===g?void 0:g.status})`),!1):(c.error(d+`:${h}(${p})`),!1)}catch(t){return D(t,"Youtube.toggleChannel"),!1}}async function He(t){var{link:e,doTask:t=!0}=t;try{var{params:s,needLogin:i}=await Ee(this,Re,qe).call(this,e,"likeVideo"),{apiKey:n,client:a,request:o,videoId:r,likeParams:l}=s||{};if(i)return F({html:""+j("loginYtb")}),!1;if(!(n&&a&&o&&r&&l))return F({text:'"getYtbToken" failed'}),!1;if(!t&&this.whiteList.likes.includes(r))return F({type:"whiteList",text:"Youtube.unlikeVideo",id:r}),!0;const c=F({type:t?"likingYtbVideo":"unlikingYtbVideo",text:r});var u=parseInt(String((new Date).getTime()/1e3),10);const d={context:{client:a,request:{sessionId:o.sessionId,internalExperimentFlags:[],consistencyTokenJars:[]},user:{}},target:{videoId:r}};if(t){if(!l)return c.error("Empty likeParams"),!1;d.params=l}const{result:h,statusText:p,status:g,data:f}=await I({url:`https://www.youtube.com/youtubei/v1/like/${t?"":"remove"}like?key=`+n,method:"POST",headers:{origin:"https://www.youtube.com",referer:"https://www.youtube.com/watch?v="+r,"content-type":"application/json","x-goog-authuser":"0","x-goog-visitor-id":a.visitorData,"x-origin":"https://www.youtube.com",authorization:`SAPISIDHASH ${u}_`+sha1(`${u} ${Ve(this,De).PAPISID} https://www.youtube.com`)},data:JSON.stringify(d)});return"Success"===h?200===(null===f||void 0===f?void 0:f.status)?t&&f.responseText.includes("Added to Liked videos")||!t&&(f.responseText.includes("Removed from Liked videos")||f.responseText.includes("Dislike removed"))?(c.success(),t&&(this.tasks.likes=G([...this.tasks.likes,e])),!0):(c.error(j("tryUpdateYtbAuth"),!0),!1):(c.error(`Error:${null===f||void 0===f?void 0:f.statusText}(${null===f||void 0===f?void 0:f.status})`),!1):(c.error(h+`:${p}(${g})`),!1)}catch(t){return D(t,"Youtube.toggleLikeVideo"),!1}}function Xe(t,e){Ze(t,e),e.add(t)}function Qe(t,e,s){Ze(t,e),e.set(t,s)}function Ze(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ts(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function es(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function ss(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,ns(t,e,"set"),s),s}function is(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,ns(t,e,"get"))}function ns(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const as=JSON.stringify({groups:[],officialGroups:[],wishlists:[],follows:[],forums:[],workshops:[],workshopVotes:[],curators:[],curatorLikes:[],announcements:[],licenses:[],playtests:[]});var os=new WeakMap,rs=new WeakMap,ls=new WeakMap,us=new WeakMap,cs=new WeakMap,ds=new WeakMap,hs=new WeakSet,ps=new WeakSet,gs=new WeakSet,fs=new WeakSet,ws=new WeakSet,ms=new WeakSet,vs=new WeakSet,ks=new WeakSet,ys=new WeakSet,bs=new WeakSet,Ts=new WeakSet,Ss=new WeakSet,xs=new WeakSet,$s=new WeakSet,Is=new WeakSet,Gs=new WeakSet,Cs=new WeakSet,Ls=new WeakSet,_s=new WeakSet,As=new WeakSet,Es=new WeakSet,Vs=new WeakSet,Os=new WeakSet,Ps=new WeakSet,Ws=new WeakSet,Ds=new WeakSet,Us=new WeakSet,Fs=new WeakSet,Ns=new WeakSet;async function js(){try{const s=F({text:j("updatingAuth",j("steamStore"))}),{result:i,statusText:n,status:a,data:o}=await I({url:"https://store.steampowered.com/",method:"GET",headers:{Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Cache-Control":"max-age=0","Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Upgrade-Insecure-Requests":"1"}});if("Success"!==i)return s.error(i+`:${n}(${a})`),!1;if(200!==(null===o||void 0===o?void 0:o.status))return s.error(`Error:${null===o||void 0===o?void 0:o.statusText}(${null===o||void 0===o?void 0:o.status})`),!1;var t;if(!o.responseText.includes("data-miniprofile="))return s.error("Error:"+j("needLoginSteamStore"),!0),!1;var e=null===(t=o.responseText.match(/g_sessionID = "(.+?)";/))||void 0===t?void 0:t[1];return e?(is(this,rs).storeSessionID=e,s.success(),!0):(s.error('Error: Get "sessionID" failed'),!1)}catch(t){return D(t,"Steam.updateStoreAuth"),!1}}async function Rs(){try{const o=F({text:j("updatingAuth",j("steamCommunity"))}),{result:r,statusText:l,status:u,data:c}=await I({url:"https://steamcommunity.com/my",method:"GET",headers:{Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Cache-Control":"max-age=0","Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Upgrade-Insecure-Requests":"1"}});if("Success"!==r)return o.error(r+`:${l}(${u})`),!1;if(200!==(null===c||void 0===c?void 0:c.status))return o.error(`Error:${null===c||void 0===c?void 0:c.statusText}(${null===c||void 0===c?void 0:c.status})`),!1;var t,e,s;if(c.responseText.includes('href="https://steamcommunity.com/login/home/'))return o.error("Error:"+j("needLoginSteamCommunity"),!0),!1;var i=null===(t=c.responseText.match(/g_steamID = "(.+?)";/))||void 0===t?void 0:t[1],n=null===(e=c.responseText.match(/g_sessionID = "(.+?)";/))||void 0===e?void 0:e[1],a=null===(s=c.responseText.match(/steamcommunity.com\/id\/(.+?)\/friends\//))||void 0===s?void 0:s[1];return(i&&(is(this,rs).steam64Id=i),a&&(is(this,rs).userName=a),n)?(is(this,rs).communitySessionID=n,o.success(),!0):(o.error('Error: Get "sessionID" failed'),!1)}catch(t){return D(t,"Steam.updateCommunityAuth"),!1}}async function Ms(){try{const i=F({text:j("gettingAreaInfo")}),{result:n,statusText:a,status:o,data:r}=await I({url:"https://store.steampowered.com/cart/",method:"GET"});if("Success"!==n)return i.error(n+`:${a}(${o})`),{};if(200!==(null===r||void 0===r?void 0:r.status))return i.error(`Error:${null===r||void 0===r?void 0:r.statusText}(${null===r||void 0===r?void 0:r.status})`),{};var t,e=null===(t=r.responseText.match(//g)].map(t=>t[1]);return e&&0{const e=setInterval(()=>{"waiting"!==is(this,ds)&&(clearInterval(e),t(!0))})}),is(this,cs)===e||!e&&"CN"!==is(this,cs))return!0;ss(this,ds,"waiting");let t=e;if(!t){const{currentArea:u,areas:c}=await es(this,gs,Ms).call(this);if(!u||!c)return ss(this,ds,"error"),!1;if("CN"!==u)return ss(this,ds,"skip"),F({text:"notNeededChangeArea"}),"skip";var s=c.filter(t=>t&&"CN"!==t);if(!s||0===s.length)return ss(this,ds,"noAnotherArea"),F({text:"noAnotherArea"}),!1;[t]=s}const l=F({text:j("changingArea",t)});var{result:i,statusText:n,status:a,data:o}=await I({url:"https://store.steampowered.com/account/setcountry",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({cc:t,sessionid:is(this,rs).storeSessionID})});if("Success"!==i)return ss(this,ds,"error"),l.error(i+`:${n}(${a})`),"CN";if(200!==(null==o?void 0:o.status)||"true"!==o.responseText)return ss(this,ds,"error"),l.error(`Error:${null==o?void 0:o.statusText}(${null==o?void 0:o.status})`),"CN";var r=(await es(this,gs,Ms).call(this))["currentArea"];return r===t?(ss(this,ds,"success"),l.success(),r):(ss(this,ds,"error"),l.error("Error: change country filed"),"CN")}catch(t){return ss(this,ds,"error"),D(t,"Steam.changeArea"),!1}}async function Ks(t){try{const e=F({type:"joiningSteamGroup",text:t}),{result:s,statusText:i,status:n,data:a}=await I({url:"https://steamcommunity.com/groups/"+t,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({action:"join",sessionID:is(this,rs).communitySessionID})});return"Success"===s?200!==(null===a||void 0===a?void 0:a.status)||a.responseText.includes("grouppage_join_area")?(e.error(`Error:${null===a||void 0===a?void 0:a.statusText}(${null===a||void 0===a?void 0:a.status})`),!1):(e.success(),this.tasks.groups=G([...this.tasks.groups,t]),!0):(e.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Steam.joinGroup"),!1}}async function Bs(t){try{if(this.whiteList.groups.includes(t))return F({type:"whiteList",text:"Steam.leaveGroup",id:t}),!0;var e=await es(this,vs,zs).call(this,t);if(!e)return!1;const s=F({type:"leavingSteamGroup",text:t}),{result:i,statusText:n,status:a,data:o}=await I({url:`https://steamcommunity.com/id/${is(this,rs).userName}/home_process`,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionID:is(this,rs).communitySessionID,action:"leaveGroup",groupId:e})});return"Success"===i?200===(null===o||void 0===o?void 0:o.status)&&o.finalUrl.includes("groups")&&0===$(o.responseText.replace(//g,"").toLowerCase()).find(`a[href='https://steamcommunity.com/groups/${t.toLowerCase()}']`).length?(s.success(),!0):(s.error(`Error:${null===o||void 0===o?void 0:o.statusText}(${null===o||void 0===o?void 0:o.status})`),!1):(s.error(i+`:${n}(${a})`),!1)}catch(t){return D(t,"Steam.leaveGroup"),!1}}async function zs(t){try{const n=F({type:"gettingSteamGroupId",text:t});var e=is(this,os).group[t];if(e)return n.success(),e;const{result:a,statusText:o,status:r,data:l}=await I({url:"https://steamcommunity.com/groups/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==a)return n.error(a+`:${o}(${r})`),!1;if(200!==(null===l||void 0===l?void 0:l.status))return n.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1;var s,i=null===(s=l.responseText.match(/OpenGroupChat\( '([0-9]+)'/))||void 0===s?void 0:s[1];return i?(es(this,Ns,fi).call(this,"group",t,i),n.success(),i):(n.error(`Error:${l.statusText}(${l.status})`),!1)}catch(t){return D(t,"Steam.getGroupID"),!1}}async function qs(t){try{const i=F({type:"joiningSteamOfficialGroup",text:t}),{result:n,statusText:a,status:o,data:r}=await I({url:`https://steamcommunity.com/games/${t}?action=join&sessionID=`+is(this,rs).communitySessionID,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==n)return i.error(n+`:${a}(${o})`),!1;if(200!==(null===r||void 0===r?void 0:r.status)||r.responseText.includes('id="publicGroupJoin"'))return i.error(`Error:${null===r||void 0===r?void 0:r.statusText}(${null===r||void 0===r?void 0:r.status})`),!1;var e;i.success(),this.tasks.officialGroups=G([...this.tasks.officialGroups,t]);var s=null===(e=r.responseText.match(/steam:\/\/friends\/joinchat\/([0-9]+)/))||void 0===e?void 0:e[1];return s&&es(this,Ns,fi).call(this,"officialGroup",t,s),!0}catch(t){return D(t,"Steam.joinOfficialGroup"),!1}}async function Js(t){try{if(this.whiteList.officialGroups.includes(t))return F({type:"whiteList",text:"Steam.leaveOfficialGroup",id:t}),!0;var e=await es(this,bs,Hs).call(this,t);if(!e)return!1;const o=F({type:"leavingSteamOfficialGroup",text:t});var{result:s,statusText:i,status:n,data:a}=await I({url:`https://steamcommunity.com/id/${is(this,rs).userName}/home_process`,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionID:is(this,rs).communitySessionID,action:"leaveGroup",groupId:e})});if("Success"!==s)return o.error(s+`:${i}(${n})`),!1;if(200!==(null==a?void 0:a.status))return o.error(`Error:${null==a?void 0:a.statusText}(${null==a?void 0:a.status})`),!1;{const{result:r,statusText:l,status:u,data:c}=await I({url:"https://steamcommunity.com/games/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});return"Success"===r?200===(null===c||void 0===c?void 0:c.status)&&c.responseText.includes('id="publicGroupJoin"')?(o.success(),!0):(o.error(`Error:${null===c||void 0===c?void 0:c.statusText}(${null===c||void 0===c?void 0:c.status})`),!1):(o.error(r+`:${l}(${u})`),!1)}}catch(t){return D(t,"Steam.leaveOfficialGroup"),!1}}async function Hs(t){try{const n=F({type:"gettingSteamOfficialGroupId",text:t});var e=is(this,os).officialGroup[t];if(e)return n.success(),e;const{result:a,statusText:o,status:r,data:l}=await I({url:"https://steamcommunity.com/games/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==a)return n.error(a+`:${o}(${r})`),!1;if(200!==(null===l||void 0===l?void 0:l.status))return n.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1;var s,i=null===(s=l.responseText.match(/steam:\/\/friends\/joinchat\/([0-9]+)/))||void 0===s?void 0:s[1];return i?(es(this,Ns,fi).call(this,"officialGroup",t,i),n.success(),i):(n.error(`Error:${l.statusText}(${l.status})`),!1)}catch(t){return D(t,"Steam.getGroupID"),!1}}async function Xs(t){try{var e;const n=F({type:"addingToWishlist",text:t});var{result:s,data:i}=await I({url:"https://store.steampowered.com/api/addtowishlist",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionid:is(this,rs).storeSessionID,appid:t}),dataType:"json"});if("Success"===s&&200===(null==i?void 0:i.status)&&!0===(null===(e=i.response)||void 0===e?void 0:e.success))return n.success(),this.tasks.wishlists=G([...this.tasks.wishlists,t]),!0;const{result:a,statusText:o,status:r,data:l}=await I({url:"https://store.steampowered.com/app/"+t,method:"GET"});return"Success"===a?200===(null===l||void 0===l?void 0:l.status)?"CN"===is(this,cs)&&l.responseText.includes('id="error_box"')?(n.warning(j("changeAreaNotice")),!!await es(this,fs,Ys).call(this)&&await es(this,Ts,Xs).call(this,t)):(!l.responseText.includes('class="queue_actions_ctn"')||!l.responseText.includes('class="already_in_library"'))&&(l.responseText.includes('class="queue_actions_ctn"')&&l.responseText.includes('id="add_to_wishlist_area_success" style="display: none;')||!l.responseText.includes('class="queue_actions_ctn"'))?(n.error(`Error:${l.statusText}(${l.status})`),!1):(n.success(),this.tasks.wishlists=G([...this.tasks.wishlists,t]),!0):(n.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1):(n.error(a+`:${o}(${r})`),!1)}catch(t){return D(t,"Steam.addToWishlist"),!1}}async function Qs(t){try{var e;if(this.whiteList.wishlists.includes(t))return F({type:"whiteList",text:"Steam.removeFromWishlist",id:t}),!0;const a=F({type:"removingFromWishlist",text:t});var{result:s,data:i}=await I({url:"https://store.steampowered.com/api/removefromwishlist",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionid:is(this,rs).storeSessionID,appid:t}),dataType:"json"});if("Success"===s&&200===(null==i?void 0:i.status)&&!0===(null===(e=i.response)||void 0===e?void 0:e.success))return a.success(),!0;const{result:o,statusText:r,status:l,data:u}=await I({url:"https://store.steampowered.com/app/"+t,method:"GET"});if("Success"!==o)return a.error(o+`:${r}(${l})`),!1;if(200!==(null===u||void 0===u?void 0:u.status))return a.error(`Error:${null===u||void 0===u?void 0:u.statusText}(${null===u||void 0===u?void 0:u.status})`),!1;if("CN"===is(this,cs)&&u.responseText.includes('id="error_box"')){a.warning(j("changeAreaNotice"));var n=await es(this,fs,Ys).call(this);return n&&"CN"!==n&&"skip"!==n?await es(this,Ss,Qs).call(this,t):!1}return u.responseText.includes('class="queue_actions_ctn"')&&(u.responseText.includes("ds_owned_flag ds_flag")||u.responseText.includes("add_to_wishlist_area"))?(a.success(),!0):(a.error(`Error:${u.statusText}(${u.status})`),!1)}catch(t){return D(t,"Steam.removeFromWishlist"),!1}}async function Zs(t,e){try{if(!e&&this.whiteList.follows.includes(t))return F({type:"whiteList",text:"Steam.unfollowGame",id:t}),!0;const a=F({type:`${e?"":"un"}followingGame`,text:t}),o={sessionid:is(this,rs).storeSessionID,appid:t};e||(o.unfollow="1");var{result:s,data:i}=await I({url:"https://store.steampowered.com/explore/followgame/",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param(o)});if("Success"===s&&200===(null==i?void 0:i.status)&&"true"===i.responseText)return a.success(),!0;var n=await es(this,$s,ti).call(this,t);return"CN"===is(this,cs)&&"areaLocked"===n?(a.warning(j("changeAreaNotice")),!!await es(this,fs,Ys).call(this)&&await es(this,Ss,Qs).call(this,t)):e===n?(a.success(),e&&(this.tasks.follows=G([...this.tasks.follows,t])),!0):(a.error(`Error:${null==i?void 0:i.statusText}(${null==i?void 0:i.status})`),!1)}catch(t){return D(t,"Steam.toggleFollowGame"),!1}}async function ti(t){try{const{result:e,data:s}=await I({url:"https://store.steampowered.com/app/"+t,method:"GET"});return"Success"===e?200===(null===s||void 0===s?void 0:s.status)&&("CN"===is(this,cs)&&s.responseText.includes('id="error_box"')?"areaLocked":"none"!==$(s.responseText.replace(//g,"")).find(".queue_control_button.queue_btn_follow>.btnv6_blue_hoverfade.btn_medium.queue_btn_active").css("display")):!1}catch(t){return D(t,"Steam.isFollowedGame"),!1}}async function ei(t){var e=!(1/))||void 0===s?void 0:s[1];return i?(es(this,Ns,fi).call(this,"workshop",t,i),n.success(),i):(n.error("Error: getWorkshopAppId failed"),!1)}catch(t){return D(t,"Steam.getWorkshopAppId"),!1}}async function ai(t){try{const o=F({type:"votingUpWorkshop",text:t});var e,{result:s,statusText:i,status:n,data:a}=await I({url:"https://steamcommunity.com/sharedfiles/voteup",method:"POST",responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({id:t,sessionid:is(this,rs).communitySessionID})});return"Success"===s?(200===(null==a?void 0:a.status)&&1===(null===(e=a.response)||void 0===e?void 0:e.success)?o.success():o.error(`Error:${null==a?void 0:a.statusText}(${null==a?void 0:a.status})`),!0):(o.error(s+`:${i}(${n})`),!0)}catch(t){return D(t,"Steam.voteupWorkshop"),!0}}async function oi(t){var e=!(1{return null===(t=t.match(/groups\/(.+)\/?/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/games\/(.+)\/?/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/\?id=([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/\?id=([\d]+)/))||void 0===t?void 0:t[1]});if(e&&0{return null===(t=t.match(/curator\/([\d]+)/))||void 0===t?void 0:t[1]}),b=this.getRealParams("curatorLikes",c,e,t=>{return null===(t=t.match(/https?:\/\/store\.steampowered\.com\/(.*?)\/([^/?]+)/))||void 0===t?void 0:t.slice(1,3).join("/")});if(0{var e;return t.includes("store.steampowered.com")?null===(e=t.match(/store\.steampowered\.com\/news\/app\/([\d]+)\/view\/([\d]+)/))||void 0===e?void 0:e.slice(1,3).join("/"):null===(t=t.match(/steamcommunity\.com\/games\/([\d]+)\/announcements\/detail\/([\d]+)/))||void 0===t?void 0:t.slice(1,3).join("/")});if(e&&0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(e&&N.doTask.steam.playtests&&0("CN"!==is(this,cs)&&(F({}).warning(j("steamFinishNotice")),await es(this,fs,Ys).call(this,"CN")),!0))}catch(t){return D(t,"Steam.toggle"),!1}}};function mi(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function vi(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function ki(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}const yi={steam:{groupLinks:[],wishlistLinks:[],curatorLinks:[],curatorLikeLinks:[],followLinks:[],forumLinks:[],announcementLinks:[],workshopVoteLinks:[],playtestLinks:[]},discord:{serverLinks:[]},instagram:{userLinks:[]},vk:{nameLinks:[]},twitch:{channelLinks:[]},reddit:{redditLinks:[]},youtube:{channelLinks:[],likeLinks:[]}};var bi=new WeakSet,Ti=new WeakSet,Si=new WeakSet,xi=new WeakSet,$i=new WeakSet,Ii=new WeakSet,Gi=new WeakSet,Ci=new WeakSet;async function Li(){try{const e=F({text:j("getTasksInfo")}),s=[];var t=$("#actions tr");$("div.bind-discord").is(":visible")&&$("div.bind-discord a")[0].click(),$("div.bind-twitch").is(":visible")&&$("div.bind-twitch a")[0].click();for(const r of t)s.push(new Promise(e=>{const t=$(r).find('td:not(".hidden")');var s=t.eq(1).find('a:not([data-trigger="link"])'),i=t.eq(2).find('a:not([data-trigger="link"])');const n=0t?(a.includes("steam")&&/join/gi.test(o)?this.undoneTasks.steam.groupLinks.push(t):/like.*announcement/gi.test(o)?this.undoneTasks.steam.announcementLinks.push(t):/(follow|subscribe).*curator/gim.test(o)&&/^https?:\/\/store\.steampowered\.com\/curator\//.test(t)?this.undoneTasks.steam.curatorLinks.push(t):a.includes("steam")&&/follow|subscribe/gim.test(o)?this.undoneTasks.steam.curatorLikeLinks.push(t):/subscribe.*steam.*forum/gim.test(o)?this.undoneTasks.steam.forumLinks.push(t):a.includes("thumbs-up")&&/^https?:\/\/steamcommunity\.com\/sharedfiles\/filedetails\/\?id=[\d]+/.test(t)?this.undoneTasks.steam.workshopVoteLinks.push(t):a.includes("plus")&&/request.*playtest/gim.test(o)?this.undoneTasks.steam.playtestLinks.push(t):a.includes("discord")||/join.*discord/gim.test(o)?this.undoneTasks.discord.serverLinks.push(t):a.includes("instagram")||/follow.*instagram/gim.test(o)?this.undoneTasks.instagram.userLinks.push(t):a.includes("twitch")||/follow.*twitch.*channel/gim.test(o)?this.undoneTasks.twitch.channelLinks.push(t):a.includes("reddit")||/subscribe.*subreddit/gim.test(o)||/follow.*reddit/gim.test(o)?this.undoneTasks.reddit.redditLinks.push(t):/watch.*art/gim.test(o)?this.undoneTasks.steam.workshopVoteLinks.push(t):/subscribe.*youtube.*channel/gim.test(o)?this.undoneTasks.youtube.channelLinks.push(t):/(watch|like).*youtube.*video/gim.test(o)||(a.includes("youtube")||a.includes("thumbs-up"))&&/(watch|like).*video/gim.test(o)?this.undoneTasks.youtube.likeLinks.push(t):a.includes("vk")||/join.*vk.*group/gim.test(o)?this.undoneTasks.vk.nameLinks.push(t):/(on twitter)|(Follow.*on.*Facebook)/gim.test(o)||(/wishlist.*game|add.*wishlist/gim.test(o)&&this.undoneTasks.steam.wishlistLinks.push(t),/follow.*button/gim.test(o)&&this.undoneTasks.steam.followLinks.push(t)),void e(!0)):e(!1)).catch(t=>(D(t,"Giveawaysu.classifyTask->getRedirectLink"),!1))}));return await Promise.all(s),e.success(),this.undoneTasks=ki(this,Gi,Pi).call(this,this.undoneTasks),!0}catch(t){return D(t,"Giveawaysu.classifyTask"),!1}}function _i(){try{return N.other.checkLogin?(0<$("a.steam-login").length&&window.open("/steam/redirect","_self"),!0):!0}catch(t){return D(t,"Giveawaysu.checkLogin"),!1}}async function Ai(){try{return N.other.checkLeftKey?(0<$(".giveaway-ended").length&&await a().fire({icon:"warning",title:j("notice"),text:j("noKeysLeft"),confirmButtonText:j("confirm"),cancelButtonText:j("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0):!0}catch(t){return D(t,"Giveawaysu.checkLeftKey"),!1}}function Ei(){var t=null===(t=window.location.href.match(/\/view\/([\d]+)/))||void 0===t?void 0:t[1];return t?(this.giveawayId=t,!0):(F({text:j("getFailed","GiveawayId")}),!1)}async function Vi(e,t){try{return{name:e,result:await t}}catch(t){return D(t,"GiveawaySu.bind"),{name:e,result:!1}}}async function Oi(){try{const s=[],i=this.undoneTasks;var t,e;return i.discord&&0[...t,...e]).length&&!this.socialInitialized.discord&&(this.social.discord=new R,s.push(ki(this,$i,Vi).call(this,"discord",this.social.discord.init()))),i.instagram&&0[...t,...e]).length&&!this.socialInitialized.instagram&&(this.social.instagram=new ut,s.push(ki(this,$i,Vi).call(this,"instagram",this.social.instagram.init()))),i.reddit&&0[...t,...e]).length&&!this.socialInitialized.reddit&&(this.social.reddit=new $t,s.push(ki(this,$i,Vi).call(this,"reddit",this.social.reddit.init()))),i.twitch&&0[...t,...e]).length&&!this.socialInitialized.twitch&&(this.social.twitch=new Xt,s.push(ki(this,$i,Vi).call(this,"twitch",this.social.twitch.init()))),i.vk&&0[...t,...e]).length&&!this.socialInitialized.vk&&(this.social.vk=new Ie,s.push(ki(this,$i,Vi).call(this,"vk",this.social.vk.init()))),i.youtube&&0[...t,...e]).length&&!this.socialInitialized.youtube&&(this.social.youtube=new Ke,s.push(ki(this,$i,Vi).call(this,"youtube",this.social.youtube.init()))),!i.steam||0<(t=Object.values(i.steam).reduce((t,e)=>[...t,...e]).length)&&(this.social.steam||(this.social.steam=new wi),0{var e,s;return["groupLinks","forumLinks","workshopLinks","workshopVoteLinks"].includes(t)&&(null===(e=i.steam)||void 0===e||null===(s=e[t])||void 0===s?void 0:s.length)||0}).reduce((t,e)=>t+e,0))&&!this.socialInitialized.steamStore&&s.push(ki(this,$i,Vi).call(this,"steamStore",this.social.steam.init("store"))),0{let e=!0;for(const s of t)s.result?this.socialInitialized[s.name]=s.result:e=!1;return e})}catch(t){return D(t,"GiveawaySu.initSocial"),!1}}function Pi(t){const e={};for(var[s,i]of Object.entries(t)){e[s]={};for(var[n,a]of Object.entries(i))e[s][n]=G(a)}return e}async function Wi(){try{if(!this.initialized&&!this.init())return!1;if(!await ki(this,bi,Li).call(this))return!1;if(!await ki(this,Ii,Oi).call(this))return!1;const e=[];var t=this.undoneTasks;return"skip"!==this.socialInitialized.discord&&this.social.discord&&e.push(this.social.discord.toggle({doTask:!0,...t.discord})),this.social.instagram&&e.push(this.social.instagram.toggle({doTask:!0,...t.instagram})),this.social.reddit&&e.push(this.social.reddit.toggle({doTask:!0,...t.reddit})),this.social.twitch&&e.push(this.social.twitch.toggle({doTask:!0,...t.twitch})),this.social.vk&&e.push(this.social.vk.toggle({doTask:!0,...t.vk})),this.social.youtube&&e.push(this.social.youtube.toggle({doTask:!0,...t.youtube})),this.social.steam&&e.push(this.social.steam.toggle({doTask:!0,...t.steam})),await Promise.all(e),F({}).success(j("allTasksComplete")),!0}catch(t){return D(t,"GiveawaySu.toggleTask"),!1}}const Di=class{constructor(){mi(this,Ci),mi(this,Gi),mi(this,Ii),mi(this,$i),mi(this,xi),mi(this,Si),mi(this,Ti),mi(this,bi),vi(this,"undoneTasks",yi),vi(this,"giveawayId",void 0),vi(this,"socialInitialized",{discord:!1,instagram:!1,reddit:!1,twitch:!1,vk:!1,youtube:!1,steamStore:!1,steamCommunity:!1,twitter:!0}),vi(this,"initialized",!1),vi(this,"social",{})}static test(){return/^https?:\/\/giveaway\.su\/giveaway\/view\/[\d]+/.test(window.location.href)}async after(){try{ki(this,Ti,_i).call(this)||F({}).warning(j("checkLoginFailed")),await ki(this,Si,Ai).call(this)||F({}).warning(j("checkLeftKeyFailed"))}catch(t){D(t,"Giveawaysu.after")}}init(){try{const t=F({text:j("initing")});return 0<$("a.steam-login").length?(window.open("/steam/redirect","_self"),t.warning(j("needLogin")),!1):!!ki(this,xi,Ei).call(this)&&(this.initialized=!0,t.success(),!0)}catch(t){return D(t,"Giveawaysu.init"),!1}}async doTask(){try{return $("#getKey").on("click",()=>{$("#auto-task-info-div").remove(),$(window.STYLE).remove(),$("#getKey").off()}),await ki(this,Ci,Wi).call(this)}catch(t){return D(t,"GiveawaySu.doTask"),!1}}async verifyTask(){try{var t;for(const e of $("#actions tr")){const s=$(e);if("adjs"!==s.attr("data-action-id")){const i=s.find("i.glyphicon-refresh"),n=i.parent();"A"!==n.prop("tagName")?i.hasClass("spin")||i.hasClass("glyphicon-ok")||(n[0].click(),await U(1e3)):(t=n.attr("href"),n.attr("href","javascript:void(0);").attr("target","_self")[0].click(),n.attr("href",t))}}}catch(t){D(t,"GiveawaySu.verifyTask")}}};var Ui,Fi,t=ji(821);if(window.STYLE=GM_addStyle(t.Z+`.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 3px}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .5s;animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .8s;animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-question-mark .8s;animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-webkit-keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@-webkit-keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}`),"discord.com"===window.location.hostname){const Ni=window.localStorage;"#auth"===window.location.hash?(window.localStorage.removeItem=()=>!0,(Ui=null===Ni||void 0===Ni||null===(Ui=Ni.getItem("token"))||void 0===Ui?void 0:Ui.replace(/^"|"$/g,""))&&0{var t,e,s;if("www.twitch.tv"===window.location.hostname&&"#auth"===window.location.hash&&(t=o.get("auth-token"),!!o.get("login")?(GM_setValue("twitchAuth",{authToken:t,clientId:null===(t=commonOptions)||void 0===t||null===(e=t.headers)||void 0===e?void 0:e["Client-ID"]}),window.close(),a().fire("",j("closePageNotice"))):a().fire("",j("needLogin"))),"twitter.com"===window.location.hostname&&"#auth"===window.location.hash&&(s=o.get("ct0"),!!o.get("twid")&&s?(GM_setValue("twitterAuth",{ct0:s}),window.close(),a().fire("",j("closePageNotice"))):a().fire("",j("needLogin"))),"www.youtube.com"===window.location.hostname&&"#auth"===window.location.hash&&((s=o.get("__Secure-3PAPISID"))?(GM_setValue("youtubeAuth",{PAPISID:s}),window.close(),a().fire("",j("closePageNotice"))):a().fire("",j("needLogin"))),"www.reddit.com"===window.location.hostname&&("#auth"===window.location.hash||"#auth"===GM_getValue("redditAuth"))){const i=$("#redesign-beta-optin-btn");if(0

    `),await n.after(),$("#auto-do-task").on("click",()=>{n.doTask()}),$("#auto-verify-task").on("click",()=>{n.verifyTask()}),console.log("%c%s","color:#1bbe1a","Auto Task GS特供脚本初始化完成!")}})}()}(); \ No newline at end of file + ${null===s||void 0===s?void 0:s.replace("u_","")}]...`);break;case"followingYtbChannel":case"unfollowingYtbChannel":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"likingYtbVideo":case"unlikingYtbVideo":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"gettingVkId":case"joiningVkGroup":case"leavingVkGroup":case"joiningVkPublic":case"leavingVkPublic":case"sendingVkWall":case"deletingVkWall":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"visitingLink":t=$(`
  • ${j("visitingLink")}[${s}]...
  • `);break;case"verifyingInsAuth":case"text":t=$(`
  • ${j(s)}
  • `);break;case"html":t=$(s||i);break;case"whiteList":t=$(`
  • ${j("skipTask")}[${s}(${n})](${j("whiteList")})
  • `);break;case"globalOptionsSkip":t=$(`
  • ${j("skipTaskOption")}${s}
  • `);break;default:t=$(`
  • ${j("unKnown")}:${e}(${s})...
  • `)}else t=s?$(`
  • ${j(s)}
  • `):i?$(i):$("
  • ");return t.addClass("card-text"),$("#auto-task-info").append(t),null!==(o=t[0])&&void 0!==o&&o.scrollIntoView(),{font:t.find("font"),success(){var t,e,s=0{try{return[...new Set(t)]}catch(t){return D(t,"unique"),[]}},l=async e=>{try{if(!e)return null;const s=GM_getValue("redirectLinks")||{};return s[e]&&s[e],await I({url:e,method:"GET"}).then(t=>{t=t.data;return null!=t&&t.finalUrl?(s[e]=t.finalUrl,GM_setValue("redirectLinks",s),t.finalUrl):null})}catch(t){return D(t,"getRedirectLink"),null}};const r={doTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0,workshopVotes:!0,announcements:!0,licenses:!0,playtests:!0}},undoTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0}},position:{buttonSideX:"right",buttonSideY:"top",buttonDistance:"15,30",showButtonSideX:"right",showButtonSideY:"top",showButtonDistance:"15,30",logSideX:"right",logSideY:"bottom",logDistance:"10,10"},hotKey:{doTaskKey:"alt + d",undoTaskKey:"alt + u",toggleLogKey:"alt + l"},other:{twitterVerifyId:"783214",youtubeVerifyChannel:"UCrXUsMBcfTVqwAS7DKg9C0Q",autoUpdateSource:"jsdelivr",language:"zh",checkLogin:!0,checkLeftKey:!0,defaultShowButton:!0,defaultShowLog:!0,debug:!1,receivePreview:!0}};t=GM_getValue("globalOptions")||{};const u=(t,e)=>{try{const n={};for(var[s,i]of Object.entries(t))"[object Object]"===Object.prototype.toString.call(i)&&"[object Object]"===Object.prototype.toString.call(e[s])?n[s]=u(i,e[s]):n[s]=e[s]??i;return n}catch(t){return D(t,"assignObject"),r}},N=u(r,t);const c={zh:{website:"网站",type:"类型",edit:"编辑",whiteList:"白名单",skipTask:"跳过撤销任务",whiteListOptions:"白名单设置",changeWhiteListOption:"设置白名单(%0)",whiteListNotFound:"找不到此项白名单: %0",changeWhiteListSuccess:"白名单修改成功,刷新生效!",changeWebsiteOptions:"网站设置",changeGlobalOptions:"全局设置",ok:"是",save:"保存",close:"关闭",return:"返回",option:"选项",value:"值",websiteOptions:"当前网站设置",changeWebsiteOptionsSuccess:"更改当前网站设置成功,刷新生效!",changeGlobalOptionsSuccess:"更改全局设置成功,刷新生效!",needLogin:"请先登录!",getTasksInfo:"正在获取并处理任务信息...",gettingKey:"正在获取Key...",verifyingTask:"正在验证任务",notice:"自动任务脚本提醒",noKeysLeft:"此页面已经没有剩余key了,是否关闭?",giveawayEnded:"此活动已结束,是否关闭?",giveawayNotWork:"此活动因某些原因(已结束/暂停/未开始...)不可用(如果是脚本误判请及时反馈),是否关闭?",confirm:"确定",cancel:"取消",unKnown:"未知",unKnownTaskType:"未识别的任务",doing:"正在做任务",allTasksComplete:"所有任务已完成!",getTaskIdFailed:"获取任务Id失败!",initSuccess:"%0 初始化成功!",initFailed:"%0 初始化失败!",errorLink:"链接错误: %0",needInit:"请先初始化",verifyingAuth:"正在验证%0凭证...",updatingAuth:"正在更新%0凭证...",initing:"正在初始化...",getFailed:"获取%0失败!",checkLoginFailed:"检测登录状态失败!",checkLeftKeyFailed:"检测剩余Key失败!",userId:"用户Id",joiningGiveaway:"正在加入赠Key",needJoinGiveaway:"需要先加入赠Key",cannotUndo:"此网站不支持取消任务",verifyAuth:"正在验证 %0 凭证...",closePageNotice:"如果此页面没有自动关闭,请自行关闭本页面。",errorReport:"检测到脚本报错,是否前往反馈BUG?",visitingLink:"正在访问链接: ",doTask:"做任务",undoTask:"撤销任务",verifyTask:"验证任务",getKey:"获取Key",selectAll:"全选",selectNone:"全不选",invertSelect:"反选",doFreeTask:"加入免费赠品",doPointTask:"加入点数赠品",skipTaskOption:"设置中已配置跳过任务",other:"其他",globalOptions:"全局设置",checkLogin:"登录检测
    需要登录的网站自动登录,部分本网站支持",checkLeftKey:"剩余Key检测
    赠Key活动结束提示是否关闭,部分本网站支持",twitterVerifyId:"通过尝试关注该账号验证Twitter凭证
    默认为Twitter官方帐号 783214
    不想关注官方账号可以改为自己的帐号",youtubeVerifyChannel:"通过尝试订阅该频道验证YouTube凭证
    默认为YouTube官方频道 UCrXUsMBcfTVqwAS7DKg9C0Q
    不想关注官方频道可以改为自己的频道",autoUpdateSource:"更新源
    github: 需代理,实时更新
    jsdelivr: 可不用代理,更新有延迟
    standby: 备用
    auto: 依次使用github, jsdelivr, standby源进行尝试更新",saveGlobalOptions:"保存全局设置",settingPage:"设置页面",name:"名称",version:"版本",scriptManager:"脚本管理器",script:"脚本",environment:"环境",os:"系统",browser:"浏览器",getId:"获取 %0 id",getTwitterUserId:"获取Twitter用户id(获取id功能仅在设置页面可用)",getYoutubeChannelId:"获取Youtube频道id(获取id功能仅在设置页面可用)",showButton:"显示按钮",hideButton:"隐藏按钮",showLog:"显示日志",hideLog:"隐藏日志",defaultShowButton:"默认显示按钮",defaultShowLog:"默认显示日志",debug:"输出调试日志,不要开启此选项!",receivePreview:"接收预览版更新",position:"组件位置",buttonSideX:"按钮区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",buttonSideY:"按钮区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",buttonDistance:"按钮区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",showButtonSideX:"显示按钮水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",showButtonSideY:"显示按钮垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",showButtonDistance:"显示按钮距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",logSideX:"日志区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",logSideY:"日志区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",logDistance:"日志区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",hotKey:"快捷键",doTaskKey:"做任务快捷键
    (实时预览功能仅在设置页面可用)",undoTaskKey:"撤销任务快捷键
    (实时预览功能仅在设置页面可用)",toggleLogKey:"显示/隐藏日志快捷键
    (实时预览功能仅在设置页面可用)",tasksHistory:"任务历史",clearHistory:"清空历史",clearHistoryFinished:"已清空任务历史!",deleteTask:"删除任务",lastChangeTime:"最后一次修改时间",clearTaskFinished:"删除以下任务完成!",clearTaskFailed:"删除任务失败,没有找到任务名!",syncData:"数据同步",settingData:"正在上传数据...",gettingData:"正在获取数据...",help:"帮助",fileName:"文件名",upload2gist:"同步到Gist",downloadFromGist:"从Gist同步",saveAndTest:"保存配置并测试",testSuccess:"测试成功!",testFailed:"测试失败!",saveAndTestNotice:"请先保存配置并测试!",processingData:"正在处理数据...",updatingData:"正在上传数据...",syncDataSuccess:"同步数据成功!",syncDataFailed:"同步数据失败,请在控制台查看错误信息!",downloadingData:"正在下载数据...",checkedNoData:"没有检测到远程数据,请确认配置是否正确!",savingData:"正在保存数据...",syncHistory:"同步任务历史",checkUpdateFailed:"检测更新失败",newVersionNotice:'检测到新版本V%0, 点此更新',language:"语言
    目前仅支持zh: 中文, en: 英文",gistOptions:"Gist 设置",swalNotice:"检测到您第一次安装V4版本脚本,请前往阅读用前必读内容!",echoNotice:'检测到您第一次安装V4版本脚本,请点此前往阅读用前必读内容!',noticeLink:"https://auto-task-doc.js.org/guide/#用前必读",toGithub:"前往Github反馈",toKeylol:"前往其乐论坛反馈",copySuccess:"错误信息已复制到剪切板,是否前往其乐论坛反馈?",copyFailed:"请复制下方错误信息后前往Keylol论坛反馈!",updateText:"%0 版本更新内容:",Active:"进行中",Ended:"已结束",Banned:"已封禁",Paused:"已暂停",notStart:"未开始",noRemoteData:"检测到远程无数据",errorRemoteDataFormat:"远程数据格式错误",updateHistory:'历史更新记录点此查看',groups:"组",officialGroups:"官方组",wishlists:"愿望单",follows:"游戏关注",forums:"论坛",workshops:"创意工坊收藏",curators:"鉴赏家",workshopVotes:"创意工坊点赞",announcements:"社区通知",steamCommunity:"Steam社区",steamStore:"Steam商店",licenses:"入库免费游戏",playtests:"请求访问权限",needLoginSteamStore:'请先登录Steam商店',needLoginSteamCommunity:'请先登录Steam社区',joiningSteamGroup:"正在加入Steam组",leavingSteamGroup:"正在退出Steam组",gettingSteamGroupId:"正在获取Steam组Id",joiningSteamOfficialGroup:"正在加入Steam官方组",leavingSteamOfficialGroup:"正在退出Steam官方组",gettingSteamOfficialGroupId:"正在获取Steam官方组Id",subscribingForum:"正在订阅Steam论坛",unsubscribingForum:"正在取消订阅Steam论坛",gettingForumId:"正在获取Steam论坛Id",followingCurator:"正在关注Steam鉴赏家",unfollowingCurator:"正在取关Steam鉴赏家",gettingCuratorId:"正在获取Steam鉴赏家Id",addingToWishlist:"正在添加游戏到Steam愿望单",removingFromWishlist:"正在从Steam愿望单移除游戏",followingGame:"正在关注Steam游戏",unfollowingGame:"正在取关Steam游戏",favoritingWorkshop:"正在收藏Steam创意工坊物品",unfavoritingWorkshop:"正在取消收藏Steam创意工坊物品",gettingWorkshopAppId:"正在获取Steam创意工坊物品Id",votingUpWorkshop:"正在点赞Steam创意工坊物品",gettingAnnouncementParams:"正在获取Steam通知信息",likingAnnouncement:"正在点赞Steam通知",changingArea:"正在更换Steam地区: %0...",notNeededChangeArea:"当前地区不需要更换",noAnotherArea:"请检测是否开启正确开启代理",gettingAreaInfo:"正在获取Steam地区信息...",changeAreaNotice:"疑似锁区游戏,尝试换区执行",steamFinishNotice:"Steam任务完成,尝试将购物车地区换回CN",gettingSubid:"正在获取游戏subid",addingFreeLicense:"正在入库",missParams:"缺少参数",gettingLicenses:"正在获取Licenses...",requestingPlayTestAccess:"正在请求访问权限",tryChangeAreaNotice:"此功能无法检测游戏是否限区,因此会尝试换区后再入库,换区失败也不影响后续入库",servers:"服务器",joiningDiscordServer:"正在加入Discord服务器",leavingDiscordServer:"正在退出Discord服务器",gettingDiscordGuild:"正在获取Discord服务器Id",getDiscordAuthFailed:"获取Discord凭证失败,请检测Discord帐号是否已登录",discordImportantNotice:"重要提醒!!!",discordImportantNoticeText:"由于Discord网站后台更新,目前使用此脚本加组后可能会导致Discord帐号被强制退出,且需要两步验证才能正常登录,请谨慎使用!!!",continue:"继续",skipDiscordTask:"跳过Discord任务",continueAndDontRemindAgain:"继续且不再提醒",users:"用户",loginIns:'请先登录Instagram',insBanned:"您的Instagram账户已被封禁",verifyingInsAuth:"正在验证Instagram凭证...",gettingInsUserId:"正在获取Instagram用户Id",followingIns:"正在关注Instagram用户",unfollowingIns:"正在取关Instagram用户",reddits:"社区/用户",loginReddit:'请先登录Reddit',changingRedditVersion:"正在切换Reddit为新版页面...",joiningReddit:"正在加入Reddit社区",leavingReddit:"正在退出Reddit社区",followingRedditUser:"正在关注Reddit用户",unfollowingRedditUser:"正在取关Reddit用户",channels:"频道",followingTwitchChannel:"正在关注Twitch频道",unfollowingTwitchChannel:"正在取关Twitch频道",gettingTwitchChannelId:"正在获取Twitch频道Id",checkingTwitchIntegrity:"正在检查Twitch完整性...",twitterUser:"推特用户",retweets:"转推",gettingTwitterUserId:"正在获取推特用户Id",followingTwitterUser:"正在关注推特用户",unfollowingTwitterUser:"正在取关推特用户",retweetting:"正在转推",unretweetting:"正在撤销转推",names:"组/社区/动态",loginVk:'请先登录Vk',gettingVkId:"正在获取Vk任务Id",joiningVkGroup:"正在加入Vk组",leavingVkGroup:"正在退出Vk组",joiningVkPublic:"正在加入Vk社区",leavingVkPublic:"正在退出Vk社区",sendingVkWall:"正在转发Vk动态",deletingVkWall:"正在撤销转发Vk动态",youtubeChannel:"YouTube频道",likes:"点赞",loginYtb:'请先登录YouTube',tryUpdateYtbAuth:'请尝试更新YouTube凭证',gettingYtbToken:"正在获取YouTube Token...",followingYtbChannel:"正在订阅YouTube频道",unfollowingYtbChannel:"正在退订YouTube频道",likingYtbVideo:"正在点赞YouTube视频",unlikingYtbVideo:"正在取消点赞YouTube视频",giveKeyNoticeBefore:"每次验证间隔15s",giveKeyNoticeAfter:'如果没有key, 请在https://givekey.ru/profile查看',noPoints:"点数不够,跳过抽奖",getNeedPointsFailed:"获取所需点数失败,跳过抽奖",joiningLottery:"正在加入抽奖",doingGleamTask:"正在做Gleam任务...",gettingGleamLink:"正在获取Gleam任务链接...",gleamTaskNotice:"如果此页面长时间未关闭,请完成任一任务后自行关闭!",verifiedGleamTasks:"已尝试验证所有任务,验证失败的任务请尝试手动验证或完成!",gsNotice:'为避免得到"0000-0000-0000"key, 已自动屏蔽"Grab Key"按钮,获取key时请关闭脚本!',giveeClubVerifyNotice:"正在验证任务...",giveeClubVerifyFinished:"请等待验证完成后自行加入赠Key",doingKeyhubTask:"正在做Keyhub任务...",SweepWidgetNotice:"正在处理并验证任务,每次验证任务有1~3s间隔防止触发验证过快警告..."},en:{website:"Website",type:"Type",edit:"Edit",whiteList:"Whitelist",skipTask:"Skip undo task",whiteListOptions:"Whitelist options",changeWhiteListOption:"Whitelist option(%0)",whiteListNotFound:"Cannot find this whitelist: %0",changeWhiteListSuccess:"The whitelist is successfully modified, and the page refresh will take effect!",changeWebsiteOptions:"Website options",changeGlobalOptions:"Global options",ok:"OK",save:"Save",close:"Close",return:"Return",option:"Option",value:"Value",websiteOptions:"Current website settings",changeWebsiteOptionsSuccess:"The current website setting is changed successfully, and the page refresh will take effect!",changeGlobalOptionsSuccess:"The global setting is changed successfully, and the refresh will take effect!",needLogin:"Please log in first!",getTasksInfo:"Obtaining and processing task information...",gettingKey:"Getting Key...",verifyingTask:"Verifying task",notice:"Automatic task script notice",noKeysLeft:"There are no more keys left on this page. Do you want to close it?",giveawayEnded:"This event has ended, do you want to close it?",giveawayNotWork:"This activity is unavailable for some reasons (banned/ended/paused/not started...) (if it is a script misjudgment, please give us feedback in time), is it closed?",confirm:"Confirm",cancel:"Cancel",unKnown:"Unknown",unKnownTaskType:"Unrecognized task",doing:"Doing a task",allTasksComplete:"All tasks have been completed!",getTaskIdFailed:"Failed to obtain task Id!",initSuccess:"%0 was initialized successfully!",initFailed:"%0 initialization failed!",errorLink:"Link error: %0",needInit:"Please initialize first",verifyingAuth:"Verifying %0 token...",updatingAuth:"Update %0 token...",initing:"Initializing...",getFailed:"Failed to get %0!",checkLoginFailed:"Failed to detect login status!",checkLeftKeyFailed:"Failed to detect the remaining keys!",userId:"User Id",joiningGiveaway:"Joining giveaway",needJoinGiveaway:"Need to join the giveaway first",cannotUndo:"This website does not support canceling tasks",verifyAuth:"Verifying %0 token...",closePageNotice:"f this page does not close automatically, please close this page yourself.",errorReport:"A script error is detected, do you want to report the BUG?",visitingLink:"Visiting link: ",doTask:"DoTask",undoTask:"UndoTask",verifyTask:"Verify",getKey:"GetKey",selectAll:"SelectAll",selectNone:"SelectNone",invertSelect:"InvertSelect",doFreeTask:"FreeTask",doPointTask:"PointTask",skipTaskOption:"Skip task has been configured in the settings",other:"Other",globalOptions:"Global Options",checkLogin:"Login detection
    Need to log in to the website automatically log in, part of this website supports.",checkLeftKey:"Key remaining detection
    The end of the giveaway event prompts whether to close or not, part of this website supports.",twitterVerifyId:"Verify Twitter token by trying to follow the account.
    The default is the official Twitter account 783214.
    If you don't want to follow the official account, you can change it to your own account.",youtubeVerifyChannel:"Verify YouTube token by trying to subscribe to the channel.
    The default is the official YouTube channel UCrXUsMBcfTVqwAS7DKg9C0Q.
    If you don't want to follow the official channel, you can change it to your own channel.",autoUpdateSource:"The source to update
    github: Fast update.
    jsdelivr: Update is delayed.
    standby: Standby source.
    auto: Try to update using github, jsdelivr, standby sources in turn.",saveGlobalOptions:"SaveSettings",settingPage:"Setting Page",name:"Name",version:"Version",scriptManager:"Script Manager",script:"Script",environment:"Environment",os:"OS",browser:"Browser",getId:"Get %0 id",getTwitterUserId:"Get Twitter user id (Get id function is only available on the settings page).",getYoutubeChannelId:"Get Youtube channel id (Get id function is only available on the settings page).",showButton:"ShowButton",hideButton:"HideButton",showLog:"ShowLog",hideLog:"HideLog",defaultShowButton:"Default display button",defaultShowLog:"Display log by default",debug:"Output debug log, do not enable this option!",receivePreview:"Receive preview updates",position:"Component position",buttonSideX:"Horizontal positioning of the button area (real-time preview function is only available on the setting page).
    left: left | right: right",buttonSideY:"The button area is positioned in the vertical direction (real-time preview function is only available on the settings page).
    top: top | bottom: bottom",buttonDistance:"The distance between the button area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",showButtonSideX:"ShowButton horizontal positioning (real-time preview function is only available on the setting page).
    left: left | right: right",showButtonSideY:"ShowButton vertical positioning (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",showButtonDistance:"The distance between the ShowButton and the edge (real-time preview function is only available on the setting page).
    Format: X distance, Y distance",logSideX:"Horizontal positioning of the log area (real-time preview function is only available on the setting page).
    left: left | right: right",logSideY:"Vertical positioning of the log area (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",logDistance:"The distance between the log area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",hotKey:"Shortcut key",doTaskKey:"DoTask shortcut keys
    (real-time preview function is only available on the settings page).",undoTaskKey:"UndoTask shortcut keys
    (real-time preview function is only available on the settings page).",toggleLogKey:"ShowLog/HideLog shortcut keys
    (real-time preview function is only available on the settings page).",tasksHistory:"TasksHistory",clearHistory:"Clear history",clearHistoryFinished:"The mission history has been cleared!",deleteTask:"Delete task",lastChangeTime:"Last Change Time",clearTaskFinished:"Delete the following tasks completed!",clearTaskFailed:"Failed to delete the task, the task name was not found!",syncData:"DataSync",settingData:"Uploading data...",gettingData:"Getting data...",help:"Help",fileName:"Filename",upload2gist:"Sync to Gist",downloadFromGist:"Sync from Gist",saveAndTest:"Save configuration and test",testSuccess:"Test success!",testFailed:"Test failed!",saveAndTestNotice:"Please save the configuration and test first!",processingData:"Processing data...",updatingData:"Uploading data...",syncDataSuccess:"Synchronized data successfully!",syncDataFailed:"Failed to synchronize data, please check the error message on the console!",downloadingData:"Downloading data...",checkedNoData:"No remote data is detected, please confirm whether the configuration is correct!",savingData:"Saving data...",syncHistory:"Synchronize tasks history",checkUpdateFailed:"Check update failed",newVersionNotice:'Checked a new version V%0, click to update',language:"Language
    Currently only supports zh: Chinese, en: English",gistOptions:"Gist Settings",swalNotice:"It is detected that you are installing the V4 version script for the first time, please go to read the READ ME FIRST content before use!",echoNotice:'It is detected that you are installing the V4 version script for the first time, please click here to read the READ ME FIRST content before use!',noticeLink:"https://auto-task-doc.js.org/en/guide/#read-me-first",toGithub:"Feedback(Github)",toKeylol:"Feedback(Keylol)",copySuccess:"The error message has been copied to the clipboard. Do you want to go to the Keylol forum to give feedback?",copyFailed:"Please copy the error information below and report back to the Keylol forum!",updateText:"Updates in version %0:",Active:"Active",Ended:"Ended",Banned:"Banned",Paused:"Paused",notStart:"notStart",noRemoteData:"No data remotely",errorRemoteDataFormat:"Remote data has wrong format",updateHistory:'Click here to view the historical update record.',groups:"Group",officialGroups:"Official Group",wishlists:"Wishlist",follows:"Follow Game",forums:"Forum",workshops:"Favorite Workshop",curators:"Curator",workshopVotes:"Voteup Workshop",announcements:"Announcement",steamCommunity:"Steam Community",steamStore:"Steam Store",licenses:"Add License",playtests:"Playtest Access",needLoginSteamStore:'Please log in to the Steam Store',needLoginSteamCommunity:'Please log in to the Steam Community',joiningSteamGroup:"Joining Steam Group",leavingSteamGroup:"Leaving Steam Group",gettingSteamGroupId:"Getting Steam Group Id",joiningSteamOfficialGroup:"Joining Steam Official Group",leavingSteamOfficialGroup:"Leaving Steam Official Group",gettingSteamOfficialGroupId:"Getting Steam Official Group Id",subscribingForum:"Subscribing the Steam Forum",unsubscribingForum:"Unsubscribing the Steam Forum",gettingForumId:"Getting Steam Forum Id",followingCurator:"Following Steam Curator",unfollowingCurator:"Unfollowing Steam Curator",gettingCuratorId:"Getting Steam Curator Id",addingToWishlist:"Adding the game to the Steam wishlist",removingFromWishlist:"Removing the game from the Steam wishlist",followingGame:"Following Steam games",unfollowingGame:"Unfollowing Steam games",favoritingWorkshop:"Favouring Steam Workshop Items",unfavoritingWorkshop:"Unfavoriting Steam Workshop Items",gettingWorkshopAppId:"Getting Steam Workshop Item Id",votingUpWorkshop:"Liking Steam workshop items",gettingAnnouncementParams:"Getting Steam announcement information",likingAnnouncement:"Liking Steam announcement",changingArea:"Changing Steam area: %0...",notNeededChangeArea:"The current area does not need to be changed",noAnotherArea:"Please check whether the proxy is turned on correctly",gettingAreaInfo:"Getting Steam area information...",changeAreaNotice:"Suspected of a locked zone game, try to change the zone to execute",steamFinishNotice:"Steam task completed, try to change the shopping cart area back to CN",gettingSubid:"Getting subid",addingFreeLicense:"Adding free license",missParams:"Missing parameters",gettingLicenses:"Getting licenses...",requestingPlayTestAccess:"Requesting play test access",tryChangeAreaNotice:"This function cannot detect whether the game is limited, so it will try to change the area before entering the library. Failure to change the area will not affect the subsequent storage.",servers:"Server",joiningDiscordServer:"Joining Discord Server",leavingDiscordServer:"Leaving Discord Server",gettingDiscordGuild:"Getting Discord server Id",getDiscordAuthFailed:"Failed to get Discord token, please check whether the Discord account is logged in",discordImportantNotice:"Important Reminder! ! !",discordImportantNoticeText:"Due to the background update of the Discord website, currently using this script to join a group may cause the Discord account to be forcibly logged out, and two-step verification is required to log in normally, please use it with caution! ! !",continue:"Continue",skipDiscordTask:"Skip",continueAndDontRemindAgain:"Continue without Reminders",users:"User",loginIns:'Please log in to Instagram',insBanned:"Your Instagram account has been banned",verifyingInsAuth:"Verifying Instagram token...",gettingInsUserId:"Getting Instagram user Id",followingIns:"Following Instagram user",unfollowingIns:"Unfollowing Instagram user",reddits:"Reddit/User",loginReddit:'Please log in to Reddit',changingRedditVersion:"Switching Reddit to a new version page...",joiningReddit:"Joining the Reddit",leavingReddit:"Leaving the Reddit",followingRedditUser:"Following Reddit User",unfollowingRedditUser:"Unfollowing Reddit User",channels:"Channel",followingTwitchChannel:"Following Twitch Channel",unfollowingTwitchChannel:"Unfollowing Twitch Channel",gettingTwitchChannelId:"Getting Twitch Channel Id",checkingTwitchIntegrity:"Checking Twitch integrity...",twitterUser:"Twitter User",retweets:"Retweet",gettingTwitterUserId:"Getting Twitter User Id",followingTwitterUser:"Following Twitter User",unfollowingTwitterUser:"Unfollowing Twitter User",retweetting:"Retweetting",unretweetting:"Unretweetting",names:"Group/Public/Wall",loginVk:'Please log in to Vk',gettingVkId:"Getting Vk task Id",joiningVkGroup:"Joining Vk Group",leavingVkGroup:"Leaving Vk Group",joiningVkPublic:"Joining Vk Public",leavingVkPublic:"Leaving Vk Public",sendingVkWall:"Sending Vk Wall",deletingVkWall:"Deleting Vk Wall",youtubeChannel:"YouTube Channel",likes:"Like",loginYtb:'Please log in to YouTube',tryUpdateYtbAuth:'Please try to update YouTube token',gettingYtbToken:"Getting YouTube Token...",followingYtbChannel:"Subscribing to YouTube channel",unfollowingYtbChannel:"Unsubscribing to YouTube channel",likingYtbVideo:"Liking YouTube video",unlikingYtbVideo:"Unliking YouTube video",giveKeyNoticeBefore:"Each verification interval is 15s",giveKeyNoticeAfter:'If there is no key, please check at https://givekey.ru/profile',noPoints:"Not enough points, skip the lottery",getNeedPointsFailed:"ailed to obtain the required points, skip the lottery",joiningLottery:"Joining the lottery",doingGleamTask:"Doing Gleam Task...",gettingGleamLink:"Getting Gleam task link...",gleamTaskNotice:"If this page has not been closed for a long time, please close it yourself after completing any task!",verifiedGleamTasks:"Attempted to verify all tasks. If the verification fails, please try to verify manually or complete it!",gsNotice:'In order to avoid getting the "0000-0000-0000" key, the "Grab Key" button has been hidden, please close the script when obtaining the key!',giveeClubVerifyNotice:"Verifying task...",giveeClubVerifyFinished:"Wait for the verification to complete and join it by yourself",doingKeyhubTask:"Doing Keyhub Task...",SweepWidgetNotice:"The task is being processed and verified. There is an interval of 1~3s for each verification task to prevent the triggering of too fast verification warning..."}},d=["zh","en"].includes(N.other.language)?N.other.language:"en";const j=function(t){for(var e,s=arguments.length,i=new Array(1i[parseInt(e,10)]):t};t=class{constructor(){var t,e,s;s=void 0,(e="tasks")in(t=this)?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s}getRealParams(e,s,i,n){try{let t=[];return 0n(t)).filter(t=>t)]),!i&&0{const t=GM_openInTab("https://discord.com/channels/@me#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=null===(t=GM_getValue("discordAuth"))||void 0===t?void 0:t.auth;t?(w(this,k,{auth:t}),s.success(),e(await g(this,T,A).call(this))):(s.error("Error: Update discord auth failed!"),e(!1))}})}catch(t){return D(t,"Discord.updateAuth"),!1}}async function V(t){try{const l=F({type:"joiningDiscordServer",text:t});var e,s,{result:i,statusText:n,status:a,data:o}=await I({url:"https://discord.com/api/v9/invites/"+t,method:"POST",dataType:"json",headers:{authorization:f(this,k).auth,origin:"https://discord.com",referer:"https://discord.com/invite/"+t}});if("Success"!==i||200!==(null==o?void 0:o.status))return l.error(i+`:${n}(${a})`),!1;l.success();var r=String(null===(e=o.response)||void 0===e||null===(s=e.guild)||void 0===s?void 0:s.id);return r&&(g(this,_,W).call(this,t,r),this.tasks.servers=G([...this.tasks.servers,t])),!0}catch(t){return D(t,"Discord.joinServer"),!1}}async function O(t){try{if(this.whiteList.servers.includes(t))return F({type:"whiteList",text:"Discord.leaveServer",id:t}),!0;var e=await g(this,L,P).call(this,t);if(!e)return!1;const o=F({type:"leavingDiscordServer",text:e});var{result:s,statusText:i,status:n,data:a}=await I({url:"https://discord.com/api/v9/users/@me/guilds/"+e,method:"DELETE",headers:{authorization:f(this,k).auth}});return"Success"===s&&204===(null==a?void 0:a.status)?(o.success(),!0):(o.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Discord.leaveServer"),!1}}async function P(t){try{const u=F({type:"gettingDiscordGuild",text:t});var e=f(this,y)[t];if(e)return u.success(),e;var{result:s,statusText:i,status:n,data:a}=await I({url:"https://discord.com/api/v9/invites/"+t,responseType:"json",method:"GET"});if("Success"!==s||200!==(null==a?void 0:a.status))return u.error(s+`:${i}(${n})`),!1;var o,r,l=null===(o=a.response)||void 0===o||null===(r=o.guild)||void 0===r?void 0:r.id;return l?(u.success(),g(this,_,W).call(this,t,l),l):(u.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Discord.getGuild"),!1}}function W(t,e){try{f(this,y)[t]=e,GM_setValue("discordCache",f(this,y))}catch(t){D(t,"Discord.setCache")}}const R=class extends t{constructor(){var t;super(...arguments),e(this,_),e(this,L),e(this,C),e(this,x),e(this,S),e(this,T),p(this,"tasks",JSON.parse(v)),p(this,"whiteList",{...JSON.parse(v),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.discord}),s(this,k,{writable:!0,value:GM_getValue("discordAuth")||{}}),s(this,y,{writable:!0,value:GM_getValue("discordCache")||{}}),s(this,b,{writable:!0,value:!1})}async init(){try{if(!GM_getValue("dontRemindDiscordAgain"))if(!await a().fire({title:j("discordImportantNotice"),text:j("discordImportantNoticeText"),showCancelButton:!0,showDenyButton:!0,confirmButtonText:j("continue"),cancelButtonText:j("skipDiscordTask"),denyButtonText:j("continueAndDontRemindAgain")}).then(t=>{var{isConfirmed:e,isDenied:t}=t;return!!e||!!t&&(GM_setValue("dontRemindDiscordAgain",!0),!0)}))return w(this,b,!1),"skip";return f(this,b)?!0:f(this,k).auth?await g(this,T,A).call(this)?(F({}).success(j("initSuccess","Discord")),w(this,b,!0),!0):(GM_setValue("discordAuth",{auth:null}),await g(this,S,E).call(this)?(F({}).success(j("initSuccess","Discord")),w(this,b,!0),!0):(F({}).error(j("initFailed","Discord")),!1)):!!await g(this,S,E).call(this)&&(w(this,b,!0),!0)}catch(t){return D(t,"Discord.init"),!1}}async toggle(t){var{doTask:e=!0,serverLinks:t=[]}=t;try{if(!f(this,b))return F({text:j("needInit")}),!1;const i=[];if(e&&!N.doTask.discord.servers||!e&&!N.undoTask.discord.servers)F({type:"globalOptionsSkip",text:"discord.servers"});else{var s=this.getRealParams("servers",t,e,t=>{return null===(t=t.match(/invite\/(.+)/))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return D(t,"Discord.toggleServers"),!1}}};function M(t,e){K(t,e),e.add(t)}function Y(t,e,s){K(t,e),e.set(t,s)}function K(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function B(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function z(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,H(t,e,"set"),s),s}function q(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function J(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,H(t,e,"get"))}function H(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const X=JSON.stringify({users:[]});var Q=new WeakMap,Z=new WeakMap,tt=new WeakMap,et=new WeakSet,st=new WeakSet,it=new WeakSet,nt=new WeakSet;async function at(){var t=0{return null===(t=t.match(/https:\/\/www\.instagram\.com\/(.+)?\//))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return D(t,"Instagram.toggleUsers"),!1}}};function ct(t,e){ht(t,e),e.add(t)}function dt(t,e,s){ht(t,e),e.set(t,s)}function ht(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pt(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function gt(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,mt(t,e,"set"),s),s}function ft(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function wt(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,mt(t,e,"get"))}function mt(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const vt=JSON.stringify({reddits:[]});var kt=new WeakMap,yt=new WeakMap,bt=new WeakSet,Tt=new WeakSet;async function St(){try{const s=F({text:j("changingRedditVersion")});return GM_setValue("redditAuth",null),await new Promise(t=>{const e=GM_openInTab("https://www.reddit.com/#auth",{active:!0,insert:!0,setParent:!0});e.onclose=async()=>{s.success(),t(await ft(this,Tt,xt).call(this,!0))}})}catch(t){return D(t,"Reddit.useBeta"),!1}}async function xt(){var t,e=0{var e=null===(e=t.match(/https?:\/\/www\.reddit\.com\/r\/([^/]*)/))||void 0===e?void 0:e[1],t=null===(t=t.match(/https?:\/\/www\.reddit\.com\/user\/([^/]*)/))||void 0===t?void 0:t[1];return t?e||t:e});if(0!0)}catch(t){return D(t,"Reddit.toggle"),!1}}};function It(t,e){Ct(t,e),e.add(t)}function Gt(t,e,s){Ct(t,e),e.set(t,s)}function Ct(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Lt(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function _t(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,Vt(t,e,"set"),s),s}function At(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function Et(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,Vt(t,e,"get"))}function Vt(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const Ot=JSON.stringify({channels:[]});var Pt=new WeakMap,Wt=new WeakMap,Dt=new WeakMap,Ut=new WeakMap,Ft=new WeakSet,Nt=new WeakSet,jt=new WeakSet,Rt=new WeakSet,Mt=new WeakSet,Yt=new WeakSet;async function Kt(){try{const r=F({text:j("verifyingAuth","Twitch")});var t,e,s,{result:i,statusText:n,status:a,data:o}=await I({url:"https://gql.twitch.tv/gql",method:"POST",dataType:"json",headers:{Authorization:"OAuth "+Et(this,Pt).authToken,"Client-Id":Et(this,Pt).clientId},data:'[{"operationName":"FrontPageNew_User","variables":{"limit":1},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"64bd07a2cbaca80699d62636d966cf6395a5d14a1f0a14282067dcb28b13eb11"}}}]'});return"Success"===i?200===(null==o?void 0:o.status)&&null!==(t=o.response)&&void 0!==t&&null!==(e=t[0])&&void 0!==e&&null!==(s=e.data)&&void 0!==s&&s.currentUser?(await At(this,Nt,Bt).call(this),r.success(),!0):(r.error(`Error:${null==o?void 0:o.statusText}(${null==o?void 0:o.status})`),!1):(r.error(i+`:${n}(${a})`),!1)}catch(t){return D(t,"Twitch.verifyAuth"),!1}}async function Bt(){var t=0{const t=GM_openInTab("https://www.twitch.tv/#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=GM_getValue("twitchAuth");t?(_t(this,Pt,t),s.success(),e(await At(this,Ft,Kt).call(this))):(s.error("Error: Update twitch auth failed!"),e(!1))}})}catch(t){return D(t,"Twitch.updateAuth"),!1}}async function qt(t){var{name:e,doTask:t=!0}=t;try{if(!t&&this.whiteList.channels.includes(e))return F({type:"whiteList",text:"Twitch.unfollowChannel",id:e}),!0;var s=await At(this,Mt,Jt).call(this,e);if(!s)return!1;const p=F({type:`${t?"":"un"}followingTwitchChannel`,text:e});var i,n,a,o,r='[{"operationName":"FollowButton_FollowUser","variables":{"input":{"disableNotifications":false,"targetID":"'+s+'"}},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"800e7346bdf7e5278a3c1d3f21b2b56e2639928f86815677a7126b093b2fdd08"}}}]',l=`[{"operationName":"FollowButton_UnfollowUser","variables":{"input":{"targetID":"${s}"}},`+'"extensions":{"persistedQuery":{"version":1,"sha256Hash":"f7dae976ebf41c755ae2d758546bfd176b4eeb856656098bb40e0a672ca0d880"}}}]',{result:u,statusText:c,status:d,data:h}=await I({url:"https://gql.twitch.tv/gql",method:"POST",dataType:"json",anonymous:!0,headers:{Origin:"https://www.twitch.tv",Referer:"https://www.twitch.tv/",Authorization:"OAuth "+Et(this,Pt).authToken,"Client-Id":Et(this,Pt).clientId,"Client-Version":Et(this,Pt).clientVersion,"X-Device-Id":Et(this,Pt).deviceId,"Client-Session-Id":Et(this,Pt).clientSessionId,"Client-Integrity":Et(this,Ut)},data:t?r:l});return"Success"===u?200===(null==h?void 0:h.status)&&null!==(i=h.response)&&void 0!==i&&i[0]&&!h.response[0].errors?(p.success(),t&&(this.tasks.channels=G([...this.tasks.channels,e])),!0):(p.error("Error:"+((null==h||null===(n=h.response)||void 0===n||null===(a=n[0].errors)||void 0===a||null===(o=a[0])||void 0===o?void 0:o.message)||`${null==h?void 0:h.statusText}(${null==h?void 0:h.status})`)),!1):(p.error(u+`:${c}(${d})`),!1)}catch(t){return D(t,"Twitch.toggleChannel"),!1}}async function Jt(t){try{const d=F({type:"gettingTwitchChannelId",text:t});var e=Et(this,Wt)[t];if(e)return d.success(),e;var{result:s,statusText:i,status:n,data:a}=await I({url:"https://gql.twitch.tv/gql",method:"POST",headers:{Authorization:"OAuth "+Et(this,Pt).authToken,"Client-Id":Et(this,Pt).clientId},responseType:"json",data:`[{"operationName":"ActiveWatchParty","variables":{"channelLogin":"${t}"},`+'"extensions":{"persistedQuery":{"version":1,"sha256Hash":"4a8156c97b19e3a36e081cf6d6ddb5dbf9f9b02ae60e4d2ff26ed70aebc80a30"}}}]'});if("Success"!==s)return d.error(s+`:${i}(${n})`),!1;if(200!==(null==a?void 0:a.status))return d.error(`Error:${null==a?void 0:a.statusText}(${null==a?void 0:a.status})`),!1;var o,r,l,u,c=null===(o=a.response)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l||null===(u=l.user)||void 0===u?void 0:u.id;return c?(At(this,Yt,Ht).call(this,t,String(c)),d.success(),c):(d.error(`Error:${a.statusText}(${a.status})`),!1)}catch(t){return D(t,"Twitch.getChannelId"),!1}}function Ht(t,e){try{Et(this,Wt)[t]=e,GM_setValue("twitchCache",Et(this,Wt))}catch(t){D(t,"Twitch.setCache")}}const Xt=class extends t{constructor(){var t;super(...arguments),It(this,Yt),It(this,Mt),It(this,Rt),It(this,jt),It(this,Nt),It(this,Ft),Lt(this,"tasks",JSON.parse(Ot)),Lt(this,"whiteList",{...JSON.parse(Ot),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.twitch}),Gt(this,Pt,{writable:!0,value:GM_getValue("twitchAuth")||{}}),Gt(this,Wt,{writable:!0,value:GM_getValue("twitchCache")||{}}),Gt(this,Dt,{writable:!0,value:!1}),Gt(this,Ut,{writable:!0,value:void 0})}async init(){try{return Et(this,Dt)?!0:Et(this,Pt).authToken&&Et(this,Pt).clientId&&Et(this,Pt).clientVersion&&Et(this,Pt).deviceId&&Et(this,Pt).clientSessionId?await At(this,Ft,Kt).call(this)?(F({}).success(j("initSuccess","Twitch")),_t(this,Dt,!0),!0):(GM_setValue("twitchAuth",null),await At(this,jt,zt).call(this)?(F({}).success(j("initSuccess","Twitch")),_t(this,Dt,!0),!0):(F({}).error(j("initFailed","Twitch")),!1)):!!await At(this,jt,zt).call(this)&&(_t(this,Dt,!0),!0)}catch(t){return D(t,"Twitch.init"),!1}}async toggle(t){var{doTask:e=!0,channelLinks:t=[]}=t;try{if(!Et(this,Dt))return F({text:j("needInit")}),!1;const i=[];if(e&&!N.doTask.twitch.channels||!e&&!N.undoTask.twitch.channels)F({type:"globalOptionsSkip",text:"twitch.channels"});else{var s=this.getRealParams("channels",t,e,t=>{return null===(t=t.match(/https:\/\/(www\.)?twitch\.tv\/(.+)/))||void 0===t?void 0:t[2]});if(0!0)}catch(t){return D(t,"Twitch.toggle"),!1}}};function Qt(t,e){te(t,e),e.add(t)}function Zt(t,e,s){te(t,e),e.set(t,s)}function te(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ee(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function se(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,ae(t,e,"set"),s),s}function ie(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function ne(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,ae(t,e,"get"))}function ae(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const oe=JSON.stringify({names:[]});var re=new WeakMap,le=new WeakMap,ue=new WeakMap,ce=new WeakSet,de=new WeakSet,he=new WeakSet,pe=new WeakSet,ge=new WeakSet,fe=new WeakSet,we=new WeakSet,me=new WeakSet;async function ve(){try{const e=F({text:j("verifyAuth","Vk")}),{result:s,statusText:i,status:n,data:a}=await I({url:"https://vk.com/im",method:"GET"});var t;return"Success"===s?null!==a&&void 0!==a&&a.finalUrl.includes("vk.com/login")?(e.error("Error:"+j("loginVk"),!0),!1):200===(null===a||void 0===a?void 0:a.status)?(se(this,re,(null===(t=a.responseText.match(/TopNavBtn__profileLink" href="\/(.*?)"/))||void 0===t?void 0:t[1])||""),e.success(),!0):(e.error(`Error:${null===a||void 0===a?void 0:a.statusText}(${null===a||void 0===a?void 0:a.status})`),!1):(e.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Vk.verifyAuth"),!1}}async function ke(t,e){var s=!(2{return null===(t=t.match(/https:\/\/vk\.com\/([^/]+)/))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return D(t,"Vk.toggle"),!1}}};function Ge(t,e){Le(t,e),e.add(t)}function Ce(t,e,s){Le(t,e),e.set(t,s)}function Le(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _e(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Ae(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,Oe(t,e,"set"),s),s}function Ee(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function Ve(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,Oe(t,e,"get"))}function Oe(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const Pe=JSON.stringify({channels:[],likes:[]}),We=async function(t,e){try{const h=F({text:j("gettingYtbToken")}),{result:p,statusText:g,status:f,data:w}=await I({url:t,method:"GET"});if("Success"!==p)return h.error(p+`:${g}(${f})`),{};if(200!==(null===w||void 0===w?void 0:w.status))return h.error(`Error:${null===w||void 0===w?void 0:w.statusText}(${null===w||void 0===w?void 0:w.status})`),{};{var s,i;if(w.responseText.includes("accounts.google.com/ServiceLogin?service=youtube"))return h.error("Error:"+j("loginYtb"),!0),{needLogin:!0};var n=null===(s=w.responseText.match(/"INNERTUBE_API_KEY":"(.*?)"/))||void 0===s?void 0:s[1],a=(null===(i=w.responseText.match(/\(\{"INNERTUBE_CONTEXT":([\w\W]*?)\}\)/)||w.responseText.match(/"INNERTUBE_CONTEXT":([\w\W]*?\}),"INNERTUBE/))||void 0===i?void 0:i[1])||"{}";const{client:m,request:v}=JSON.parse(a);if(n&&m&&v){if(m.hl="en","channel"===e){var o,r=null===(o=w.responseText.match(//))||void 0===o?void 0:o[1];return r?(h.success(),{params:{apiKey:n,client:m,request:v,channelId:r}}):(h.error('Error: Get "channelId" failed!'),{})}if("likeVideo"!==e)return h.error("Error: Unknown type"),{};var l,u,c=null===(l=w.responseText.match(//))||void 0===l?void 0:l[1],d=null===(u=w.responseText.match(/"likeParams":"(.*?)"/))||void 0===u?void 0:u[1];return c?(h.success(),{params:{apiKey:n,client:m,request:v,videoId:c,likeParams:d}}):(h.error('Error: Get "videoId" failed!'),{})}return h.error('Error: Parameter "apiKey" not found!'),{}}}catch(t){return D(t,"Youtube.getInfo"),{}}};var De=new WeakMap,Ue=new WeakMap,Fe=new WeakMap,Ne=new WeakSet,je=new WeakSet,Re=new WeakSet,Me=new WeakSet,Ye=new WeakSet;class Ke extends t{constructor(){var t;super(...arguments),Ge(this,Ye),Ge(this,Me),Ge(this,Re),Ge(this,je),Ge(this,Ne),_e(this,"tasks",JSON.parse(Pe)),_e(this,"whiteList",{...JSON.parse(Pe),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.youtube}),Ce(this,De,{writable:!0,value:GM_getValue("youtubeAuth")||{}}),Ce(this,Ue,{writable:!0,value:!1}),Ce(this,Fe,{writable:!0,value:"https://www.youtube.com/channel/"+N.other.youtubeVerifyChannel})}async init(){try{return Ve(this,Ue)?!0:Ve(this,De).PAPISID?await Ee(this,Ne,Be).call(this)?(F({}).success(j("initSuccess","Youtube")),Ae(this,Ue,!0),!0):(GM_setValue("youtubeAuth",null),await Ee(this,je,ze).call(this)?(F({}).success(j("initSuccess","Youtube")),Ae(this,Ue,!0),!0):(F({}).error(j("initFailed","Youtube")),!1)):!!await Ee(this,je,ze).call(this)&&(Ae(this,Ue,!0),!0)}catch(t){return D(t,"Youtube.init"),!1}}async toggle(t){var{doTask:e=!0,channelLinks:s=[],videoLinks:t=[]}=t;try{if(!Ve(this,Ue))return F({text:j("needInit")}),!1;const a=[];if(e&&!N.doTask.youtube.channels||!e&&!N.undoTask.youtube.channels)F({type:"globalOptionsSkip",text:"youtube.channels"});else{var i=this.getRealParams("channels",s,e,t=>{var e;return/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(t)?null===(e=t.match(/url=(https:\/\/www\.youtube\.com\/.*)/))||void 0===e?void 0:e[1]:t});if(0{var e;return/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(t)?null===(e=t.match(/url=(https:\/\/www\.youtube\.com\/.*)/))||void 0===e?void 0:e[1]:t});if(0!0)}catch(t){return D(t,"Youtube.toggle"),!1}}}async function Be(){try{return await Ee(this,Me,Je).call(this,{link:Ve(this,Fe),doTask:!0,verify:!0})}catch(t){return D(t,"Youtube.verifyAuth"),!1}}async function ze(){try{const s=F({text:j("updatingAuth","Youtube")});return await new Promise(e=>{const t=GM_openInTab("https://www.youtube.com/#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=GM_getValue("youtubeAuth");t?(Ae(this,De,t),s.success(),Ee(this,Ne,Be).call(this).then(t=>{e(t)})):(s.error("Error: Update youtube auth failed!"),e(!1))}})}catch(t){return D(t,"Discord.updateAuth"),!1}}function qe(t,e){return We(t,e)}async function Je(t){var{link:e,doTask:s=!0,verify:t=!1}=t;try{var{params:i,needLogin:n}=await Ee(this,Re,qe).call(this,e,"channel"),{apiKey:a,client:o,request:r,channelId:l}=i||{};if(n)return F({html:j("loginYtb")}),!1;if(!(a&&o&&r&&l))return F({text:'"getYtbToken" failed'}),!1;if(!s&&!t&&this.whiteList.channels.includes(l))return F({type:"whiteList",text:"Youtube.unfollowChannel",id:l}),!0;const c=t?F({text:j("verifyingAuth","Youtube")}):F({type:s?"followingYtbChannel":"unfollowingYtbChannel",text:l});var u=parseInt(String((new Date).getTime()/1e3),10);const{result:d,statusText:h,status:p,data:g}=await I({url:`https://www.youtube.com/youtubei/v1/subscription/${s?"":"un"}subscribe?key=`+a,method:"POST",headers:{origin:"https://www.youtube.com",referer:"https://www.youtube.com/channel/"+l,"content-type":"application/json","x-goog-authuser":"0","x-goog-visitor-id":null==o?void 0:o.visitorData,"x-origin":"https://www.youtube.com",authorization:`SAPISIDHASH ${u}_`+sha1(`${u} ${Ve(this,De).PAPISID} https://www.youtube.com`)},data:JSON.stringify({context:{client:o,request:{sessionId:null==r?void 0:r.sessionId,internalExperimentFlags:[],consistencyTokenJars:[]},user:{}},channelIds:[l],params:s?"EgIIAhgA":"CgIIAhgA"})});return"Success"===d?200===(null===g||void 0===g?void 0:g.status)?s&&(/"subscribed": true/.test(g.responseText)||g.responseText.includes("The subscription already exists"))||!s&&/"subscribed": false/.test(g.responseText)?(c.success(),s&&!t&&(this.tasks.channels=G([...this.tasks.channels,e])),!0):t&&g.responseText.includes("You may not subscribe to yourself")?(c.success(),!0):(c.error(j("tryUpdateYtbAuth"),!0),!1):(c.error(`Error:${null===g||void 0===g?void 0:g.statusText}(${null===g||void 0===g?void 0:g.status})`),!1):(c.error(d+`:${h}(${p})`),!1)}catch(t){return D(t,"Youtube.toggleChannel"),!1}}async function He(t){var{link:e,doTask:t=!0}=t;try{var{params:s,needLogin:i}=await Ee(this,Re,qe).call(this,e,"likeVideo"),{apiKey:n,client:a,request:o,videoId:r,likeParams:l}=s||{};if(i)return F({html:""+j("loginYtb")}),!1;if(!(n&&a&&o&&r&&l))return F({text:'"getYtbToken" failed'}),!1;if(!t&&this.whiteList.likes.includes(r))return F({type:"whiteList",text:"Youtube.unlikeVideo",id:r}),!0;const c=F({type:t?"likingYtbVideo":"unlikingYtbVideo",text:r});var u=parseInt(String((new Date).getTime()/1e3),10);const d={context:{client:a,request:{sessionId:o.sessionId,internalExperimentFlags:[],consistencyTokenJars:[]},user:{}},target:{videoId:r}};if(t){if(!l)return c.error("Empty likeParams"),!1;d.params=l}const{result:h,statusText:p,status:g,data:f}=await I({url:`https://www.youtube.com/youtubei/v1/like/${t?"":"remove"}like?key=`+n,method:"POST",headers:{origin:"https://www.youtube.com",referer:"https://www.youtube.com/watch?v="+r,"content-type":"application/json","x-goog-authuser":"0","x-goog-visitor-id":a.visitorData,"x-origin":"https://www.youtube.com",authorization:`SAPISIDHASH ${u}_`+sha1(`${u} ${Ve(this,De).PAPISID} https://www.youtube.com`)},data:JSON.stringify(d)});return"Success"===h?200===(null===f||void 0===f?void 0:f.status)?t&&f.responseText.includes("Added to Liked videos")||!t&&(f.responseText.includes("Removed from Liked videos")||f.responseText.includes("Dislike removed"))?(c.success(),t&&(this.tasks.likes=G([...this.tasks.likes,e])),!0):(c.error(j("tryUpdateYtbAuth"),!0),!1):(c.error(`Error:${null===f||void 0===f?void 0:f.statusText}(${null===f||void 0===f?void 0:f.status})`),!1):(c.error(h+`:${p}(${g})`),!1)}catch(t){return D(t,"Youtube.toggleLikeVideo"),!1}}function Xe(t,e){Ze(t,e),e.add(t)}function Qe(t,e,s){Ze(t,e),e.set(t,s)}function Ze(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ts(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function es(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function ss(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,ns(t,e,"set"),s),s}function is(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,ns(t,e,"get"))}function ns(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const as=JSON.stringify({groups:[],officialGroups:[],wishlists:[],follows:[],forums:[],workshops:[],workshopVotes:[],curators:[],curatorLikes:[],announcements:[],licenses:[],playtests:[]});var os=new WeakMap,rs=new WeakMap,ls=new WeakMap,us=new WeakMap,cs=new WeakMap,ds=new WeakMap,hs=new WeakSet,ps=new WeakSet,gs=new WeakSet,fs=new WeakSet,ws=new WeakSet,ms=new WeakSet,vs=new WeakSet,ks=new WeakSet,ys=new WeakSet,bs=new WeakSet,Ts=new WeakSet,Ss=new WeakSet,xs=new WeakSet,$s=new WeakSet,Is=new WeakSet,Gs=new WeakSet,Cs=new WeakSet,Ls=new WeakSet,_s=new WeakSet,As=new WeakSet,Es=new WeakSet,Vs=new WeakSet,Os=new WeakSet,Ps=new WeakSet,Ws=new WeakSet,Ds=new WeakSet,Us=new WeakSet,Fs=new WeakSet,Ns=new WeakSet;async function js(){try{const s=F({text:j("updatingAuth",j("steamStore"))}),{result:i,statusText:n,status:a,data:o}=await I({url:"https://store.steampowered.com/",method:"GET",headers:{Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Cache-Control":"max-age=0","Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Upgrade-Insecure-Requests":"1"}});if("Success"!==i)return s.error(i+`:${n}(${a})`),!1;if(200!==(null===o||void 0===o?void 0:o.status))return s.error(`Error:${null===o||void 0===o?void 0:o.statusText}(${null===o||void 0===o?void 0:o.status})`),!1;var t;if(!o.responseText.includes("data-miniprofile="))return s.error("Error:"+j("needLoginSteamStore"),!0),!1;var e=null===(t=o.responseText.match(/g_sessionID = "(.+?)";/))||void 0===t?void 0:t[1];return e?(is(this,rs).storeSessionID=e,s.success(),!0):(s.error('Error: Get "sessionID" failed'),!1)}catch(t){return D(t,"Steam.updateStoreAuth"),!1}}async function Rs(){try{const o=F({text:j("updatingAuth",j("steamCommunity"))}),{result:r,statusText:l,status:u,data:c}=await I({url:"https://steamcommunity.com/my",method:"GET",headers:{Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Cache-Control":"max-age=0","Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Upgrade-Insecure-Requests":"1"}});if("Success"!==r)return o.error(r+`:${l}(${u})`),!1;if(200!==(null===c||void 0===c?void 0:c.status))return o.error(`Error:${null===c||void 0===c?void 0:c.statusText}(${null===c||void 0===c?void 0:c.status})`),!1;var t,e,s;if(c.responseText.includes('href="https://steamcommunity.com/login/home/'))return o.error("Error:"+j("needLoginSteamCommunity"),!0),!1;var i=null===(t=c.responseText.match(/g_steamID = "(.+?)";/))||void 0===t?void 0:t[1],n=null===(e=c.responseText.match(/g_sessionID = "(.+?)";/))||void 0===e?void 0:e[1],a=null===(s=c.responseText.match(/steamcommunity.com\/id\/(.+?)\/friends\//))||void 0===s?void 0:s[1];return(i&&(is(this,rs).steam64Id=i),a&&(is(this,rs).userName=a),n)?(is(this,rs).communitySessionID=n,o.success(),!0):(o.error('Error: Get "sessionID" failed'),!1)}catch(t){return D(t,"Steam.updateCommunityAuth"),!1}}async function Ms(){try{const i=F({text:j("gettingAreaInfo")}),{result:n,statusText:a,status:o,data:r}=await I({url:"https://store.steampowered.com/cart/",method:"GET"});if("Success"!==n)return i.error(n+`:${a}(${o})`),{};if(200!==(null===r||void 0===r?void 0:r.status))return i.error(`Error:${null===r||void 0===r?void 0:r.statusText}(${null===r||void 0===r?void 0:r.status})`),{};var t,e=null===(t=r.responseText.match(//g)].map(t=>t[1]);return e&&0{const e=setInterval(()=>{"waiting"!==is(this,ds)&&(clearInterval(e),t(!0))})}),is(this,cs)===e||!e&&"CN"!==is(this,cs))return!0;ss(this,ds,"waiting");let t=e;if(!t){const{currentArea:u,areas:c}=await es(this,gs,Ms).call(this);if(!u||!c)return ss(this,ds,"error"),!1;if("CN"!==u)return ss(this,ds,"skip"),F({text:"notNeededChangeArea"}),"skip";var s=c.filter(t=>t&&"CN"!==t);if(!s||0===s.length)return ss(this,ds,"noAnotherArea"),F({text:"noAnotherArea"}),!1;[t]=s}const l=F({text:j("changingArea",t)});var{result:i,statusText:n,status:a,data:o}=await I({url:"https://store.steampowered.com/account/setcountry",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({cc:t,sessionid:is(this,rs).storeSessionID})});if("Success"!==i)return ss(this,ds,"error"),l.error(i+`:${n}(${a})`),"CN";if(200!==(null==o?void 0:o.status)||"true"!==o.responseText)return ss(this,ds,"error"),l.error(`Error:${null==o?void 0:o.statusText}(${null==o?void 0:o.status})`),"CN";var r=(await es(this,gs,Ms).call(this))["currentArea"];return r===t?(ss(this,ds,"success"),l.success(),r):(ss(this,ds,"error"),l.error("Error: change country filed"),"CN")}catch(t){return ss(this,ds,"error"),D(t,"Steam.changeArea"),!1}}async function Ks(t){try{const e=F({type:"joiningSteamGroup",text:t}),{result:s,statusText:i,status:n,data:a}=await I({url:"https://steamcommunity.com/groups/"+t,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({action:"join",sessionID:is(this,rs).communitySessionID})});return"Success"===s?200!==(null===a||void 0===a?void 0:a.status)||a.responseText.includes("grouppage_join_area")?(e.error(`Error:${null===a||void 0===a?void 0:a.statusText}(${null===a||void 0===a?void 0:a.status})`),!1):(e.success(),this.tasks.groups=G([...this.tasks.groups,t]),!0):(e.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Steam.joinGroup"),!1}}async function Bs(t){try{if(this.whiteList.groups.includes(t))return F({type:"whiteList",text:"Steam.leaveGroup",id:t}),!0;var e=await es(this,vs,zs).call(this,t);if(!e)return!1;const s=F({type:"leavingSteamGroup",text:t}),{result:i,statusText:n,status:a,data:o}=await I({url:`https://steamcommunity.com/id/${is(this,rs).userName}/home_process`,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionID:is(this,rs).communitySessionID,action:"leaveGroup",groupId:e})});return"Success"===i?200===(null===o||void 0===o?void 0:o.status)&&o.finalUrl.includes("groups")&&0===$(o.responseText.replace(//g,"").toLowerCase()).find(`a[href='https://steamcommunity.com/groups/${t.toLowerCase()}']`).length?(s.success(),!0):(s.error(`Error:${null===o||void 0===o?void 0:o.statusText}(${null===o||void 0===o?void 0:o.status})`),!1):(s.error(i+`:${n}(${a})`),!1)}catch(t){return D(t,"Steam.leaveGroup"),!1}}async function zs(t){try{const n=F({type:"gettingSteamGroupId",text:t});var e=is(this,os).group[t];if(e)return n.success(),e;const{result:a,statusText:o,status:r,data:l}=await I({url:"https://steamcommunity.com/groups/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==a)return n.error(a+`:${o}(${r})`),!1;if(200!==(null===l||void 0===l?void 0:l.status))return n.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1;var s,i=null===(s=l.responseText.match(/OpenGroupChat\( '([0-9]+)'/))||void 0===s?void 0:s[1];return i?(es(this,Ns,fi).call(this,"group",t,i),n.success(),i):(n.error(`Error:${l.statusText}(${l.status})`),!1)}catch(t){return D(t,"Steam.getGroupID"),!1}}async function qs(t){try{const i=F({type:"joiningSteamOfficialGroup",text:t}),{result:n,statusText:a,status:o,data:r}=await I({url:`https://steamcommunity.com/games/${t}?action=join&sessionID=`+is(this,rs).communitySessionID,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==n)return i.error(n+`:${a}(${o})`),!1;if(200!==(null===r||void 0===r?void 0:r.status)||r.responseText.includes('id="publicGroupJoin"'))return i.error(`Error:${null===r||void 0===r?void 0:r.statusText}(${null===r||void 0===r?void 0:r.status})`),!1;var e;i.success(),this.tasks.officialGroups=G([...this.tasks.officialGroups,t]);var s=null===(e=r.responseText.match(/steam:\/\/friends\/joinchat\/([0-9]+)/))||void 0===e?void 0:e[1];return s&&es(this,Ns,fi).call(this,"officialGroup",t,s),!0}catch(t){return D(t,"Steam.joinOfficialGroup"),!1}}async function Js(t){try{if(this.whiteList.officialGroups.includes(t))return F({type:"whiteList",text:"Steam.leaveOfficialGroup",id:t}),!0;var e=await es(this,bs,Hs).call(this,t);if(!e)return!1;const o=F({type:"leavingSteamOfficialGroup",text:t});var{result:s,statusText:i,status:n,data:a}=await I({url:`https://steamcommunity.com/id/${is(this,rs).userName}/home_process`,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionID:is(this,rs).communitySessionID,action:"leaveGroup",groupId:e})});if("Success"!==s)return o.error(s+`:${i}(${n})`),!1;if(200!==(null==a?void 0:a.status))return o.error(`Error:${null==a?void 0:a.statusText}(${null==a?void 0:a.status})`),!1;{const{result:r,statusText:l,status:u,data:c}=await I({url:"https://steamcommunity.com/games/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});return"Success"===r?200===(null===c||void 0===c?void 0:c.status)&&c.responseText.includes('id="publicGroupJoin"')?(o.success(),!0):(o.error(`Error:${null===c||void 0===c?void 0:c.statusText}(${null===c||void 0===c?void 0:c.status})`),!1):(o.error(r+`:${l}(${u})`),!1)}}catch(t){return D(t,"Steam.leaveOfficialGroup"),!1}}async function Hs(t){try{const n=F({type:"gettingSteamOfficialGroupId",text:t});var e=is(this,os).officialGroup[t];if(e)return n.success(),e;const{result:a,statusText:o,status:r,data:l}=await I({url:"https://steamcommunity.com/games/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==a)return n.error(a+`:${o}(${r})`),!1;if(200!==(null===l||void 0===l?void 0:l.status))return n.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1;var s,i=null===(s=l.responseText.match(/steam:\/\/friends\/joinchat\/([0-9]+)/))||void 0===s?void 0:s[1];return i?(es(this,Ns,fi).call(this,"officialGroup",t,i),n.success(),i):(n.error(`Error:${l.statusText}(${l.status})`),!1)}catch(t){return D(t,"Steam.getGroupID"),!1}}async function Xs(t){try{var e;const n=F({type:"addingToWishlist",text:t});var{result:s,data:i}=await I({url:"https://store.steampowered.com/api/addtowishlist",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionid:is(this,rs).storeSessionID,appid:t}),dataType:"json"});if("Success"===s&&200===(null==i?void 0:i.status)&&!0===(null===(e=i.response)||void 0===e?void 0:e.success))return n.success(),this.tasks.wishlists=G([...this.tasks.wishlists,t]),!0;const{result:a,statusText:o,status:r,data:l}=await I({url:"https://store.steampowered.com/app/"+t,method:"GET"});return"Success"===a?200===(null===l||void 0===l?void 0:l.status)?"CN"===is(this,cs)&&l.responseText.includes('id="error_box"')?(n.warning(j("changeAreaNotice")),!!await es(this,fs,Ys).call(this)&&await es(this,Ts,Xs).call(this,t)):(!l.responseText.includes('class="queue_actions_ctn"')||!l.responseText.includes('class="already_in_library"'))&&(l.responseText.includes('class="queue_actions_ctn"')&&l.responseText.includes('id="add_to_wishlist_area_success" style="display: none;')||!l.responseText.includes('class="queue_actions_ctn"'))?(n.error(`Error:${l.statusText}(${l.status})`),!1):(n.success(),this.tasks.wishlists=G([...this.tasks.wishlists,t]),!0):(n.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1):(n.error(a+`:${o}(${r})`),!1)}catch(t){return D(t,"Steam.addToWishlist"),!1}}async function Qs(t){try{var e;if(this.whiteList.wishlists.includes(t))return F({type:"whiteList",text:"Steam.removeFromWishlist",id:t}),!0;const a=F({type:"removingFromWishlist",text:t});var{result:s,data:i}=await I({url:"https://store.steampowered.com/api/removefromwishlist",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionid:is(this,rs).storeSessionID,appid:t}),dataType:"json"});if("Success"===s&&200===(null==i?void 0:i.status)&&!0===(null===(e=i.response)||void 0===e?void 0:e.success))return a.success(),!0;const{result:o,statusText:r,status:l,data:u}=await I({url:"https://store.steampowered.com/app/"+t,method:"GET"});if("Success"!==o)return a.error(o+`:${r}(${l})`),!1;if(200!==(null===u||void 0===u?void 0:u.status))return a.error(`Error:${null===u||void 0===u?void 0:u.statusText}(${null===u||void 0===u?void 0:u.status})`),!1;if("CN"===is(this,cs)&&u.responseText.includes('id="error_box"')){a.warning(j("changeAreaNotice"));var n=await es(this,fs,Ys).call(this);return n&&"CN"!==n&&"skip"!==n?await es(this,Ss,Qs).call(this,t):!1}return u.responseText.includes('class="queue_actions_ctn"')&&(u.responseText.includes("ds_owned_flag ds_flag")||u.responseText.includes("add_to_wishlist_area"))?(a.success(),!0):(a.error(`Error:${u.statusText}(${u.status})`),!1)}catch(t){return D(t,"Steam.removeFromWishlist"),!1}}async function Zs(t,e){try{if(!e&&this.whiteList.follows.includes(t))return F({type:"whiteList",text:"Steam.unfollowGame",id:t}),!0;const a=F({type:`${e?"":"un"}followingGame`,text:t}),o={sessionid:is(this,rs).storeSessionID,appid:t};e||(o.unfollow="1");var{result:s,data:i}=await I({url:"https://store.steampowered.com/explore/followgame/",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param(o)});if("Success"===s&&200===(null==i?void 0:i.status)&&"true"===i.responseText)return a.success(),!0;var n=await es(this,$s,ti).call(this,t);return"CN"===is(this,cs)&&"areaLocked"===n?(a.warning(j("changeAreaNotice")),!!await es(this,fs,Ys).call(this)&&await es(this,Ss,Qs).call(this,t)):e===n?(a.success(),e&&(this.tasks.follows=G([...this.tasks.follows,t])),!0):(a.error(`Error:${null==i?void 0:i.statusText}(${null==i?void 0:i.status})`),!1)}catch(t){return D(t,"Steam.toggleFollowGame"),!1}}async function ti(t){try{const{result:e,data:s}=await I({url:"https://store.steampowered.com/app/"+t,method:"GET"});return"Success"===e?200===(null===s||void 0===s?void 0:s.status)&&("CN"===is(this,cs)&&s.responseText.includes('id="error_box"')?"areaLocked":"none"!==$(s.responseText.replace(//g,"")).find(".queue_control_button.queue_btn_follow>.btnv6_blue_hoverfade.btn_medium.queue_btn_active").css("display")):!1}catch(t){return D(t,"Steam.isFollowedGame"),!1}}async function ei(t){var e=!(1/))||void 0===s?void 0:s[1];return i?(es(this,Ns,fi).call(this,"workshop",t,i),n.success(),i):(n.error("Error: getWorkshopAppId failed"),!1)}catch(t){return D(t,"Steam.getWorkshopAppId"),!1}}async function ai(t){try{const o=F({type:"votingUpWorkshop",text:t});var e,{result:s,statusText:i,status:n,data:a}=await I({url:"https://steamcommunity.com/sharedfiles/voteup",method:"POST",responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({id:t,sessionid:is(this,rs).communitySessionID})});return"Success"===s?(200===(null==a?void 0:a.status)&&1===(null===(e=a.response)||void 0===e?void 0:e.success)?o.success():o.error(`Error:${null==a?void 0:a.statusText}(${null==a?void 0:a.status})`),!0):(o.error(s+`:${i}(${n})`),!0)}catch(t){return D(t,"Steam.voteupWorkshop"),!0}}async function oi(t){var e=!(1{return null===(t=t.match(/groups\/(.+)\/?/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/games\/(.+)\/?/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/\?id=([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/\?id=([\d]+)/))||void 0===t?void 0:t[1]});if(e&&0{return null===(t=t.match(/curator\/([\d]+)/))||void 0===t?void 0:t[1]}),b=this.getRealParams("curatorLikes",c,e,t=>{return null===(t=t.match(/https?:\/\/store\.steampowered\.com\/(.*?)\/([^/?]+)/))||void 0===t?void 0:t.slice(1,3).join("/")});if(0{var e;return t.includes("store.steampowered.com")?null===(e=t.match(/store\.steampowered\.com\/news\/app\/([\d]+)\/view\/([\d]+)/))||void 0===e?void 0:e.slice(1,3).join("/"):null===(t=t.match(/steamcommunity\.com\/games\/([\d]+)\/announcements\/detail\/([\d]+)/))||void 0===t?void 0:t.slice(1,3).join("/")});if(e&&0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(e&&N.doTask.steam.playtests&&0("CN"!==is(this,cs)&&(F({}).warning(j("steamFinishNotice")),await es(this,fs,Ys).call(this,"CN")),!0))}catch(t){return D(t,"Steam.toggle"),!1}}};function mi(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function vi(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function ki(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}const yi={steam:{groupLinks:[],wishlistLinks:[],curatorLinks:[],curatorLikeLinks:[],followLinks:[],forumLinks:[],announcementLinks:[],workshopVoteLinks:[],playtestLinks:[]},discord:{serverLinks:[]},instagram:{userLinks:[]},vk:{nameLinks:[]},twitch:{channelLinks:[]},reddit:{redditLinks:[]},youtube:{channelLinks:[],likeLinks:[]},twitter:{userLinks:[],retweetLinks:[]}};var bi=new WeakSet,Ti=new WeakSet,Si=new WeakSet,xi=new WeakSet,$i=new WeakSet,Ii=new WeakSet,Gi=new WeakSet,Ci=new WeakSet;async function Li(){try{const e=F({text:j("getTasksInfo")}),s=[];var t=$("#actions tr");$("div.bind-discord").is(":visible")&&$("div.bind-discord a")[0].click(),$("div.bind-twitch").is(":visible")&&$("div.bind-twitch a")[0].click();for(const r of t)s.push(new Promise(e=>{const t=$(r).find('td:not(".hidden")');var s=t.eq(1).find('a:not([data-trigger="link"])'),i=t.eq(2).find('a:not([data-trigger="link"])');const n=0t?(a.includes("steam")&&/join/gi.test(o)?this.undoneTasks.steam.groupLinks.push(t):/like.*announcement/gi.test(o)?this.undoneTasks.steam.announcementLinks.push(t):/(follow|subscribe).*curator/gim.test(o)&&/^https?:\/\/store\.steampowered\.com\/curator\//.test(t)?this.undoneTasks.steam.curatorLinks.push(t):a.includes("steam")&&/follow|subscribe/gim.test(o)?this.undoneTasks.steam.curatorLikeLinks.push(t):/subscribe.*steam.*forum/gim.test(o)?this.undoneTasks.steam.forumLinks.push(t):a.includes("thumbs-up")&&/^https?:\/\/steamcommunity\.com\/sharedfiles\/filedetails\/\?id=[\d]+/.test(t)?this.undoneTasks.steam.workshopVoteLinks.push(t):a.includes("plus")&&/request.*playtest/gim.test(o)?this.undoneTasks.steam.playtestLinks.push(t):a.includes("discord")||/join.*discord/gim.test(o)?this.undoneTasks.discord.serverLinks.push(t):a.includes("instagram")||/follow.*instagram/gim.test(o)?this.undoneTasks.instagram.userLinks.push(t):a.includes("twitch")||/follow.*twitch.*channel/gim.test(o)?this.undoneTasks.twitch.channelLinks.push(t):a.includes("reddit")||/subscribe.*subreddit/gim.test(o)||/follow.*reddit/gim.test(o)?this.undoneTasks.reddit.redditLinks.push(t):/watch.*art/gim.test(o)?this.undoneTasks.steam.workshopVoteLinks.push(t):/subscribe.*youtube.*channel/gim.test(o)?this.undoneTasks.youtube.channelLinks.push(t):/(watch|like).*youtube.*video/gim.test(o)||(a.includes("youtube")||a.includes("thumbs-up"))&&/(watch|like).*video/gim.test(o)?this.undoneTasks.youtube.likeLinks.push(t):a.includes("vk")||/join.*vk.*group/gim.test(o)?this.undoneTasks.vk.nameLinks.push(t):/(on twitter)|(Follow.*on.*Facebook)/gim.test(o)||(/wishlist.*game|add.*wishlist/gim.test(o)&&this.undoneTasks.steam.wishlistLinks.push(t),/follow.*button/gim.test(o)&&this.undoneTasks.steam.followLinks.push(t)),void e(!0)):e(!1)).catch(t=>(D(t,"Giveawaysu.classifyTask->getRedirectLink"),!1))}));return await Promise.all(s),e.success(),this.undoneTasks=ki(this,Gi,Pi).call(this,this.undoneTasks),!0}catch(t){return D(t,"Giveawaysu.classifyTask"),!1}}function _i(){try{return N.other.checkLogin?(0<$("a.steam-login").length&&window.open("/steam/redirect","_self"),!0):!0}catch(t){return D(t,"Giveawaysu.checkLogin"),!1}}async function Ai(){try{return N.other.checkLeftKey?(0<$(".giveaway-ended").length&&await a().fire({icon:"warning",title:j("notice"),text:j("noKeysLeft"),confirmButtonText:j("confirm"),cancelButtonText:j("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0):!0}catch(t){return D(t,"Giveawaysu.checkLeftKey"),!1}}function Ei(){var t=null===(t=window.location.href.match(/\/view\/([\d]+)/))||void 0===t?void 0:t[1];return t?(this.giveawayId=t,!0):(F({text:j("getFailed","GiveawayId")}),!1)}async function Vi(e,t){try{return{name:e,result:await t}}catch(t){return D(t,"GiveawaySu.bind"),{name:e,result:!1}}}async function Oi(){try{const s=[],i=this.undoneTasks;var t,e;return i.discord&&0[...t,...e]).length&&!this.socialInitialized.discord&&(this.social.discord=new R,s.push(ki(this,$i,Vi).call(this,"discord",this.social.discord.init()))),i.instagram&&0[...t,...e]).length&&!this.socialInitialized.instagram&&(this.social.instagram=new ut,s.push(ki(this,$i,Vi).call(this,"instagram",this.social.instagram.init()))),i.reddit&&0[...t,...e]).length&&!this.socialInitialized.reddit&&(this.social.reddit=new $t,s.push(ki(this,$i,Vi).call(this,"reddit",this.social.reddit.init()))),i.twitch&&0[...t,...e]).length&&!this.socialInitialized.twitch&&(this.social.twitch=new Xt,s.push(ki(this,$i,Vi).call(this,"twitch",this.social.twitch.init()))),i.vk&&0[...t,...e]).length&&!this.socialInitialized.vk&&(this.social.vk=new Ie,s.push(ki(this,$i,Vi).call(this,"vk",this.social.vk.init()))),i.youtube&&0[...t,...e]).length&&!this.socialInitialized.youtube&&(this.social.youtube=new Ke,s.push(ki(this,$i,Vi).call(this,"youtube",this.social.youtube.init()))),!i.steam||0<(t=Object.values(i.steam).reduce((t,e)=>[...t,...e]).length)&&(this.social.steam||(this.social.steam=new wi),0{var e,s;return["groupLinks","forumLinks","workshopLinks","workshopVoteLinks"].includes(t)&&(null===(e=i.steam)||void 0===e||null===(s=e[t])||void 0===s?void 0:s.length)||0}).reduce((t,e)=>t+e,0))&&!this.socialInitialized.steamStore&&s.push(ki(this,$i,Vi).call(this,"steamStore",this.social.steam.init("store"))),0{let e=!0;for(const s of t)s.result?this.socialInitialized[s.name]=s.result:e=!1;return e})}catch(t){return D(t,"GiveawaySu.initSocial"),!1}}function Pi(t){const e={};for(var[s,i]of Object.entries(t)){e[s]={};for(var[n,a]of Object.entries(i))e[s][n]=G(a)}return e}async function Wi(){try{if(!this.initialized&&!this.init())return!1;if(!await ki(this,bi,Li).call(this))return!1;if(!await ki(this,Ii,Oi).call(this))return!1;const e=[];var t=this.undoneTasks;return"skip"!==this.socialInitialized.discord&&this.social.discord&&e.push(this.social.discord.toggle({doTask:!0,...t.discord})),this.social.instagram&&e.push(this.social.instagram.toggle({doTask:!0,...t.instagram})),this.social.reddit&&e.push(this.social.reddit.toggle({doTask:!0,...t.reddit})),this.social.twitch&&e.push(this.social.twitch.toggle({doTask:!0,...t.twitch})),this.social.vk&&e.push(this.social.vk.toggle({doTask:!0,...t.vk})),this.social.youtube&&e.push(this.social.youtube.toggle({doTask:!0,...t.youtube})),this.social.steam&&e.push(this.social.steam.toggle({doTask:!0,...t.steam})),await Promise.all(e),F({}).success(j("allTasksComplete")),!0}catch(t){return D(t,"GiveawaySu.toggleTask"),!1}}const Di=class{constructor(){mi(this,Ci),mi(this,Gi),mi(this,Ii),mi(this,$i),mi(this,xi),mi(this,Si),mi(this,Ti),mi(this,bi),vi(this,"undoneTasks",yi),vi(this,"giveawayId",void 0),vi(this,"socialInitialized",{discord:!1,instagram:!1,reddit:!1,twitch:!1,vk:!1,youtube:!1,steamStore:!1,steamCommunity:!1,twitter:!0}),vi(this,"initialized",!1),vi(this,"social",{})}static test(){return/^https?:\/\/giveaway\.su\/giveaway\/view\/[\d]+/.test(window.location.href)}async after(){try{ki(this,Ti,_i).call(this)||F({}).warning(j("checkLoginFailed")),await ki(this,Si,Ai).call(this)||F({}).warning(j("checkLeftKeyFailed"))}catch(t){D(t,"Giveawaysu.after")}}init(){try{const t=F({text:j("initing")});return 0<$("a.steam-login").length?(window.open("/steam/redirect","_self"),t.warning(j("needLogin")),!1):!!ki(this,xi,Ei).call(this)&&(this.initialized=!0,t.success(),!0)}catch(t){return D(t,"Giveawaysu.init"),!1}}async doTask(){try{return $("#getKey").on("click",()=>{$("#auto-task-info-div").remove(),$(window.STYLE).remove(),$("#getKey").off()}),await ki(this,Ci,Wi).call(this)}catch(t){return D(t,"GiveawaySu.doTask"),!1}}async verifyTask(){try{var t;for(const e of $("#actions tr")){const s=$(e);if("adjs"!==s.attr("data-action-id")){const i=s.find("i.glyphicon-refresh"),n=i.parent();"A"!==n.prop("tagName")?i.hasClass("spin")||i.hasClass("glyphicon-ok")||(n[0].click(),await U(1e3)):(t=n.attr("href"),n.attr("href","javascript:void(0);").attr("target","_self")[0].click(),n.attr("href",t))}}}catch(t){D(t,"GiveawaySu.verifyTask")}}};var Ui,Fi,t=ji(821);if(window.STYLE=GM_addStyle(t.Z+`.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 3px}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .5s;animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .8s;animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-question-mark .8s;animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-webkit-keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@-webkit-keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}`),"discord.com"===window.location.hostname){const Ni=window.localStorage;"#auth"===window.location.hash?(window.localStorage.removeItem=()=>!0,(Ui=null===Ni||void 0===Ni||null===(Ui=Ni.getItem("token"))||void 0===Ui?void 0:Ui.replace(/^"|"$/g,""))&&0{var t,e,s;if("www.twitch.tv"===window.location.hostname&&"#auth"===window.location.hash&&(t=o.get("auth-token"),!!o.get("login")?(GM_setValue("twitchAuth",{authToken:t,clientId:null===(t=commonOptions)||void 0===t||null===(e=t.headers)||void 0===e?void 0:e["Client-ID"]}),window.close(),a().fire("",j("closePageNotice"))):a().fire("",j("needLogin"))),"twitter.com"===window.location.hostname&&"#auth"===window.location.hash&&(s=o.get("ct0"),!!o.get("twid")&&s?(GM_setValue("twitterAuth",{ct0:s}),window.close(),a().fire("",j("closePageNotice"))):a().fire("",j("needLogin"))),"www.youtube.com"===window.location.hostname&&"#auth"===window.location.hash&&((s=o.get("__Secure-3PAPISID"))?(GM_setValue("youtubeAuth",{PAPISID:s}),window.close(),a().fire("",j("closePageNotice"))):a().fire("",j("needLogin"))),"www.reddit.com"===window.location.hostname&&("#auth"===window.location.hash||"#auth"===GM_getValue("redditAuth"))){const i=$("#redesign-beta-optin-btn");if(0

    `),await n.after(),$("#auto-do-task").on("click",()=>{n.doTask()}),$("#auto-verify-task").on("click",()=>{n.verifyTask()}),console.log("%c%s","color:#1bbe1a","Auto Task GS特供脚本初始化完成!")}})}()}(); \ No newline at end of file diff --git a/dist/auto-task-v4-for-giveawaysu.user.js b/dist/auto-task-v4-for-giveawaysu.user.js index b7a72c9..a754da6 100644 --- a/dist/auto-task-v4-for-giveawaysu.user.js +++ b/dist/auto-task-v4-for-giveawaysu.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name auto-task-v4-for-giveawaysu // @namespace auto-task-v4-for-giveawaysu -// @version 4.2.23 +// @version 4.2.24 // @description 赠Key站自动任务 // @author HCLonely // @license MIT @@ -84,4 +84,4 @@ console.log('%c%s', 'color:blue', 'Auto Task GS特供脚本开始加载'); `+s.stack)}async function i(s){var t=1{s.dataType&&(s.responseType=s.dataType);var t={timeout:3e4,ontimeout(t){e({result:"Error",statusText:"Timeout",status:601,data:t,options:s})},onabort(t){e({result:"Error",statusText:"Aborted",status:602,data:t,options:s})},onerror(t){e({result:"Error",statusText:"Error",status:603,data:t,options:s})},onload(t){e({result:"Success",statusText:"Load",status:600,data:t,options:s})},...s};GM_xmlhttpRequest(t)});return window.DEBUG&&console.log("%cAuto-Task[httpRequest]:","color:blue",JSON.stringify(e)),600!==e.status&&t<2?await i(s,t+1):e}catch(t){return console.log("%cAuto-Task[httpRequest]:","color:red",JSON.stringify({errorMsg:t,options:s})),D(t,"httpRequest"),{result:"JsError",statusText:"Error",status:604,error:t,options:s}}}const I=i;function U(){let e=0{setTimeout(()=>{t(!0)},e)})}const F=t=>{let{type:e,text:s,html:i,id:n}=t;const a={success:()=>a,error:()=>a,warning:()=>a,info:()=>a,view:()=>a};try{var o;let t;if(e)switch(e){case"joiningSteamGroup":case"leavingSteamGroup":case"gettingSteamGroupId":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"joiningSteamOfficialGroup":case"leavingSteamOfficialGroup":case"gettingSteamOfficialGroupId":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"subscribingForum":case"unsubscribingForum":case"gettingForumId":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"followingCurator":case"unfollowingCurator":case"gettingCuratorId":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"addingToWishlist":case"removingFromWishlist":case"followingGame":case"unfollowingGame":case"gettingSubid":case"addingFreeLicense":case"requestingPlayTestAccess":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"addingFreeLicenseSubid":t=$(`
  • ${j("addingFreeLicense")}[${s}]...
  • `);break;case"favoritingWorkshop":case"unfavoritingWorkshop":case"gettingWorkshopAppId":case"votingUpWorkshop":t=$(`
  • ${j(e)}[ ${s}]...
  • `);break;case"gettingAnnouncementParams":case"likingAnnouncement":t=$(`
  • ${j(e)}[ ${n}]...
  • `);break;case"joiningDiscordServer":case"gettingDiscordGuild":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"leavingDiscordServer":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"updateDiscordAuth":t=$(`
  • ${j("updateDiscordAuth")}
  • `);break;case"followingTwitchChannel":case"unfollowingTwitchChannel":case"gettingTwitchChannelId":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"gettingInsUserId":case"followingIns":case"unfollowingIns":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"gettingTwitterUserId":case"followingTwitterUser":case"unfollowingTwitterUser":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"retweetting":case"unretweetting":t=$(`
  • ${j(e)}${s}...
  • `);break;case"joiningReddit":case"leavingReddit":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"followingRedditUser":case"unfollowingRedditUser":t=$(`
  • ${j(e)}[ - ${null===s||void 0===s?void 0:s.replace("u_","")}]...
  • `);break;case"followingYtbChannel":case"unfollowingYtbChannel":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"likingYtbVideo":case"unlikingYtbVideo":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"gettingVkId":case"joiningVkGroup":case"leavingVkGroup":case"joiningVkPublic":case"leavingVkPublic":case"sendingVkWall":case"deletingVkWall":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"visitingLink":t=$(`
  • ${j("visitingLink")}[${s}]...
  • `);break;case"verifyingInsAuth":case"text":t=$(`
  • ${j(s)}
  • `);break;case"html":t=$(s||i);break;case"whiteList":t=$(`
  • ${j("skipTask")}[${s}(${n})](${j("whiteList")})
  • `);break;case"globalOptionsSkip":t=$(`
  • ${j("skipTaskOption")}${s}
  • `);break;default:t=$(`
  • ${j("unKnown")}:${e}(${s})...
  • `)}else t=s?$(`
  • ${j(s)}
  • `):i?$(i):$("
  • ");return t.addClass("card-text"),$("#auto-task-info").append(t),null!==(o=t[0])&&void 0!==o&&o.scrollIntoView(),{font:t.find("font"),success(){var t,e,s=0{try{return[...new Set(t)]}catch(t){return D(t,"unique"),[]}},l=async e=>{try{if(!e)return null;const s=GM_getValue("redirectLinks")||{};return s[e]&&s[e],await I({url:e,method:"GET"}).then(t=>{t=t.data;return null!=t&&t.finalUrl?(s[e]=t.finalUrl,GM_setValue("redirectLinks",s),t.finalUrl):null})}catch(t){return D(t,"getRedirectLink"),null}};const r={doTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0,workshopVotes:!0,announcements:!0,licenses:!0,playtests:!0}},undoTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0}},position:{buttonSideX:"right",buttonSideY:"top",buttonDistance:"15,30",showButtonSideX:"right",showButtonSideY:"top",showButtonDistance:"15,30",logSideX:"right",logSideY:"bottom",logDistance:"10,10"},hotKey:{doTaskKey:"alt + d",undoTaskKey:"alt + u",toggleLogKey:"alt + l"},other:{twitterVerifyId:"783214",youtubeVerifyChannel:"UCrXUsMBcfTVqwAS7DKg9C0Q",autoUpdateSource:"jsdelivr",language:"zh",checkLogin:!0,checkLeftKey:!0,defaultShowButton:!0,defaultShowLog:!0,debug:!1,receivePreview:!0}};t=GM_getValue("globalOptions")||{};const u=(t,e)=>{try{const n={};for(var[s,i]of Object.entries(t))"[object Object]"===Object.prototype.toString.call(i)&&"[object Object]"===Object.prototype.toString.call(e[s])?n[s]=u(i,e[s]):n[s]=e[s]??i;return n}catch(t){return D(t,"assignObject"),r}},N=u(r,t);const c={zh:{website:"网站",type:"类型",edit:"编辑",whiteList:"白名单",skipTask:"跳过撤销任务",whiteListOptions:"白名单设置",changeWhiteListOption:"设置白名单(%0)",whiteListNotFound:"找不到此项白名单: %0",changeWhiteListSuccess:"白名单修改成功,刷新生效!",changeWebsiteOptions:"网站设置",changeGlobalOptions:"全局设置",ok:"是",save:"保存",close:"关闭",return:"返回",option:"选项",value:"值",websiteOptions:"当前网站设置",changeWebsiteOptionsSuccess:"更改当前网站设置成功,刷新生效!",changeGlobalOptionsSuccess:"更改全局设置成功,刷新生效!",needLogin:"请先登录!",getTasksInfo:"正在获取并处理任务信息...",gettingKey:"正在获取Key...",verifyingTask:"正在验证任务",notice:"自动任务脚本提醒",noKeysLeft:"此页面已经没有剩余key了,是否关闭?",giveawayEnded:"此活动已结束,是否关闭?",giveawayNotWork:"此活动因某些原因(已结束/暂停/未开始...)不可用(如果是脚本误判请及时反馈),是否关闭?",confirm:"确定",cancel:"取消",unKnown:"未知",unKnownTaskType:"未识别的任务",doing:"正在做任务",allTasksComplete:"所有任务已完成!",getTaskIdFailed:"获取任务Id失败!",initSuccess:"%0 初始化成功!",initFailed:"%0 初始化失败!",errorLink:"链接错误: %0",needInit:"请先初始化",verifyingAuth:"正在验证%0凭证...",updatingAuth:"正在更新%0凭证...",initing:"正在初始化...",getFailed:"获取%0失败!",checkLoginFailed:"检测登录状态失败!",checkLeftKeyFailed:"检测剩余Key失败!",userId:"用户Id",joiningGiveaway:"正在加入赠Key",needJoinGiveaway:"需要先加入赠Key",cannotUndo:"此网站不支持取消任务",verifyAuth:"正在验证 %0 凭证...",closePageNotice:"如果此页面没有自动关闭,请自行关闭本页面。",errorReport:"检测到脚本报错,是否前往反馈BUG?",visitingLink:"正在访问链接: ",doTask:"做任务",undoTask:"撤销任务",verifyTask:"验证任务",getKey:"获取Key",selectAll:"全选",selectNone:"全不选",invertSelect:"反选",doFreeTask:"加入免费赠品",doPointTask:"加入点数赠品",skipTaskOption:"设置中已配置跳过任务",other:"其他",globalOptions:"全局设置",checkLogin:"登录检测
    需要登录的网站自动登录,部分本网站支持",checkLeftKey:"剩余Key检测
    赠Key活动结束提示是否关闭,部分本网站支持",twitterVerifyId:"通过尝试关注该账号验证Twitter凭证
    默认为Twitter官方帐号 783214
    不想关注官方账号可以改为自己的帐号",youtubeVerifyChannel:"通过尝试订阅该频道验证YouTube凭证
    默认为YouTube官方频道 UCrXUsMBcfTVqwAS7DKg9C0Q
    不想关注官方频道可以改为自己的频道",autoUpdateSource:"更新源
    github: 需代理,实时更新
    jsdelivr: 可不用代理,更新有延迟
    standby: 备用
    auto: 依次使用github, jsdelivr, standby源进行尝试更新",saveGlobalOptions:"保存全局设置",settingPage:"设置页面",name:"名称",version:"版本",scriptManager:"脚本管理器",script:"脚本",environment:"环境",os:"系统",browser:"浏览器",getId:"获取 %0 id",getTwitterUserId:"获取Twitter用户id(获取id功能仅在设置页面可用)",getYoutubeChannelId:"获取Youtube频道id(获取id功能仅在设置页面可用)",showButton:"显示按钮",hideButton:"隐藏按钮",showLog:"显示日志",hideLog:"隐藏日志",defaultShowButton:"默认显示按钮",defaultShowLog:"默认显示日志",debug:"输出调试日志,不要开启此选项!",receivePreview:"接收预览版更新",position:"组件位置",buttonSideX:"按钮区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",buttonSideY:"按钮区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",buttonDistance:"按钮区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",showButtonSideX:"显示按钮水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",showButtonSideY:"显示按钮垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",showButtonDistance:"显示按钮距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",logSideX:"日志区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",logSideY:"日志区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",logDistance:"日志区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",hotKey:"快捷键",doTaskKey:"做任务快捷键
    (实时预览功能仅在设置页面可用)",undoTaskKey:"撤销任务快捷键
    (实时预览功能仅在设置页面可用)",toggleLogKey:"显示/隐藏日志快捷键
    (实时预览功能仅在设置页面可用)",tasksHistory:"任务历史",clearHistory:"清空历史",clearHistoryFinished:"已清空任务历史!",deleteTask:"删除任务",lastChangeTime:"最后一次修改时间",clearTaskFinished:"删除以下任务完成!",clearTaskFailed:"删除任务失败,没有找到任务名!",syncData:"数据同步",settingData:"正在上传数据...",gettingData:"正在获取数据...",help:"帮助",fileName:"文件名",upload2gist:"同步到Gist",downloadFromGist:"从Gist同步",saveAndTest:"保存配置并测试",testSuccess:"测试成功!",testFailed:"测试失败!",saveAndTestNotice:"请先保存配置并测试!",processingData:"正在处理数据...",updatingData:"正在上传数据...",syncDataSuccess:"同步数据成功!",syncDataFailed:"同步数据失败,请在控制台查看错误信息!",downloadingData:"正在下载数据...",checkedNoData:"没有检测到远程数据,请确认配置是否正确!",savingData:"正在保存数据...",syncHistory:"同步任务历史",checkUpdateFailed:"检测更新失败",newVersionNotice:'检测到新版本V%0, 点此更新',language:"语言
    目前仅支持zh: 中文, en: 英文",gistOptions:"Gist 设置",swalNotice:"检测到您第一次安装V4版本脚本,请前往阅读用前必读内容!",echoNotice:'检测到您第一次安装V4版本脚本,请点此前往阅读用前必读内容!',noticeLink:"https://auto-task-doc.js.org/guide/#用前必读",toGithub:"前往Github反馈",toKeylol:"前往其乐论坛反馈",copySuccess:"错误信息已复制到剪切板,是否前往其乐论坛反馈?",copyFailed:"请复制下方错误信息后前往Keylol论坛反馈!",updateText:"%0 版本更新内容:",Active:"进行中",Ended:"已结束",Banned:"已封禁",Paused:"已暂停",notStart:"未开始",noRemoteData:"检测到远程无数据",errorRemoteDataFormat:"远程数据格式错误",updateHistory:'历史更新记录点此查看',groups:"组",officialGroups:"官方组",wishlists:"愿望单",follows:"游戏关注",forums:"论坛",workshops:"创意工坊收藏",curators:"鉴赏家",workshopVotes:"创意工坊点赞",announcements:"社区通知",steamCommunity:"Steam社区",steamStore:"Steam商店",licenses:"入库免费游戏",playtests:"请求访问权限",needLoginSteamStore:'请先登录Steam商店',needLoginSteamCommunity:'请先登录Steam社区',joiningSteamGroup:"正在加入Steam组",leavingSteamGroup:"正在退出Steam组",gettingSteamGroupId:"正在获取Steam组Id",joiningSteamOfficialGroup:"正在加入Steam官方组",leavingSteamOfficialGroup:"正在退出Steam官方组",gettingSteamOfficialGroupId:"正在获取Steam官方组Id",subscribingForum:"正在订阅Steam论坛",unsubscribingForum:"正在取消订阅Steam论坛",gettingForumId:"正在获取Steam论坛Id",followingCurator:"正在关注Steam鉴赏家",unfollowingCurator:"正在取关Steam鉴赏家",gettingCuratorId:"正在获取Steam鉴赏家Id",addingToWishlist:"正在添加游戏到Steam愿望单",removingFromWishlist:"正在从Steam愿望单移除游戏",followingGame:"正在关注Steam游戏",unfollowingGame:"正在取关Steam游戏",favoritingWorkshop:"正在收藏Steam创意工坊物品",unfavoritingWorkshop:"正在取消收藏Steam创意工坊物品",gettingWorkshopAppId:"正在获取Steam创意工坊物品Id",votingUpWorkshop:"正在点赞Steam创意工坊物品",gettingAnnouncementParams:"正在获取Steam通知信息",likingAnnouncement:"正在点赞Steam通知",changingArea:"正在更换Steam地区: %0...",notNeededChangeArea:"当前地区不需要更换",noAnotherArea:"请检测是否开启正确开启代理",gettingAreaInfo:"正在获取Steam地区信息...",changeAreaNotice:"疑似锁区游戏,尝试换区执行",steamFinishNotice:"Steam任务完成,尝试将购物车地区换回CN",gettingSubid:"正在获取游戏subid",addingFreeLicense:"正在入库",missParams:"缺少参数",gettingLicenses:"正在获取Licenses...",requestingPlayTestAccess:"正在请求访问权限",tryChangeAreaNotice:"此功能无法检测游戏是否限区,因此会尝试换区后再入库,换区失败也不影响后续入库",servers:"服务器",joiningDiscordServer:"正在加入Discord服务器",leavingDiscordServer:"正在退出Discord服务器",gettingDiscordGuild:"正在获取Discord服务器Id",getDiscordAuthFailed:"获取Discord凭证失败,请检测Discord帐号是否已登录",discordImportantNotice:"重要提醒!!!",discordImportantNoticeText:"由于Discord网站后台更新,目前使用此脚本加组后可能会导致Discord帐号被强制退出,且需要两步验证才能正常登录,请谨慎使用!!!",continue:"继续",skipDiscordTask:"跳过Discord任务",continueAndDontRemindAgain:"继续且不再提醒",users:"用户",loginIns:'请先登录Instagram',insBanned:"您的Instagram账户已被封禁",verifyingInsAuth:"正在验证Instagram凭证...",gettingInsUserId:"正在获取Instagram用户Id",followingIns:"正在关注Instagram用户",unfollowingIns:"正在取关Instagram用户",reddits:"社区/用户",loginReddit:'请先登录Reddit',changingRedditVersion:"正在切换Reddit为新版页面...",joiningReddit:"正在加入Reddit社区",leavingReddit:"正在退出Reddit社区",followingRedditUser:"正在关注Reddit用户",unfollowingRedditUser:"正在取关Reddit用户",channels:"频道",followingTwitchChannel:"正在关注Twitch频道",unfollowingTwitchChannel:"正在取关Twitch频道",gettingTwitchChannelId:"正在获取Twitch频道Id",checkingTwitchIntegrity:"正在检查Twitch完整性...",twitterUser:"推特用户",retweets:"转推",gettingTwitterUserId:"正在获取推特用户Id",followingTwitterUser:"正在关注推特用户",unfollowingTwitterUser:"正在取关推特用户",retweetting:"正在转推",unretweetting:"正在撤销转推",names:"组/社区/动态",loginVk:'请先登录Vk',gettingVkId:"正在获取Vk任务Id",joiningVkGroup:"正在加入Vk组",leavingVkGroup:"正在退出Vk组",joiningVkPublic:"正在加入Vk社区",leavingVkPublic:"正在退出Vk社区",sendingVkWall:"正在转发Vk动态",deletingVkWall:"正在撤销转发Vk动态",youtubeChannel:"YouTube频道",likes:"点赞",loginYtb:'请先登录YouTube',tryUpdateYtbAuth:'请尝试更新YouTube凭证',gettingYtbToken:"正在获取YouTube Token...",followingYtbChannel:"正在订阅YouTube频道",unfollowingYtbChannel:"正在退订YouTube频道",likingYtbVideo:"正在点赞YouTube视频",unlikingYtbVideo:"正在取消点赞YouTube视频",giveKeyNoticeBefore:"每次验证间隔15s",giveKeyNoticeAfter:'如果没有key, 请在https://givekey.ru/profile查看',noPoints:"点数不够,跳过抽奖",getNeedPointsFailed:"获取所需点数失败,跳过抽奖",joiningLottery:"正在加入抽奖",doingGleamTask:"正在做Gleam任务...",gettingGleamLink:"正在获取Gleam任务链接...",gleamTaskNotice:"如果此页面长时间未关闭,请完成任一任务后自行关闭!",verifiedGleamTasks:"已尝试验证所有任务,验证失败的任务请尝试手动验证或完成!",gsNotice:'为避免得到"0000-0000-0000"key, 已自动屏蔽"Grab Key"按钮,获取key时请关闭脚本!',giveeClubVerifyNotice:"正在验证任务...",giveeClubVerifyFinished:"请等待验证完成后自行加入赠Key",doingKeyhubTask:"正在做Keyhub任务...",SweepWidgetNotice:"正在处理并验证任务,每次验证任务有1~3s间隔防止触发验证过快警告..."},en:{website:"Website",type:"Type",edit:"Edit",whiteList:"Whitelist",skipTask:"Skip undo task",whiteListOptions:"Whitelist options",changeWhiteListOption:"Whitelist option(%0)",whiteListNotFound:"Cannot find this whitelist: %0",changeWhiteListSuccess:"The whitelist is successfully modified, and the page refresh will take effect!",changeWebsiteOptions:"Website options",changeGlobalOptions:"Global options",ok:"OK",save:"Save",close:"Close",return:"Return",option:"Option",value:"Value",websiteOptions:"Current website settings",changeWebsiteOptionsSuccess:"The current website setting is changed successfully, and the page refresh will take effect!",changeGlobalOptionsSuccess:"The global setting is changed successfully, and the refresh will take effect!",needLogin:"Please log in first!",getTasksInfo:"Obtaining and processing task information...",gettingKey:"Getting Key...",verifyingTask:"Verifying task",notice:"Automatic task script notice",noKeysLeft:"There are no more keys left on this page. Do you want to close it?",giveawayEnded:"This event has ended, do you want to close it?",giveawayNotWork:"This activity is unavailable for some reasons (banned/ended/paused/not started...) (if it is a script misjudgment, please give us feedback in time), is it closed?",confirm:"Confirm",cancel:"Cancel",unKnown:"Unknown",unKnownTaskType:"Unrecognized task",doing:"Doing a task",allTasksComplete:"All tasks have been completed!",getTaskIdFailed:"Failed to obtain task Id!",initSuccess:"%0 was initialized successfully!",initFailed:"%0 initialization failed!",errorLink:"Link error: %0",needInit:"Please initialize first",verifyingAuth:"Verifying %0 token...",updatingAuth:"Update %0 token...",initing:"Initializing...",getFailed:"Failed to get %0!",checkLoginFailed:"Failed to detect login status!",checkLeftKeyFailed:"Failed to detect the remaining keys!",userId:"User Id",joiningGiveaway:"Joining giveaway",needJoinGiveaway:"Need to join the giveaway first",cannotUndo:"This website does not support canceling tasks",verifyAuth:"Verifying %0 token...",closePageNotice:"f this page does not close automatically, please close this page yourself.",errorReport:"A script error is detected, do you want to report the BUG?",visitingLink:"Visiting link: ",doTask:"DoTask",undoTask:"UndoTask",verifyTask:"Verify",getKey:"GetKey",selectAll:"SelectAll",selectNone:"SelectNone",invertSelect:"InvertSelect",doFreeTask:"FreeTask",doPointTask:"PointTask",skipTaskOption:"Skip task has been configured in the settings",other:"Other",globalOptions:"Global Options",checkLogin:"Login detection
    Need to log in to the website automatically log in, part of this website supports.",checkLeftKey:"Key remaining detection
    The end of the giveaway event prompts whether to close or not, part of this website supports.",twitterVerifyId:"Verify Twitter token by trying to follow the account.
    The default is the official Twitter account 783214.
    If you don't want to follow the official account, you can change it to your own account.",youtubeVerifyChannel:"Verify YouTube token by trying to subscribe to the channel.
    The default is the official YouTube channel UCrXUsMBcfTVqwAS7DKg9C0Q.
    If you don't want to follow the official channel, you can change it to your own channel.",autoUpdateSource:"The source to update
    github: Fast update.
    jsdelivr: Update is delayed.
    standby: Standby source.
    auto: Try to update using github, jsdelivr, standby sources in turn.",saveGlobalOptions:"SaveSettings",settingPage:"Setting Page",name:"Name",version:"Version",scriptManager:"Script Manager",script:"Script",environment:"Environment",os:"OS",browser:"Browser",getId:"Get %0 id",getTwitterUserId:"Get Twitter user id (Get id function is only available on the settings page).",getYoutubeChannelId:"Get Youtube channel id (Get id function is only available on the settings page).",showButton:"ShowButton",hideButton:"HideButton",showLog:"ShowLog",hideLog:"HideLog",defaultShowButton:"Default display button",defaultShowLog:"Display log by default",debug:"Output debug log, do not enable this option!",receivePreview:"Receive preview updates",position:"Component position",buttonSideX:"Horizontal positioning of the button area (real-time preview function is only available on the setting page).
    left: left | right: right",buttonSideY:"The button area is positioned in the vertical direction (real-time preview function is only available on the settings page).
    top: top | bottom: bottom",buttonDistance:"The distance between the button area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",showButtonSideX:"ShowButton horizontal positioning (real-time preview function is only available on the setting page).
    left: left | right: right",showButtonSideY:"ShowButton vertical positioning (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",showButtonDistance:"The distance between the ShowButton and the edge (real-time preview function is only available on the setting page).
    Format: X distance, Y distance",logSideX:"Horizontal positioning of the log area (real-time preview function is only available on the setting page).
    left: left | right: right",logSideY:"Vertical positioning of the log area (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",logDistance:"The distance between the log area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",hotKey:"Shortcut key",doTaskKey:"DoTask shortcut keys
    (real-time preview function is only available on the settings page).",undoTaskKey:"UndoTask shortcut keys
    (real-time preview function is only available on the settings page).",toggleLogKey:"ShowLog/HideLog shortcut keys
    (real-time preview function is only available on the settings page).",tasksHistory:"TasksHistory",clearHistory:"Clear history",clearHistoryFinished:"The mission history has been cleared!",deleteTask:"Delete task",lastChangeTime:"Last Change Time",clearTaskFinished:"Delete the following tasks completed!",clearTaskFailed:"Failed to delete the task, the task name was not found!",syncData:"DataSync",settingData:"Uploading data...",gettingData:"Getting data...",help:"Help",fileName:"Filename",upload2gist:"Sync to Gist",downloadFromGist:"Sync from Gist",saveAndTest:"Save configuration and test",testSuccess:"Test success!",testFailed:"Test failed!",saveAndTestNotice:"Please save the configuration and test first!",processingData:"Processing data...",updatingData:"Uploading data...",syncDataSuccess:"Synchronized data successfully!",syncDataFailed:"Failed to synchronize data, please check the error message on the console!",downloadingData:"Downloading data...",checkedNoData:"No remote data is detected, please confirm whether the configuration is correct!",savingData:"Saving data...",syncHistory:"Synchronize tasks history",checkUpdateFailed:"Check update failed",newVersionNotice:'Checked a new version V%0, click to update',language:"Language
    Currently only supports zh: Chinese, en: English",gistOptions:"Gist Settings",swalNotice:"It is detected that you are installing the V4 version script for the first time, please go to read the READ ME FIRST content before use!",echoNotice:'It is detected that you are installing the V4 version script for the first time, please click here to read the READ ME FIRST content before use!',noticeLink:"https://auto-task-doc.js.org/en/guide/#read-me-first",toGithub:"Feedback(Github)",toKeylol:"Feedback(Keylol)",copySuccess:"The error message has been copied to the clipboard. Do you want to go to the Keylol forum to give feedback?",copyFailed:"Please copy the error information below and report back to the Keylol forum!",updateText:"Updates in version %0:",Active:"Active",Ended:"Ended",Banned:"Banned",Paused:"Paused",notStart:"notStart",noRemoteData:"No data remotely",errorRemoteDataFormat:"Remote data has wrong format",updateHistory:'Click here to view the historical update record.',groups:"Group",officialGroups:"Official Group",wishlists:"Wishlist",follows:"Follow Game",forums:"Forum",workshops:"Favorite Workshop",curators:"Curator",workshopVotes:"Voteup Workshop",announcements:"Announcement",steamCommunity:"Steam Community",steamStore:"Steam Store",licenses:"Add License",playtests:"Playtest Access",needLoginSteamStore:'Please log in to the Steam Store',needLoginSteamCommunity:'Please log in to the Steam Community',joiningSteamGroup:"Joining Steam Group",leavingSteamGroup:"Leaving Steam Group",gettingSteamGroupId:"Getting Steam Group Id",joiningSteamOfficialGroup:"Joining Steam Official Group",leavingSteamOfficialGroup:"Leaving Steam Official Group",gettingSteamOfficialGroupId:"Getting Steam Official Group Id",subscribingForum:"Subscribing the Steam Forum",unsubscribingForum:"Unsubscribing the Steam Forum",gettingForumId:"Getting Steam Forum Id",followingCurator:"Following Steam Curator",unfollowingCurator:"Unfollowing Steam Curator",gettingCuratorId:"Getting Steam Curator Id",addingToWishlist:"Adding the game to the Steam wishlist",removingFromWishlist:"Removing the game from the Steam wishlist",followingGame:"Following Steam games",unfollowingGame:"Unfollowing Steam games",favoritingWorkshop:"Favouring Steam Workshop Items",unfavoritingWorkshop:"Unfavoriting Steam Workshop Items",gettingWorkshopAppId:"Getting Steam Workshop Item Id",votingUpWorkshop:"Liking Steam workshop items",gettingAnnouncementParams:"Getting Steam announcement information",likingAnnouncement:"Liking Steam announcement",changingArea:"Changing Steam area: %0...",notNeededChangeArea:"The current area does not need to be changed",noAnotherArea:"Please check whether the proxy is turned on correctly",gettingAreaInfo:"Getting Steam area information...",changeAreaNotice:"Suspected of a locked zone game, try to change the zone to execute",steamFinishNotice:"Steam task completed, try to change the shopping cart area back to CN",gettingSubid:"Getting subid",addingFreeLicense:"Adding free license",missParams:"Missing parameters",gettingLicenses:"Getting licenses...",requestingPlayTestAccess:"Requesting play test access",tryChangeAreaNotice:"This function cannot detect whether the game is limited, so it will try to change the area before entering the library. Failure to change the area will not affect the subsequent storage.",servers:"Server",joiningDiscordServer:"Joining Discord Server",leavingDiscordServer:"Leaving Discord Server",gettingDiscordGuild:"Getting Discord server Id",getDiscordAuthFailed:"Failed to get Discord token, please check whether the Discord account is logged in",discordImportantNotice:"Important Reminder! ! !",discordImportantNoticeText:"Due to the background update of the Discord website, currently using this script to join a group may cause the Discord account to be forcibly logged out, and two-step verification is required to log in normally, please use it with caution! ! !",continue:"Continue",skipDiscordTask:"Skip",continueAndDontRemindAgain:"Continue without Reminders",users:"User",loginIns:'Please log in to Instagram',insBanned:"Your Instagram account has been banned",verifyingInsAuth:"Verifying Instagram token...",gettingInsUserId:"Getting Instagram user Id",followingIns:"Following Instagram user",unfollowingIns:"Unfollowing Instagram user",reddits:"Reddit/User",loginReddit:'Please log in to Reddit',changingRedditVersion:"Switching Reddit to a new version page...",joiningReddit:"Joining the Reddit",leavingReddit:"Leaving the Reddit",followingRedditUser:"Following Reddit User",unfollowingRedditUser:"Unfollowing Reddit User",channels:"Channel",followingTwitchChannel:"Following Twitch Channel",unfollowingTwitchChannel:"Unfollowing Twitch Channel",gettingTwitchChannelId:"Getting Twitch Channel Id",checkingTwitchIntegrity:"Checking Twitch integrity...",twitterUser:"Twitter User",retweets:"Retweet",gettingTwitterUserId:"Getting Twitter User Id",followingTwitterUser:"Following Twitter User",unfollowingTwitterUser:"Unfollowing Twitter User",retweetting:"Retweetting",unretweetting:"Unretweetting",names:"Group/Public/Wall",loginVk:'Please log in to Vk',gettingVkId:"Getting Vk task Id",joiningVkGroup:"Joining Vk Group",leavingVkGroup:"Leaving Vk Group",joiningVkPublic:"Joining Vk Public",leavingVkPublic:"Leaving Vk Public",sendingVkWall:"Sending Vk Wall",deletingVkWall:"Deleting Vk Wall",youtubeChannel:"YouTube Channel",likes:"Like",loginYtb:'Please log in to YouTube',tryUpdateYtbAuth:'Please try to update YouTube token',gettingYtbToken:"Getting YouTube Token...",followingYtbChannel:"Subscribing to YouTube channel",unfollowingYtbChannel:"Unsubscribing to YouTube channel",likingYtbVideo:"Liking YouTube video",unlikingYtbVideo:"Unliking YouTube video",giveKeyNoticeBefore:"Each verification interval is 15s",giveKeyNoticeAfter:'If there is no key, please check at https://givekey.ru/profile',noPoints:"Not enough points, skip the lottery",getNeedPointsFailed:"ailed to obtain the required points, skip the lottery",joiningLottery:"Joining the lottery",doingGleamTask:"Doing Gleam Task...",gettingGleamLink:"Getting Gleam task link...",gleamTaskNotice:"If this page has not been closed for a long time, please close it yourself after completing any task!",verifiedGleamTasks:"Attempted to verify all tasks. If the verification fails, please try to verify manually or complete it!",gsNotice:'In order to avoid getting the "0000-0000-0000" key, the "Grab Key" button has been hidden, please close the script when obtaining the key!',giveeClubVerifyNotice:"Verifying task...",giveeClubVerifyFinished:"Wait for the verification to complete and join it by yourself",doingKeyhubTask:"Doing Keyhub Task...",SweepWidgetNotice:"The task is being processed and verified. There is an interval of 1~3s for each verification task to prevent the triggering of too fast verification warning..."}},d=["zh","en"].includes(N.other.language)?N.other.language:"en";const j=function(t){for(var e,s=arguments.length,i=new Array(1i[parseInt(e,10)]):t};t=class{constructor(){var t,e,s;s=void 0,(e="tasks")in(t=this)?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s}getRealParams(e,s,i,n){try{let t=[];return 0n(t)).filter(t=>t)]),!i&&0{const t=GM_openInTab("https://discord.com/channels/@me#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=null===(t=GM_getValue("discordAuth"))||void 0===t?void 0:t.auth;t?(w(this,k,{auth:t}),s.success(),e(await g(this,T,A).call(this))):(s.error("Error: Update discord auth failed!"),e(!1))}})}catch(t){return D(t,"Discord.updateAuth"),!1}}async function V(t){try{const l=F({type:"joiningDiscordServer",text:t});var e,s,{result:i,statusText:n,status:a,data:o}=await I({url:"https://discord.com/api/v9/invites/"+t,method:"POST",dataType:"json",headers:{authorization:f(this,k).auth,origin:"https://discord.com",referer:"https://discord.com/invite/"+t}});if("Success"!==i||200!==(null==o?void 0:o.status))return l.error(i+`:${n}(${a})`),!1;l.success();var r=String(null===(e=o.response)||void 0===e||null===(s=e.guild)||void 0===s?void 0:s.id);return r&&(g(this,_,W).call(this,t,r),this.tasks.servers=G([...this.tasks.servers,t])),!0}catch(t){return D(t,"Discord.joinServer"),!1}}async function O(t){try{if(this.whiteList.servers.includes(t))return F({type:"whiteList",text:"Discord.leaveServer",id:t}),!0;var e=await g(this,L,P).call(this,t);if(!e)return!1;const o=F({type:"leavingDiscordServer",text:e});var{result:s,statusText:i,status:n,data:a}=await I({url:"https://discord.com/api/v9/users/@me/guilds/"+e,method:"DELETE",headers:{authorization:f(this,k).auth}});return"Success"===s&&204===(null==a?void 0:a.status)?(o.success(),!0):(o.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Discord.leaveServer"),!1}}async function P(t){try{const u=F({type:"gettingDiscordGuild",text:t});var e=f(this,y)[t];if(e)return u.success(),e;var{result:s,statusText:i,status:n,data:a}=await I({url:"https://discord.com/api/v9/invites/"+t,responseType:"json",method:"GET"});if("Success"!==s||200!==(null==a?void 0:a.status))return u.error(s+`:${i}(${n})`),!1;var o,r,l=null===(o=a.response)||void 0===o||null===(r=o.guild)||void 0===r?void 0:r.id;return l?(u.success(),g(this,_,W).call(this,t,l),l):(u.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Discord.getGuild"),!1}}function W(t,e){try{f(this,y)[t]=e,GM_setValue("discordCache",f(this,y))}catch(t){D(t,"Discord.setCache")}}const R=class extends t{constructor(){var t;super(...arguments),e(this,_),e(this,L),e(this,C),e(this,x),e(this,S),e(this,T),p(this,"tasks",JSON.parse(v)),p(this,"whiteList",{...JSON.parse(v),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.discord}),s(this,k,{writable:!0,value:GM_getValue("discordAuth")||{}}),s(this,y,{writable:!0,value:GM_getValue("discordCache")||{}}),s(this,b,{writable:!0,value:!1})}async init(){try{if(!GM_getValue("dontRemindDiscordAgain"))if(!await a().fire({title:j("discordImportantNotice"),text:j("discordImportantNoticeText"),showCancelButton:!0,showDenyButton:!0,confirmButtonText:j("continue"),cancelButtonText:j("skipDiscordTask"),denyButtonText:j("continueAndDontRemindAgain")}).then(t=>{var{isConfirmed:e,isDenied:t}=t;return!!e||!!t&&(GM_setValue("dontRemindDiscordAgain",!0),!0)}))return w(this,b,!1),"skip";return f(this,b)?!0:f(this,k).auth?await g(this,T,A).call(this)?(F({}).success(j("initSuccess","Discord")),w(this,b,!0),!0):(GM_setValue("discordAuth",{auth:null}),await g(this,S,E).call(this)?(F({}).success(j("initSuccess","Discord")),w(this,b,!0),!0):(F({}).error(j("initFailed","Discord")),!1)):!!await g(this,S,E).call(this)&&(w(this,b,!0),!0)}catch(t){return D(t,"Discord.init"),!1}}async toggle(t){var{doTask:e=!0,serverLinks:t=[]}=t;try{if(!f(this,b))return F({text:j("needInit")}),!1;const i=[];if(e&&!N.doTask.discord.servers||!e&&!N.undoTask.discord.servers)F({type:"globalOptionsSkip",text:"discord.servers"});else{var s=this.getRealParams("servers",t,e,t=>{return null===(t=t.match(/invite\/(.+)/))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return D(t,"Discord.toggleServers"),!1}}};function M(t,e){K(t,e),e.add(t)}function Y(t,e,s){K(t,e),e.set(t,s)}function K(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function B(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function z(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,H(t,e,"set"),s),s}function q(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function J(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,H(t,e,"get"))}function H(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const X=JSON.stringify({users:[]});var Q=new WeakMap,Z=new WeakMap,tt=new WeakMap,et=new WeakSet,st=new WeakSet,it=new WeakSet,nt=new WeakSet;async function at(){var t=0{return null===(t=t.match(/https:\/\/www\.instagram\.com\/(.+)?\//))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return D(t,"Instagram.toggleUsers"),!1}}};function ct(t,e){ht(t,e),e.add(t)}function dt(t,e,s){ht(t,e),e.set(t,s)}function ht(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pt(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function gt(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,mt(t,e,"set"),s),s}function ft(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function wt(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,mt(t,e,"get"))}function mt(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const vt=JSON.stringify({reddits:[]});var kt=new WeakMap,yt=new WeakMap,bt=new WeakSet,Tt=new WeakSet;async function St(){try{const s=F({text:j("changingRedditVersion")});return GM_setValue("redditAuth",null),await new Promise(t=>{const e=GM_openInTab("https://www.reddit.com/#auth",{active:!0,insert:!0,setParent:!0});e.onclose=async()=>{s.success(),t(await ft(this,Tt,xt).call(this,!0))}})}catch(t){return D(t,"Reddit.useBeta"),!1}}async function xt(){var t,e=0{var e=null===(e=t.match(/https?:\/\/www\.reddit\.com\/r\/([^/]*)/))||void 0===e?void 0:e[1],t=null===(t=t.match(/https?:\/\/www\.reddit\.com\/user\/([^/]*)/))||void 0===t?void 0:t[1];return t?e||t:e});if(0!0)}catch(t){return D(t,"Reddit.toggle"),!1}}};function It(t,e){Ct(t,e),e.add(t)}function Gt(t,e,s){Ct(t,e),e.set(t,s)}function Ct(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Lt(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function _t(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,Vt(t,e,"set"),s),s}function At(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function Et(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,Vt(t,e,"get"))}function Vt(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const Ot=JSON.stringify({channels:[]});var Pt=new WeakMap,Wt=new WeakMap,Dt=new WeakMap,Ut=new WeakMap,Ft=new WeakSet,Nt=new WeakSet,jt=new WeakSet,Rt=new WeakSet,Mt=new WeakSet,Yt=new WeakSet;async function Kt(){try{const r=F({text:j("verifyingAuth","Twitch")});var t,e,s,{result:i,statusText:n,status:a,data:o}=await I({url:"https://gql.twitch.tv/gql",method:"POST",dataType:"json",headers:{Authorization:"OAuth "+Et(this,Pt).authToken,"Client-Id":Et(this,Pt).clientId},data:'[{"operationName":"FrontPageNew_User","variables":{"limit":1},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"64bd07a2cbaca80699d62636d966cf6395a5d14a1f0a14282067dcb28b13eb11"}}}]'});return"Success"===i?200===(null==o?void 0:o.status)&&null!==(t=o.response)&&void 0!==t&&null!==(e=t[0])&&void 0!==e&&null!==(s=e.data)&&void 0!==s&&s.currentUser?(await At(this,Nt,Bt).call(this),r.success(),!0):(r.error(`Error:${null==o?void 0:o.statusText}(${null==o?void 0:o.status})`),!1):(r.error(i+`:${n}(${a})`),!1)}catch(t){return D(t,"Twitch.verifyAuth"),!1}}async function Bt(){var t=0{const t=GM_openInTab("https://www.twitch.tv/#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=GM_getValue("twitchAuth");t?(_t(this,Pt,t),s.success(),e(await At(this,Ft,Kt).call(this))):(s.error("Error: Update twitch auth failed!"),e(!1))}})}catch(t){return D(t,"Twitch.updateAuth"),!1}}async function qt(t){var{name:e,doTask:t=!0}=t;try{if(!t&&this.whiteList.channels.includes(e))return F({type:"whiteList",text:"Twitch.unfollowChannel",id:e}),!0;var s=await At(this,Mt,Jt).call(this,e);if(!s)return!1;const p=F({type:`${t?"":"un"}followingTwitchChannel`,text:e});var i,n,a,o,r='[{"operationName":"FollowButton_FollowUser","variables":{"input":{"disableNotifications":false,"targetID":"'+s+'"}},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"800e7346bdf7e5278a3c1d3f21b2b56e2639928f86815677a7126b093b2fdd08"}}}]',l=`[{"operationName":"FollowButton_UnfollowUser","variables":{"input":{"targetID":"${s}"}},`+'"extensions":{"persistedQuery":{"version":1,"sha256Hash":"f7dae976ebf41c755ae2d758546bfd176b4eeb856656098bb40e0a672ca0d880"}}}]',{result:u,statusText:c,status:d,data:h}=await I({url:"https://gql.twitch.tv/gql",method:"POST",dataType:"json",anonymous:!0,headers:{Origin:"https://www.twitch.tv",Referer:"https://www.twitch.tv/",Authorization:"OAuth "+Et(this,Pt).authToken,"Client-Id":Et(this,Pt).clientId,"Client-Version":Et(this,Pt).clientVersion,"X-Device-Id":Et(this,Pt).deviceId,"Client-Session-Id":Et(this,Pt).clientSessionId,"Client-Integrity":Et(this,Ut)},data:t?r:l});return"Success"===u?200===(null==h?void 0:h.status)&&null!==(i=h.response)&&void 0!==i&&i[0]&&!h.response[0].errors?(p.success(),t&&(this.tasks.channels=G([...this.tasks.channels,e])),!0):(p.error("Error:"+((null==h||null===(n=h.response)||void 0===n||null===(a=n[0].errors)||void 0===a||null===(o=a[0])||void 0===o?void 0:o.message)||`${null==h?void 0:h.statusText}(${null==h?void 0:h.status})`)),!1):(p.error(u+`:${c}(${d})`),!1)}catch(t){return D(t,"Twitch.toggleChannel"),!1}}async function Jt(t){try{const d=F({type:"gettingTwitchChannelId",text:t});var e=Et(this,Wt)[t];if(e)return d.success(),e;var{result:s,statusText:i,status:n,data:a}=await I({url:"https://gql.twitch.tv/gql",method:"POST",headers:{Authorization:"OAuth "+Et(this,Pt).authToken,"Client-Id":Et(this,Pt).clientId},responseType:"json",data:`[{"operationName":"ActiveWatchParty","variables":{"channelLogin":"${t}"},`+'"extensions":{"persistedQuery":{"version":1,"sha256Hash":"4a8156c97b19e3a36e081cf6d6ddb5dbf9f9b02ae60e4d2ff26ed70aebc80a30"}}}]'});if("Success"!==s)return d.error(s+`:${i}(${n})`),!1;if(200!==(null==a?void 0:a.status))return d.error(`Error:${null==a?void 0:a.statusText}(${null==a?void 0:a.status})`),!1;var o,r,l,u,c=null===(o=a.response)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l||null===(u=l.user)||void 0===u?void 0:u.id;return c?(At(this,Yt,Ht).call(this,t,String(c)),d.success(),c):(d.error(`Error:${a.statusText}(${a.status})`),!1)}catch(t){return D(t,"Twitch.getChannelId"),!1}}function Ht(t,e){try{Et(this,Wt)[t]=e,GM_setValue("twitchCache",Et(this,Wt))}catch(t){D(t,"Twitch.setCache")}}const Xt=class extends t{constructor(){var t;super(...arguments),It(this,Yt),It(this,Mt),It(this,Rt),It(this,jt),It(this,Nt),It(this,Ft),Lt(this,"tasks",JSON.parse(Ot)),Lt(this,"whiteList",{...JSON.parse(Ot),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.twitch}),Gt(this,Pt,{writable:!0,value:GM_getValue("twitchAuth")||{}}),Gt(this,Wt,{writable:!0,value:GM_getValue("twitchCache")||{}}),Gt(this,Dt,{writable:!0,value:!1}),Gt(this,Ut,{writable:!0,value:void 0})}async init(){try{return Et(this,Dt)?!0:Et(this,Pt).authToken&&Et(this,Pt).clientId&&Et(this,Pt).clientVersion&&Et(this,Pt).deviceId&&Et(this,Pt).clientSessionId?await At(this,Ft,Kt).call(this)?(F({}).success(j("initSuccess","Twitch")),_t(this,Dt,!0),!0):(GM_setValue("twitchAuth",null),await At(this,jt,zt).call(this)?(F({}).success(j("initSuccess","Twitch")),_t(this,Dt,!0),!0):(F({}).error(j("initFailed","Twitch")),!1)):!!await At(this,jt,zt).call(this)&&(_t(this,Dt,!0),!0)}catch(t){return D(t,"Twitch.init"),!1}}async toggle(t){var{doTask:e=!0,channelLinks:t=[]}=t;try{if(!Et(this,Dt))return F({text:j("needInit")}),!1;const i=[];if(e&&!N.doTask.twitch.channels||!e&&!N.undoTask.twitch.channels)F({type:"globalOptionsSkip",text:"twitch.channels"});else{var s=this.getRealParams("channels",t,e,t=>{return null===(t=t.match(/https:\/\/(www\.)?twitch\.tv\/(.+)/))||void 0===t?void 0:t[2]});if(0!0)}catch(t){return D(t,"Twitch.toggle"),!1}}};function Qt(t,e){te(t,e),e.add(t)}function Zt(t,e,s){te(t,e),e.set(t,s)}function te(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ee(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function se(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,ae(t,e,"set"),s),s}function ie(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function ne(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,ae(t,e,"get"))}function ae(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const oe=JSON.stringify({names:[]});var re=new WeakMap,le=new WeakMap,ue=new WeakMap,ce=new WeakSet,de=new WeakSet,he=new WeakSet,pe=new WeakSet,ge=new WeakSet,fe=new WeakSet,we=new WeakSet,me=new WeakSet;async function ve(){try{const e=F({text:j("verifyAuth","Vk")}),{result:s,statusText:i,status:n,data:a}=await I({url:"https://vk.com/im",method:"GET"});var t;return"Success"===s?null!==a&&void 0!==a&&a.finalUrl.includes("vk.com/login")?(e.error("Error:"+j("loginVk"),!0),!1):200===(null===a||void 0===a?void 0:a.status)?(se(this,re,(null===(t=a.responseText.match(/TopNavBtn__profileLink" href="\/(.*?)"/))||void 0===t?void 0:t[1])||""),e.success(),!0):(e.error(`Error:${null===a||void 0===a?void 0:a.statusText}(${null===a||void 0===a?void 0:a.status})`),!1):(e.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Vk.verifyAuth"),!1}}async function ke(t,e){var s=!(2{return null===(t=t.match(/https:\/\/vk\.com\/([^/]+)/))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return D(t,"Vk.toggle"),!1}}};function Ge(t,e){Le(t,e),e.add(t)}function Ce(t,e,s){Le(t,e),e.set(t,s)}function Le(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _e(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Ae(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,Oe(t,e,"set"),s),s}function Ee(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function Ve(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,Oe(t,e,"get"))}function Oe(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const Pe=JSON.stringify({channels:[],likes:[]}),We=async function(t,e){try{const h=F({text:j("gettingYtbToken")}),{result:p,statusText:g,status:f,data:w}=await I({url:t,method:"GET"});if("Success"!==p)return h.error(p+`:${g}(${f})`),{};if(200!==(null===w||void 0===w?void 0:w.status))return h.error(`Error:${null===w||void 0===w?void 0:w.statusText}(${null===w||void 0===w?void 0:w.status})`),{};{var s,i;if(w.responseText.includes("accounts.google.com/ServiceLogin?service=youtube"))return h.error("Error:"+j("loginYtb"),!0),{needLogin:!0};var n=null===(s=w.responseText.match(/"INNERTUBE_API_KEY":"(.*?)"/))||void 0===s?void 0:s[1],a=(null===(i=w.responseText.match(/\(\{"INNERTUBE_CONTEXT":([\w\W]*?)\}\)/)||w.responseText.match(/"INNERTUBE_CONTEXT":([\w\W]*?\}),"INNERTUBE/))||void 0===i?void 0:i[1])||"{}";const{client:m,request:v}=JSON.parse(a);if(n&&m&&v){if(m.hl="en","channel"===e){var o,r=null===(o=w.responseText.match(//))||void 0===o?void 0:o[1];return r?(h.success(),{params:{apiKey:n,client:m,request:v,channelId:r}}):(h.error('Error: Get "channelId" failed!'),{})}if("likeVideo"!==e)return h.error("Error: Unknown type"),{};var l,u,c=null===(l=w.responseText.match(//))||void 0===l?void 0:l[1],d=null===(u=w.responseText.match(/"likeParams":"(.*?)"/))||void 0===u?void 0:u[1];return c?(h.success(),{params:{apiKey:n,client:m,request:v,videoId:c,likeParams:d}}):(h.error('Error: Get "videoId" failed!'),{})}return h.error('Error: Parameter "apiKey" not found!'),{}}}catch(t){return D(t,"Youtube.getInfo"),{}}};var De=new WeakMap,Ue=new WeakMap,Fe=new WeakMap,Ne=new WeakSet,je=new WeakSet,Re=new WeakSet,Me=new WeakSet,Ye=new WeakSet;class Ke extends t{constructor(){var t;super(...arguments),Ge(this,Ye),Ge(this,Me),Ge(this,Re),Ge(this,je),Ge(this,Ne),_e(this,"tasks",JSON.parse(Pe)),_e(this,"whiteList",{...JSON.parse(Pe),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.youtube}),Ce(this,De,{writable:!0,value:GM_getValue("youtubeAuth")||{}}),Ce(this,Ue,{writable:!0,value:!1}),Ce(this,Fe,{writable:!0,value:"https://www.youtube.com/channel/"+N.other.youtubeVerifyChannel})}async init(){try{return Ve(this,Ue)?!0:Ve(this,De).PAPISID?await Ee(this,Ne,Be).call(this)?(F({}).success(j("initSuccess","Youtube")),Ae(this,Ue,!0),!0):(GM_setValue("youtubeAuth",null),await Ee(this,je,ze).call(this)?(F({}).success(j("initSuccess","Youtube")),Ae(this,Ue,!0),!0):(F({}).error(j("initFailed","Youtube")),!1)):!!await Ee(this,je,ze).call(this)&&(Ae(this,Ue,!0),!0)}catch(t){return D(t,"Youtube.init"),!1}}async toggle(t){var{doTask:e=!0,channelLinks:s=[],videoLinks:t=[]}=t;try{if(!Ve(this,Ue))return F({text:j("needInit")}),!1;const a=[];if(e&&!N.doTask.youtube.channels||!e&&!N.undoTask.youtube.channels)F({type:"globalOptionsSkip",text:"youtube.channels"});else{var i=this.getRealParams("channels",s,e,t=>{var e;return/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(t)?null===(e=t.match(/url=(https:\/\/www\.youtube\.com\/.*)/))||void 0===e?void 0:e[1]:t});if(0{var e;return/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(t)?null===(e=t.match(/url=(https:\/\/www\.youtube\.com\/.*)/))||void 0===e?void 0:e[1]:t});if(0!0)}catch(t){return D(t,"Youtube.toggle"),!1}}}async function Be(){try{return await Ee(this,Me,Je).call(this,{link:Ve(this,Fe),doTask:!0,verify:!0})}catch(t){return D(t,"Youtube.verifyAuth"),!1}}async function ze(){try{const s=F({text:j("updatingAuth","Youtube")});return await new Promise(e=>{const t=GM_openInTab("https://www.youtube.com/#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=GM_getValue("youtubeAuth");t?(Ae(this,De,t),s.success(),Ee(this,Ne,Be).call(this).then(t=>{e(t)})):(s.error("Error: Update youtube auth failed!"),e(!1))}})}catch(t){return D(t,"Discord.updateAuth"),!1}}function qe(t,e){return We(t,e)}async function Je(t){var{link:e,doTask:s=!0,verify:t=!1}=t;try{var{params:i,needLogin:n}=await Ee(this,Re,qe).call(this,e,"channel"),{apiKey:a,client:o,request:r,channelId:l}=i||{};if(n)return F({html:j("loginYtb")}),!1;if(!(a&&o&&r&&l))return F({text:'"getYtbToken" failed'}),!1;if(!s&&!t&&this.whiteList.channels.includes(l))return F({type:"whiteList",text:"Youtube.unfollowChannel",id:l}),!0;const c=t?F({text:j("verifyingAuth","Youtube")}):F({type:s?"followingYtbChannel":"unfollowingYtbChannel",text:l});var u=parseInt(String((new Date).getTime()/1e3),10);const{result:d,statusText:h,status:p,data:g}=await I({url:`https://www.youtube.com/youtubei/v1/subscription/${s?"":"un"}subscribe?key=`+a,method:"POST",headers:{origin:"https://www.youtube.com",referer:"https://www.youtube.com/channel/"+l,"content-type":"application/json","x-goog-authuser":"0","x-goog-visitor-id":null==o?void 0:o.visitorData,"x-origin":"https://www.youtube.com",authorization:`SAPISIDHASH ${u}_`+sha1(`${u} ${Ve(this,De).PAPISID} https://www.youtube.com`)},data:JSON.stringify({context:{client:o,request:{sessionId:null==r?void 0:r.sessionId,internalExperimentFlags:[],consistencyTokenJars:[]},user:{}},channelIds:[l],params:s?"EgIIAhgA":"CgIIAhgA"})});return"Success"===d?200===(null===g||void 0===g?void 0:g.status)?s&&(/"subscribed": true/.test(g.responseText)||g.responseText.includes("The subscription already exists"))||!s&&/"subscribed": false/.test(g.responseText)?(c.success(),s&&!t&&(this.tasks.channels=G([...this.tasks.channels,e])),!0):t&&g.responseText.includes("You may not subscribe to yourself")?(c.success(),!0):(c.error(j("tryUpdateYtbAuth"),!0),!1):(c.error(`Error:${null===g||void 0===g?void 0:g.statusText}(${null===g||void 0===g?void 0:g.status})`),!1):(c.error(d+`:${h}(${p})`),!1)}catch(t){return D(t,"Youtube.toggleChannel"),!1}}async function He(t){var{link:e,doTask:t=!0}=t;try{var{params:s,needLogin:i}=await Ee(this,Re,qe).call(this,e,"likeVideo"),{apiKey:n,client:a,request:o,videoId:r,likeParams:l}=s||{};if(i)return F({html:""+j("loginYtb")}),!1;if(!(n&&a&&o&&r&&l))return F({text:'"getYtbToken" failed'}),!1;if(!t&&this.whiteList.likes.includes(r))return F({type:"whiteList",text:"Youtube.unlikeVideo",id:r}),!0;const c=F({type:t?"likingYtbVideo":"unlikingYtbVideo",text:r});var u=parseInt(String((new Date).getTime()/1e3),10);const d={context:{client:a,request:{sessionId:o.sessionId,internalExperimentFlags:[],consistencyTokenJars:[]},user:{}},target:{videoId:r}};if(t){if(!l)return c.error("Empty likeParams"),!1;d.params=l}const{result:h,statusText:p,status:g,data:f}=await I({url:`https://www.youtube.com/youtubei/v1/like/${t?"":"remove"}like?key=`+n,method:"POST",headers:{origin:"https://www.youtube.com",referer:"https://www.youtube.com/watch?v="+r,"content-type":"application/json","x-goog-authuser":"0","x-goog-visitor-id":a.visitorData,"x-origin":"https://www.youtube.com",authorization:`SAPISIDHASH ${u}_`+sha1(`${u} ${Ve(this,De).PAPISID} https://www.youtube.com`)},data:JSON.stringify(d)});return"Success"===h?200===(null===f||void 0===f?void 0:f.status)?t&&f.responseText.includes("Added to Liked videos")||!t&&(f.responseText.includes("Removed from Liked videos")||f.responseText.includes("Dislike removed"))?(c.success(),t&&(this.tasks.likes=G([...this.tasks.likes,e])),!0):(c.error(j("tryUpdateYtbAuth"),!0),!1):(c.error(`Error:${null===f||void 0===f?void 0:f.statusText}(${null===f||void 0===f?void 0:f.status})`),!1):(c.error(h+`:${p}(${g})`),!1)}catch(t){return D(t,"Youtube.toggleLikeVideo"),!1}}function Xe(t,e){Ze(t,e),e.add(t)}function Qe(t,e,s){Ze(t,e),e.set(t,s)}function Ze(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ts(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function es(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function ss(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,ns(t,e,"set"),s),s}function is(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,ns(t,e,"get"))}function ns(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const as=JSON.stringify({groups:[],officialGroups:[],wishlists:[],follows:[],forums:[],workshops:[],workshopVotes:[],curators:[],curatorLikes:[],announcements:[],licenses:[],playtests:[]});var os=new WeakMap,rs=new WeakMap,ls=new WeakMap,us=new WeakMap,cs=new WeakMap,ds=new WeakMap,hs=new WeakSet,ps=new WeakSet,gs=new WeakSet,fs=new WeakSet,ws=new WeakSet,ms=new WeakSet,vs=new WeakSet,ks=new WeakSet,ys=new WeakSet,bs=new WeakSet,Ts=new WeakSet,Ss=new WeakSet,xs=new WeakSet,$s=new WeakSet,Is=new WeakSet,Gs=new WeakSet,Cs=new WeakSet,Ls=new WeakSet,_s=new WeakSet,As=new WeakSet,Es=new WeakSet,Vs=new WeakSet,Os=new WeakSet,Ps=new WeakSet,Ws=new WeakSet,Ds=new WeakSet,Us=new WeakSet,Fs=new WeakSet,Ns=new WeakSet;async function js(){try{const s=F({text:j("updatingAuth",j("steamStore"))}),{result:i,statusText:n,status:a,data:o}=await I({url:"https://store.steampowered.com/",method:"GET",headers:{Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Cache-Control":"max-age=0","Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Upgrade-Insecure-Requests":"1"}});if("Success"!==i)return s.error(i+`:${n}(${a})`),!1;if(200!==(null===o||void 0===o?void 0:o.status))return s.error(`Error:${null===o||void 0===o?void 0:o.statusText}(${null===o||void 0===o?void 0:o.status})`),!1;var t;if(!o.responseText.includes("data-miniprofile="))return s.error("Error:"+j("needLoginSteamStore"),!0),!1;var e=null===(t=o.responseText.match(/g_sessionID = "(.+?)";/))||void 0===t?void 0:t[1];return e?(is(this,rs).storeSessionID=e,s.success(),!0):(s.error('Error: Get "sessionID" failed'),!1)}catch(t){return D(t,"Steam.updateStoreAuth"),!1}}async function Rs(){try{const o=F({text:j("updatingAuth",j("steamCommunity"))}),{result:r,statusText:l,status:u,data:c}=await I({url:"https://steamcommunity.com/my",method:"GET",headers:{Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Cache-Control":"max-age=0","Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Upgrade-Insecure-Requests":"1"}});if("Success"!==r)return o.error(r+`:${l}(${u})`),!1;if(200!==(null===c||void 0===c?void 0:c.status))return o.error(`Error:${null===c||void 0===c?void 0:c.statusText}(${null===c||void 0===c?void 0:c.status})`),!1;var t,e,s;if(c.responseText.includes('href="https://steamcommunity.com/login/home/'))return o.error("Error:"+j("needLoginSteamCommunity"),!0),!1;var i=null===(t=c.responseText.match(/g_steamID = "(.+?)";/))||void 0===t?void 0:t[1],n=null===(e=c.responseText.match(/g_sessionID = "(.+?)";/))||void 0===e?void 0:e[1],a=null===(s=c.responseText.match(/steamcommunity.com\/id\/(.+?)\/friends\//))||void 0===s?void 0:s[1];return(i&&(is(this,rs).steam64Id=i),a&&(is(this,rs).userName=a),n)?(is(this,rs).communitySessionID=n,o.success(),!0):(o.error('Error: Get "sessionID" failed'),!1)}catch(t){return D(t,"Steam.updateCommunityAuth"),!1}}async function Ms(){try{const i=F({text:j("gettingAreaInfo")}),{result:n,statusText:a,status:o,data:r}=await I({url:"https://store.steampowered.com/cart/",method:"GET"});if("Success"!==n)return i.error(n+`:${a}(${o})`),{};if(200!==(null===r||void 0===r?void 0:r.status))return i.error(`Error:${null===r||void 0===r?void 0:r.statusText}(${null===r||void 0===r?void 0:r.status})`),{};var t,e=null===(t=r.responseText.match(//g)].map(t=>t[1]);return e&&0{const e=setInterval(()=>{"waiting"!==is(this,ds)&&(clearInterval(e),t(!0))})}),is(this,cs)===e||!e&&"CN"!==is(this,cs))return!0;ss(this,ds,"waiting");let t=e;if(!t){const{currentArea:u,areas:c}=await es(this,gs,Ms).call(this);if(!u||!c)return ss(this,ds,"error"),!1;if("CN"!==u)return ss(this,ds,"skip"),F({text:"notNeededChangeArea"}),"skip";var s=c.filter(t=>t&&"CN"!==t);if(!s||0===s.length)return ss(this,ds,"noAnotherArea"),F({text:"noAnotherArea"}),!1;[t]=s}const l=F({text:j("changingArea",t)});var{result:i,statusText:n,status:a,data:o}=await I({url:"https://store.steampowered.com/account/setcountry",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({cc:t,sessionid:is(this,rs).storeSessionID})});if("Success"!==i)return ss(this,ds,"error"),l.error(i+`:${n}(${a})`),"CN";if(200!==(null==o?void 0:o.status)||"true"!==o.responseText)return ss(this,ds,"error"),l.error(`Error:${null==o?void 0:o.statusText}(${null==o?void 0:o.status})`),"CN";var r=(await es(this,gs,Ms).call(this))["currentArea"];return r===t?(ss(this,ds,"success"),l.success(),r):(ss(this,ds,"error"),l.error("Error: change country filed"),"CN")}catch(t){return ss(this,ds,"error"),D(t,"Steam.changeArea"),!1}}async function Ks(t){try{const e=F({type:"joiningSteamGroup",text:t}),{result:s,statusText:i,status:n,data:a}=await I({url:"https://steamcommunity.com/groups/"+t,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({action:"join",sessionID:is(this,rs).communitySessionID})});return"Success"===s?200!==(null===a||void 0===a?void 0:a.status)||a.responseText.includes("grouppage_join_area")?(e.error(`Error:${null===a||void 0===a?void 0:a.statusText}(${null===a||void 0===a?void 0:a.status})`),!1):(e.success(),this.tasks.groups=G([...this.tasks.groups,t]),!0):(e.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Steam.joinGroup"),!1}}async function Bs(t){try{if(this.whiteList.groups.includes(t))return F({type:"whiteList",text:"Steam.leaveGroup",id:t}),!0;var e=await es(this,vs,zs).call(this,t);if(!e)return!1;const s=F({type:"leavingSteamGroup",text:t}),{result:i,statusText:n,status:a,data:o}=await I({url:`https://steamcommunity.com/id/${is(this,rs).userName}/home_process`,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionID:is(this,rs).communitySessionID,action:"leaveGroup",groupId:e})});return"Success"===i?200===(null===o||void 0===o?void 0:o.status)&&o.finalUrl.includes("groups")&&0===$(o.responseText.replace(//g,"").toLowerCase()).find(`a[href='https://steamcommunity.com/groups/${t.toLowerCase()}']`).length?(s.success(),!0):(s.error(`Error:${null===o||void 0===o?void 0:o.statusText}(${null===o||void 0===o?void 0:o.status})`),!1):(s.error(i+`:${n}(${a})`),!1)}catch(t){return D(t,"Steam.leaveGroup"),!1}}async function zs(t){try{const n=F({type:"gettingSteamGroupId",text:t});var e=is(this,os).group[t];if(e)return n.success(),e;const{result:a,statusText:o,status:r,data:l}=await I({url:"https://steamcommunity.com/groups/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==a)return n.error(a+`:${o}(${r})`),!1;if(200!==(null===l||void 0===l?void 0:l.status))return n.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1;var s,i=null===(s=l.responseText.match(/OpenGroupChat\( '([0-9]+)'/))||void 0===s?void 0:s[1];return i?(es(this,Ns,fi).call(this,"group",t,i),n.success(),i):(n.error(`Error:${l.statusText}(${l.status})`),!1)}catch(t){return D(t,"Steam.getGroupID"),!1}}async function qs(t){try{const i=F({type:"joiningSteamOfficialGroup",text:t}),{result:n,statusText:a,status:o,data:r}=await I({url:`https://steamcommunity.com/games/${t}?action=join&sessionID=`+is(this,rs).communitySessionID,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==n)return i.error(n+`:${a}(${o})`),!1;if(200!==(null===r||void 0===r?void 0:r.status)||r.responseText.includes('id="publicGroupJoin"'))return i.error(`Error:${null===r||void 0===r?void 0:r.statusText}(${null===r||void 0===r?void 0:r.status})`),!1;var e;i.success(),this.tasks.officialGroups=G([...this.tasks.officialGroups,t]);var s=null===(e=r.responseText.match(/steam:\/\/friends\/joinchat\/([0-9]+)/))||void 0===e?void 0:e[1];return s&&es(this,Ns,fi).call(this,"officialGroup",t,s),!0}catch(t){return D(t,"Steam.joinOfficialGroup"),!1}}async function Js(t){try{if(this.whiteList.officialGroups.includes(t))return F({type:"whiteList",text:"Steam.leaveOfficialGroup",id:t}),!0;var e=await es(this,bs,Hs).call(this,t);if(!e)return!1;const o=F({type:"leavingSteamOfficialGroup",text:t});var{result:s,statusText:i,status:n,data:a}=await I({url:`https://steamcommunity.com/id/${is(this,rs).userName}/home_process`,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionID:is(this,rs).communitySessionID,action:"leaveGroup",groupId:e})});if("Success"!==s)return o.error(s+`:${i}(${n})`),!1;if(200!==(null==a?void 0:a.status))return o.error(`Error:${null==a?void 0:a.statusText}(${null==a?void 0:a.status})`),!1;{const{result:r,statusText:l,status:u,data:c}=await I({url:"https://steamcommunity.com/games/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});return"Success"===r?200===(null===c||void 0===c?void 0:c.status)&&c.responseText.includes('id="publicGroupJoin"')?(o.success(),!0):(o.error(`Error:${null===c||void 0===c?void 0:c.statusText}(${null===c||void 0===c?void 0:c.status})`),!1):(o.error(r+`:${l}(${u})`),!1)}}catch(t){return D(t,"Steam.leaveOfficialGroup"),!1}}async function Hs(t){try{const n=F({type:"gettingSteamOfficialGroupId",text:t});var e=is(this,os).officialGroup[t];if(e)return n.success(),e;const{result:a,statusText:o,status:r,data:l}=await I({url:"https://steamcommunity.com/games/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==a)return n.error(a+`:${o}(${r})`),!1;if(200!==(null===l||void 0===l?void 0:l.status))return n.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1;var s,i=null===(s=l.responseText.match(/steam:\/\/friends\/joinchat\/([0-9]+)/))||void 0===s?void 0:s[1];return i?(es(this,Ns,fi).call(this,"officialGroup",t,i),n.success(),i):(n.error(`Error:${l.statusText}(${l.status})`),!1)}catch(t){return D(t,"Steam.getGroupID"),!1}}async function Xs(t){try{var e;const n=F({type:"addingToWishlist",text:t});var{result:s,data:i}=await I({url:"https://store.steampowered.com/api/addtowishlist",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionid:is(this,rs).storeSessionID,appid:t}),dataType:"json"});if("Success"===s&&200===(null==i?void 0:i.status)&&!0===(null===(e=i.response)||void 0===e?void 0:e.success))return n.success(),this.tasks.wishlists=G([...this.tasks.wishlists,t]),!0;const{result:a,statusText:o,status:r,data:l}=await I({url:"https://store.steampowered.com/app/"+t,method:"GET"});return"Success"===a?200===(null===l||void 0===l?void 0:l.status)?"CN"===is(this,cs)&&l.responseText.includes('id="error_box"')?(n.warning(j("changeAreaNotice")),!!await es(this,fs,Ys).call(this)&&await es(this,Ts,Xs).call(this,t)):(!l.responseText.includes('class="queue_actions_ctn"')||!l.responseText.includes('class="already_in_library"'))&&(l.responseText.includes('class="queue_actions_ctn"')&&l.responseText.includes('id="add_to_wishlist_area_success" style="display: none;')||!l.responseText.includes('class="queue_actions_ctn"'))?(n.error(`Error:${l.statusText}(${l.status})`),!1):(n.success(),this.tasks.wishlists=G([...this.tasks.wishlists,t]),!0):(n.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1):(n.error(a+`:${o}(${r})`),!1)}catch(t){return D(t,"Steam.addToWishlist"),!1}}async function Qs(t){try{var e;if(this.whiteList.wishlists.includes(t))return F({type:"whiteList",text:"Steam.removeFromWishlist",id:t}),!0;const a=F({type:"removingFromWishlist",text:t});var{result:s,data:i}=await I({url:"https://store.steampowered.com/api/removefromwishlist",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionid:is(this,rs).storeSessionID,appid:t}),dataType:"json"});if("Success"===s&&200===(null==i?void 0:i.status)&&!0===(null===(e=i.response)||void 0===e?void 0:e.success))return a.success(),!0;const{result:o,statusText:r,status:l,data:u}=await I({url:"https://store.steampowered.com/app/"+t,method:"GET"});if("Success"!==o)return a.error(o+`:${r}(${l})`),!1;if(200!==(null===u||void 0===u?void 0:u.status))return a.error(`Error:${null===u||void 0===u?void 0:u.statusText}(${null===u||void 0===u?void 0:u.status})`),!1;if("CN"===is(this,cs)&&u.responseText.includes('id="error_box"')){a.warning(j("changeAreaNotice"));var n=await es(this,fs,Ys).call(this);return n&&"CN"!==n&&"skip"!==n?await es(this,Ss,Qs).call(this,t):!1}return u.responseText.includes('class="queue_actions_ctn"')&&(u.responseText.includes("ds_owned_flag ds_flag")||u.responseText.includes("add_to_wishlist_area"))?(a.success(),!0):(a.error(`Error:${u.statusText}(${u.status})`),!1)}catch(t){return D(t,"Steam.removeFromWishlist"),!1}}async function Zs(t,e){try{if(!e&&this.whiteList.follows.includes(t))return F({type:"whiteList",text:"Steam.unfollowGame",id:t}),!0;const a=F({type:`${e?"":"un"}followingGame`,text:t}),o={sessionid:is(this,rs).storeSessionID,appid:t};e||(o.unfollow="1");var{result:s,data:i}=await I({url:"https://store.steampowered.com/explore/followgame/",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param(o)});if("Success"===s&&200===(null==i?void 0:i.status)&&"true"===i.responseText)return a.success(),!0;var n=await es(this,$s,ti).call(this,t);return"CN"===is(this,cs)&&"areaLocked"===n?(a.warning(j("changeAreaNotice")),!!await es(this,fs,Ys).call(this)&&await es(this,Ss,Qs).call(this,t)):e===n?(a.success(),e&&(this.tasks.follows=G([...this.tasks.follows,t])),!0):(a.error(`Error:${null==i?void 0:i.statusText}(${null==i?void 0:i.status})`),!1)}catch(t){return D(t,"Steam.toggleFollowGame"),!1}}async function ti(t){try{const{result:e,data:s}=await I({url:"https://store.steampowered.com/app/"+t,method:"GET"});return"Success"===e?200===(null===s||void 0===s?void 0:s.status)&&("CN"===is(this,cs)&&s.responseText.includes('id="error_box"')?"areaLocked":"none"!==$(s.responseText.replace(//g,"")).find(".queue_control_button.queue_btn_follow>.btnv6_blue_hoverfade.btn_medium.queue_btn_active").css("display")):!1}catch(t){return D(t,"Steam.isFollowedGame"),!1}}async function ei(t){var e=!(1/))||void 0===s?void 0:s[1];return i?(es(this,Ns,fi).call(this,"workshop",t,i),n.success(),i):(n.error("Error: getWorkshopAppId failed"),!1)}catch(t){return D(t,"Steam.getWorkshopAppId"),!1}}async function ai(t){try{const o=F({type:"votingUpWorkshop",text:t});var e,{result:s,statusText:i,status:n,data:a}=await I({url:"https://steamcommunity.com/sharedfiles/voteup",method:"POST",responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({id:t,sessionid:is(this,rs).communitySessionID})});return"Success"===s?(200===(null==a?void 0:a.status)&&1===(null===(e=a.response)||void 0===e?void 0:e.success)?o.success():o.error(`Error:${null==a?void 0:a.statusText}(${null==a?void 0:a.status})`),!0):(o.error(s+`:${i}(${n})`),!0)}catch(t){return D(t,"Steam.voteupWorkshop"),!0}}async function oi(t){var e=!(1{return null===(t=t.match(/groups\/(.+)\/?/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/games\/(.+)\/?/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/\?id=([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/\?id=([\d]+)/))||void 0===t?void 0:t[1]});if(e&&0{return null===(t=t.match(/curator\/([\d]+)/))||void 0===t?void 0:t[1]}),b=this.getRealParams("curatorLikes",c,e,t=>{return null===(t=t.match(/https?:\/\/store\.steampowered\.com\/(.*?)\/([^/?]+)/))||void 0===t?void 0:t.slice(1,3).join("/")});if(0{var e;return t.includes("store.steampowered.com")?null===(e=t.match(/store\.steampowered\.com\/news\/app\/([\d]+)\/view\/([\d]+)/))||void 0===e?void 0:e.slice(1,3).join("/"):null===(t=t.match(/steamcommunity\.com\/games\/([\d]+)\/announcements\/detail\/([\d]+)/))||void 0===t?void 0:t.slice(1,3).join("/")});if(e&&0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(e&&N.doTask.steam.playtests&&0("CN"!==is(this,cs)&&(F({}).warning(j("steamFinishNotice")),await es(this,fs,Ys).call(this,"CN")),!0))}catch(t){return D(t,"Steam.toggle"),!1}}};function mi(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function vi(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function ki(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}const yi={steam:{groupLinks:[],wishlistLinks:[],curatorLinks:[],curatorLikeLinks:[],followLinks:[],forumLinks:[],announcementLinks:[],workshopVoteLinks:[],playtestLinks:[]},discord:{serverLinks:[]},instagram:{userLinks:[]},vk:{nameLinks:[]},twitch:{channelLinks:[]},reddit:{redditLinks:[]},youtube:{channelLinks:[],likeLinks:[]}};var bi=new WeakSet,Ti=new WeakSet,Si=new WeakSet,xi=new WeakSet,$i=new WeakSet,Ii=new WeakSet,Gi=new WeakSet,Ci=new WeakSet;async function Li(){try{const e=F({text:j("getTasksInfo")}),s=[];var t=$("#actions tr");$("div.bind-discord").is(":visible")&&$("div.bind-discord a")[0].click(),$("div.bind-twitch").is(":visible")&&$("div.bind-twitch a")[0].click();for(const r of t)s.push(new Promise(e=>{const t=$(r).find('td:not(".hidden")');var s=t.eq(1).find('a:not([data-trigger="link"])'),i=t.eq(2).find('a:not([data-trigger="link"])');const n=0t?(a.includes("steam")&&/join/gi.test(o)?this.undoneTasks.steam.groupLinks.push(t):/like.*announcement/gi.test(o)?this.undoneTasks.steam.announcementLinks.push(t):/(follow|subscribe).*curator/gim.test(o)&&/^https?:\/\/store\.steampowered\.com\/curator\//.test(t)?this.undoneTasks.steam.curatorLinks.push(t):a.includes("steam")&&/follow|subscribe/gim.test(o)?this.undoneTasks.steam.curatorLikeLinks.push(t):/subscribe.*steam.*forum/gim.test(o)?this.undoneTasks.steam.forumLinks.push(t):a.includes("thumbs-up")&&/^https?:\/\/steamcommunity\.com\/sharedfiles\/filedetails\/\?id=[\d]+/.test(t)?this.undoneTasks.steam.workshopVoteLinks.push(t):a.includes("plus")&&/request.*playtest/gim.test(o)?this.undoneTasks.steam.playtestLinks.push(t):a.includes("discord")||/join.*discord/gim.test(o)?this.undoneTasks.discord.serverLinks.push(t):a.includes("instagram")||/follow.*instagram/gim.test(o)?this.undoneTasks.instagram.userLinks.push(t):a.includes("twitch")||/follow.*twitch.*channel/gim.test(o)?this.undoneTasks.twitch.channelLinks.push(t):a.includes("reddit")||/subscribe.*subreddit/gim.test(o)||/follow.*reddit/gim.test(o)?this.undoneTasks.reddit.redditLinks.push(t):/watch.*art/gim.test(o)?this.undoneTasks.steam.workshopVoteLinks.push(t):/subscribe.*youtube.*channel/gim.test(o)?this.undoneTasks.youtube.channelLinks.push(t):/(watch|like).*youtube.*video/gim.test(o)||(a.includes("youtube")||a.includes("thumbs-up"))&&/(watch|like).*video/gim.test(o)?this.undoneTasks.youtube.likeLinks.push(t):a.includes("vk")||/join.*vk.*group/gim.test(o)?this.undoneTasks.vk.nameLinks.push(t):/(on twitter)|(Follow.*on.*Facebook)/gim.test(o)||(/wishlist.*game|add.*wishlist/gim.test(o)&&this.undoneTasks.steam.wishlistLinks.push(t),/follow.*button/gim.test(o)&&this.undoneTasks.steam.followLinks.push(t)),void e(!0)):e(!1)).catch(t=>(D(t,"Giveawaysu.classifyTask->getRedirectLink"),!1))}));return await Promise.all(s),e.success(),this.undoneTasks=ki(this,Gi,Pi).call(this,this.undoneTasks),!0}catch(t){return D(t,"Giveawaysu.classifyTask"),!1}}function _i(){try{return N.other.checkLogin?(0<$("a.steam-login").length&&window.open("/steam/redirect","_self"),!0):!0}catch(t){return D(t,"Giveawaysu.checkLogin"),!1}}async function Ai(){try{return N.other.checkLeftKey?(0<$(".giveaway-ended").length&&await a().fire({icon:"warning",title:j("notice"),text:j("noKeysLeft"),confirmButtonText:j("confirm"),cancelButtonText:j("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0):!0}catch(t){return D(t,"Giveawaysu.checkLeftKey"),!1}}function Ei(){var t=null===(t=window.location.href.match(/\/view\/([\d]+)/))||void 0===t?void 0:t[1];return t?(this.giveawayId=t,!0):(F({text:j("getFailed","GiveawayId")}),!1)}async function Vi(e,t){try{return{name:e,result:await t}}catch(t){return D(t,"GiveawaySu.bind"),{name:e,result:!1}}}async function Oi(){try{const s=[],i=this.undoneTasks;var t,e;return i.discord&&0[...t,...e]).length&&!this.socialInitialized.discord&&(this.social.discord=new R,s.push(ki(this,$i,Vi).call(this,"discord",this.social.discord.init()))),i.instagram&&0[...t,...e]).length&&!this.socialInitialized.instagram&&(this.social.instagram=new ut,s.push(ki(this,$i,Vi).call(this,"instagram",this.social.instagram.init()))),i.reddit&&0[...t,...e]).length&&!this.socialInitialized.reddit&&(this.social.reddit=new $t,s.push(ki(this,$i,Vi).call(this,"reddit",this.social.reddit.init()))),i.twitch&&0[...t,...e]).length&&!this.socialInitialized.twitch&&(this.social.twitch=new Xt,s.push(ki(this,$i,Vi).call(this,"twitch",this.social.twitch.init()))),i.vk&&0[...t,...e]).length&&!this.socialInitialized.vk&&(this.social.vk=new Ie,s.push(ki(this,$i,Vi).call(this,"vk",this.social.vk.init()))),i.youtube&&0[...t,...e]).length&&!this.socialInitialized.youtube&&(this.social.youtube=new Ke,s.push(ki(this,$i,Vi).call(this,"youtube",this.social.youtube.init()))),!i.steam||0<(t=Object.values(i.steam).reduce((t,e)=>[...t,...e]).length)&&(this.social.steam||(this.social.steam=new wi),0{var e,s;return["groupLinks","forumLinks","workshopLinks","workshopVoteLinks"].includes(t)&&(null===(e=i.steam)||void 0===e||null===(s=e[t])||void 0===s?void 0:s.length)||0}).reduce((t,e)=>t+e,0))&&!this.socialInitialized.steamStore&&s.push(ki(this,$i,Vi).call(this,"steamStore",this.social.steam.init("store"))),0{let e=!0;for(const s of t)s.result?this.socialInitialized[s.name]=s.result:e=!1;return e})}catch(t){return D(t,"GiveawaySu.initSocial"),!1}}function Pi(t){const e={};for(var[s,i]of Object.entries(t)){e[s]={};for(var[n,a]of Object.entries(i))e[s][n]=G(a)}return e}async function Wi(){try{if(!this.initialized&&!this.init())return!1;if(!await ki(this,bi,Li).call(this))return!1;if(!await ki(this,Ii,Oi).call(this))return!1;const e=[];var t=this.undoneTasks;return"skip"!==this.socialInitialized.discord&&this.social.discord&&e.push(this.social.discord.toggle({doTask:!0,...t.discord})),this.social.instagram&&e.push(this.social.instagram.toggle({doTask:!0,...t.instagram})),this.social.reddit&&e.push(this.social.reddit.toggle({doTask:!0,...t.reddit})),this.social.twitch&&e.push(this.social.twitch.toggle({doTask:!0,...t.twitch})),this.social.vk&&e.push(this.social.vk.toggle({doTask:!0,...t.vk})),this.social.youtube&&e.push(this.social.youtube.toggle({doTask:!0,...t.youtube})),this.social.steam&&e.push(this.social.steam.toggle({doTask:!0,...t.steam})),await Promise.all(e),F({}).success(j("allTasksComplete")),!0}catch(t){return D(t,"GiveawaySu.toggleTask"),!1}}const Di=class{constructor(){mi(this,Ci),mi(this,Gi),mi(this,Ii),mi(this,$i),mi(this,xi),mi(this,Si),mi(this,Ti),mi(this,bi),vi(this,"undoneTasks",yi),vi(this,"giveawayId",void 0),vi(this,"socialInitialized",{discord:!1,instagram:!1,reddit:!1,twitch:!1,vk:!1,youtube:!1,steamStore:!1,steamCommunity:!1,twitter:!0}),vi(this,"initialized",!1),vi(this,"social",{})}static test(){return/^https?:\/\/giveaway\.su\/giveaway\/view\/[\d]+/.test(window.location.href)}async after(){try{ki(this,Ti,_i).call(this)||F({}).warning(j("checkLoginFailed")),await ki(this,Si,Ai).call(this)||F({}).warning(j("checkLeftKeyFailed"))}catch(t){D(t,"Giveawaysu.after")}}init(){try{const t=F({text:j("initing")});return 0<$("a.steam-login").length?(window.open("/steam/redirect","_self"),t.warning(j("needLogin")),!1):!!ki(this,xi,Ei).call(this)&&(this.initialized=!0,t.success(),!0)}catch(t){return D(t,"Giveawaysu.init"),!1}}async doTask(){try{return $("#getKey").on("click",()=>{$("#auto-task-info-div").remove(),$(window.STYLE).remove(),$("#getKey").off()}),await ki(this,Ci,Wi).call(this)}catch(t){return D(t,"GiveawaySu.doTask"),!1}}async verifyTask(){try{var t;for(const e of $("#actions tr")){const s=$(e);if("adjs"!==s.attr("data-action-id")){const i=s.find("i.glyphicon-refresh"),n=i.parent();"A"!==n.prop("tagName")?i.hasClass("spin")||i.hasClass("glyphicon-ok")||(n[0].click(),await U(1e3)):(t=n.attr("href"),n.attr("href","javascript:void(0);").attr("target","_self")[0].click(),n.attr("href",t))}}}catch(t){D(t,"GiveawaySu.verifyTask")}}};var Ui,Fi,t=ji(821);if(window.STYLE=GM_addStyle(t.Z+GM_getResourceText("style")),"discord.com"===window.location.hostname){const Ni=window.localStorage;"#auth"===window.location.hash?(window.localStorage.removeItem=()=>!0,(Ui=null===Ni||void 0===Ni||null===(Ui=Ni.getItem("token"))||void 0===Ui?void 0:Ui.replace(/^"|"$/g,""))&&0{var t,e,s;if("www.twitch.tv"===window.location.hostname&&"#auth"===window.location.hash&&(t=o.get("auth-token"),!!o.get("login")?(GM_setValue("twitchAuth",{authToken:t,clientId:null===(t=commonOptions)||void 0===t||null===(e=t.headers)||void 0===e?void 0:e["Client-ID"]}),window.close(),a().fire("",j("closePageNotice"))):a().fire("",j("needLogin"))),"twitter.com"===window.location.hostname&&"#auth"===window.location.hash&&(s=o.get("ct0"),!!o.get("twid")&&s?(GM_setValue("twitterAuth",{ct0:s}),window.close(),a().fire("",j("closePageNotice"))):a().fire("",j("needLogin"))),"www.youtube.com"===window.location.hostname&&"#auth"===window.location.hash&&((s=o.get("__Secure-3PAPISID"))?(GM_setValue("youtubeAuth",{PAPISID:s}),window.close(),a().fire("",j("closePageNotice"))):a().fire("",j("needLogin"))),"www.reddit.com"===window.location.hostname&&("#auth"===window.location.hash||"#auth"===GM_getValue("redditAuth"))){const i=$("#redesign-beta-optin-btn");if(0

    `),await n.after(),$("#auto-do-task").on("click",()=>{n.doTask()}),$("#auto-verify-task").on("click",()=>{n.verifyTask()}),console.log("%c%s","color:#1bbe1a","Auto Task GS特供脚本初始化完成!")}})}()}(); \ No newline at end of file + ${null===s||void 0===s?void 0:s.replace("u_","")}]...`);break;case"followingYtbChannel":case"unfollowingYtbChannel":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"likingYtbVideo":case"unlikingYtbVideo":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"gettingVkId":case"joiningVkGroup":case"leavingVkGroup":case"joiningVkPublic":case"leavingVkPublic":case"sendingVkWall":case"deletingVkWall":t=$(`
  • ${j(e)}[${s}]...
  • `);break;case"visitingLink":t=$(`
  • ${j("visitingLink")}[${s}]...
  • `);break;case"verifyingInsAuth":case"text":t=$(`
  • ${j(s)}
  • `);break;case"html":t=$(s||i);break;case"whiteList":t=$(`
  • ${j("skipTask")}[${s}(${n})](${j("whiteList")})
  • `);break;case"globalOptionsSkip":t=$(`
  • ${j("skipTaskOption")}${s}
  • `);break;default:t=$(`
  • ${j("unKnown")}:${e}(${s})...
  • `)}else t=s?$(`
  • ${j(s)}
  • `):i?$(i):$("
  • ");return t.addClass("card-text"),$("#auto-task-info").append(t),null!==(o=t[0])&&void 0!==o&&o.scrollIntoView(),{font:t.find("font"),success(){var t,e,s=0{try{return[...new Set(t)]}catch(t){return D(t,"unique"),[]}},l=async e=>{try{if(!e)return null;const s=GM_getValue("redirectLinks")||{};return s[e]&&s[e],await I({url:e,method:"GET"}).then(t=>{t=t.data;return null!=t&&t.finalUrl?(s[e]=t.finalUrl,GM_setValue("redirectLinks",s),t.finalUrl):null})}catch(t){return D(t,"getRedirectLink"),null}};const r={doTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0,workshopVotes:!0,announcements:!0,licenses:!0,playtests:!0}},undoTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0}},position:{buttonSideX:"right",buttonSideY:"top",buttonDistance:"15,30",showButtonSideX:"right",showButtonSideY:"top",showButtonDistance:"15,30",logSideX:"right",logSideY:"bottom",logDistance:"10,10"},hotKey:{doTaskKey:"alt + d",undoTaskKey:"alt + u",toggleLogKey:"alt + l"},other:{twitterVerifyId:"783214",youtubeVerifyChannel:"UCrXUsMBcfTVqwAS7DKg9C0Q",autoUpdateSource:"jsdelivr",language:"zh",checkLogin:!0,checkLeftKey:!0,defaultShowButton:!0,defaultShowLog:!0,debug:!1,receivePreview:!0}};t=GM_getValue("globalOptions")||{};const u=(t,e)=>{try{const n={};for(var[s,i]of Object.entries(t))"[object Object]"===Object.prototype.toString.call(i)&&"[object Object]"===Object.prototype.toString.call(e[s])?n[s]=u(i,e[s]):n[s]=e[s]??i;return n}catch(t){return D(t,"assignObject"),r}},N=u(r,t);const c={zh:{website:"网站",type:"类型",edit:"编辑",whiteList:"白名单",skipTask:"跳过撤销任务",whiteListOptions:"白名单设置",changeWhiteListOption:"设置白名单(%0)",whiteListNotFound:"找不到此项白名单: %0",changeWhiteListSuccess:"白名单修改成功,刷新生效!",changeWebsiteOptions:"网站设置",changeGlobalOptions:"全局设置",ok:"是",save:"保存",close:"关闭",return:"返回",option:"选项",value:"值",websiteOptions:"当前网站设置",changeWebsiteOptionsSuccess:"更改当前网站设置成功,刷新生效!",changeGlobalOptionsSuccess:"更改全局设置成功,刷新生效!",needLogin:"请先登录!",getTasksInfo:"正在获取并处理任务信息...",gettingKey:"正在获取Key...",verifyingTask:"正在验证任务",notice:"自动任务脚本提醒",noKeysLeft:"此页面已经没有剩余key了,是否关闭?",giveawayEnded:"此活动已结束,是否关闭?",giveawayNotWork:"此活动因某些原因(已结束/暂停/未开始...)不可用(如果是脚本误判请及时反馈),是否关闭?",confirm:"确定",cancel:"取消",unKnown:"未知",unKnownTaskType:"未识别的任务",doing:"正在做任务",allTasksComplete:"所有任务已完成!",getTaskIdFailed:"获取任务Id失败!",initSuccess:"%0 初始化成功!",initFailed:"%0 初始化失败!",errorLink:"链接错误: %0",needInit:"请先初始化",verifyingAuth:"正在验证%0凭证...",updatingAuth:"正在更新%0凭证...",initing:"正在初始化...",getFailed:"获取%0失败!",checkLoginFailed:"检测登录状态失败!",checkLeftKeyFailed:"检测剩余Key失败!",userId:"用户Id",joiningGiveaway:"正在加入赠Key",needJoinGiveaway:"需要先加入赠Key",cannotUndo:"此网站不支持取消任务",verifyAuth:"正在验证 %0 凭证...",closePageNotice:"如果此页面没有自动关闭,请自行关闭本页面。",errorReport:"检测到脚本报错,是否前往反馈BUG?",visitingLink:"正在访问链接: ",doTask:"做任务",undoTask:"撤销任务",verifyTask:"验证任务",getKey:"获取Key",selectAll:"全选",selectNone:"全不选",invertSelect:"反选",doFreeTask:"加入免费赠品",doPointTask:"加入点数赠品",skipTaskOption:"设置中已配置跳过任务",other:"其他",globalOptions:"全局设置",checkLogin:"登录检测
    需要登录的网站自动登录,部分本网站支持",checkLeftKey:"剩余Key检测
    赠Key活动结束提示是否关闭,部分本网站支持",twitterVerifyId:"通过尝试关注该账号验证Twitter凭证
    默认为Twitter官方帐号 783214
    不想关注官方账号可以改为自己的帐号",youtubeVerifyChannel:"通过尝试订阅该频道验证YouTube凭证
    默认为YouTube官方频道 UCrXUsMBcfTVqwAS7DKg9C0Q
    不想关注官方频道可以改为自己的频道",autoUpdateSource:"更新源
    github: 需代理,实时更新
    jsdelivr: 可不用代理,更新有延迟
    standby: 备用
    auto: 依次使用github, jsdelivr, standby源进行尝试更新",saveGlobalOptions:"保存全局设置",settingPage:"设置页面",name:"名称",version:"版本",scriptManager:"脚本管理器",script:"脚本",environment:"环境",os:"系统",browser:"浏览器",getId:"获取 %0 id",getTwitterUserId:"获取Twitter用户id(获取id功能仅在设置页面可用)",getYoutubeChannelId:"获取Youtube频道id(获取id功能仅在设置页面可用)",showButton:"显示按钮",hideButton:"隐藏按钮",showLog:"显示日志",hideLog:"隐藏日志",defaultShowButton:"默认显示按钮",defaultShowLog:"默认显示日志",debug:"输出调试日志,不要开启此选项!",receivePreview:"接收预览版更新",position:"组件位置",buttonSideX:"按钮区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",buttonSideY:"按钮区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",buttonDistance:"按钮区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",showButtonSideX:"显示按钮水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",showButtonSideY:"显示按钮垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",showButtonDistance:"显示按钮距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",logSideX:"日志区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",logSideY:"日志区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",logDistance:"日志区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",hotKey:"快捷键",doTaskKey:"做任务快捷键
    (实时预览功能仅在设置页面可用)",undoTaskKey:"撤销任务快捷键
    (实时预览功能仅在设置页面可用)",toggleLogKey:"显示/隐藏日志快捷键
    (实时预览功能仅在设置页面可用)",tasksHistory:"任务历史",clearHistory:"清空历史",clearHistoryFinished:"已清空任务历史!",deleteTask:"删除任务",lastChangeTime:"最后一次修改时间",clearTaskFinished:"删除以下任务完成!",clearTaskFailed:"删除任务失败,没有找到任务名!",syncData:"数据同步",settingData:"正在上传数据...",gettingData:"正在获取数据...",help:"帮助",fileName:"文件名",upload2gist:"同步到Gist",downloadFromGist:"从Gist同步",saveAndTest:"保存配置并测试",testSuccess:"测试成功!",testFailed:"测试失败!",saveAndTestNotice:"请先保存配置并测试!",processingData:"正在处理数据...",updatingData:"正在上传数据...",syncDataSuccess:"同步数据成功!",syncDataFailed:"同步数据失败,请在控制台查看错误信息!",downloadingData:"正在下载数据...",checkedNoData:"没有检测到远程数据,请确认配置是否正确!",savingData:"正在保存数据...",syncHistory:"同步任务历史",checkUpdateFailed:"检测更新失败",newVersionNotice:'检测到新版本V%0, 点此更新',language:"语言
    目前仅支持zh: 中文, en: 英文",gistOptions:"Gist 设置",swalNotice:"检测到您第一次安装V4版本脚本,请前往阅读用前必读内容!",echoNotice:'检测到您第一次安装V4版本脚本,请点此前往阅读用前必读内容!',noticeLink:"https://auto-task-doc.js.org/guide/#用前必读",toGithub:"前往Github反馈",toKeylol:"前往其乐论坛反馈",copySuccess:"错误信息已复制到剪切板,是否前往其乐论坛反馈?",copyFailed:"请复制下方错误信息后前往Keylol论坛反馈!",updateText:"%0 版本更新内容:",Active:"进行中",Ended:"已结束",Banned:"已封禁",Paused:"已暂停",notStart:"未开始",noRemoteData:"检测到远程无数据",errorRemoteDataFormat:"远程数据格式错误",updateHistory:'历史更新记录点此查看',groups:"组",officialGroups:"官方组",wishlists:"愿望单",follows:"游戏关注",forums:"论坛",workshops:"创意工坊收藏",curators:"鉴赏家",workshopVotes:"创意工坊点赞",announcements:"社区通知",steamCommunity:"Steam社区",steamStore:"Steam商店",licenses:"入库免费游戏",playtests:"请求访问权限",needLoginSteamStore:'请先登录Steam商店',needLoginSteamCommunity:'请先登录Steam社区',joiningSteamGroup:"正在加入Steam组",leavingSteamGroup:"正在退出Steam组",gettingSteamGroupId:"正在获取Steam组Id",joiningSteamOfficialGroup:"正在加入Steam官方组",leavingSteamOfficialGroup:"正在退出Steam官方组",gettingSteamOfficialGroupId:"正在获取Steam官方组Id",subscribingForum:"正在订阅Steam论坛",unsubscribingForum:"正在取消订阅Steam论坛",gettingForumId:"正在获取Steam论坛Id",followingCurator:"正在关注Steam鉴赏家",unfollowingCurator:"正在取关Steam鉴赏家",gettingCuratorId:"正在获取Steam鉴赏家Id",addingToWishlist:"正在添加游戏到Steam愿望单",removingFromWishlist:"正在从Steam愿望单移除游戏",followingGame:"正在关注Steam游戏",unfollowingGame:"正在取关Steam游戏",favoritingWorkshop:"正在收藏Steam创意工坊物品",unfavoritingWorkshop:"正在取消收藏Steam创意工坊物品",gettingWorkshopAppId:"正在获取Steam创意工坊物品Id",votingUpWorkshop:"正在点赞Steam创意工坊物品",gettingAnnouncementParams:"正在获取Steam通知信息",likingAnnouncement:"正在点赞Steam通知",changingArea:"正在更换Steam地区: %0...",notNeededChangeArea:"当前地区不需要更换",noAnotherArea:"请检测是否开启正确开启代理",gettingAreaInfo:"正在获取Steam地区信息...",changeAreaNotice:"疑似锁区游戏,尝试换区执行",steamFinishNotice:"Steam任务完成,尝试将购物车地区换回CN",gettingSubid:"正在获取游戏subid",addingFreeLicense:"正在入库",missParams:"缺少参数",gettingLicenses:"正在获取Licenses...",requestingPlayTestAccess:"正在请求访问权限",tryChangeAreaNotice:"此功能无法检测游戏是否限区,因此会尝试换区后再入库,换区失败也不影响后续入库",servers:"服务器",joiningDiscordServer:"正在加入Discord服务器",leavingDiscordServer:"正在退出Discord服务器",gettingDiscordGuild:"正在获取Discord服务器Id",getDiscordAuthFailed:"获取Discord凭证失败,请检测Discord帐号是否已登录",discordImportantNotice:"重要提醒!!!",discordImportantNoticeText:"由于Discord网站后台更新,目前使用此脚本加组后可能会导致Discord帐号被强制退出,且需要两步验证才能正常登录,请谨慎使用!!!",continue:"继续",skipDiscordTask:"跳过Discord任务",continueAndDontRemindAgain:"继续且不再提醒",users:"用户",loginIns:'请先登录Instagram',insBanned:"您的Instagram账户已被封禁",verifyingInsAuth:"正在验证Instagram凭证...",gettingInsUserId:"正在获取Instagram用户Id",followingIns:"正在关注Instagram用户",unfollowingIns:"正在取关Instagram用户",reddits:"社区/用户",loginReddit:'请先登录Reddit',changingRedditVersion:"正在切换Reddit为新版页面...",joiningReddit:"正在加入Reddit社区",leavingReddit:"正在退出Reddit社区",followingRedditUser:"正在关注Reddit用户",unfollowingRedditUser:"正在取关Reddit用户",channels:"频道",followingTwitchChannel:"正在关注Twitch频道",unfollowingTwitchChannel:"正在取关Twitch频道",gettingTwitchChannelId:"正在获取Twitch频道Id",checkingTwitchIntegrity:"正在检查Twitch完整性...",twitterUser:"推特用户",retweets:"转推",gettingTwitterUserId:"正在获取推特用户Id",followingTwitterUser:"正在关注推特用户",unfollowingTwitterUser:"正在取关推特用户",retweetting:"正在转推",unretweetting:"正在撤销转推",names:"组/社区/动态",loginVk:'请先登录Vk',gettingVkId:"正在获取Vk任务Id",joiningVkGroup:"正在加入Vk组",leavingVkGroup:"正在退出Vk组",joiningVkPublic:"正在加入Vk社区",leavingVkPublic:"正在退出Vk社区",sendingVkWall:"正在转发Vk动态",deletingVkWall:"正在撤销转发Vk动态",youtubeChannel:"YouTube频道",likes:"点赞",loginYtb:'请先登录YouTube',tryUpdateYtbAuth:'请尝试更新YouTube凭证',gettingYtbToken:"正在获取YouTube Token...",followingYtbChannel:"正在订阅YouTube频道",unfollowingYtbChannel:"正在退订YouTube频道",likingYtbVideo:"正在点赞YouTube视频",unlikingYtbVideo:"正在取消点赞YouTube视频",giveKeyNoticeBefore:"每次验证间隔15s",giveKeyNoticeAfter:'如果没有key, 请在https://givekey.ru/profile查看',noPoints:"点数不够,跳过抽奖",getNeedPointsFailed:"获取所需点数失败,跳过抽奖",joiningLottery:"正在加入抽奖",doingGleamTask:"正在做Gleam任务...",gettingGleamLink:"正在获取Gleam任务链接...",gleamTaskNotice:"如果此页面长时间未关闭,请完成任一任务后自行关闭!",verifiedGleamTasks:"已尝试验证所有任务,验证失败的任务请尝试手动验证或完成!",gsNotice:'为避免得到"0000-0000-0000"key, 已自动屏蔽"Grab Key"按钮,获取key时请关闭脚本!',giveeClubVerifyNotice:"正在验证任务...",giveeClubVerifyFinished:"请等待验证完成后自行加入赠Key",doingKeyhubTask:"正在做Keyhub任务...",SweepWidgetNotice:"正在处理并验证任务,每次验证任务有1~3s间隔防止触发验证过快警告..."},en:{website:"Website",type:"Type",edit:"Edit",whiteList:"Whitelist",skipTask:"Skip undo task",whiteListOptions:"Whitelist options",changeWhiteListOption:"Whitelist option(%0)",whiteListNotFound:"Cannot find this whitelist: %0",changeWhiteListSuccess:"The whitelist is successfully modified, and the page refresh will take effect!",changeWebsiteOptions:"Website options",changeGlobalOptions:"Global options",ok:"OK",save:"Save",close:"Close",return:"Return",option:"Option",value:"Value",websiteOptions:"Current website settings",changeWebsiteOptionsSuccess:"The current website setting is changed successfully, and the page refresh will take effect!",changeGlobalOptionsSuccess:"The global setting is changed successfully, and the refresh will take effect!",needLogin:"Please log in first!",getTasksInfo:"Obtaining and processing task information...",gettingKey:"Getting Key...",verifyingTask:"Verifying task",notice:"Automatic task script notice",noKeysLeft:"There are no more keys left on this page. Do you want to close it?",giveawayEnded:"This event has ended, do you want to close it?",giveawayNotWork:"This activity is unavailable for some reasons (banned/ended/paused/not started...) (if it is a script misjudgment, please give us feedback in time), is it closed?",confirm:"Confirm",cancel:"Cancel",unKnown:"Unknown",unKnownTaskType:"Unrecognized task",doing:"Doing a task",allTasksComplete:"All tasks have been completed!",getTaskIdFailed:"Failed to obtain task Id!",initSuccess:"%0 was initialized successfully!",initFailed:"%0 initialization failed!",errorLink:"Link error: %0",needInit:"Please initialize first",verifyingAuth:"Verifying %0 token...",updatingAuth:"Update %0 token...",initing:"Initializing...",getFailed:"Failed to get %0!",checkLoginFailed:"Failed to detect login status!",checkLeftKeyFailed:"Failed to detect the remaining keys!",userId:"User Id",joiningGiveaway:"Joining giveaway",needJoinGiveaway:"Need to join the giveaway first",cannotUndo:"This website does not support canceling tasks",verifyAuth:"Verifying %0 token...",closePageNotice:"f this page does not close automatically, please close this page yourself.",errorReport:"A script error is detected, do you want to report the BUG?",visitingLink:"Visiting link: ",doTask:"DoTask",undoTask:"UndoTask",verifyTask:"Verify",getKey:"GetKey",selectAll:"SelectAll",selectNone:"SelectNone",invertSelect:"InvertSelect",doFreeTask:"FreeTask",doPointTask:"PointTask",skipTaskOption:"Skip task has been configured in the settings",other:"Other",globalOptions:"Global Options",checkLogin:"Login detection
    Need to log in to the website automatically log in, part of this website supports.",checkLeftKey:"Key remaining detection
    The end of the giveaway event prompts whether to close or not, part of this website supports.",twitterVerifyId:"Verify Twitter token by trying to follow the account.
    The default is the official Twitter account 783214.
    If you don't want to follow the official account, you can change it to your own account.",youtubeVerifyChannel:"Verify YouTube token by trying to subscribe to the channel.
    The default is the official YouTube channel UCrXUsMBcfTVqwAS7DKg9C0Q.
    If you don't want to follow the official channel, you can change it to your own channel.",autoUpdateSource:"The source to update
    github: Fast update.
    jsdelivr: Update is delayed.
    standby: Standby source.
    auto: Try to update using github, jsdelivr, standby sources in turn.",saveGlobalOptions:"SaveSettings",settingPage:"Setting Page",name:"Name",version:"Version",scriptManager:"Script Manager",script:"Script",environment:"Environment",os:"OS",browser:"Browser",getId:"Get %0 id",getTwitterUserId:"Get Twitter user id (Get id function is only available on the settings page).",getYoutubeChannelId:"Get Youtube channel id (Get id function is only available on the settings page).",showButton:"ShowButton",hideButton:"HideButton",showLog:"ShowLog",hideLog:"HideLog",defaultShowButton:"Default display button",defaultShowLog:"Display log by default",debug:"Output debug log, do not enable this option!",receivePreview:"Receive preview updates",position:"Component position",buttonSideX:"Horizontal positioning of the button area (real-time preview function is only available on the setting page).
    left: left | right: right",buttonSideY:"The button area is positioned in the vertical direction (real-time preview function is only available on the settings page).
    top: top | bottom: bottom",buttonDistance:"The distance between the button area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",showButtonSideX:"ShowButton horizontal positioning (real-time preview function is only available on the setting page).
    left: left | right: right",showButtonSideY:"ShowButton vertical positioning (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",showButtonDistance:"The distance between the ShowButton and the edge (real-time preview function is only available on the setting page).
    Format: X distance, Y distance",logSideX:"Horizontal positioning of the log area (real-time preview function is only available on the setting page).
    left: left | right: right",logSideY:"Vertical positioning of the log area (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",logDistance:"The distance between the log area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",hotKey:"Shortcut key",doTaskKey:"DoTask shortcut keys
    (real-time preview function is only available on the settings page).",undoTaskKey:"UndoTask shortcut keys
    (real-time preview function is only available on the settings page).",toggleLogKey:"ShowLog/HideLog shortcut keys
    (real-time preview function is only available on the settings page).",tasksHistory:"TasksHistory",clearHistory:"Clear history",clearHistoryFinished:"The mission history has been cleared!",deleteTask:"Delete task",lastChangeTime:"Last Change Time",clearTaskFinished:"Delete the following tasks completed!",clearTaskFailed:"Failed to delete the task, the task name was not found!",syncData:"DataSync",settingData:"Uploading data...",gettingData:"Getting data...",help:"Help",fileName:"Filename",upload2gist:"Sync to Gist",downloadFromGist:"Sync from Gist",saveAndTest:"Save configuration and test",testSuccess:"Test success!",testFailed:"Test failed!",saveAndTestNotice:"Please save the configuration and test first!",processingData:"Processing data...",updatingData:"Uploading data...",syncDataSuccess:"Synchronized data successfully!",syncDataFailed:"Failed to synchronize data, please check the error message on the console!",downloadingData:"Downloading data...",checkedNoData:"No remote data is detected, please confirm whether the configuration is correct!",savingData:"Saving data...",syncHistory:"Synchronize tasks history",checkUpdateFailed:"Check update failed",newVersionNotice:'Checked a new version V%0, click to update',language:"Language
    Currently only supports zh: Chinese, en: English",gistOptions:"Gist Settings",swalNotice:"It is detected that you are installing the V4 version script for the first time, please go to read the READ ME FIRST content before use!",echoNotice:'It is detected that you are installing the V4 version script for the first time, please click here to read the READ ME FIRST content before use!',noticeLink:"https://auto-task-doc.js.org/en/guide/#read-me-first",toGithub:"Feedback(Github)",toKeylol:"Feedback(Keylol)",copySuccess:"The error message has been copied to the clipboard. Do you want to go to the Keylol forum to give feedback?",copyFailed:"Please copy the error information below and report back to the Keylol forum!",updateText:"Updates in version %0:",Active:"Active",Ended:"Ended",Banned:"Banned",Paused:"Paused",notStart:"notStart",noRemoteData:"No data remotely",errorRemoteDataFormat:"Remote data has wrong format",updateHistory:'Click here to view the historical update record.',groups:"Group",officialGroups:"Official Group",wishlists:"Wishlist",follows:"Follow Game",forums:"Forum",workshops:"Favorite Workshop",curators:"Curator",workshopVotes:"Voteup Workshop",announcements:"Announcement",steamCommunity:"Steam Community",steamStore:"Steam Store",licenses:"Add License",playtests:"Playtest Access",needLoginSteamStore:'Please log in to the Steam Store',needLoginSteamCommunity:'Please log in to the Steam Community',joiningSteamGroup:"Joining Steam Group",leavingSteamGroup:"Leaving Steam Group",gettingSteamGroupId:"Getting Steam Group Id",joiningSteamOfficialGroup:"Joining Steam Official Group",leavingSteamOfficialGroup:"Leaving Steam Official Group",gettingSteamOfficialGroupId:"Getting Steam Official Group Id",subscribingForum:"Subscribing the Steam Forum",unsubscribingForum:"Unsubscribing the Steam Forum",gettingForumId:"Getting Steam Forum Id",followingCurator:"Following Steam Curator",unfollowingCurator:"Unfollowing Steam Curator",gettingCuratorId:"Getting Steam Curator Id",addingToWishlist:"Adding the game to the Steam wishlist",removingFromWishlist:"Removing the game from the Steam wishlist",followingGame:"Following Steam games",unfollowingGame:"Unfollowing Steam games",favoritingWorkshop:"Favouring Steam Workshop Items",unfavoritingWorkshop:"Unfavoriting Steam Workshop Items",gettingWorkshopAppId:"Getting Steam Workshop Item Id",votingUpWorkshop:"Liking Steam workshop items",gettingAnnouncementParams:"Getting Steam announcement information",likingAnnouncement:"Liking Steam announcement",changingArea:"Changing Steam area: %0...",notNeededChangeArea:"The current area does not need to be changed",noAnotherArea:"Please check whether the proxy is turned on correctly",gettingAreaInfo:"Getting Steam area information...",changeAreaNotice:"Suspected of a locked zone game, try to change the zone to execute",steamFinishNotice:"Steam task completed, try to change the shopping cart area back to CN",gettingSubid:"Getting subid",addingFreeLicense:"Adding free license",missParams:"Missing parameters",gettingLicenses:"Getting licenses...",requestingPlayTestAccess:"Requesting play test access",tryChangeAreaNotice:"This function cannot detect whether the game is limited, so it will try to change the area before entering the library. Failure to change the area will not affect the subsequent storage.",servers:"Server",joiningDiscordServer:"Joining Discord Server",leavingDiscordServer:"Leaving Discord Server",gettingDiscordGuild:"Getting Discord server Id",getDiscordAuthFailed:"Failed to get Discord token, please check whether the Discord account is logged in",discordImportantNotice:"Important Reminder! ! !",discordImportantNoticeText:"Due to the background update of the Discord website, currently using this script to join a group may cause the Discord account to be forcibly logged out, and two-step verification is required to log in normally, please use it with caution! ! !",continue:"Continue",skipDiscordTask:"Skip",continueAndDontRemindAgain:"Continue without Reminders",users:"User",loginIns:'Please log in to Instagram',insBanned:"Your Instagram account has been banned",verifyingInsAuth:"Verifying Instagram token...",gettingInsUserId:"Getting Instagram user Id",followingIns:"Following Instagram user",unfollowingIns:"Unfollowing Instagram user",reddits:"Reddit/User",loginReddit:'Please log in to Reddit',changingRedditVersion:"Switching Reddit to a new version page...",joiningReddit:"Joining the Reddit",leavingReddit:"Leaving the Reddit",followingRedditUser:"Following Reddit User",unfollowingRedditUser:"Unfollowing Reddit User",channels:"Channel",followingTwitchChannel:"Following Twitch Channel",unfollowingTwitchChannel:"Unfollowing Twitch Channel",gettingTwitchChannelId:"Getting Twitch Channel Id",checkingTwitchIntegrity:"Checking Twitch integrity...",twitterUser:"Twitter User",retweets:"Retweet",gettingTwitterUserId:"Getting Twitter User Id",followingTwitterUser:"Following Twitter User",unfollowingTwitterUser:"Unfollowing Twitter User",retweetting:"Retweetting",unretweetting:"Unretweetting",names:"Group/Public/Wall",loginVk:'Please log in to Vk',gettingVkId:"Getting Vk task Id",joiningVkGroup:"Joining Vk Group",leavingVkGroup:"Leaving Vk Group",joiningVkPublic:"Joining Vk Public",leavingVkPublic:"Leaving Vk Public",sendingVkWall:"Sending Vk Wall",deletingVkWall:"Deleting Vk Wall",youtubeChannel:"YouTube Channel",likes:"Like",loginYtb:'Please log in to YouTube',tryUpdateYtbAuth:'Please try to update YouTube token',gettingYtbToken:"Getting YouTube Token...",followingYtbChannel:"Subscribing to YouTube channel",unfollowingYtbChannel:"Unsubscribing to YouTube channel",likingYtbVideo:"Liking YouTube video",unlikingYtbVideo:"Unliking YouTube video",giveKeyNoticeBefore:"Each verification interval is 15s",giveKeyNoticeAfter:'If there is no key, please check at https://givekey.ru/profile',noPoints:"Not enough points, skip the lottery",getNeedPointsFailed:"ailed to obtain the required points, skip the lottery",joiningLottery:"Joining the lottery",doingGleamTask:"Doing Gleam Task...",gettingGleamLink:"Getting Gleam task link...",gleamTaskNotice:"If this page has not been closed for a long time, please close it yourself after completing any task!",verifiedGleamTasks:"Attempted to verify all tasks. If the verification fails, please try to verify manually or complete it!",gsNotice:'In order to avoid getting the "0000-0000-0000" key, the "Grab Key" button has been hidden, please close the script when obtaining the key!',giveeClubVerifyNotice:"Verifying task...",giveeClubVerifyFinished:"Wait for the verification to complete and join it by yourself",doingKeyhubTask:"Doing Keyhub Task...",SweepWidgetNotice:"The task is being processed and verified. There is an interval of 1~3s for each verification task to prevent the triggering of too fast verification warning..."}},d=["zh","en"].includes(N.other.language)?N.other.language:"en";const j=function(t){for(var e,s=arguments.length,i=new Array(1i[parseInt(e,10)]):t};t=class{constructor(){var t,e,s;s=void 0,(e="tasks")in(t=this)?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s}getRealParams(e,s,i,n){try{let t=[];return 0n(t)).filter(t=>t)]),!i&&0{const t=GM_openInTab("https://discord.com/channels/@me#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=null===(t=GM_getValue("discordAuth"))||void 0===t?void 0:t.auth;t?(w(this,k,{auth:t}),s.success(),e(await g(this,T,A).call(this))):(s.error("Error: Update discord auth failed!"),e(!1))}})}catch(t){return D(t,"Discord.updateAuth"),!1}}async function V(t){try{const l=F({type:"joiningDiscordServer",text:t});var e,s,{result:i,statusText:n,status:a,data:o}=await I({url:"https://discord.com/api/v9/invites/"+t,method:"POST",dataType:"json",headers:{authorization:f(this,k).auth,origin:"https://discord.com",referer:"https://discord.com/invite/"+t}});if("Success"!==i||200!==(null==o?void 0:o.status))return l.error(i+`:${n}(${a})`),!1;l.success();var r=String(null===(e=o.response)||void 0===e||null===(s=e.guild)||void 0===s?void 0:s.id);return r&&(g(this,_,W).call(this,t,r),this.tasks.servers=G([...this.tasks.servers,t])),!0}catch(t){return D(t,"Discord.joinServer"),!1}}async function O(t){try{if(this.whiteList.servers.includes(t))return F({type:"whiteList",text:"Discord.leaveServer",id:t}),!0;var e=await g(this,L,P).call(this,t);if(!e)return!1;const o=F({type:"leavingDiscordServer",text:e});var{result:s,statusText:i,status:n,data:a}=await I({url:"https://discord.com/api/v9/users/@me/guilds/"+e,method:"DELETE",headers:{authorization:f(this,k).auth}});return"Success"===s&&204===(null==a?void 0:a.status)?(o.success(),!0):(o.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Discord.leaveServer"),!1}}async function P(t){try{const u=F({type:"gettingDiscordGuild",text:t});var e=f(this,y)[t];if(e)return u.success(),e;var{result:s,statusText:i,status:n,data:a}=await I({url:"https://discord.com/api/v9/invites/"+t,responseType:"json",method:"GET"});if("Success"!==s||200!==(null==a?void 0:a.status))return u.error(s+`:${i}(${n})`),!1;var o,r,l=null===(o=a.response)||void 0===o||null===(r=o.guild)||void 0===r?void 0:r.id;return l?(u.success(),g(this,_,W).call(this,t,l),l):(u.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Discord.getGuild"),!1}}function W(t,e){try{f(this,y)[t]=e,GM_setValue("discordCache",f(this,y))}catch(t){D(t,"Discord.setCache")}}const R=class extends t{constructor(){var t;super(...arguments),e(this,_),e(this,L),e(this,C),e(this,x),e(this,S),e(this,T),p(this,"tasks",JSON.parse(v)),p(this,"whiteList",{...JSON.parse(v),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.discord}),s(this,k,{writable:!0,value:GM_getValue("discordAuth")||{}}),s(this,y,{writable:!0,value:GM_getValue("discordCache")||{}}),s(this,b,{writable:!0,value:!1})}async init(){try{if(!GM_getValue("dontRemindDiscordAgain"))if(!await a().fire({title:j("discordImportantNotice"),text:j("discordImportantNoticeText"),showCancelButton:!0,showDenyButton:!0,confirmButtonText:j("continue"),cancelButtonText:j("skipDiscordTask"),denyButtonText:j("continueAndDontRemindAgain")}).then(t=>{var{isConfirmed:e,isDenied:t}=t;return!!e||!!t&&(GM_setValue("dontRemindDiscordAgain",!0),!0)}))return w(this,b,!1),"skip";return f(this,b)?!0:f(this,k).auth?await g(this,T,A).call(this)?(F({}).success(j("initSuccess","Discord")),w(this,b,!0),!0):(GM_setValue("discordAuth",{auth:null}),await g(this,S,E).call(this)?(F({}).success(j("initSuccess","Discord")),w(this,b,!0),!0):(F({}).error(j("initFailed","Discord")),!1)):!!await g(this,S,E).call(this)&&(w(this,b,!0),!0)}catch(t){return D(t,"Discord.init"),!1}}async toggle(t){var{doTask:e=!0,serverLinks:t=[]}=t;try{if(!f(this,b))return F({text:j("needInit")}),!1;const i=[];if(e&&!N.doTask.discord.servers||!e&&!N.undoTask.discord.servers)F({type:"globalOptionsSkip",text:"discord.servers"});else{var s=this.getRealParams("servers",t,e,t=>{return null===(t=t.match(/invite\/(.+)/))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return D(t,"Discord.toggleServers"),!1}}};function M(t,e){K(t,e),e.add(t)}function Y(t,e,s){K(t,e),e.set(t,s)}function K(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function B(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function z(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,H(t,e,"set"),s),s}function q(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function J(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,H(t,e,"get"))}function H(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const X=JSON.stringify({users:[]});var Q=new WeakMap,Z=new WeakMap,tt=new WeakMap,et=new WeakSet,st=new WeakSet,it=new WeakSet,nt=new WeakSet;async function at(){var t=0{return null===(t=t.match(/https:\/\/www\.instagram\.com\/(.+)?\//))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return D(t,"Instagram.toggleUsers"),!1}}};function ct(t,e){ht(t,e),e.add(t)}function dt(t,e,s){ht(t,e),e.set(t,s)}function ht(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pt(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function gt(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,mt(t,e,"set"),s),s}function ft(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function wt(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,mt(t,e,"get"))}function mt(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const vt=JSON.stringify({reddits:[]});var kt=new WeakMap,yt=new WeakMap,bt=new WeakSet,Tt=new WeakSet;async function St(){try{const s=F({text:j("changingRedditVersion")});return GM_setValue("redditAuth",null),await new Promise(t=>{const e=GM_openInTab("https://www.reddit.com/#auth",{active:!0,insert:!0,setParent:!0});e.onclose=async()=>{s.success(),t(await ft(this,Tt,xt).call(this,!0))}})}catch(t){return D(t,"Reddit.useBeta"),!1}}async function xt(){var t,e=0{var e=null===(e=t.match(/https?:\/\/www\.reddit\.com\/r\/([^/]*)/))||void 0===e?void 0:e[1],t=null===(t=t.match(/https?:\/\/www\.reddit\.com\/user\/([^/]*)/))||void 0===t?void 0:t[1];return t?e||t:e});if(0!0)}catch(t){return D(t,"Reddit.toggle"),!1}}};function It(t,e){Ct(t,e),e.add(t)}function Gt(t,e,s){Ct(t,e),e.set(t,s)}function Ct(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Lt(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function _t(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,Vt(t,e,"set"),s),s}function At(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function Et(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,Vt(t,e,"get"))}function Vt(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const Ot=JSON.stringify({channels:[]});var Pt=new WeakMap,Wt=new WeakMap,Dt=new WeakMap,Ut=new WeakMap,Ft=new WeakSet,Nt=new WeakSet,jt=new WeakSet,Rt=new WeakSet,Mt=new WeakSet,Yt=new WeakSet;async function Kt(){try{const r=F({text:j("verifyingAuth","Twitch")});var t,e,s,{result:i,statusText:n,status:a,data:o}=await I({url:"https://gql.twitch.tv/gql",method:"POST",dataType:"json",headers:{Authorization:"OAuth "+Et(this,Pt).authToken,"Client-Id":Et(this,Pt).clientId},data:'[{"operationName":"FrontPageNew_User","variables":{"limit":1},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"64bd07a2cbaca80699d62636d966cf6395a5d14a1f0a14282067dcb28b13eb11"}}}]'});return"Success"===i?200===(null==o?void 0:o.status)&&null!==(t=o.response)&&void 0!==t&&null!==(e=t[0])&&void 0!==e&&null!==(s=e.data)&&void 0!==s&&s.currentUser?(await At(this,Nt,Bt).call(this),r.success(),!0):(r.error(`Error:${null==o?void 0:o.statusText}(${null==o?void 0:o.status})`),!1):(r.error(i+`:${n}(${a})`),!1)}catch(t){return D(t,"Twitch.verifyAuth"),!1}}async function Bt(){var t=0{const t=GM_openInTab("https://www.twitch.tv/#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=GM_getValue("twitchAuth");t?(_t(this,Pt,t),s.success(),e(await At(this,Ft,Kt).call(this))):(s.error("Error: Update twitch auth failed!"),e(!1))}})}catch(t){return D(t,"Twitch.updateAuth"),!1}}async function qt(t){var{name:e,doTask:t=!0}=t;try{if(!t&&this.whiteList.channels.includes(e))return F({type:"whiteList",text:"Twitch.unfollowChannel",id:e}),!0;var s=await At(this,Mt,Jt).call(this,e);if(!s)return!1;const p=F({type:`${t?"":"un"}followingTwitchChannel`,text:e});var i,n,a,o,r='[{"operationName":"FollowButton_FollowUser","variables":{"input":{"disableNotifications":false,"targetID":"'+s+'"}},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"800e7346bdf7e5278a3c1d3f21b2b56e2639928f86815677a7126b093b2fdd08"}}}]',l=`[{"operationName":"FollowButton_UnfollowUser","variables":{"input":{"targetID":"${s}"}},`+'"extensions":{"persistedQuery":{"version":1,"sha256Hash":"f7dae976ebf41c755ae2d758546bfd176b4eeb856656098bb40e0a672ca0d880"}}}]',{result:u,statusText:c,status:d,data:h}=await I({url:"https://gql.twitch.tv/gql",method:"POST",dataType:"json",anonymous:!0,headers:{Origin:"https://www.twitch.tv",Referer:"https://www.twitch.tv/",Authorization:"OAuth "+Et(this,Pt).authToken,"Client-Id":Et(this,Pt).clientId,"Client-Version":Et(this,Pt).clientVersion,"X-Device-Id":Et(this,Pt).deviceId,"Client-Session-Id":Et(this,Pt).clientSessionId,"Client-Integrity":Et(this,Ut)},data:t?r:l});return"Success"===u?200===(null==h?void 0:h.status)&&null!==(i=h.response)&&void 0!==i&&i[0]&&!h.response[0].errors?(p.success(),t&&(this.tasks.channels=G([...this.tasks.channels,e])),!0):(p.error("Error:"+((null==h||null===(n=h.response)||void 0===n||null===(a=n[0].errors)||void 0===a||null===(o=a[0])||void 0===o?void 0:o.message)||`${null==h?void 0:h.statusText}(${null==h?void 0:h.status})`)),!1):(p.error(u+`:${c}(${d})`),!1)}catch(t){return D(t,"Twitch.toggleChannel"),!1}}async function Jt(t){try{const d=F({type:"gettingTwitchChannelId",text:t});var e=Et(this,Wt)[t];if(e)return d.success(),e;var{result:s,statusText:i,status:n,data:a}=await I({url:"https://gql.twitch.tv/gql",method:"POST",headers:{Authorization:"OAuth "+Et(this,Pt).authToken,"Client-Id":Et(this,Pt).clientId},responseType:"json",data:`[{"operationName":"ActiveWatchParty","variables":{"channelLogin":"${t}"},`+'"extensions":{"persistedQuery":{"version":1,"sha256Hash":"4a8156c97b19e3a36e081cf6d6ddb5dbf9f9b02ae60e4d2ff26ed70aebc80a30"}}}]'});if("Success"!==s)return d.error(s+`:${i}(${n})`),!1;if(200!==(null==a?void 0:a.status))return d.error(`Error:${null==a?void 0:a.statusText}(${null==a?void 0:a.status})`),!1;var o,r,l,u,c=null===(o=a.response)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l||null===(u=l.user)||void 0===u?void 0:u.id;return c?(At(this,Yt,Ht).call(this,t,String(c)),d.success(),c):(d.error(`Error:${a.statusText}(${a.status})`),!1)}catch(t){return D(t,"Twitch.getChannelId"),!1}}function Ht(t,e){try{Et(this,Wt)[t]=e,GM_setValue("twitchCache",Et(this,Wt))}catch(t){D(t,"Twitch.setCache")}}const Xt=class extends t{constructor(){var t;super(...arguments),It(this,Yt),It(this,Mt),It(this,Rt),It(this,jt),It(this,Nt),It(this,Ft),Lt(this,"tasks",JSON.parse(Ot)),Lt(this,"whiteList",{...JSON.parse(Ot),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.twitch}),Gt(this,Pt,{writable:!0,value:GM_getValue("twitchAuth")||{}}),Gt(this,Wt,{writable:!0,value:GM_getValue("twitchCache")||{}}),Gt(this,Dt,{writable:!0,value:!1}),Gt(this,Ut,{writable:!0,value:void 0})}async init(){try{return Et(this,Dt)?!0:Et(this,Pt).authToken&&Et(this,Pt).clientId&&Et(this,Pt).clientVersion&&Et(this,Pt).deviceId&&Et(this,Pt).clientSessionId?await At(this,Ft,Kt).call(this)?(F({}).success(j("initSuccess","Twitch")),_t(this,Dt,!0),!0):(GM_setValue("twitchAuth",null),await At(this,jt,zt).call(this)?(F({}).success(j("initSuccess","Twitch")),_t(this,Dt,!0),!0):(F({}).error(j("initFailed","Twitch")),!1)):!!await At(this,jt,zt).call(this)&&(_t(this,Dt,!0),!0)}catch(t){return D(t,"Twitch.init"),!1}}async toggle(t){var{doTask:e=!0,channelLinks:t=[]}=t;try{if(!Et(this,Dt))return F({text:j("needInit")}),!1;const i=[];if(e&&!N.doTask.twitch.channels||!e&&!N.undoTask.twitch.channels)F({type:"globalOptionsSkip",text:"twitch.channels"});else{var s=this.getRealParams("channels",t,e,t=>{return null===(t=t.match(/https:\/\/(www\.)?twitch\.tv\/(.+)/))||void 0===t?void 0:t[2]});if(0!0)}catch(t){return D(t,"Twitch.toggle"),!1}}};function Qt(t,e){te(t,e),e.add(t)}function Zt(t,e,s){te(t,e),e.set(t,s)}function te(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ee(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function se(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,ae(t,e,"set"),s),s}function ie(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function ne(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,ae(t,e,"get"))}function ae(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const oe=JSON.stringify({names:[]});var re=new WeakMap,le=new WeakMap,ue=new WeakMap,ce=new WeakSet,de=new WeakSet,he=new WeakSet,pe=new WeakSet,ge=new WeakSet,fe=new WeakSet,we=new WeakSet,me=new WeakSet;async function ve(){try{const e=F({text:j("verifyAuth","Vk")}),{result:s,statusText:i,status:n,data:a}=await I({url:"https://vk.com/im",method:"GET"});var t;return"Success"===s?null!==a&&void 0!==a&&a.finalUrl.includes("vk.com/login")?(e.error("Error:"+j("loginVk"),!0),!1):200===(null===a||void 0===a?void 0:a.status)?(se(this,re,(null===(t=a.responseText.match(/TopNavBtn__profileLink" href="\/(.*?)"/))||void 0===t?void 0:t[1])||""),e.success(),!0):(e.error(`Error:${null===a||void 0===a?void 0:a.statusText}(${null===a||void 0===a?void 0:a.status})`),!1):(e.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Vk.verifyAuth"),!1}}async function ke(t,e){var s=!(2{return null===(t=t.match(/https:\/\/vk\.com\/([^/]+)/))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return D(t,"Vk.toggle"),!1}}};function Ge(t,e){Le(t,e),e.add(t)}function Ce(t,e,s){Le(t,e),e.set(t,s)}function Le(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _e(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Ae(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,Oe(t,e,"set"),s),s}function Ee(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function Ve(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,Oe(t,e,"get"))}function Oe(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const Pe=JSON.stringify({channels:[],likes:[]}),We=async function(t,e){try{const h=F({text:j("gettingYtbToken")}),{result:p,statusText:g,status:f,data:w}=await I({url:t,method:"GET"});if("Success"!==p)return h.error(p+`:${g}(${f})`),{};if(200!==(null===w||void 0===w?void 0:w.status))return h.error(`Error:${null===w||void 0===w?void 0:w.statusText}(${null===w||void 0===w?void 0:w.status})`),{};{var s,i;if(w.responseText.includes("accounts.google.com/ServiceLogin?service=youtube"))return h.error("Error:"+j("loginYtb"),!0),{needLogin:!0};var n=null===(s=w.responseText.match(/"INNERTUBE_API_KEY":"(.*?)"/))||void 0===s?void 0:s[1],a=(null===(i=w.responseText.match(/\(\{"INNERTUBE_CONTEXT":([\w\W]*?)\}\)/)||w.responseText.match(/"INNERTUBE_CONTEXT":([\w\W]*?\}),"INNERTUBE/))||void 0===i?void 0:i[1])||"{}";const{client:m,request:v}=JSON.parse(a);if(n&&m&&v){if(m.hl="en","channel"===e){var o,r=null===(o=w.responseText.match(//))||void 0===o?void 0:o[1];return r?(h.success(),{params:{apiKey:n,client:m,request:v,channelId:r}}):(h.error('Error: Get "channelId" failed!'),{})}if("likeVideo"!==e)return h.error("Error: Unknown type"),{};var l,u,c=null===(l=w.responseText.match(//))||void 0===l?void 0:l[1],d=null===(u=w.responseText.match(/"likeParams":"(.*?)"/))||void 0===u?void 0:u[1];return c?(h.success(),{params:{apiKey:n,client:m,request:v,videoId:c,likeParams:d}}):(h.error('Error: Get "videoId" failed!'),{})}return h.error('Error: Parameter "apiKey" not found!'),{}}}catch(t){return D(t,"Youtube.getInfo"),{}}};var De=new WeakMap,Ue=new WeakMap,Fe=new WeakMap,Ne=new WeakSet,je=new WeakSet,Re=new WeakSet,Me=new WeakSet,Ye=new WeakSet;class Ke extends t{constructor(){var t;super(...arguments),Ge(this,Ye),Ge(this,Me),Ge(this,Re),Ge(this,je),Ge(this,Ne),_e(this,"tasks",JSON.parse(Pe)),_e(this,"whiteList",{...JSON.parse(Pe),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.youtube}),Ce(this,De,{writable:!0,value:GM_getValue("youtubeAuth")||{}}),Ce(this,Ue,{writable:!0,value:!1}),Ce(this,Fe,{writable:!0,value:"https://www.youtube.com/channel/"+N.other.youtubeVerifyChannel})}async init(){try{return Ve(this,Ue)?!0:Ve(this,De).PAPISID?await Ee(this,Ne,Be).call(this)?(F({}).success(j("initSuccess","Youtube")),Ae(this,Ue,!0),!0):(GM_setValue("youtubeAuth",null),await Ee(this,je,ze).call(this)?(F({}).success(j("initSuccess","Youtube")),Ae(this,Ue,!0),!0):(F({}).error(j("initFailed","Youtube")),!1)):!!await Ee(this,je,ze).call(this)&&(Ae(this,Ue,!0),!0)}catch(t){return D(t,"Youtube.init"),!1}}async toggle(t){var{doTask:e=!0,channelLinks:s=[],videoLinks:t=[]}=t;try{if(!Ve(this,Ue))return F({text:j("needInit")}),!1;const a=[];if(e&&!N.doTask.youtube.channels||!e&&!N.undoTask.youtube.channels)F({type:"globalOptionsSkip",text:"youtube.channels"});else{var i=this.getRealParams("channels",s,e,t=>{var e;return/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(t)?null===(e=t.match(/url=(https:\/\/www\.youtube\.com\/.*)/))||void 0===e?void 0:e[1]:t});if(0{var e;return/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(t)?null===(e=t.match(/url=(https:\/\/www\.youtube\.com\/.*)/))||void 0===e?void 0:e[1]:t});if(0!0)}catch(t){return D(t,"Youtube.toggle"),!1}}}async function Be(){try{return await Ee(this,Me,Je).call(this,{link:Ve(this,Fe),doTask:!0,verify:!0})}catch(t){return D(t,"Youtube.verifyAuth"),!1}}async function ze(){try{const s=F({text:j("updatingAuth","Youtube")});return await new Promise(e=>{const t=GM_openInTab("https://www.youtube.com/#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=GM_getValue("youtubeAuth");t?(Ae(this,De,t),s.success(),Ee(this,Ne,Be).call(this).then(t=>{e(t)})):(s.error("Error: Update youtube auth failed!"),e(!1))}})}catch(t){return D(t,"Discord.updateAuth"),!1}}function qe(t,e){return We(t,e)}async function Je(t){var{link:e,doTask:s=!0,verify:t=!1}=t;try{var{params:i,needLogin:n}=await Ee(this,Re,qe).call(this,e,"channel"),{apiKey:a,client:o,request:r,channelId:l}=i||{};if(n)return F({html:j("loginYtb")}),!1;if(!(a&&o&&r&&l))return F({text:'"getYtbToken" failed'}),!1;if(!s&&!t&&this.whiteList.channels.includes(l))return F({type:"whiteList",text:"Youtube.unfollowChannel",id:l}),!0;const c=t?F({text:j("verifyingAuth","Youtube")}):F({type:s?"followingYtbChannel":"unfollowingYtbChannel",text:l});var u=parseInt(String((new Date).getTime()/1e3),10);const{result:d,statusText:h,status:p,data:g}=await I({url:`https://www.youtube.com/youtubei/v1/subscription/${s?"":"un"}subscribe?key=`+a,method:"POST",headers:{origin:"https://www.youtube.com",referer:"https://www.youtube.com/channel/"+l,"content-type":"application/json","x-goog-authuser":"0","x-goog-visitor-id":null==o?void 0:o.visitorData,"x-origin":"https://www.youtube.com",authorization:`SAPISIDHASH ${u}_`+sha1(`${u} ${Ve(this,De).PAPISID} https://www.youtube.com`)},data:JSON.stringify({context:{client:o,request:{sessionId:null==r?void 0:r.sessionId,internalExperimentFlags:[],consistencyTokenJars:[]},user:{}},channelIds:[l],params:s?"EgIIAhgA":"CgIIAhgA"})});return"Success"===d?200===(null===g||void 0===g?void 0:g.status)?s&&(/"subscribed": true/.test(g.responseText)||g.responseText.includes("The subscription already exists"))||!s&&/"subscribed": false/.test(g.responseText)?(c.success(),s&&!t&&(this.tasks.channels=G([...this.tasks.channels,e])),!0):t&&g.responseText.includes("You may not subscribe to yourself")?(c.success(),!0):(c.error(j("tryUpdateYtbAuth"),!0),!1):(c.error(`Error:${null===g||void 0===g?void 0:g.statusText}(${null===g||void 0===g?void 0:g.status})`),!1):(c.error(d+`:${h}(${p})`),!1)}catch(t){return D(t,"Youtube.toggleChannel"),!1}}async function He(t){var{link:e,doTask:t=!0}=t;try{var{params:s,needLogin:i}=await Ee(this,Re,qe).call(this,e,"likeVideo"),{apiKey:n,client:a,request:o,videoId:r,likeParams:l}=s||{};if(i)return F({html:""+j("loginYtb")}),!1;if(!(n&&a&&o&&r&&l))return F({text:'"getYtbToken" failed'}),!1;if(!t&&this.whiteList.likes.includes(r))return F({type:"whiteList",text:"Youtube.unlikeVideo",id:r}),!0;const c=F({type:t?"likingYtbVideo":"unlikingYtbVideo",text:r});var u=parseInt(String((new Date).getTime()/1e3),10);const d={context:{client:a,request:{sessionId:o.sessionId,internalExperimentFlags:[],consistencyTokenJars:[]},user:{}},target:{videoId:r}};if(t){if(!l)return c.error("Empty likeParams"),!1;d.params=l}const{result:h,statusText:p,status:g,data:f}=await I({url:`https://www.youtube.com/youtubei/v1/like/${t?"":"remove"}like?key=`+n,method:"POST",headers:{origin:"https://www.youtube.com",referer:"https://www.youtube.com/watch?v="+r,"content-type":"application/json","x-goog-authuser":"0","x-goog-visitor-id":a.visitorData,"x-origin":"https://www.youtube.com",authorization:`SAPISIDHASH ${u}_`+sha1(`${u} ${Ve(this,De).PAPISID} https://www.youtube.com`)},data:JSON.stringify(d)});return"Success"===h?200===(null===f||void 0===f?void 0:f.status)?t&&f.responseText.includes("Added to Liked videos")||!t&&(f.responseText.includes("Removed from Liked videos")||f.responseText.includes("Dislike removed"))?(c.success(),t&&(this.tasks.likes=G([...this.tasks.likes,e])),!0):(c.error(j("tryUpdateYtbAuth"),!0),!1):(c.error(`Error:${null===f||void 0===f?void 0:f.statusText}(${null===f||void 0===f?void 0:f.status})`),!1):(c.error(h+`:${p}(${g})`),!1)}catch(t){return D(t,"Youtube.toggleLikeVideo"),!1}}function Xe(t,e){Ze(t,e),e.add(t)}function Qe(t,e,s){Ze(t,e),e.set(t,s)}function Ze(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ts(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function es(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function ss(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,ns(t,e,"set"),s),s}function is(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,ns(t,e,"get"))}function ns(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const as=JSON.stringify({groups:[],officialGroups:[],wishlists:[],follows:[],forums:[],workshops:[],workshopVotes:[],curators:[],curatorLikes:[],announcements:[],licenses:[],playtests:[]});var os=new WeakMap,rs=new WeakMap,ls=new WeakMap,us=new WeakMap,cs=new WeakMap,ds=new WeakMap,hs=new WeakSet,ps=new WeakSet,gs=new WeakSet,fs=new WeakSet,ws=new WeakSet,ms=new WeakSet,vs=new WeakSet,ks=new WeakSet,ys=new WeakSet,bs=new WeakSet,Ts=new WeakSet,Ss=new WeakSet,xs=new WeakSet,$s=new WeakSet,Is=new WeakSet,Gs=new WeakSet,Cs=new WeakSet,Ls=new WeakSet,_s=new WeakSet,As=new WeakSet,Es=new WeakSet,Vs=new WeakSet,Os=new WeakSet,Ps=new WeakSet,Ws=new WeakSet,Ds=new WeakSet,Us=new WeakSet,Fs=new WeakSet,Ns=new WeakSet;async function js(){try{const s=F({text:j("updatingAuth",j("steamStore"))}),{result:i,statusText:n,status:a,data:o}=await I({url:"https://store.steampowered.com/",method:"GET",headers:{Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Cache-Control":"max-age=0","Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Upgrade-Insecure-Requests":"1"}});if("Success"!==i)return s.error(i+`:${n}(${a})`),!1;if(200!==(null===o||void 0===o?void 0:o.status))return s.error(`Error:${null===o||void 0===o?void 0:o.statusText}(${null===o||void 0===o?void 0:o.status})`),!1;var t;if(!o.responseText.includes("data-miniprofile="))return s.error("Error:"+j("needLoginSteamStore"),!0),!1;var e=null===(t=o.responseText.match(/g_sessionID = "(.+?)";/))||void 0===t?void 0:t[1];return e?(is(this,rs).storeSessionID=e,s.success(),!0):(s.error('Error: Get "sessionID" failed'),!1)}catch(t){return D(t,"Steam.updateStoreAuth"),!1}}async function Rs(){try{const o=F({text:j("updatingAuth",j("steamCommunity"))}),{result:r,statusText:l,status:u,data:c}=await I({url:"https://steamcommunity.com/my",method:"GET",headers:{Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Cache-Control":"max-age=0","Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Upgrade-Insecure-Requests":"1"}});if("Success"!==r)return o.error(r+`:${l}(${u})`),!1;if(200!==(null===c||void 0===c?void 0:c.status))return o.error(`Error:${null===c||void 0===c?void 0:c.statusText}(${null===c||void 0===c?void 0:c.status})`),!1;var t,e,s;if(c.responseText.includes('href="https://steamcommunity.com/login/home/'))return o.error("Error:"+j("needLoginSteamCommunity"),!0),!1;var i=null===(t=c.responseText.match(/g_steamID = "(.+?)";/))||void 0===t?void 0:t[1],n=null===(e=c.responseText.match(/g_sessionID = "(.+?)";/))||void 0===e?void 0:e[1],a=null===(s=c.responseText.match(/steamcommunity.com\/id\/(.+?)\/friends\//))||void 0===s?void 0:s[1];return(i&&(is(this,rs).steam64Id=i),a&&(is(this,rs).userName=a),n)?(is(this,rs).communitySessionID=n,o.success(),!0):(o.error('Error: Get "sessionID" failed'),!1)}catch(t){return D(t,"Steam.updateCommunityAuth"),!1}}async function Ms(){try{const i=F({text:j("gettingAreaInfo")}),{result:n,statusText:a,status:o,data:r}=await I({url:"https://store.steampowered.com/cart/",method:"GET"});if("Success"!==n)return i.error(n+`:${a}(${o})`),{};if(200!==(null===r||void 0===r?void 0:r.status))return i.error(`Error:${null===r||void 0===r?void 0:r.statusText}(${null===r||void 0===r?void 0:r.status})`),{};var t,e=null===(t=r.responseText.match(//g)].map(t=>t[1]);return e&&0{const e=setInterval(()=>{"waiting"!==is(this,ds)&&(clearInterval(e),t(!0))})}),is(this,cs)===e||!e&&"CN"!==is(this,cs))return!0;ss(this,ds,"waiting");let t=e;if(!t){const{currentArea:u,areas:c}=await es(this,gs,Ms).call(this);if(!u||!c)return ss(this,ds,"error"),!1;if("CN"!==u)return ss(this,ds,"skip"),F({text:"notNeededChangeArea"}),"skip";var s=c.filter(t=>t&&"CN"!==t);if(!s||0===s.length)return ss(this,ds,"noAnotherArea"),F({text:"noAnotherArea"}),!1;[t]=s}const l=F({text:j("changingArea",t)});var{result:i,statusText:n,status:a,data:o}=await I({url:"https://store.steampowered.com/account/setcountry",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({cc:t,sessionid:is(this,rs).storeSessionID})});if("Success"!==i)return ss(this,ds,"error"),l.error(i+`:${n}(${a})`),"CN";if(200!==(null==o?void 0:o.status)||"true"!==o.responseText)return ss(this,ds,"error"),l.error(`Error:${null==o?void 0:o.statusText}(${null==o?void 0:o.status})`),"CN";var r=(await es(this,gs,Ms).call(this))["currentArea"];return r===t?(ss(this,ds,"success"),l.success(),r):(ss(this,ds,"error"),l.error("Error: change country filed"),"CN")}catch(t){return ss(this,ds,"error"),D(t,"Steam.changeArea"),!1}}async function Ks(t){try{const e=F({type:"joiningSteamGroup",text:t}),{result:s,statusText:i,status:n,data:a}=await I({url:"https://steamcommunity.com/groups/"+t,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({action:"join",sessionID:is(this,rs).communitySessionID})});return"Success"===s?200!==(null===a||void 0===a?void 0:a.status)||a.responseText.includes("grouppage_join_area")?(e.error(`Error:${null===a||void 0===a?void 0:a.statusText}(${null===a||void 0===a?void 0:a.status})`),!1):(e.success(),this.tasks.groups=G([...this.tasks.groups,t]),!0):(e.error(s+`:${i}(${n})`),!1)}catch(t){return D(t,"Steam.joinGroup"),!1}}async function Bs(t){try{if(this.whiteList.groups.includes(t))return F({type:"whiteList",text:"Steam.leaveGroup",id:t}),!0;var e=await es(this,vs,zs).call(this,t);if(!e)return!1;const s=F({type:"leavingSteamGroup",text:t}),{result:i,statusText:n,status:a,data:o}=await I({url:`https://steamcommunity.com/id/${is(this,rs).userName}/home_process`,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionID:is(this,rs).communitySessionID,action:"leaveGroup",groupId:e})});return"Success"===i?200===(null===o||void 0===o?void 0:o.status)&&o.finalUrl.includes("groups")&&0===$(o.responseText.replace(//g,"").toLowerCase()).find(`a[href='https://steamcommunity.com/groups/${t.toLowerCase()}']`).length?(s.success(),!0):(s.error(`Error:${null===o||void 0===o?void 0:o.statusText}(${null===o||void 0===o?void 0:o.status})`),!1):(s.error(i+`:${n}(${a})`),!1)}catch(t){return D(t,"Steam.leaveGroup"),!1}}async function zs(t){try{const n=F({type:"gettingSteamGroupId",text:t});var e=is(this,os).group[t];if(e)return n.success(),e;const{result:a,statusText:o,status:r,data:l}=await I({url:"https://steamcommunity.com/groups/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==a)return n.error(a+`:${o}(${r})`),!1;if(200!==(null===l||void 0===l?void 0:l.status))return n.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1;var s,i=null===(s=l.responseText.match(/OpenGroupChat\( '([0-9]+)'/))||void 0===s?void 0:s[1];return i?(es(this,Ns,fi).call(this,"group",t,i),n.success(),i):(n.error(`Error:${l.statusText}(${l.status})`),!1)}catch(t){return D(t,"Steam.getGroupID"),!1}}async function qs(t){try{const i=F({type:"joiningSteamOfficialGroup",text:t}),{result:n,statusText:a,status:o,data:r}=await I({url:`https://steamcommunity.com/games/${t}?action=join&sessionID=`+is(this,rs).communitySessionID,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==n)return i.error(n+`:${a}(${o})`),!1;if(200!==(null===r||void 0===r?void 0:r.status)||r.responseText.includes('id="publicGroupJoin"'))return i.error(`Error:${null===r||void 0===r?void 0:r.statusText}(${null===r||void 0===r?void 0:r.status})`),!1;var e;i.success(),this.tasks.officialGroups=G([...this.tasks.officialGroups,t]);var s=null===(e=r.responseText.match(/steam:\/\/friends\/joinchat\/([0-9]+)/))||void 0===e?void 0:e[1];return s&&es(this,Ns,fi).call(this,"officialGroup",t,s),!0}catch(t){return D(t,"Steam.joinOfficialGroup"),!1}}async function Js(t){try{if(this.whiteList.officialGroups.includes(t))return F({type:"whiteList",text:"Steam.leaveOfficialGroup",id:t}),!0;var e=await es(this,bs,Hs).call(this,t);if(!e)return!1;const o=F({type:"leavingSteamOfficialGroup",text:t});var{result:s,statusText:i,status:n,data:a}=await I({url:`https://steamcommunity.com/id/${is(this,rs).userName}/home_process`,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionID:is(this,rs).communitySessionID,action:"leaveGroup",groupId:e})});if("Success"!==s)return o.error(s+`:${i}(${n})`),!1;if(200!==(null==a?void 0:a.status))return o.error(`Error:${null==a?void 0:a.statusText}(${null==a?void 0:a.status})`),!1;{const{result:r,statusText:l,status:u,data:c}=await I({url:"https://steamcommunity.com/games/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});return"Success"===r?200===(null===c||void 0===c?void 0:c.status)&&c.responseText.includes('id="publicGroupJoin"')?(o.success(),!0):(o.error(`Error:${null===c||void 0===c?void 0:c.statusText}(${null===c||void 0===c?void 0:c.status})`),!1):(o.error(r+`:${l}(${u})`),!1)}}catch(t){return D(t,"Steam.leaveOfficialGroup"),!1}}async function Hs(t){try{const n=F({type:"gettingSteamOfficialGroupId",text:t});var e=is(this,os).officialGroup[t];if(e)return n.success(),e;const{result:a,statusText:o,status:r,data:l}=await I({url:"https://steamcommunity.com/games/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==a)return n.error(a+`:${o}(${r})`),!1;if(200!==(null===l||void 0===l?void 0:l.status))return n.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1;var s,i=null===(s=l.responseText.match(/steam:\/\/friends\/joinchat\/([0-9]+)/))||void 0===s?void 0:s[1];return i?(es(this,Ns,fi).call(this,"officialGroup",t,i),n.success(),i):(n.error(`Error:${l.statusText}(${l.status})`),!1)}catch(t){return D(t,"Steam.getGroupID"),!1}}async function Xs(t){try{var e;const n=F({type:"addingToWishlist",text:t});var{result:s,data:i}=await I({url:"https://store.steampowered.com/api/addtowishlist",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionid:is(this,rs).storeSessionID,appid:t}),dataType:"json"});if("Success"===s&&200===(null==i?void 0:i.status)&&!0===(null===(e=i.response)||void 0===e?void 0:e.success))return n.success(),this.tasks.wishlists=G([...this.tasks.wishlists,t]),!0;const{result:a,statusText:o,status:r,data:l}=await I({url:"https://store.steampowered.com/app/"+t,method:"GET"});return"Success"===a?200===(null===l||void 0===l?void 0:l.status)?"CN"===is(this,cs)&&l.responseText.includes('id="error_box"')?(n.warning(j("changeAreaNotice")),!!await es(this,fs,Ys).call(this)&&await es(this,Ts,Xs).call(this,t)):(!l.responseText.includes('class="queue_actions_ctn"')||!l.responseText.includes('class="already_in_library"'))&&(l.responseText.includes('class="queue_actions_ctn"')&&l.responseText.includes('id="add_to_wishlist_area_success" style="display: none;')||!l.responseText.includes('class="queue_actions_ctn"'))?(n.error(`Error:${l.statusText}(${l.status})`),!1):(n.success(),this.tasks.wishlists=G([...this.tasks.wishlists,t]),!0):(n.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1):(n.error(a+`:${o}(${r})`),!1)}catch(t){return D(t,"Steam.addToWishlist"),!1}}async function Qs(t){try{var e;if(this.whiteList.wishlists.includes(t))return F({type:"whiteList",text:"Steam.removeFromWishlist",id:t}),!0;const a=F({type:"removingFromWishlist",text:t});var{result:s,data:i}=await I({url:"https://store.steampowered.com/api/removefromwishlist",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionid:is(this,rs).storeSessionID,appid:t}),dataType:"json"});if("Success"===s&&200===(null==i?void 0:i.status)&&!0===(null===(e=i.response)||void 0===e?void 0:e.success))return a.success(),!0;const{result:o,statusText:r,status:l,data:u}=await I({url:"https://store.steampowered.com/app/"+t,method:"GET"});if("Success"!==o)return a.error(o+`:${r}(${l})`),!1;if(200!==(null===u||void 0===u?void 0:u.status))return a.error(`Error:${null===u||void 0===u?void 0:u.statusText}(${null===u||void 0===u?void 0:u.status})`),!1;if("CN"===is(this,cs)&&u.responseText.includes('id="error_box"')){a.warning(j("changeAreaNotice"));var n=await es(this,fs,Ys).call(this);return n&&"CN"!==n&&"skip"!==n?await es(this,Ss,Qs).call(this,t):!1}return u.responseText.includes('class="queue_actions_ctn"')&&(u.responseText.includes("ds_owned_flag ds_flag")||u.responseText.includes("add_to_wishlist_area"))?(a.success(),!0):(a.error(`Error:${u.statusText}(${u.status})`),!1)}catch(t){return D(t,"Steam.removeFromWishlist"),!1}}async function Zs(t,e){try{if(!e&&this.whiteList.follows.includes(t))return F({type:"whiteList",text:"Steam.unfollowGame",id:t}),!0;const a=F({type:`${e?"":"un"}followingGame`,text:t}),o={sessionid:is(this,rs).storeSessionID,appid:t};e||(o.unfollow="1");var{result:s,data:i}=await I({url:"https://store.steampowered.com/explore/followgame/",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param(o)});if("Success"===s&&200===(null==i?void 0:i.status)&&"true"===i.responseText)return a.success(),!0;var n=await es(this,$s,ti).call(this,t);return"CN"===is(this,cs)&&"areaLocked"===n?(a.warning(j("changeAreaNotice")),!!await es(this,fs,Ys).call(this)&&await es(this,Ss,Qs).call(this,t)):e===n?(a.success(),e&&(this.tasks.follows=G([...this.tasks.follows,t])),!0):(a.error(`Error:${null==i?void 0:i.statusText}(${null==i?void 0:i.status})`),!1)}catch(t){return D(t,"Steam.toggleFollowGame"),!1}}async function ti(t){try{const{result:e,data:s}=await I({url:"https://store.steampowered.com/app/"+t,method:"GET"});return"Success"===e?200===(null===s||void 0===s?void 0:s.status)&&("CN"===is(this,cs)&&s.responseText.includes('id="error_box"')?"areaLocked":"none"!==$(s.responseText.replace(//g,"")).find(".queue_control_button.queue_btn_follow>.btnv6_blue_hoverfade.btn_medium.queue_btn_active").css("display")):!1}catch(t){return D(t,"Steam.isFollowedGame"),!1}}async function ei(t){var e=!(1/))||void 0===s?void 0:s[1];return i?(es(this,Ns,fi).call(this,"workshop",t,i),n.success(),i):(n.error("Error: getWorkshopAppId failed"),!1)}catch(t){return D(t,"Steam.getWorkshopAppId"),!1}}async function ai(t){try{const o=F({type:"votingUpWorkshop",text:t});var e,{result:s,statusText:i,status:n,data:a}=await I({url:"https://steamcommunity.com/sharedfiles/voteup",method:"POST",responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({id:t,sessionid:is(this,rs).communitySessionID})});return"Success"===s?(200===(null==a?void 0:a.status)&&1===(null===(e=a.response)||void 0===e?void 0:e.success)?o.success():o.error(`Error:${null==a?void 0:a.statusText}(${null==a?void 0:a.status})`),!0):(o.error(s+`:${i}(${n})`),!0)}catch(t){return D(t,"Steam.voteupWorkshop"),!0}}async function oi(t){var e=!(1{return null===(t=t.match(/groups\/(.+)\/?/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/games\/(.+)\/?/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/\?id=([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/\?id=([\d]+)/))||void 0===t?void 0:t[1]});if(e&&0{return null===(t=t.match(/curator\/([\d]+)/))||void 0===t?void 0:t[1]}),b=this.getRealParams("curatorLikes",c,e,t=>{return null===(t=t.match(/https?:\/\/store\.steampowered\.com\/(.*?)\/([^/?]+)/))||void 0===t?void 0:t.slice(1,3).join("/")});if(0{var e;return t.includes("store.steampowered.com")?null===(e=t.match(/store\.steampowered\.com\/news\/app\/([\d]+)\/view\/([\d]+)/))||void 0===e?void 0:e.slice(1,3).join("/"):null===(t=t.match(/steamcommunity\.com\/games\/([\d]+)\/announcements\/detail\/([\d]+)/))||void 0===t?void 0:t.slice(1,3).join("/")});if(e&&0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(e&&N.doTask.steam.playtests&&0("CN"!==is(this,cs)&&(F({}).warning(j("steamFinishNotice")),await es(this,fs,Ys).call(this,"CN")),!0))}catch(t){return D(t,"Steam.toggle"),!1}}};function mi(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function vi(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function ki(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}const yi={steam:{groupLinks:[],wishlistLinks:[],curatorLinks:[],curatorLikeLinks:[],followLinks:[],forumLinks:[],announcementLinks:[],workshopVoteLinks:[],playtestLinks:[]},discord:{serverLinks:[]},instagram:{userLinks:[]},vk:{nameLinks:[]},twitch:{channelLinks:[]},reddit:{redditLinks:[]},youtube:{channelLinks:[],likeLinks:[]},twitter:{userLinks:[],retweetLinks:[]}};var bi=new WeakSet,Ti=new WeakSet,Si=new WeakSet,xi=new WeakSet,$i=new WeakSet,Ii=new WeakSet,Gi=new WeakSet,Ci=new WeakSet;async function Li(){try{const e=F({text:j("getTasksInfo")}),s=[];var t=$("#actions tr");$("div.bind-discord").is(":visible")&&$("div.bind-discord a")[0].click(),$("div.bind-twitch").is(":visible")&&$("div.bind-twitch a")[0].click();for(const r of t)s.push(new Promise(e=>{const t=$(r).find('td:not(".hidden")');var s=t.eq(1).find('a:not([data-trigger="link"])'),i=t.eq(2).find('a:not([data-trigger="link"])');const n=0t?(a.includes("steam")&&/join/gi.test(o)?this.undoneTasks.steam.groupLinks.push(t):/like.*announcement/gi.test(o)?this.undoneTasks.steam.announcementLinks.push(t):/(follow|subscribe).*curator/gim.test(o)&&/^https?:\/\/store\.steampowered\.com\/curator\//.test(t)?this.undoneTasks.steam.curatorLinks.push(t):a.includes("steam")&&/follow|subscribe/gim.test(o)?this.undoneTasks.steam.curatorLikeLinks.push(t):/subscribe.*steam.*forum/gim.test(o)?this.undoneTasks.steam.forumLinks.push(t):a.includes("thumbs-up")&&/^https?:\/\/steamcommunity\.com\/sharedfiles\/filedetails\/\?id=[\d]+/.test(t)?this.undoneTasks.steam.workshopVoteLinks.push(t):a.includes("plus")&&/request.*playtest/gim.test(o)?this.undoneTasks.steam.playtestLinks.push(t):a.includes("discord")||/join.*discord/gim.test(o)?this.undoneTasks.discord.serverLinks.push(t):a.includes("instagram")||/follow.*instagram/gim.test(o)?this.undoneTasks.instagram.userLinks.push(t):a.includes("twitch")||/follow.*twitch.*channel/gim.test(o)?this.undoneTasks.twitch.channelLinks.push(t):a.includes("reddit")||/subscribe.*subreddit/gim.test(o)||/follow.*reddit/gim.test(o)?this.undoneTasks.reddit.redditLinks.push(t):/watch.*art/gim.test(o)?this.undoneTasks.steam.workshopVoteLinks.push(t):/subscribe.*youtube.*channel/gim.test(o)?this.undoneTasks.youtube.channelLinks.push(t):/(watch|like).*youtube.*video/gim.test(o)||(a.includes("youtube")||a.includes("thumbs-up"))&&/(watch|like).*video/gim.test(o)?this.undoneTasks.youtube.likeLinks.push(t):a.includes("vk")||/join.*vk.*group/gim.test(o)?this.undoneTasks.vk.nameLinks.push(t):/(on twitter)|(Follow.*on.*Facebook)/gim.test(o)||(/wishlist.*game|add.*wishlist/gim.test(o)&&this.undoneTasks.steam.wishlistLinks.push(t),/follow.*button/gim.test(o)&&this.undoneTasks.steam.followLinks.push(t)),void e(!0)):e(!1)).catch(t=>(D(t,"Giveawaysu.classifyTask->getRedirectLink"),!1))}));return await Promise.all(s),e.success(),this.undoneTasks=ki(this,Gi,Pi).call(this,this.undoneTasks),!0}catch(t){return D(t,"Giveawaysu.classifyTask"),!1}}function _i(){try{return N.other.checkLogin?(0<$("a.steam-login").length&&window.open("/steam/redirect","_self"),!0):!0}catch(t){return D(t,"Giveawaysu.checkLogin"),!1}}async function Ai(){try{return N.other.checkLeftKey?(0<$(".giveaway-ended").length&&await a().fire({icon:"warning",title:j("notice"),text:j("noKeysLeft"),confirmButtonText:j("confirm"),cancelButtonText:j("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0):!0}catch(t){return D(t,"Giveawaysu.checkLeftKey"),!1}}function Ei(){var t=null===(t=window.location.href.match(/\/view\/([\d]+)/))||void 0===t?void 0:t[1];return t?(this.giveawayId=t,!0):(F({text:j("getFailed","GiveawayId")}),!1)}async function Vi(e,t){try{return{name:e,result:await t}}catch(t){return D(t,"GiveawaySu.bind"),{name:e,result:!1}}}async function Oi(){try{const s=[],i=this.undoneTasks;var t,e;return i.discord&&0[...t,...e]).length&&!this.socialInitialized.discord&&(this.social.discord=new R,s.push(ki(this,$i,Vi).call(this,"discord",this.social.discord.init()))),i.instagram&&0[...t,...e]).length&&!this.socialInitialized.instagram&&(this.social.instagram=new ut,s.push(ki(this,$i,Vi).call(this,"instagram",this.social.instagram.init()))),i.reddit&&0[...t,...e]).length&&!this.socialInitialized.reddit&&(this.social.reddit=new $t,s.push(ki(this,$i,Vi).call(this,"reddit",this.social.reddit.init()))),i.twitch&&0[...t,...e]).length&&!this.socialInitialized.twitch&&(this.social.twitch=new Xt,s.push(ki(this,$i,Vi).call(this,"twitch",this.social.twitch.init()))),i.vk&&0[...t,...e]).length&&!this.socialInitialized.vk&&(this.social.vk=new Ie,s.push(ki(this,$i,Vi).call(this,"vk",this.social.vk.init()))),i.youtube&&0[...t,...e]).length&&!this.socialInitialized.youtube&&(this.social.youtube=new Ke,s.push(ki(this,$i,Vi).call(this,"youtube",this.social.youtube.init()))),!i.steam||0<(t=Object.values(i.steam).reduce((t,e)=>[...t,...e]).length)&&(this.social.steam||(this.social.steam=new wi),0{var e,s;return["groupLinks","forumLinks","workshopLinks","workshopVoteLinks"].includes(t)&&(null===(e=i.steam)||void 0===e||null===(s=e[t])||void 0===s?void 0:s.length)||0}).reduce((t,e)=>t+e,0))&&!this.socialInitialized.steamStore&&s.push(ki(this,$i,Vi).call(this,"steamStore",this.social.steam.init("store"))),0{let e=!0;for(const s of t)s.result?this.socialInitialized[s.name]=s.result:e=!1;return e})}catch(t){return D(t,"GiveawaySu.initSocial"),!1}}function Pi(t){const e={};for(var[s,i]of Object.entries(t)){e[s]={};for(var[n,a]of Object.entries(i))e[s][n]=G(a)}return e}async function Wi(){try{if(!this.initialized&&!this.init())return!1;if(!await ki(this,bi,Li).call(this))return!1;if(!await ki(this,Ii,Oi).call(this))return!1;const e=[];var t=this.undoneTasks;return"skip"!==this.socialInitialized.discord&&this.social.discord&&e.push(this.social.discord.toggle({doTask:!0,...t.discord})),this.social.instagram&&e.push(this.social.instagram.toggle({doTask:!0,...t.instagram})),this.social.reddit&&e.push(this.social.reddit.toggle({doTask:!0,...t.reddit})),this.social.twitch&&e.push(this.social.twitch.toggle({doTask:!0,...t.twitch})),this.social.vk&&e.push(this.social.vk.toggle({doTask:!0,...t.vk})),this.social.youtube&&e.push(this.social.youtube.toggle({doTask:!0,...t.youtube})),this.social.steam&&e.push(this.social.steam.toggle({doTask:!0,...t.steam})),await Promise.all(e),F({}).success(j("allTasksComplete")),!0}catch(t){return D(t,"GiveawaySu.toggleTask"),!1}}const Di=class{constructor(){mi(this,Ci),mi(this,Gi),mi(this,Ii),mi(this,$i),mi(this,xi),mi(this,Si),mi(this,Ti),mi(this,bi),vi(this,"undoneTasks",yi),vi(this,"giveawayId",void 0),vi(this,"socialInitialized",{discord:!1,instagram:!1,reddit:!1,twitch:!1,vk:!1,youtube:!1,steamStore:!1,steamCommunity:!1,twitter:!0}),vi(this,"initialized",!1),vi(this,"social",{})}static test(){return/^https?:\/\/giveaway\.su\/giveaway\/view\/[\d]+/.test(window.location.href)}async after(){try{ki(this,Ti,_i).call(this)||F({}).warning(j("checkLoginFailed")),await ki(this,Si,Ai).call(this)||F({}).warning(j("checkLeftKeyFailed"))}catch(t){D(t,"Giveawaysu.after")}}init(){try{const t=F({text:j("initing")});return 0<$("a.steam-login").length?(window.open("/steam/redirect","_self"),t.warning(j("needLogin")),!1):!!ki(this,xi,Ei).call(this)&&(this.initialized=!0,t.success(),!0)}catch(t){return D(t,"Giveawaysu.init"),!1}}async doTask(){try{return $("#getKey").on("click",()=>{$("#auto-task-info-div").remove(),$(window.STYLE).remove(),$("#getKey").off()}),await ki(this,Ci,Wi).call(this)}catch(t){return D(t,"GiveawaySu.doTask"),!1}}async verifyTask(){try{var t;for(const e of $("#actions tr")){const s=$(e);if("adjs"!==s.attr("data-action-id")){const i=s.find("i.glyphicon-refresh"),n=i.parent();"A"!==n.prop("tagName")?i.hasClass("spin")||i.hasClass("glyphicon-ok")||(n[0].click(),await U(1e3)):(t=n.attr("href"),n.attr("href","javascript:void(0);").attr("target","_self")[0].click(),n.attr("href",t))}}}catch(t){D(t,"GiveawaySu.verifyTask")}}};var Ui,Fi,t=ji(821);if(window.STYLE=GM_addStyle(t.Z+GM_getResourceText("style")),"discord.com"===window.location.hostname){const Ni=window.localStorage;"#auth"===window.location.hash?(window.localStorage.removeItem=()=>!0,(Ui=null===Ni||void 0===Ni||null===(Ui=Ni.getItem("token"))||void 0===Ui?void 0:Ui.replace(/^"|"$/g,""))&&0{var t,e,s;if("www.twitch.tv"===window.location.hostname&&"#auth"===window.location.hash&&(t=o.get("auth-token"),!!o.get("login")?(GM_setValue("twitchAuth",{authToken:t,clientId:null===(t=commonOptions)||void 0===t||null===(e=t.headers)||void 0===e?void 0:e["Client-ID"]}),window.close(),a().fire("",j("closePageNotice"))):a().fire("",j("needLogin"))),"twitter.com"===window.location.hostname&&"#auth"===window.location.hash&&(s=o.get("ct0"),!!o.get("twid")&&s?(GM_setValue("twitterAuth",{ct0:s}),window.close(),a().fire("",j("closePageNotice"))):a().fire("",j("needLogin"))),"www.youtube.com"===window.location.hostname&&"#auth"===window.location.hash&&((s=o.get("__Secure-3PAPISID"))?(GM_setValue("youtubeAuth",{PAPISID:s}),window.close(),a().fire("",j("closePageNotice"))):a().fire("",j("needLogin"))),"www.reddit.com"===window.location.hostname&&("#auth"===window.location.hash||"#auth"===GM_getValue("redditAuth"))){const i=$("#redesign-beta-optin-btn");if(0

    `),await n.after(),$("#auto-do-task").on("click",()=>{n.doTask()}),$("#auto-verify-task").on("click",()=>{n.verifyTask()}),console.log("%c%s","color:#1bbe1a","Auto Task GS特供脚本初始化完成!")}})}()}(); \ No newline at end of file diff --git a/dist/auto-task-v4.all.user.js b/dist/auto-task-v4.all.user.js index a5d0661..300126f 100644 --- a/dist/auto-task-v4.all.user.js +++ b/dist/auto-task-v4.all.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name auto-task-v4 // @namespace auto-task-v4 -// @version 4.2.23 +// @version 4.2.24 // @description 自动完成 Freeanywhere,Giveawaysu,GiveeClub,Givekey,Gleam,Indiedb,keyhub,OpiumPulses,Opquests,SweepWidget 等网站的任务。 // @description:en Automatically complete the tasks of FreeAnyWhere, GiveawaySu, GiveeClub, Givekey, Gleam, Indiedb, keyhub, OpiumPulses, Opquests, SweepWidget websites. // @author HCLonely @@ -7393,6 +7393,10 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); youtube: { channelLinks: [], likeLinks: [] + }, + twitter: { + userLinks: [], + retweetLinks: [] } }; var _checkLogin = new WeakSet(); @@ -8640,12 +8644,13 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); const tasks = $('.event-actions tr'); for (const task of tasks) { pro.push(new Promise(resolve => { - var _$$find; + var _$$find, _$$find2; const taskDes = $(task).find('.event-action-label a'); const taskIcon = $(task).find('.event-action-icon i').attr('class') || ''; const taskName = taskDes.text().trim(); const taskType = (_$$find = $(task).find('button[data-type]')) === null || _$$find === void 0 ? void 0 : _$$find.attr('data-type'); - if (taskIcon.includes('ban') || /AdBlock/i.test(taskName) || taskIcon.includes('envelope')) { + const taskFinished = (_$$find2 = $(task).find('.event-action-buttons .btn-success')) === null || _$$find2 === void 0 ? void 0 : _$$find2.length; + if (taskIcon.includes('ban') || /AdBlock/i.test(taskName) || taskIcon.includes('envelope') || taskFinished) { return resolve(true); } getRedirectLink(taskDes.attr('href')).then(taskLink => { @@ -8684,6 +8689,12 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); this.undoneTasks.youtube.likeLinks.push(taskLink); } else if (taskIcon.includes('vk') || /join.*vk.*group/gim.test(taskName)) { this.undoneTasks.vk.nameLinks.push(taskLink); + } else if (taskIcon.includes('twitter')) { + if (/https?:\/\/twitter\.com\/[^/]+\/?$/gim.test(taskLink)) { + this.undoneTasks.twitter.userLinks.push(taskLink); + } else if (/https?:\/\/twitter\.com\/[^/]+?\/status\/[\d]+/gim.test(taskLink)) { + this.undoneTasks.twitter.retweetLinks.push(taskLink); + } } else { if (/(on twitter)|(Follow.*on.*Facebook)/gim.test(taskName)) {} else { if (/follow.*button/gim.test(taskName)) { diff --git a/dist/auto-task-v4.compatibility.all.user.js b/dist/auto-task-v4.compatibility.all.user.js index f5da5f6..9c36d8c 100644 --- a/dist/auto-task-v4.compatibility.all.user.js +++ b/dist/auto-task-v4.compatibility.all.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name auto-task-v4.compatibility // @namespace auto-task-v4.compatibility -// @version 4.2.23 +// @version 4.2.24 // @description 自动完成 Freeanywhere,Giveawaysu,GiveeClub,Givekey,Gleam,Indiedb,keyhub,OpiumPulses,Opquests,SweepWidget 等网站的任务。 // @description:en Automatically complete the tasks of FreeAnyWhere, GiveawaySu, GiveeClub, Givekey, Gleam, Indiedb, keyhub, OpiumPulses, Opquests, SweepWidget websites. // @author HCLonely @@ -116,15 +116,15 @@ var runtime=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); -!function(){var s={588:function(t,e){!function(t){"use strict";var i=function(){return(i=Object.assign||function(t){for(var e,s=1,i=arguments.length;s[a-z\d]+)(\/|\s)(?(\d+\.)+\d+)/i))||void 0===e?void 0:e.groups)&&void 0!==s?s:{},o=n.name,r=n.version,l={},c=0,u=Object.entries(this.browserNameMap);c(.*)=.+)/.exec(decodeURIComponent(t)))||void 0===t?void 0:t.groups;if(!t)return{};for(var e=t.params.split("&"),i={},s=0;s=e?t:""+Array(e+1-i.length).join(s)+t},e={s:n,z:function(t){var e=-t.utcOffset(),s=Math.abs(e),i=Math.floor(s/60),a=s%60;return(e<=0?"+":"-")+n(i,2,"0")+":"+n(a,2,"0")},m:function t(e,s){if(e.date(){s.dataType&&(s.responseType=s.dataType);var t={timeout:3e4,ontimeout(t){e({result:"Error",statusText:"Timeout",status:601,data:t,options:s})},onabort(t){e({result:"Error",statusText:"Aborted",status:602,data:t,options:s})},onerror(t){e({result:"Error",statusText:"Error",status:603,data:t,options:s})},onload(t){e({result:"Success",statusText:"Load",status:600,data:t,options:s})},...s};GM_xmlhttpRequest(t)});return window.DEBUG&&console.log("%cAuto-Task[httpRequest]:","color:blue",JSON.stringify(e)),600!==e.status&&t<2?await i(s,t+1):e}catch(t){return console.log("%cAuto-Task[httpRequest]:","color:red",JSON.stringify({errorMsg:t,options:s})),R(t,"httpRequest"),{result:"JsError",statusText:"Error",status:604,error:t,options:s}}}const L=i;function P(){let e=0{setTimeout(()=>{t(!0)},e)})}const V=t=>{let{type:e,text:s,html:i,id:a}=t;const n={success:()=>n,error:()=>n,warning:()=>n,info:()=>n,view:()=>n};try{var o;let t;if(e)switch(e){case"joiningSteamGroup":case"leavingSteamGroup":case"gettingSteamGroupId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"joiningSteamOfficialGroup":case"leavingSteamOfficialGroup":case"gettingSteamOfficialGroupId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"subscribingForum":case"unsubscribingForum":case"gettingForumId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"followingCurator":case"unfollowingCurator":case"gettingCuratorId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"addingToWishlist":case"removingFromWishlist":case"followingGame":case"unfollowingGame":case"gettingSubid":case"addingFreeLicense":case"requestingPlayTestAccess":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"addingFreeLicenseSubid":t=$(`
  • ${K("addingFreeLicense")}[${s}]...
  • `);break;case"favoritingWorkshop":case"unfavoritingWorkshop":case"gettingWorkshopAppId":case"votingUpWorkshop":t=$(`
  • ${K(e)}[ - ${s}]...
  • `);break;case"gettingAnnouncementParams":case"likingAnnouncement":t=$(`
  • ${K(e)}[ - ${a}]...
  • `);break;case"joiningDiscordServer":case"gettingDiscordGuild":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"leavingDiscordServer":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"updateDiscordAuth":t=$(`
  • ${K("updateDiscordAuth")}
  • `);break;case"followingTwitchChannel":case"unfollowingTwitchChannel":case"gettingTwitchChannelId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"gettingInsUserId":case"followingIns":case"unfollowingIns":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"gettingTwitterUserId":case"followingTwitterUser":case"unfollowingTwitterUser":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"retweetting":case"unretweetting":t=$(`
  • ${K(e)}${s}...
  • `);break;case"joiningReddit":case"leavingReddit":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"followingRedditUser":case"unfollowingRedditUser":t=$(`
  • ${K(e)}[ - ${null===s||void 0===s?void 0:s.replace("u_","")}]...
  • `);break;case"followingYtbChannel":case"unfollowingYtbChannel":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"likingYtbVideo":case"unlikingYtbVideo":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"gettingVkId":case"joiningVkGroup":case"leavingVkGroup":case"joiningVkPublic":case"leavingVkPublic":case"sendingVkWall":case"deletingVkWall":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"visitingLink":t=$(`
  • ${K("visitingLink")}[${s}]...
  • `);break;case"verifyingInsAuth":case"text":t=$(`
  • ${K(s)}
  • `);break;case"html":t=$(s||i);break;case"whiteList":t=$(`
  • ${K("skipTask")}[${s}(${a})](${K("whiteList")})
  • `);break;case"globalOptionsSkip":t=$(`
  • ${K("skipTaskOption")}${s}
  • `);break;default:t=$(`
  • ${K("unKnown")}:${e}(${s})...
  • `)}else t=s?$(`
  • ${K(s)}
  • `):i?$(i):$("
  • ");return t.addClass("card-text"),$("#auto-task-info").append(t),null!==(o=t[0])&&void 0!==o&&o.scrollIntoView(),{font:t.find("font"),success(){var t,e,s=0{try{return[...new Set(t)]}catch(t){return R(t,"unique"),[]}},u=async e=>{try{if(!e)return null;const s=GM_getValue("redirectLinks")||{};return s[e]&&s[e],await L({url:e,method:"GET"}).then(t=>{t=t.data;return null!=t&&t.finalUrl?(s[e]=t.finalUrl,GM_setValue("redirectLinks",s),t.finalUrl):null})}catch(t){return R(t,"getRedirectLink"),null}},n=async(t,e)=>{try{const i=V({type:"visitLink",text:t});return await L({url:t,method:"GET",...e}).then(t=>{var{result:e,statusText:s,status:t}=t;return"Success"===e?(i.success(),!0):(i.error(e+`:${s}(${t})`),!1)})}catch(t){return R(t,"visitLink"),!1}};const l=i=>{try{let e=0;for(let t=0;t>8*t&255;s+=("00"+a.toString(16)).slice(-2)}return s}catch(t){return R(t,"stringToColour"),"#fff"}},o={doTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0,workshopVotes:!0,announcements:!0,licenses:!0,playtests:!0}},undoTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0}},position:{buttonSideX:"right",buttonSideY:"top",buttonDistance:"15,30",showButtonSideX:"right",showButtonSideY:"top",showButtonDistance:"15,30",logSideX:"right",logSideY:"bottom",logDistance:"10,10"},hotKey:{doTaskKey:"alt + d",undoTaskKey:"alt + u",toggleLogKey:"alt + l"},other:{twitterVerifyId:"783214",youtubeVerifyChannel:"UCrXUsMBcfTVqwAS7DKg9C0Q",autoUpdateSource:"jsdelivr",language:"zh",checkLogin:!0,checkLeftKey:!0,defaultShowButton:!0,defaultShowLog:!0,debug:!1,receivePreview:!0}};var s=GM_getValue("globalOptions")||{};const r=(t,e)=>{try{const a={};for(var[s,i]of Object.entries(t))"[object Object]"===Object.prototype.toString.call(i)&&"[object Object]"===Object.prototype.toString.call(e[s])?a[s]=r(i,e[s]):a[s]=e[s]??i;return a}catch(t){return R(t,"assignObject"),o}},N=r(o,s),c=()=>{try{const i={};$("#globalOptionsForm").serializeArray().map(t=>(i[t.name]=t.value,t)),$.makeArray($("#globalOptionsForm input")).map(t=>{const e=$(t).attr("name");var s=e.split(".");return 3===s.length?N[s[0]][s[1]][s[2]]=!!i[e]&&("on"===i[e]||i[e]):2===s.length&&(N[s[0]][s[1]]=!!i[e]&&("on"===i[e]||i[e])),t}),GM_setValue("globalOptions",N),p().fire({title:K("changeGlobalOptionsSuccess"),icon:"success"})}catch(t){R(t,"saveData")}},w=e=>{try{let t=`
    - `;for(const[o,r]of Object.entries(N))for(var[s,i]of Object.entries(r))if(["other","position","hotKey"].includes(o))"boolean"==typeof i?t+=`${0===Object.keys(r).indexOf(s)?``:""}`:t+=`${0===Object.keys(r).indexOf(s)?``:""}`;else for(var[a,n]of Object.entries(i))t+=`${0===Object.keys(r).indexOf(s)?``:""}`;t+="
    ${K("type")}${K("option")}${K("value")}
    ${K(o)}${K(s)}
    ${K(o)}${K(s)}
    ${K(o)}${s}.${K(a)}
    ","swal"===e?p().fire({title:K("globalOptions"),html:t,showConfirmButton:!0,confirmButtonText:K("save"),showCancelButton:!0,cancelButtonText:K("close")}).then(t=>{t=t.isConfirmed;t&&c()}):$("body").append(`

    ${K("globalOptions")}

    `+t)}catch(t){R(t,"changeGlobalOptions")}};const d={zh:{website:"网站",type:"类型",edit:"编辑",whiteList:"白名单",skipTask:"跳过撤销任务",whiteListOptions:"白名单设置",changeWhiteListOption:"设置白名单(%0)",whiteListNotFound:"找不到此项白名单: %0",changeWhiteListSuccess:"白名单修改成功,刷新生效!",changeWebsiteOptions:"网站设置",changeGlobalOptions:"全局设置",ok:"是",save:"保存",close:"关闭",return:"返回",option:"选项",value:"值",websiteOptions:"当前网站设置",changeWebsiteOptionsSuccess:"更改当前网站设置成功,刷新生效!",changeGlobalOptionsSuccess:"更改全局设置成功,刷新生效!",needLogin:"请先登录!",getTasksInfo:"正在获取并处理任务信息...",gettingKey:"正在获取Key...",verifyingTask:"正在验证任务",notice:"自动任务脚本提醒",noKeysLeft:"此页面已经没有剩余key了,是否关闭?",giveawayEnded:"此活动已结束,是否关闭?",giveawayNotWork:"此活动因某些原因(已结束/暂停/未开始...)不可用(如果是脚本误判请及时反馈),是否关闭?",confirm:"确定",cancel:"取消",unKnown:"未知",unKnownTaskType:"未识别的任务",doing:"正在做任务",allTasksComplete:"所有任务已完成!",getTaskIdFailed:"获取任务Id失败!",initSuccess:"%0 初始化成功!",initFailed:"%0 初始化失败!",errorLink:"链接错误: %0",needInit:"请先初始化",verifyingAuth:"正在验证%0凭证...",updatingAuth:"正在更新%0凭证...",initing:"正在初始化...",getFailed:"获取%0失败!",checkLoginFailed:"检测登录状态失败!",checkLeftKeyFailed:"检测剩余Key失败!",userId:"用户Id",joiningGiveaway:"正在加入赠Key",needJoinGiveaway:"需要先加入赠Key",cannotUndo:"此网站不支持取消任务",verifyAuth:"正在验证 %0 凭证...",closePageNotice:"如果此页面没有自动关闭,请自行关闭本页面。",errorReport:"检测到脚本报错,是否前往反馈BUG?",visitingLink:"正在访问链接: ",doTask:"做任务",undoTask:"撤销任务",verifyTask:"验证任务",getKey:"获取Key",selectAll:"全选",selectNone:"全不选",invertSelect:"反选",doFreeTask:"加入免费赠品",doPointTask:"加入点数赠品",skipTaskOption:"设置中已配置跳过任务",other:"其他",globalOptions:"全局设置",checkLogin:"登录检测
    需要登录的网站自动登录,部分本网站支持",checkLeftKey:"剩余Key检测
    赠Key活动结束提示是否关闭,部分本网站支持",twitterVerifyId:"通过尝试关注该账号验证Twitter凭证
    默认为Twitter官方帐号 783214
    不想关注官方账号可以改为自己的帐号",youtubeVerifyChannel:"通过尝试订阅该频道验证YouTube凭证
    默认为YouTube官方频道 UCrXUsMBcfTVqwAS7DKg9C0Q
    不想关注官方频道可以改为自己的频道",autoUpdateSource:"更新源
    github: 需代理,实时更新
    jsdelivr: 可不用代理,更新有延迟
    standby: 备用
    auto: 依次使用github, jsdelivr, standby源进行尝试更新",saveGlobalOptions:"保存全局设置",settingPage:"设置页面",name:"名称",version:"版本",scriptManager:"脚本管理器",script:"脚本",environment:"环境",os:"系统",browser:"浏览器",getId:"获取 %0 id",getTwitterUserId:"获取Twitter用户id(获取id功能仅在设置页面可用)",getYoutubeChannelId:"获取Youtube频道id(获取id功能仅在设置页面可用)",showButton:"显示按钮",hideButton:"隐藏按钮",showLog:"显示日志",hideLog:"隐藏日志",defaultShowButton:"默认显示按钮",defaultShowLog:"默认显示日志",debug:"输出调试日志,不要开启此选项!",receivePreview:"接收预览版更新",position:"组件位置",buttonSideX:"按钮区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",buttonSideY:"按钮区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",buttonDistance:"按钮区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",showButtonSideX:"显示按钮水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",showButtonSideY:"显示按钮垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",showButtonDistance:"显示按钮距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",logSideX:"日志区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",logSideY:"日志区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",logDistance:"日志区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",hotKey:"快捷键",doTaskKey:"做任务快捷键
    (实时预览功能仅在设置页面可用)",undoTaskKey:"撤销任务快捷键
    (实时预览功能仅在设置页面可用)",toggleLogKey:"显示/隐藏日志快捷键
    (实时预览功能仅在设置页面可用)",tasksHistory:"任务历史",clearHistory:"清空历史",clearHistoryFinished:"已清空任务历史!",deleteTask:"删除任务",lastChangeTime:"最后一次修改时间",clearTaskFinished:"删除以下任务完成!",clearTaskFailed:"删除任务失败,没有找到任务名!",syncData:"数据同步",settingData:"正在上传数据...",gettingData:"正在获取数据...",help:"帮助",fileName:"文件名",upload2gist:"同步到Gist",downloadFromGist:"从Gist同步",saveAndTest:"保存配置并测试",testSuccess:"测试成功!",testFailed:"测试失败!",saveAndTestNotice:"请先保存配置并测试!",processingData:"正在处理数据...",updatingData:"正在上传数据...",syncDataSuccess:"同步数据成功!",syncDataFailed:"同步数据失败,请在控制台查看错误信息!",downloadingData:"正在下载数据...",checkedNoData:"没有检测到远程数据,请确认配置是否正确!",savingData:"正在保存数据...",syncHistory:"同步任务历史",checkUpdateFailed:"检测更新失败",newVersionNotice:'检测到新版本V%0, 点此更新',language:"语言
    目前仅支持zh: 中文, en: 英文",gistOptions:"Gist 设置",swalNotice:"检测到您第一次安装V4版本脚本,请前往阅读用前必读内容!",echoNotice:'检测到您第一次安装V4版本脚本,请点此前往阅读用前必读内容!',noticeLink:"https://auto-task-doc.js.org/guide/#用前必读",toGithub:"前往Github反馈",toKeylol:"前往其乐论坛反馈",copySuccess:"错误信息已复制到剪切板,是否前往其乐论坛反馈?",copyFailed:"请复制下方错误信息后前往Keylol论坛反馈!",updateText:"%0 版本更新内容:",Active:"进行中",Ended:"已结束",Banned:"已封禁",Paused:"已暂停",notStart:"未开始",noRemoteData:"检测到远程无数据",errorRemoteDataFormat:"远程数据格式错误",updateHistory:'历史更新记录点此查看',groups:"组",officialGroups:"官方组",wishlists:"愿望单",follows:"游戏关注",forums:"论坛",workshops:"创意工坊收藏",curators:"鉴赏家",workshopVotes:"创意工坊点赞",announcements:"社区通知",steamCommunity:"Steam社区",steamStore:"Steam商店",licenses:"入库免费游戏",playtests:"请求访问权限",needLoginSteamStore:'请先登录Steam商店',needLoginSteamCommunity:'请先登录Steam社区',joiningSteamGroup:"正在加入Steam组",leavingSteamGroup:"正在退出Steam组",gettingSteamGroupId:"正在获取Steam组Id",joiningSteamOfficialGroup:"正在加入Steam官方组",leavingSteamOfficialGroup:"正在退出Steam官方组",gettingSteamOfficialGroupId:"正在获取Steam官方组Id",subscribingForum:"正在订阅Steam论坛",unsubscribingForum:"正在取消订阅Steam论坛",gettingForumId:"正在获取Steam论坛Id",followingCurator:"正在关注Steam鉴赏家",unfollowingCurator:"正在取关Steam鉴赏家",gettingCuratorId:"正在获取Steam鉴赏家Id",addingToWishlist:"正在添加游戏到Steam愿望单",removingFromWishlist:"正在从Steam愿望单移除游戏",followingGame:"正在关注Steam游戏",unfollowingGame:"正在取关Steam游戏",favoritingWorkshop:"正在收藏Steam创意工坊物品",unfavoritingWorkshop:"正在取消收藏Steam创意工坊物品",gettingWorkshopAppId:"正在获取Steam创意工坊物品Id",votingUpWorkshop:"正在点赞Steam创意工坊物品",gettingAnnouncementParams:"正在获取Steam通知信息",likingAnnouncement:"正在点赞Steam通知",changingArea:"正在更换Steam地区: %0...",notNeededChangeArea:"当前地区不需要更换",noAnotherArea:"请检测是否开启正确开启代理",gettingAreaInfo:"正在获取Steam地区信息...",changeAreaNotice:"疑似锁区游戏,尝试换区执行",steamFinishNotice:"Steam任务完成,尝试将购物车地区换回CN",gettingSubid:"正在获取游戏subid",addingFreeLicense:"正在入库",missParams:"缺少参数",gettingLicenses:"正在获取Licenses...",requestingPlayTestAccess:"正在请求访问权限",tryChangeAreaNotice:"此功能无法检测游戏是否限区,因此会尝试换区后再入库,换区失败也不影响后续入库",servers:"服务器",joiningDiscordServer:"正在加入Discord服务器",leavingDiscordServer:"正在退出Discord服务器",gettingDiscordGuild:"正在获取Discord服务器Id",getDiscordAuthFailed:"获取Discord凭证失败,请检测Discord帐号是否已登录",discordImportantNotice:"重要提醒!!!",discordImportantNoticeText:"由于Discord网站后台更新,目前使用此脚本加组后可能会导致Discord帐号被强制退出,且需要两步验证才能正常登录,请谨慎使用!!!",continue:"继续",skipDiscordTask:"跳过Discord任务",continueAndDontRemindAgain:"继续且不再提醒",users:"用户",loginIns:'请先登录Instagram',insBanned:"您的Instagram账户已被封禁",verifyingInsAuth:"正在验证Instagram凭证...",gettingInsUserId:"正在获取Instagram用户Id",followingIns:"正在关注Instagram用户",unfollowingIns:"正在取关Instagram用户",reddits:"社区/用户",loginReddit:'请先登录Reddit',changingRedditVersion:"正在切换Reddit为新版页面...",joiningReddit:"正在加入Reddit社区",leavingReddit:"正在退出Reddit社区",followingRedditUser:"正在关注Reddit用户",unfollowingRedditUser:"正在取关Reddit用户",channels:"频道",followingTwitchChannel:"正在关注Twitch频道",unfollowingTwitchChannel:"正在取关Twitch频道",gettingTwitchChannelId:"正在获取Twitch频道Id",checkingTwitchIntegrity:"正在检查Twitch完整性...",twitterUser:"推特用户",retweets:"转推",gettingTwitterUserId:"正在获取推特用户Id",followingTwitterUser:"正在关注推特用户",unfollowingTwitterUser:"正在取关推特用户",retweetting:"正在转推",unretweetting:"正在撤销转推",names:"组/社区/动态",loginVk:'请先登录Vk',gettingVkId:"正在获取Vk任务Id",joiningVkGroup:"正在加入Vk组",leavingVkGroup:"正在退出Vk组",joiningVkPublic:"正在加入Vk社区",leavingVkPublic:"正在退出Vk社区",sendingVkWall:"正在转发Vk动态",deletingVkWall:"正在撤销转发Vk动态",youtubeChannel:"YouTube频道",likes:"点赞",loginYtb:'请先登录YouTube',tryUpdateYtbAuth:'请尝试更新YouTube凭证',gettingYtbToken:"正在获取YouTube Token...",followingYtbChannel:"正在订阅YouTube频道",unfollowingYtbChannel:"正在退订YouTube频道",likingYtbVideo:"正在点赞YouTube视频",unlikingYtbVideo:"正在取消点赞YouTube视频",giveKeyNoticeBefore:"每次验证间隔15s",giveKeyNoticeAfter:'如果没有key, 请在https://givekey.ru/profile查看',noPoints:"点数不够,跳过抽奖",getNeedPointsFailed:"获取所需点数失败,跳过抽奖",joiningLottery:"正在加入抽奖",doingGleamTask:"正在做Gleam任务...",gettingGleamLink:"正在获取Gleam任务链接...",gleamTaskNotice:"如果此页面长时间未关闭,请完成任一任务后自行关闭!",verifiedGleamTasks:"已尝试验证所有任务,验证失败的任务请尝试手动验证或完成!",gsNotice:'为避免得到"0000-0000-0000"key, 已自动屏蔽"Grab Key"按钮,获取key时请关闭脚本!',giveeClubVerifyNotice:"正在验证任务...",giveeClubVerifyFinished:"请等待验证完成后自行加入赠Key",doingKeyhubTask:"正在做Keyhub任务...",SweepWidgetNotice:"正在处理并验证任务,每次验证任务有1~3s间隔防止触发验证过快警告..."},en:{website:"Website",type:"Type",edit:"Edit",whiteList:"Whitelist",skipTask:"Skip undo task",whiteListOptions:"Whitelist options",changeWhiteListOption:"Whitelist option(%0)",whiteListNotFound:"Cannot find this whitelist: %0",changeWhiteListSuccess:"The whitelist is successfully modified, and the page refresh will take effect!",changeWebsiteOptions:"Website options",changeGlobalOptions:"Global options",ok:"OK",save:"Save",close:"Close",return:"Return",option:"Option",value:"Value",websiteOptions:"Current website settings",changeWebsiteOptionsSuccess:"The current website setting is changed successfully, and the page refresh will take effect!",changeGlobalOptionsSuccess:"The global setting is changed successfully, and the refresh will take effect!",needLogin:"Please log in first!",getTasksInfo:"Obtaining and processing task information...",gettingKey:"Getting Key...",verifyingTask:"Verifying task",notice:"Automatic task script notice",noKeysLeft:"There are no more keys left on this page. Do you want to close it?",giveawayEnded:"This event has ended, do you want to close it?",giveawayNotWork:"This activity is unavailable for some reasons (banned/ended/paused/not started...) (if it is a script misjudgment, please give us feedback in time), is it closed?",confirm:"Confirm",cancel:"Cancel",unKnown:"Unknown",unKnownTaskType:"Unrecognized task",doing:"Doing a task",allTasksComplete:"All tasks have been completed!",getTaskIdFailed:"Failed to obtain task Id!",initSuccess:"%0 was initialized successfully!",initFailed:"%0 initialization failed!",errorLink:"Link error: %0",needInit:"Please initialize first",verifyingAuth:"Verifying %0 token...",updatingAuth:"Update %0 token...",initing:"Initializing...",getFailed:"Failed to get %0!",checkLoginFailed:"Failed to detect login status!",checkLeftKeyFailed:"Failed to detect the remaining keys!",userId:"User Id",joiningGiveaway:"Joining giveaway",needJoinGiveaway:"Need to join the giveaway first",cannotUndo:"This website does not support canceling tasks",verifyAuth:"Verifying %0 token...",closePageNotice:"f this page does not close automatically, please close this page yourself.",errorReport:"A script error is detected, do you want to report the BUG?",visitingLink:"Visiting link: ",doTask:"DoTask",undoTask:"UndoTask",verifyTask:"Verify",getKey:"GetKey",selectAll:"SelectAll",selectNone:"SelectNone",invertSelect:"InvertSelect",doFreeTask:"FreeTask",doPointTask:"PointTask",skipTaskOption:"Skip task has been configured in the settings",other:"Other",globalOptions:"Global Options",checkLogin:"Login detection
    Need to log in to the website automatically log in, part of this website supports.",checkLeftKey:"Key remaining detection
    The end of the giveaway event prompts whether to close or not, part of this website supports.",twitterVerifyId:"Verify Twitter token by trying to follow the account.
    The default is the official Twitter account 783214.
    If you don't want to follow the official account, you can change it to your own account.",youtubeVerifyChannel:"Verify YouTube token by trying to subscribe to the channel.
    The default is the official YouTube channel UCrXUsMBcfTVqwAS7DKg9C0Q.
    If you don't want to follow the official channel, you can change it to your own channel.",autoUpdateSource:"The source to update
    github: Fast update.
    jsdelivr: Update is delayed.
    standby: Standby source.
    auto: Try to update using github, jsdelivr, standby sources in turn.",saveGlobalOptions:"SaveSettings",settingPage:"Setting Page",name:"Name",version:"Version",scriptManager:"Script Manager",script:"Script",environment:"Environment",os:"OS",browser:"Browser",getId:"Get %0 id",getTwitterUserId:"Get Twitter user id (Get id function is only available on the settings page).",getYoutubeChannelId:"Get Youtube channel id (Get id function is only available on the settings page).",showButton:"ShowButton",hideButton:"HideButton",showLog:"ShowLog",hideLog:"HideLog",defaultShowButton:"Default display button",defaultShowLog:"Display log by default",debug:"Output debug log, do not enable this option!",receivePreview:"Receive preview updates",position:"Component position",buttonSideX:"Horizontal positioning of the button area (real-time preview function is only available on the setting page).
    left: left | right: right",buttonSideY:"The button area is positioned in the vertical direction (real-time preview function is only available on the settings page).
    top: top | bottom: bottom",buttonDistance:"The distance between the button area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",showButtonSideX:"ShowButton horizontal positioning (real-time preview function is only available on the setting page).
    left: left | right: right",showButtonSideY:"ShowButton vertical positioning (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",showButtonDistance:"The distance between the ShowButton and the edge (real-time preview function is only available on the setting page).
    Format: X distance, Y distance",logSideX:"Horizontal positioning of the log area (real-time preview function is only available on the setting page).
    left: left | right: right",logSideY:"Vertical positioning of the log area (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",logDistance:"The distance between the log area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",hotKey:"Shortcut key",doTaskKey:"DoTask shortcut keys
    (real-time preview function is only available on the settings page).",undoTaskKey:"UndoTask shortcut keys
    (real-time preview function is only available on the settings page).",toggleLogKey:"ShowLog/HideLog shortcut keys
    (real-time preview function is only available on the settings page).",tasksHistory:"TasksHistory",clearHistory:"Clear history",clearHistoryFinished:"The mission history has been cleared!",deleteTask:"Delete task",lastChangeTime:"Last Change Time",clearTaskFinished:"Delete the following tasks completed!",clearTaskFailed:"Failed to delete the task, the task name was not found!",syncData:"DataSync",settingData:"Uploading data...",gettingData:"Getting data...",help:"Help",fileName:"Filename",upload2gist:"Sync to Gist",downloadFromGist:"Sync from Gist",saveAndTest:"Save configuration and test",testSuccess:"Test success!",testFailed:"Test failed!",saveAndTestNotice:"Please save the configuration and test first!",processingData:"Processing data...",updatingData:"Uploading data...",syncDataSuccess:"Synchronized data successfully!",syncDataFailed:"Failed to synchronize data, please check the error message on the console!",downloadingData:"Downloading data...",checkedNoData:"No remote data is detected, please confirm whether the configuration is correct!",savingData:"Saving data...",syncHistory:"Synchronize tasks history",checkUpdateFailed:"Check update failed",newVersionNotice:'Checked a new version V%0, click to update',language:"Language
    Currently only supports zh: Chinese, en: English",gistOptions:"Gist Settings",swalNotice:"It is detected that you are installing the V4 version script for the first time, please go to read the READ ME FIRST content before use!",echoNotice:'It is detected that you are installing the V4 version script for the first time, please click here to read the READ ME FIRST content before use!',noticeLink:"https://auto-task-doc.js.org/en/guide/#read-me-first",toGithub:"Feedback(Github)",toKeylol:"Feedback(Keylol)",copySuccess:"The error message has been copied to the clipboard. Do you want to go to the Keylol forum to give feedback?",copyFailed:"Please copy the error information below and report back to the Keylol forum!",updateText:"Updates in version %0:",Active:"Active",Ended:"Ended",Banned:"Banned",Paused:"Paused",notStart:"notStart",noRemoteData:"No data remotely",errorRemoteDataFormat:"Remote data has wrong format",updateHistory:'Click here to view the historical update record.',groups:"Group",officialGroups:"Official Group",wishlists:"Wishlist",follows:"Follow Game",forums:"Forum",workshops:"Favorite Workshop",curators:"Curator",workshopVotes:"Voteup Workshop",announcements:"Announcement",steamCommunity:"Steam Community",steamStore:"Steam Store",licenses:"Add License",playtests:"Playtest Access",needLoginSteamStore:'Please log in to the Steam Store',needLoginSteamCommunity:'Please log in to the Steam Community',joiningSteamGroup:"Joining Steam Group",leavingSteamGroup:"Leaving Steam Group",gettingSteamGroupId:"Getting Steam Group Id",joiningSteamOfficialGroup:"Joining Steam Official Group",leavingSteamOfficialGroup:"Leaving Steam Official Group",gettingSteamOfficialGroupId:"Getting Steam Official Group Id",subscribingForum:"Subscribing the Steam Forum",unsubscribingForum:"Unsubscribing the Steam Forum",gettingForumId:"Getting Steam Forum Id",followingCurator:"Following Steam Curator",unfollowingCurator:"Unfollowing Steam Curator",gettingCuratorId:"Getting Steam Curator Id",addingToWishlist:"Adding the game to the Steam wishlist",removingFromWishlist:"Removing the game from the Steam wishlist",followingGame:"Following Steam games",unfollowingGame:"Unfollowing Steam games",favoritingWorkshop:"Favouring Steam Workshop Items",unfavoritingWorkshop:"Unfavoriting Steam Workshop Items",gettingWorkshopAppId:"Getting Steam Workshop Item Id",votingUpWorkshop:"Liking Steam workshop items",gettingAnnouncementParams:"Getting Steam announcement information",likingAnnouncement:"Liking Steam announcement",changingArea:"Changing Steam area: %0...",notNeededChangeArea:"The current area does not need to be changed",noAnotherArea:"Please check whether the proxy is turned on correctly",gettingAreaInfo:"Getting Steam area information...",changeAreaNotice:"Suspected of a locked zone game, try to change the zone to execute",steamFinishNotice:"Steam task completed, try to change the shopping cart area back to CN",gettingSubid:"Getting subid",addingFreeLicense:"Adding free license",missParams:"Missing parameters",gettingLicenses:"Getting licenses...",requestingPlayTestAccess:"Requesting play test access",tryChangeAreaNotice:"This function cannot detect whether the game is limited, so it will try to change the area before entering the library. Failure to change the area will not affect the subsequent storage.",servers:"Server",joiningDiscordServer:"Joining Discord Server",leavingDiscordServer:"Leaving Discord Server",gettingDiscordGuild:"Getting Discord server Id",getDiscordAuthFailed:"Failed to get Discord token, please check whether the Discord account is logged in",discordImportantNotice:"Important Reminder! ! !",discordImportantNoticeText:"Due to the background update of the Discord website, currently using this script to join a group may cause the Discord account to be forcibly logged out, and two-step verification is required to log in normally, please use it with caution! ! !",continue:"Continue",skipDiscordTask:"Skip",continueAndDontRemindAgain:"Continue without Reminders",users:"User",loginIns:'Please log in to Instagram',insBanned:"Your Instagram account has been banned",verifyingInsAuth:"Verifying Instagram token...",gettingInsUserId:"Getting Instagram user Id",followingIns:"Following Instagram user",unfollowingIns:"Unfollowing Instagram user",reddits:"Reddit/User",loginReddit:'Please log in to Reddit',changingRedditVersion:"Switching Reddit to a new version page...",joiningReddit:"Joining the Reddit",leavingReddit:"Leaving the Reddit",followingRedditUser:"Following Reddit User",unfollowingRedditUser:"Unfollowing Reddit User",channels:"Channel",followingTwitchChannel:"Following Twitch Channel",unfollowingTwitchChannel:"Unfollowing Twitch Channel",gettingTwitchChannelId:"Getting Twitch Channel Id",checkingTwitchIntegrity:"Checking Twitch integrity...",twitterUser:"Twitter User",retweets:"Retweet",gettingTwitterUserId:"Getting Twitter User Id",followingTwitterUser:"Following Twitter User",unfollowingTwitterUser:"Unfollowing Twitter User",retweetting:"Retweetting",unretweetting:"Unretweetting",names:"Group/Public/Wall",loginVk:'Please log in to Vk',gettingVkId:"Getting Vk task Id",joiningVkGroup:"Joining Vk Group",leavingVkGroup:"Leaving Vk Group",joiningVkPublic:"Joining Vk Public",leavingVkPublic:"Leaving Vk Public",sendingVkWall:"Sending Vk Wall",deletingVkWall:"Deleting Vk Wall",youtubeChannel:"YouTube Channel",likes:"Like",loginYtb:'Please log in to YouTube',tryUpdateYtbAuth:'Please try to update YouTube token',gettingYtbToken:"Getting YouTube Token...",followingYtbChannel:"Subscribing to YouTube channel",unfollowingYtbChannel:"Unsubscribing to YouTube channel",likingYtbVideo:"Liking YouTube video",unlikingYtbVideo:"Unliking YouTube video",giveKeyNoticeBefore:"Each verification interval is 15s",giveKeyNoticeAfter:'If there is no key, please check at https://givekey.ru/profile',noPoints:"Not enough points, skip the lottery",getNeedPointsFailed:"ailed to obtain the required points, skip the lottery",joiningLottery:"Joining the lottery",doingGleamTask:"Doing Gleam Task...",gettingGleamLink:"Getting Gleam task link...",gleamTaskNotice:"If this page has not been closed for a long time, please close it yourself after completing any task!",verifiedGleamTasks:"Attempted to verify all tasks. If the verification fails, please try to verify manually or complete it!",gsNotice:'In order to avoid getting the "0000-0000-0000" key, the "Grab Key" button has been hidden, please close the script when obtaining the key!',giveeClubVerifyNotice:"Verifying task...",giveeClubVerifyFinished:"Wait for the verification to complete and join it by yourself",doingKeyhubTask:"Doing Keyhub Task...",SweepWidgetNotice:"The task is being processed and verified. There is an interval of 1~3s for each verification task to prevent the triggering of too fast verification warning..."}},h=["zh","en"].includes(N.other.language)?N.other.language:"en";const K=function(t){for(var e,s=arguments.length,i=new Array(1i[parseInt(e,10)]):t};function R(s,i){window.TRACE&&console.trace("%cAuto-Task[Debug]:","color:blue"),p().fire({title:K("errorReport"),icon:"error",showCancelButton:!0,confirmButtonText:K("toGithub"),showDenyButton:!0,denyButtonText:K("toKeylol"),cancelButtonText:K("close")}).then(t=>{var{isDenied:e,isConfirmed:t}=t;t?window.open(`https://github.com/HCLonely/auto-task-v4/issues/new?title=${encodeURIComponent("[BUG] 脚本报错: "+i)}&labels=bug&template=bug_report.yml&website=${encodeURIComponent(window.location.href)}&browser=${encodeURIComponent(JSON.stringify((0,a.ua)(),null,4))}&manager=${encodeURIComponent(GM_info.scriptHandler+" "+GM_info.version)}&user-script=${encodeURIComponent(GM_info.script.version)}&logs=${encodeURIComponent(s.stack||"null")}&run-logs=`+encodeURIComponent($.makeArray($("#auto-task-info>li")).map(t=>t.innerText).join("\n")),"_blank"):e&&(e=`错误链接: [url=${window.location.href}]${window.location.href}[/url] +!function(){var s={588:function(t,e){!function(t){"use strict";var i=function(){return(i=Object.assign||function(t){for(var e,s=1,i=arguments.length;s[a-z\d]+)(\/|\s)(?(\d+\.)+\d+)/i))||void 0===e?void 0:e.groups)&&void 0!==s?s:{},o=a.name,r=a.version,l={},c=0,u=Object.entries(this.browserNameMap);c(.*)=.+)/.exec(decodeURIComponent(t)))||void 0===t?void 0:t.groups;if(!t)return{};for(var e=t.params.split("&"),i={},s=0;s=e?t:""+Array(e+1-i.length).join(s)+t},e={s:a,z:function(t){var e=-t.utcOffset(),s=Math.abs(e),i=Math.floor(s/60),n=s%60;return(e<=0?"+":"-")+a(i,2,"0")+":"+a(n,2,"0")},m:function t(e,s){if(e.date(){s.dataType&&(s.responseType=s.dataType);var t={timeout:3e4,ontimeout(t){e({result:"Error",statusText:"Timeout",status:601,data:t,options:s})},onabort(t){e({result:"Error",statusText:"Aborted",status:602,data:t,options:s})},onerror(t){e({result:"Error",statusText:"Error",status:603,data:t,options:s})},onload(t){e({result:"Success",statusText:"Load",status:600,data:t,options:s})},...s};GM_xmlhttpRequest(t)});return window.DEBUG&&console.log("%cAuto-Task[httpRequest]:","color:blue",JSON.stringify(e)),600!==e.status&&t<2?await i(s,t+1):e}catch(t){return console.log("%cAuto-Task[httpRequest]:","color:red",JSON.stringify({errorMsg:t,options:s})),R(t,"httpRequest"),{result:"JsError",statusText:"Error",status:604,error:t,options:s}}}const L=i;function P(){let e=0{setTimeout(()=>{t(!0)},e)})}const V=t=>{let{type:e,text:s,html:i,id:n}=t;const a={success:()=>a,error:()=>a,warning:()=>a,info:()=>a,view:()=>a};try{var o;let t;if(e)switch(e){case"joiningSteamGroup":case"leavingSteamGroup":case"gettingSteamGroupId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"joiningSteamOfficialGroup":case"leavingSteamOfficialGroup":case"gettingSteamOfficialGroupId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"subscribingForum":case"unsubscribingForum":case"gettingForumId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"followingCurator":case"unfollowingCurator":case"gettingCuratorId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"addingToWishlist":case"removingFromWishlist":case"followingGame":case"unfollowingGame":case"gettingSubid":case"addingFreeLicense":case"requestingPlayTestAccess":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"addingFreeLicenseSubid":t=$(`
  • ${K("addingFreeLicense")}[${s}]...
  • `);break;case"favoritingWorkshop":case"unfavoritingWorkshop":case"gettingWorkshopAppId":case"votingUpWorkshop":t=$(`
  • ${K(e)}[ + ${s}]...
  • `);break;case"gettingAnnouncementParams":case"likingAnnouncement":t=$(`
  • ${K(e)}[ + ${n}]...
  • `);break;case"joiningDiscordServer":case"gettingDiscordGuild":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"leavingDiscordServer":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"updateDiscordAuth":t=$(`
  • ${K("updateDiscordAuth")}
  • `);break;case"followingTwitchChannel":case"unfollowingTwitchChannel":case"gettingTwitchChannelId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"gettingInsUserId":case"followingIns":case"unfollowingIns":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"gettingTwitterUserId":case"followingTwitterUser":case"unfollowingTwitterUser":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"retweetting":case"unretweetting":t=$(`
  • ${K(e)}${s}...
  • `);break;case"joiningReddit":case"leavingReddit":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"followingRedditUser":case"unfollowingRedditUser":t=$(`
  • ${K(e)}[ + ${null===s||void 0===s?void 0:s.replace("u_","")}]...
  • `);break;case"followingYtbChannel":case"unfollowingYtbChannel":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"likingYtbVideo":case"unlikingYtbVideo":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"gettingVkId":case"joiningVkGroup":case"leavingVkGroup":case"joiningVkPublic":case"leavingVkPublic":case"sendingVkWall":case"deletingVkWall":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"visitingLink":t=$(`
  • ${K("visitingLink")}[${s}]...
  • `);break;case"verifyingInsAuth":case"text":t=$(`
  • ${K(s)}
  • `);break;case"html":t=$(s||i);break;case"whiteList":t=$(`
  • ${K("skipTask")}[${s}(${n})](${K("whiteList")})
  • `);break;case"globalOptionsSkip":t=$(`
  • ${K("skipTaskOption")}${s}
  • `);break;default:t=$(`
  • ${K("unKnown")}:${e}(${s})...
  • `)}else t=s?$(`
  • ${K(s)}
  • `):i?$(i):$("
  • ");return t.addClass("card-text"),$("#auto-task-info").append(t),null!==(o=t[0])&&void 0!==o&&o.scrollIntoView(),{font:t.find("font"),success(){var t,e,s=0{try{return[...new Set(t)]}catch(t){return R(t,"unique"),[]}},u=async e=>{try{if(!e)return null;const s=GM_getValue("redirectLinks")||{};return s[e]&&s[e],await L({url:e,method:"GET"}).then(t=>{t=t.data;return null!=t&&t.finalUrl?(s[e]=t.finalUrl,GM_setValue("redirectLinks",s),t.finalUrl):null})}catch(t){return R(t,"getRedirectLink"),null}},a=async(t,e)=>{try{const i=V({type:"visitLink",text:t});return await L({url:t,method:"GET",...e}).then(t=>{var{result:e,statusText:s,status:t}=t;return"Success"===e?(i.success(),!0):(i.error(e+`:${s}(${t})`),!1)})}catch(t){return R(t,"visitLink"),!1}};const l=i=>{try{let e=0;for(let t=0;t>8*t&255;s+=("00"+n.toString(16)).slice(-2)}return s}catch(t){return R(t,"stringToColour"),"#fff"}},o={doTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0,workshopVotes:!0,announcements:!0,licenses:!0,playtests:!0}},undoTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0}},position:{buttonSideX:"right",buttonSideY:"top",buttonDistance:"15,30",showButtonSideX:"right",showButtonSideY:"top",showButtonDistance:"15,30",logSideX:"right",logSideY:"bottom",logDistance:"10,10"},hotKey:{doTaskKey:"alt + d",undoTaskKey:"alt + u",toggleLogKey:"alt + l"},other:{twitterVerifyId:"783214",youtubeVerifyChannel:"UCrXUsMBcfTVqwAS7DKg9C0Q",autoUpdateSource:"jsdelivr",language:"zh",checkLogin:!0,checkLeftKey:!0,defaultShowButton:!0,defaultShowLog:!0,debug:!1,receivePreview:!0}};var s=GM_getValue("globalOptions")||{};const r=(t,e)=>{try{const n={};for(var[s,i]of Object.entries(t))"[object Object]"===Object.prototype.toString.call(i)&&"[object Object]"===Object.prototype.toString.call(e[s])?n[s]=r(i,e[s]):n[s]=e[s]??i;return n}catch(t){return R(t,"assignObject"),o}},N=r(o,s),c=()=>{try{const i={};$("#globalOptionsForm").serializeArray().map(t=>(i[t.name]=t.value,t)),$.makeArray($("#globalOptionsForm input")).map(t=>{const e=$(t).attr("name");var s=e.split(".");return 3===s.length?N[s[0]][s[1]][s[2]]=!!i[e]&&("on"===i[e]||i[e]):2===s.length&&(N[s[0]][s[1]]=!!i[e]&&("on"===i[e]||i[e])),t}),GM_setValue("globalOptions",N),p().fire({title:K("changeGlobalOptionsSuccess"),icon:"success"})}catch(t){R(t,"saveData")}},w=e=>{try{let t=`
    + `;for(const[o,r]of Object.entries(N))for(var[s,i]of Object.entries(r))if(["other","position","hotKey"].includes(o))"boolean"==typeof i?t+=`${0===Object.keys(r).indexOf(s)?``:""}`:t+=`${0===Object.keys(r).indexOf(s)?``:""}`;else for(var[n,a]of Object.entries(i))t+=`${0===Object.keys(r).indexOf(s)?``:""}`;t+="
    ${K("type")}${K("option")}${K("value")}
    ${K(o)}${K(s)}
    ${K(o)}${K(s)}
    ${K(o)}${s}.${K(n)}
    ","swal"===e?p().fire({title:K("globalOptions"),html:t,showConfirmButton:!0,confirmButtonText:K("save"),showCancelButton:!0,cancelButtonText:K("close")}).then(t=>{t=t.isConfirmed;t&&c()}):$("body").append(`

    ${K("globalOptions")}

    `+t)}catch(t){R(t,"changeGlobalOptions")}};const d={zh:{website:"网站",type:"类型",edit:"编辑",whiteList:"白名单",skipTask:"跳过撤销任务",whiteListOptions:"白名单设置",changeWhiteListOption:"设置白名单(%0)",whiteListNotFound:"找不到此项白名单: %0",changeWhiteListSuccess:"白名单修改成功,刷新生效!",changeWebsiteOptions:"网站设置",changeGlobalOptions:"全局设置",ok:"是",save:"保存",close:"关闭",return:"返回",option:"选项",value:"值",websiteOptions:"当前网站设置",changeWebsiteOptionsSuccess:"更改当前网站设置成功,刷新生效!",changeGlobalOptionsSuccess:"更改全局设置成功,刷新生效!",needLogin:"请先登录!",getTasksInfo:"正在获取并处理任务信息...",gettingKey:"正在获取Key...",verifyingTask:"正在验证任务",notice:"自动任务脚本提醒",noKeysLeft:"此页面已经没有剩余key了,是否关闭?",giveawayEnded:"此活动已结束,是否关闭?",giveawayNotWork:"此活动因某些原因(已结束/暂停/未开始...)不可用(如果是脚本误判请及时反馈),是否关闭?",confirm:"确定",cancel:"取消",unKnown:"未知",unKnownTaskType:"未识别的任务",doing:"正在做任务",allTasksComplete:"所有任务已完成!",getTaskIdFailed:"获取任务Id失败!",initSuccess:"%0 初始化成功!",initFailed:"%0 初始化失败!",errorLink:"链接错误: %0",needInit:"请先初始化",verifyingAuth:"正在验证%0凭证...",updatingAuth:"正在更新%0凭证...",initing:"正在初始化...",getFailed:"获取%0失败!",checkLoginFailed:"检测登录状态失败!",checkLeftKeyFailed:"检测剩余Key失败!",userId:"用户Id",joiningGiveaway:"正在加入赠Key",needJoinGiveaway:"需要先加入赠Key",cannotUndo:"此网站不支持取消任务",verifyAuth:"正在验证 %0 凭证...",closePageNotice:"如果此页面没有自动关闭,请自行关闭本页面。",errorReport:"检测到脚本报错,是否前往反馈BUG?",visitingLink:"正在访问链接: ",doTask:"做任务",undoTask:"撤销任务",verifyTask:"验证任务",getKey:"获取Key",selectAll:"全选",selectNone:"全不选",invertSelect:"反选",doFreeTask:"加入免费赠品",doPointTask:"加入点数赠品",skipTaskOption:"设置中已配置跳过任务",other:"其他",globalOptions:"全局设置",checkLogin:"登录检测
    需要登录的网站自动登录,部分本网站支持",checkLeftKey:"剩余Key检测
    赠Key活动结束提示是否关闭,部分本网站支持",twitterVerifyId:"通过尝试关注该账号验证Twitter凭证
    默认为Twitter官方帐号 783214
    不想关注官方账号可以改为自己的帐号",youtubeVerifyChannel:"通过尝试订阅该频道验证YouTube凭证
    默认为YouTube官方频道 UCrXUsMBcfTVqwAS7DKg9C0Q
    不想关注官方频道可以改为自己的频道",autoUpdateSource:"更新源
    github: 需代理,实时更新
    jsdelivr: 可不用代理,更新有延迟
    standby: 备用
    auto: 依次使用github, jsdelivr, standby源进行尝试更新",saveGlobalOptions:"保存全局设置",settingPage:"设置页面",name:"名称",version:"版本",scriptManager:"脚本管理器",script:"脚本",environment:"环境",os:"系统",browser:"浏览器",getId:"获取 %0 id",getTwitterUserId:"获取Twitter用户id(获取id功能仅在设置页面可用)",getYoutubeChannelId:"获取Youtube频道id(获取id功能仅在设置页面可用)",showButton:"显示按钮",hideButton:"隐藏按钮",showLog:"显示日志",hideLog:"隐藏日志",defaultShowButton:"默认显示按钮",defaultShowLog:"默认显示日志",debug:"输出调试日志,不要开启此选项!",receivePreview:"接收预览版更新",position:"组件位置",buttonSideX:"按钮区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",buttonSideY:"按钮区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",buttonDistance:"按钮区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",showButtonSideX:"显示按钮水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",showButtonSideY:"显示按钮垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",showButtonDistance:"显示按钮距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",logSideX:"日志区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",logSideY:"日志区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",logDistance:"日志区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",hotKey:"快捷键",doTaskKey:"做任务快捷键
    (实时预览功能仅在设置页面可用)",undoTaskKey:"撤销任务快捷键
    (实时预览功能仅在设置页面可用)",toggleLogKey:"显示/隐藏日志快捷键
    (实时预览功能仅在设置页面可用)",tasksHistory:"任务历史",clearHistory:"清空历史",clearHistoryFinished:"已清空任务历史!",deleteTask:"删除任务",lastChangeTime:"最后一次修改时间",clearTaskFinished:"删除以下任务完成!",clearTaskFailed:"删除任务失败,没有找到任务名!",syncData:"数据同步",settingData:"正在上传数据...",gettingData:"正在获取数据...",help:"帮助",fileName:"文件名",upload2gist:"同步到Gist",downloadFromGist:"从Gist同步",saveAndTest:"保存配置并测试",testSuccess:"测试成功!",testFailed:"测试失败!",saveAndTestNotice:"请先保存配置并测试!",processingData:"正在处理数据...",updatingData:"正在上传数据...",syncDataSuccess:"同步数据成功!",syncDataFailed:"同步数据失败,请在控制台查看错误信息!",downloadingData:"正在下载数据...",checkedNoData:"没有检测到远程数据,请确认配置是否正确!",savingData:"正在保存数据...",syncHistory:"同步任务历史",checkUpdateFailed:"检测更新失败",newVersionNotice:'检测到新版本V%0, 点此更新',language:"语言
    目前仅支持zh: 中文, en: 英文",gistOptions:"Gist 设置",swalNotice:"检测到您第一次安装V4版本脚本,请前往阅读用前必读内容!",echoNotice:'检测到您第一次安装V4版本脚本,请点此前往阅读用前必读内容!',noticeLink:"https://auto-task-doc.js.org/guide/#用前必读",toGithub:"前往Github反馈",toKeylol:"前往其乐论坛反馈",copySuccess:"错误信息已复制到剪切板,是否前往其乐论坛反馈?",copyFailed:"请复制下方错误信息后前往Keylol论坛反馈!",updateText:"%0 版本更新内容:",Active:"进行中",Ended:"已结束",Banned:"已封禁",Paused:"已暂停",notStart:"未开始",noRemoteData:"检测到远程无数据",errorRemoteDataFormat:"远程数据格式错误",updateHistory:'历史更新记录点此查看',groups:"组",officialGroups:"官方组",wishlists:"愿望单",follows:"游戏关注",forums:"论坛",workshops:"创意工坊收藏",curators:"鉴赏家",workshopVotes:"创意工坊点赞",announcements:"社区通知",steamCommunity:"Steam社区",steamStore:"Steam商店",licenses:"入库免费游戏",playtests:"请求访问权限",needLoginSteamStore:'请先登录Steam商店',needLoginSteamCommunity:'请先登录Steam社区',joiningSteamGroup:"正在加入Steam组",leavingSteamGroup:"正在退出Steam组",gettingSteamGroupId:"正在获取Steam组Id",joiningSteamOfficialGroup:"正在加入Steam官方组",leavingSteamOfficialGroup:"正在退出Steam官方组",gettingSteamOfficialGroupId:"正在获取Steam官方组Id",subscribingForum:"正在订阅Steam论坛",unsubscribingForum:"正在取消订阅Steam论坛",gettingForumId:"正在获取Steam论坛Id",followingCurator:"正在关注Steam鉴赏家",unfollowingCurator:"正在取关Steam鉴赏家",gettingCuratorId:"正在获取Steam鉴赏家Id",addingToWishlist:"正在添加游戏到Steam愿望单",removingFromWishlist:"正在从Steam愿望单移除游戏",followingGame:"正在关注Steam游戏",unfollowingGame:"正在取关Steam游戏",favoritingWorkshop:"正在收藏Steam创意工坊物品",unfavoritingWorkshop:"正在取消收藏Steam创意工坊物品",gettingWorkshopAppId:"正在获取Steam创意工坊物品Id",votingUpWorkshop:"正在点赞Steam创意工坊物品",gettingAnnouncementParams:"正在获取Steam通知信息",likingAnnouncement:"正在点赞Steam通知",changingArea:"正在更换Steam地区: %0...",notNeededChangeArea:"当前地区不需要更换",noAnotherArea:"请检测是否开启正确开启代理",gettingAreaInfo:"正在获取Steam地区信息...",changeAreaNotice:"疑似锁区游戏,尝试换区执行",steamFinishNotice:"Steam任务完成,尝试将购物车地区换回CN",gettingSubid:"正在获取游戏subid",addingFreeLicense:"正在入库",missParams:"缺少参数",gettingLicenses:"正在获取Licenses...",requestingPlayTestAccess:"正在请求访问权限",tryChangeAreaNotice:"此功能无法检测游戏是否限区,因此会尝试换区后再入库,换区失败也不影响后续入库",servers:"服务器",joiningDiscordServer:"正在加入Discord服务器",leavingDiscordServer:"正在退出Discord服务器",gettingDiscordGuild:"正在获取Discord服务器Id",getDiscordAuthFailed:"获取Discord凭证失败,请检测Discord帐号是否已登录",discordImportantNotice:"重要提醒!!!",discordImportantNoticeText:"由于Discord网站后台更新,目前使用此脚本加组后可能会导致Discord帐号被强制退出,且需要两步验证才能正常登录,请谨慎使用!!!",continue:"继续",skipDiscordTask:"跳过Discord任务",continueAndDontRemindAgain:"继续且不再提醒",users:"用户",loginIns:'请先登录Instagram',insBanned:"您的Instagram账户已被封禁",verifyingInsAuth:"正在验证Instagram凭证...",gettingInsUserId:"正在获取Instagram用户Id",followingIns:"正在关注Instagram用户",unfollowingIns:"正在取关Instagram用户",reddits:"社区/用户",loginReddit:'请先登录Reddit',changingRedditVersion:"正在切换Reddit为新版页面...",joiningReddit:"正在加入Reddit社区",leavingReddit:"正在退出Reddit社区",followingRedditUser:"正在关注Reddit用户",unfollowingRedditUser:"正在取关Reddit用户",channels:"频道",followingTwitchChannel:"正在关注Twitch频道",unfollowingTwitchChannel:"正在取关Twitch频道",gettingTwitchChannelId:"正在获取Twitch频道Id",checkingTwitchIntegrity:"正在检查Twitch完整性...",twitterUser:"推特用户",retweets:"转推",gettingTwitterUserId:"正在获取推特用户Id",followingTwitterUser:"正在关注推特用户",unfollowingTwitterUser:"正在取关推特用户",retweetting:"正在转推",unretweetting:"正在撤销转推",names:"组/社区/动态",loginVk:'请先登录Vk',gettingVkId:"正在获取Vk任务Id",joiningVkGroup:"正在加入Vk组",leavingVkGroup:"正在退出Vk组",joiningVkPublic:"正在加入Vk社区",leavingVkPublic:"正在退出Vk社区",sendingVkWall:"正在转发Vk动态",deletingVkWall:"正在撤销转发Vk动态",youtubeChannel:"YouTube频道",likes:"点赞",loginYtb:'请先登录YouTube',tryUpdateYtbAuth:'请尝试更新YouTube凭证',gettingYtbToken:"正在获取YouTube Token...",followingYtbChannel:"正在订阅YouTube频道",unfollowingYtbChannel:"正在退订YouTube频道",likingYtbVideo:"正在点赞YouTube视频",unlikingYtbVideo:"正在取消点赞YouTube视频",giveKeyNoticeBefore:"每次验证间隔15s",giveKeyNoticeAfter:'如果没有key, 请在https://givekey.ru/profile查看',noPoints:"点数不够,跳过抽奖",getNeedPointsFailed:"获取所需点数失败,跳过抽奖",joiningLottery:"正在加入抽奖",doingGleamTask:"正在做Gleam任务...",gettingGleamLink:"正在获取Gleam任务链接...",gleamTaskNotice:"如果此页面长时间未关闭,请完成任一任务后自行关闭!",verifiedGleamTasks:"已尝试验证所有任务,验证失败的任务请尝试手动验证或完成!",gsNotice:'为避免得到"0000-0000-0000"key, 已自动屏蔽"Grab Key"按钮,获取key时请关闭脚本!',giveeClubVerifyNotice:"正在验证任务...",giveeClubVerifyFinished:"请等待验证完成后自行加入赠Key",doingKeyhubTask:"正在做Keyhub任务...",SweepWidgetNotice:"正在处理并验证任务,每次验证任务有1~3s间隔防止触发验证过快警告..."},en:{website:"Website",type:"Type",edit:"Edit",whiteList:"Whitelist",skipTask:"Skip undo task",whiteListOptions:"Whitelist options",changeWhiteListOption:"Whitelist option(%0)",whiteListNotFound:"Cannot find this whitelist: %0",changeWhiteListSuccess:"The whitelist is successfully modified, and the page refresh will take effect!",changeWebsiteOptions:"Website options",changeGlobalOptions:"Global options",ok:"OK",save:"Save",close:"Close",return:"Return",option:"Option",value:"Value",websiteOptions:"Current website settings",changeWebsiteOptionsSuccess:"The current website setting is changed successfully, and the page refresh will take effect!",changeGlobalOptionsSuccess:"The global setting is changed successfully, and the refresh will take effect!",needLogin:"Please log in first!",getTasksInfo:"Obtaining and processing task information...",gettingKey:"Getting Key...",verifyingTask:"Verifying task",notice:"Automatic task script notice",noKeysLeft:"There are no more keys left on this page. Do you want to close it?",giveawayEnded:"This event has ended, do you want to close it?",giveawayNotWork:"This activity is unavailable for some reasons (banned/ended/paused/not started...) (if it is a script misjudgment, please give us feedback in time), is it closed?",confirm:"Confirm",cancel:"Cancel",unKnown:"Unknown",unKnownTaskType:"Unrecognized task",doing:"Doing a task",allTasksComplete:"All tasks have been completed!",getTaskIdFailed:"Failed to obtain task Id!",initSuccess:"%0 was initialized successfully!",initFailed:"%0 initialization failed!",errorLink:"Link error: %0",needInit:"Please initialize first",verifyingAuth:"Verifying %0 token...",updatingAuth:"Update %0 token...",initing:"Initializing...",getFailed:"Failed to get %0!",checkLoginFailed:"Failed to detect login status!",checkLeftKeyFailed:"Failed to detect the remaining keys!",userId:"User Id",joiningGiveaway:"Joining giveaway",needJoinGiveaway:"Need to join the giveaway first",cannotUndo:"This website does not support canceling tasks",verifyAuth:"Verifying %0 token...",closePageNotice:"f this page does not close automatically, please close this page yourself.",errorReport:"A script error is detected, do you want to report the BUG?",visitingLink:"Visiting link: ",doTask:"DoTask",undoTask:"UndoTask",verifyTask:"Verify",getKey:"GetKey",selectAll:"SelectAll",selectNone:"SelectNone",invertSelect:"InvertSelect",doFreeTask:"FreeTask",doPointTask:"PointTask",skipTaskOption:"Skip task has been configured in the settings",other:"Other",globalOptions:"Global Options",checkLogin:"Login detection
    Need to log in to the website automatically log in, part of this website supports.",checkLeftKey:"Key remaining detection
    The end of the giveaway event prompts whether to close or not, part of this website supports.",twitterVerifyId:"Verify Twitter token by trying to follow the account.
    The default is the official Twitter account 783214.
    If you don't want to follow the official account, you can change it to your own account.",youtubeVerifyChannel:"Verify YouTube token by trying to subscribe to the channel.
    The default is the official YouTube channel UCrXUsMBcfTVqwAS7DKg9C0Q.
    If you don't want to follow the official channel, you can change it to your own channel.",autoUpdateSource:"The source to update
    github: Fast update.
    jsdelivr: Update is delayed.
    standby: Standby source.
    auto: Try to update using github, jsdelivr, standby sources in turn.",saveGlobalOptions:"SaveSettings",settingPage:"Setting Page",name:"Name",version:"Version",scriptManager:"Script Manager",script:"Script",environment:"Environment",os:"OS",browser:"Browser",getId:"Get %0 id",getTwitterUserId:"Get Twitter user id (Get id function is only available on the settings page).",getYoutubeChannelId:"Get Youtube channel id (Get id function is only available on the settings page).",showButton:"ShowButton",hideButton:"HideButton",showLog:"ShowLog",hideLog:"HideLog",defaultShowButton:"Default display button",defaultShowLog:"Display log by default",debug:"Output debug log, do not enable this option!",receivePreview:"Receive preview updates",position:"Component position",buttonSideX:"Horizontal positioning of the button area (real-time preview function is only available on the setting page).
    left: left | right: right",buttonSideY:"The button area is positioned in the vertical direction (real-time preview function is only available on the settings page).
    top: top | bottom: bottom",buttonDistance:"The distance between the button area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",showButtonSideX:"ShowButton horizontal positioning (real-time preview function is only available on the setting page).
    left: left | right: right",showButtonSideY:"ShowButton vertical positioning (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",showButtonDistance:"The distance between the ShowButton and the edge (real-time preview function is only available on the setting page).
    Format: X distance, Y distance",logSideX:"Horizontal positioning of the log area (real-time preview function is only available on the setting page).
    left: left | right: right",logSideY:"Vertical positioning of the log area (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",logDistance:"The distance between the log area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",hotKey:"Shortcut key",doTaskKey:"DoTask shortcut keys
    (real-time preview function is only available on the settings page).",undoTaskKey:"UndoTask shortcut keys
    (real-time preview function is only available on the settings page).",toggleLogKey:"ShowLog/HideLog shortcut keys
    (real-time preview function is only available on the settings page).",tasksHistory:"TasksHistory",clearHistory:"Clear history",clearHistoryFinished:"The mission history has been cleared!",deleteTask:"Delete task",lastChangeTime:"Last Change Time",clearTaskFinished:"Delete the following tasks completed!",clearTaskFailed:"Failed to delete the task, the task name was not found!",syncData:"DataSync",settingData:"Uploading data...",gettingData:"Getting data...",help:"Help",fileName:"Filename",upload2gist:"Sync to Gist",downloadFromGist:"Sync from Gist",saveAndTest:"Save configuration and test",testSuccess:"Test success!",testFailed:"Test failed!",saveAndTestNotice:"Please save the configuration and test first!",processingData:"Processing data...",updatingData:"Uploading data...",syncDataSuccess:"Synchronized data successfully!",syncDataFailed:"Failed to synchronize data, please check the error message on the console!",downloadingData:"Downloading data...",checkedNoData:"No remote data is detected, please confirm whether the configuration is correct!",savingData:"Saving data...",syncHistory:"Synchronize tasks history",checkUpdateFailed:"Check update failed",newVersionNotice:'Checked a new version V%0, click to update',language:"Language
    Currently only supports zh: Chinese, en: English",gistOptions:"Gist Settings",swalNotice:"It is detected that you are installing the V4 version script for the first time, please go to read the READ ME FIRST content before use!",echoNotice:'It is detected that you are installing the V4 version script for the first time, please click here to read the READ ME FIRST content before use!',noticeLink:"https://auto-task-doc.js.org/en/guide/#read-me-first",toGithub:"Feedback(Github)",toKeylol:"Feedback(Keylol)",copySuccess:"The error message has been copied to the clipboard. Do you want to go to the Keylol forum to give feedback?",copyFailed:"Please copy the error information below and report back to the Keylol forum!",updateText:"Updates in version %0:",Active:"Active",Ended:"Ended",Banned:"Banned",Paused:"Paused",notStart:"notStart",noRemoteData:"No data remotely",errorRemoteDataFormat:"Remote data has wrong format",updateHistory:'Click here to view the historical update record.',groups:"Group",officialGroups:"Official Group",wishlists:"Wishlist",follows:"Follow Game",forums:"Forum",workshops:"Favorite Workshop",curators:"Curator",workshopVotes:"Voteup Workshop",announcements:"Announcement",steamCommunity:"Steam Community",steamStore:"Steam Store",licenses:"Add License",playtests:"Playtest Access",needLoginSteamStore:'Please log in to the Steam Store',needLoginSteamCommunity:'Please log in to the Steam Community',joiningSteamGroup:"Joining Steam Group",leavingSteamGroup:"Leaving Steam Group",gettingSteamGroupId:"Getting Steam Group Id",joiningSteamOfficialGroup:"Joining Steam Official Group",leavingSteamOfficialGroup:"Leaving Steam Official Group",gettingSteamOfficialGroupId:"Getting Steam Official Group Id",subscribingForum:"Subscribing the Steam Forum",unsubscribingForum:"Unsubscribing the Steam Forum",gettingForumId:"Getting Steam Forum Id",followingCurator:"Following Steam Curator",unfollowingCurator:"Unfollowing Steam Curator",gettingCuratorId:"Getting Steam Curator Id",addingToWishlist:"Adding the game to the Steam wishlist",removingFromWishlist:"Removing the game from the Steam wishlist",followingGame:"Following Steam games",unfollowingGame:"Unfollowing Steam games",favoritingWorkshop:"Favouring Steam Workshop Items",unfavoritingWorkshop:"Unfavoriting Steam Workshop Items",gettingWorkshopAppId:"Getting Steam Workshop Item Id",votingUpWorkshop:"Liking Steam workshop items",gettingAnnouncementParams:"Getting Steam announcement information",likingAnnouncement:"Liking Steam announcement",changingArea:"Changing Steam area: %0...",notNeededChangeArea:"The current area does not need to be changed",noAnotherArea:"Please check whether the proxy is turned on correctly",gettingAreaInfo:"Getting Steam area information...",changeAreaNotice:"Suspected of a locked zone game, try to change the zone to execute",steamFinishNotice:"Steam task completed, try to change the shopping cart area back to CN",gettingSubid:"Getting subid",addingFreeLicense:"Adding free license",missParams:"Missing parameters",gettingLicenses:"Getting licenses...",requestingPlayTestAccess:"Requesting play test access",tryChangeAreaNotice:"This function cannot detect whether the game is limited, so it will try to change the area before entering the library. Failure to change the area will not affect the subsequent storage.",servers:"Server",joiningDiscordServer:"Joining Discord Server",leavingDiscordServer:"Leaving Discord Server",gettingDiscordGuild:"Getting Discord server Id",getDiscordAuthFailed:"Failed to get Discord token, please check whether the Discord account is logged in",discordImportantNotice:"Important Reminder! ! !",discordImportantNoticeText:"Due to the background update of the Discord website, currently using this script to join a group may cause the Discord account to be forcibly logged out, and two-step verification is required to log in normally, please use it with caution! ! !",continue:"Continue",skipDiscordTask:"Skip",continueAndDontRemindAgain:"Continue without Reminders",users:"User",loginIns:'Please log in to Instagram',insBanned:"Your Instagram account has been banned",verifyingInsAuth:"Verifying Instagram token...",gettingInsUserId:"Getting Instagram user Id",followingIns:"Following Instagram user",unfollowingIns:"Unfollowing Instagram user",reddits:"Reddit/User",loginReddit:'Please log in to Reddit',changingRedditVersion:"Switching Reddit to a new version page...",joiningReddit:"Joining the Reddit",leavingReddit:"Leaving the Reddit",followingRedditUser:"Following Reddit User",unfollowingRedditUser:"Unfollowing Reddit User",channels:"Channel",followingTwitchChannel:"Following Twitch Channel",unfollowingTwitchChannel:"Unfollowing Twitch Channel",gettingTwitchChannelId:"Getting Twitch Channel Id",checkingTwitchIntegrity:"Checking Twitch integrity...",twitterUser:"Twitter User",retweets:"Retweet",gettingTwitterUserId:"Getting Twitter User Id",followingTwitterUser:"Following Twitter User",unfollowingTwitterUser:"Unfollowing Twitter User",retweetting:"Retweetting",unretweetting:"Unretweetting",names:"Group/Public/Wall",loginVk:'Please log in to Vk',gettingVkId:"Getting Vk task Id",joiningVkGroup:"Joining Vk Group",leavingVkGroup:"Leaving Vk Group",joiningVkPublic:"Joining Vk Public",leavingVkPublic:"Leaving Vk Public",sendingVkWall:"Sending Vk Wall",deletingVkWall:"Deleting Vk Wall",youtubeChannel:"YouTube Channel",likes:"Like",loginYtb:'Please log in to YouTube',tryUpdateYtbAuth:'Please try to update YouTube token',gettingYtbToken:"Getting YouTube Token...",followingYtbChannel:"Subscribing to YouTube channel",unfollowingYtbChannel:"Unsubscribing to YouTube channel",likingYtbVideo:"Liking YouTube video",unlikingYtbVideo:"Unliking YouTube video",giveKeyNoticeBefore:"Each verification interval is 15s",giveKeyNoticeAfter:'If there is no key, please check at https://givekey.ru/profile',noPoints:"Not enough points, skip the lottery",getNeedPointsFailed:"ailed to obtain the required points, skip the lottery",joiningLottery:"Joining the lottery",doingGleamTask:"Doing Gleam Task...",gettingGleamLink:"Getting Gleam task link...",gleamTaskNotice:"If this page has not been closed for a long time, please close it yourself after completing any task!",verifiedGleamTasks:"Attempted to verify all tasks. If the verification fails, please try to verify manually or complete it!",gsNotice:'In order to avoid getting the "0000-0000-0000" key, the "Grab Key" button has been hidden, please close the script when obtaining the key!',giveeClubVerifyNotice:"Verifying task...",giveeClubVerifyFinished:"Wait for the verification to complete and join it by yourself",doingKeyhubTask:"Doing Keyhub Task...",SweepWidgetNotice:"The task is being processed and verified. There is an interval of 1~3s for each verification task to prevent the triggering of too fast verification warning..."}},h=["zh","en"].includes(N.other.language)?N.other.language:"en";const K=function(t){for(var e,s=arguments.length,i=new Array(1i[parseInt(e,10)]):t};function R(s,i){window.TRACE&&console.trace("%cAuto-Task[Debug]:","color:blue"),p().fire({title:K("errorReport"),icon:"error",showCancelButton:!0,confirmButtonText:K("toGithub"),showDenyButton:!0,denyButtonText:K("toKeylol"),cancelButtonText:K("close")}).then(t=>{var{isDenied:e,isConfirmed:t}=t;t?window.open(`https://github.com/HCLonely/auto-task-v4/issues/new?title=${encodeURIComponent("[BUG] 脚本报错: "+i)}&labels=bug&template=bug_report.yml&website=${encodeURIComponent(window.location.href)}&browser=${encodeURIComponent(JSON.stringify((0,n.ua)(),null,4))}&manager=${encodeURIComponent(GM_info.scriptHandler+" "+GM_info.version)}&user-script=${encodeURIComponent(GM_info.script.version)}&logs=${encodeURIComponent(s.stack||"null")}&run-logs=`+encodeURIComponent($.makeArray($("#auto-task-info>li")).map(t=>t.innerText).join("\n")),"_blank"):e&&(e=`错误链接: [url=${window.location.href}]${window.location.href}[/url] 环境: -[code]${JSON.stringify((0,a.ua)(),null,4)}[/code] +[code]${JSON.stringify((0,n.ua)(),null,4)}[/code] 脚本管理器: ${GM_info.scriptHandler} ${GM_info.version} 脚本版本: ${GM_info.script.version} @@ -134,19 +134,19 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); 执行日志: [code]${$.makeArray($("#auto-task-info>li")).map(t=>t.innerText).join("\n")}[/code]`,GM_setClipboard(e),p().fire({title:K("copySuccess"),icon:"success",confirmButtonText:K("ok")}).then(()=>{window.open("https://keylol.com/forum.php?mod=post&action=reply&fid=319&tid=777450","_blank")}))}),console.log("%c%s","color:white;background:red",`Auto-Task[Error]: ${i} -`+s.stack)}var g=class{constructor(){var t,e,s;s=void 0,(e="tasks")in(t=this)?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s}getRealParams(e,s,i,a){try{let t=[];return 0a(t)).filter(t=>t)]),!i&&0{const t=GM_openInTab("https://discord.com/channels/@me#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=null===(t=GM_getValue("discordAuth"))||void 0===t?void 0:t.auth;t?(x(this,_,{auth:t}),s.success(),e(await b(this,O,M).call(this))):(s.error("Error: Update discord auth failed!"),e(!1))}})}catch(t){return R(t,"Discord.updateAuth"),!1}}async function B(t){try{const l=V({type:"joiningDiscordServer",text:t});var e,s,{result:i,statusText:a,status:n,data:o}=await L({url:"https://discord.com/api/v9/invites/"+t,method:"POST",dataType:"json",headers:{authorization:T(this,_).auth,origin:"https://discord.com",referer:"https://discord.com/invite/"+t}});if("Success"!==i||200!==(null==o?void 0:o.status))return l.error(i+`:${a}(${n})`),!1;l.success();var r=String(null===(e=o.response)||void 0===e||null===(s=e.guild)||void 0===s?void 0:s.id);return r&&(b(this,F,q).call(this,t,r),this.tasks.servers=I([...this.tasks.servers,t])),!0}catch(t){return R(t,"Discord.joinServer"),!1}}async function z(t){try{if(this.whiteList.servers.includes(t))return V({type:"whiteList",text:"Discord.leaveServer",id:t}),!0;var e=await b(this,W,Y).call(this,t);if(!e)return!1;const o=V({type:"leavingDiscordServer",text:e});var{result:s,statusText:i,status:a,data:n}=await L({url:"https://discord.com/api/v9/users/@me/guilds/"+e,method:"DELETE",headers:{authorization:T(this,_).auth}});return"Success"===s&&204===(null==n?void 0:n.status)?(o.success(),!0):(o.error(s+`:${i}(${a})`),!1)}catch(t){return R(t,"Discord.leaveServer"),!1}}async function Y(t){try{const c=V({type:"gettingDiscordGuild",text:t});var e=T(this,C)[t];if(e)return c.success(),e;var{result:s,statusText:i,status:a,data:n}=await L({url:"https://discord.com/api/v9/invites/"+t,responseType:"json",method:"GET"});if("Success"!==s||200!==(null==n?void 0:n.status))return c.error(s+`:${i}(${a})`),!1;var o,r,l=null===(o=n.response)||void 0===o||null===(r=o.guild)||void 0===r?void 0:r.id;return l?(c.success(),b(this,F,q).call(this,t,l),l):(c.error(s+`:${i}(${a})`),!1)}catch(t){return R(t,"Discord.getGuild"),!1}}function q(t,e){try{T(this,C)[t]=e,GM_setValue("discordCache",T(this,C))}catch(t){R(t,"Discord.setCache")}}const J=class extends g{constructor(){var t;super(...arguments),m(this,F),m(this,W),m(this,j),m(this,D),m(this,E),m(this,O),y(this,"tasks",JSON.parse(G)),y(this,"whiteList",{...JSON.parse(G),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.discord}),v(this,_,{writable:!0,value:GM_getValue("discordAuth")||{}}),v(this,C,{writable:!0,value:GM_getValue("discordCache")||{}}),v(this,A,{writable:!0,value:!1})}async init(){try{if(!GM_getValue("dontRemindDiscordAgain"))if(!await p().fire({title:K("discordImportantNotice"),text:K("discordImportantNoticeText"),showCancelButton:!0,showDenyButton:!0,confirmButtonText:K("continue"),cancelButtonText:K("skipDiscordTask"),denyButtonText:K("continueAndDontRemindAgain")}).then(t=>{var{isConfirmed:e,isDenied:t}=t;return!!e||!!t&&(GM_setValue("dontRemindDiscordAgain",!0),!0)}))return x(this,A,!1),"skip";return T(this,A)?!0:T(this,_).auth?await b(this,O,M).call(this)?(V({}).success(K("initSuccess","Discord")),x(this,A,!0),!0):(GM_setValue("discordAuth",{auth:null}),await b(this,E,U).call(this)?(V({}).success(K("initSuccess","Discord")),x(this,A,!0),!0):(V({}).error(K("initFailed","Discord")),!1)):!!await b(this,E,U).call(this)&&(x(this,A,!0),!0)}catch(t){return R(t,"Discord.init"),!1}}async toggle(t){var{doTask:e=!0,serverLinks:t=[]}=t;try{if(!T(this,A))return V({text:K("needInit")}),!1;const i=[];if(e&&!N.doTask.discord.servers||!e&&!N.undoTask.discord.servers)V({type:"globalOptionsSkip",text:"discord.servers"});else{var s=this.getRealParams("servers",t,e,t=>{return null===(t=t.match(/invite\/(.+)/))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return R(t,"Discord.toggleServers"),!1}}};function H(t,e){Z(t,e),e.add(t)}function X(t,e,s){Z(t,e),e.set(t,s)}function Z(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Q(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function tt(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,it(t,e,"set"),s),s}function et(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function st(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,it(t,e,"get"))}function it(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const at=JSON.stringify({users:[]});var nt=new WeakMap,ot=new WeakMap,rt=new WeakMap,lt=new WeakSet,ct=new WeakSet,ut=new WeakSet,dt=new WeakSet;async function ht(){var t=0{return null===(t=t.match(/https:\/\/www\.instagram\.com\/(.+)?\//))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return R(t,"Instagram.toggleUsers"),!1}}};function mt(t,e){kt(t,e),e.add(t)}function vt(t,e,s){kt(t,e),e.set(t,s)}function kt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function yt(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function bt(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,xt(t,e,"set"),s),s}function Tt(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function $t(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,xt(t,e,"get"))}function xt(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const St=JSON.stringify({reddits:[]});var Lt=new WeakMap,It=new WeakMap,Gt=new WeakSet,_t=new WeakSet;async function Ct(){try{const s=V({text:K("changingRedditVersion")});return GM_setValue("redditAuth",null),await new Promise(t=>{const e=GM_openInTab("https://www.reddit.com/#auth",{active:!0,insert:!0,setParent:!0});e.onclose=async()=>{s.success(),t(await Tt(this,_t,At).call(this,!0))}})}catch(t){return R(t,"Reddit.useBeta"),!1}}async function At(){var t,e=0{var e=null===(e=t.match(/https?:\/\/www\.reddit\.com\/r\/([^/]*)/))||void 0===e?void 0:e[1],t=null===(t=t.match(/https?:\/\/www\.reddit\.com\/user\/([^/]*)/))||void 0===t?void 0:t[1];return t?e||t:e});if(0!0)}catch(t){return R(t,"Reddit.toggle"),!1}}};function Et(t,e){jt(t,e),e.add(t)}function Dt(t,e,s){jt(t,e),e.set(t,s)}function jt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wt(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Pt(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,Ft(t,e,"set"),s),s}function Vt(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function Nt(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,Ft(t,e,"get"))}function Ft(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const Mt=JSON.stringify({channels:[]});var Ut=new WeakMap,Bt=new WeakMap,Kt=new WeakMap,Rt=new WeakMap,zt=new WeakSet,Yt=new WeakSet,qt=new WeakSet,Jt=new WeakSet,Ht=new WeakSet,Xt=new WeakSet;async function Zt(){try{const r=V({text:K("verifyingAuth","Twitch")});var t,e,s,{result:i,statusText:a,status:n,data:o}=await L({url:"https://gql.twitch.tv/gql",method:"POST",dataType:"json",headers:{Authorization:"OAuth "+Nt(this,Ut).authToken,"Client-Id":Nt(this,Ut).clientId},data:'[{"operationName":"FrontPageNew_User","variables":{"limit":1},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"64bd07a2cbaca80699d62636d966cf6395a5d14a1f0a14282067dcb28b13eb11"}}}]'});return"Success"===i?200===(null==o?void 0:o.status)&&null!==(t=o.response)&&void 0!==t&&null!==(e=t[0])&&void 0!==e&&null!==(s=e.data)&&void 0!==s&&s.currentUser?(await Vt(this,Yt,Qt).call(this),r.success(),!0):(r.error(`Error:${null==o?void 0:o.statusText}(${null==o?void 0:o.status})`),!1):(r.error(i+`:${a}(${n})`),!1)}catch(t){return R(t,"Twitch.verifyAuth"),!1}}async function Qt(){var t=0{const t=GM_openInTab("https://www.twitch.tv/#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=GM_getValue("twitchAuth");t?(Pt(this,Ut,t),s.success(),e(await Vt(this,zt,Zt).call(this))):(s.error("Error: Update twitch auth failed!"),e(!1))}})}catch(t){return R(t,"Twitch.updateAuth"),!1}}async function ee(t){var{name:e,doTask:t=!0}=t;try{if(!t&&this.whiteList.channels.includes(e))return V({type:"whiteList",text:"Twitch.unfollowChannel",id:e}),!0;var s=await Vt(this,Ht,se).call(this,e);if(!s)return!1;const p=V({type:`${t?"":"un"}followingTwitchChannel`,text:e});var i,a,n,o,r='[{"operationName":"FollowButton_FollowUser","variables":{"input":{"disableNotifications":false,"targetID":"'+s+'"}},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"800e7346bdf7e5278a3c1d3f21b2b56e2639928f86815677a7126b093b2fdd08"}}}]',l=`[{"operationName":"FollowButton_UnfollowUser","variables":{"input":{"targetID":"${s}"}},`+'"extensions":{"persistedQuery":{"version":1,"sha256Hash":"f7dae976ebf41c755ae2d758546bfd176b4eeb856656098bb40e0a672ca0d880"}}}]',{result:c,statusText:u,status:d,data:h}=await L({url:"https://gql.twitch.tv/gql",method:"POST",dataType:"json",anonymous:!0,headers:{Origin:"https://www.twitch.tv",Referer:"https://www.twitch.tv/",Authorization:"OAuth "+Nt(this,Ut).authToken,"Client-Id":Nt(this,Ut).clientId,"Client-Version":Nt(this,Ut).clientVersion,"X-Device-Id":Nt(this,Ut).deviceId,"Client-Session-Id":Nt(this,Ut).clientSessionId,"Client-Integrity":Nt(this,Rt)},data:t?r:l});return"Success"===c?200===(null==h?void 0:h.status)&&null!==(i=h.response)&&void 0!==i&&i[0]&&!h.response[0].errors?(p.success(),t&&(this.tasks.channels=I([...this.tasks.channels,e])),!0):(p.error("Error:"+((null==h||null===(a=h.response)||void 0===a||null===(n=a[0].errors)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.message)||`${null==h?void 0:h.statusText}(${null==h?void 0:h.status})`)),!1):(p.error(c+`:${u}(${d})`),!1)}catch(t){return R(t,"Twitch.toggleChannel"),!1}}async function se(t){try{const d=V({type:"gettingTwitchChannelId",text:t});var e=Nt(this,Bt)[t];if(e)return d.success(),e;var{result:s,statusText:i,status:a,data:n}=await L({url:"https://gql.twitch.tv/gql",method:"POST",headers:{Authorization:"OAuth "+Nt(this,Ut).authToken,"Client-Id":Nt(this,Ut).clientId},responseType:"json",data:`[{"operationName":"ActiveWatchParty","variables":{"channelLogin":"${t}"},`+'"extensions":{"persistedQuery":{"version":1,"sha256Hash":"4a8156c97b19e3a36e081cf6d6ddb5dbf9f9b02ae60e4d2ff26ed70aebc80a30"}}}]'});if("Success"!==s)return d.error(s+`:${i}(${a})`),!1;if(200!==(null==n?void 0:n.status))return d.error(`Error:${null==n?void 0:n.statusText}(${null==n?void 0:n.status})`),!1;var o,r,l,c,u=null===(o=n.response)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l||null===(c=l.user)||void 0===c?void 0:c.id;return u?(Vt(this,Xt,ie).call(this,t,String(u)),d.success(),u):(d.error(`Error:${n.statusText}(${n.status})`),!1)}catch(t){return R(t,"Twitch.getChannelId"),!1}}function ie(t,e){try{Nt(this,Bt)[t]=e,GM_setValue("twitchCache",Nt(this,Bt))}catch(t){R(t,"Twitch.setCache")}}const ae=class extends g{constructor(){var t;super(...arguments),Et(this,Xt),Et(this,Ht),Et(this,Jt),Et(this,qt),Et(this,Yt),Et(this,zt),Wt(this,"tasks",JSON.parse(Mt)),Wt(this,"whiteList",{...JSON.parse(Mt),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.twitch}),Dt(this,Ut,{writable:!0,value:GM_getValue("twitchAuth")||{}}),Dt(this,Bt,{writable:!0,value:GM_getValue("twitchCache")||{}}),Dt(this,Kt,{writable:!0,value:!1}),Dt(this,Rt,{writable:!0,value:void 0})}async init(){try{return Nt(this,Kt)?!0:Nt(this,Ut).authToken&&Nt(this,Ut).clientId&&Nt(this,Ut).clientVersion&&Nt(this,Ut).deviceId&&Nt(this,Ut).clientSessionId?await Vt(this,zt,Zt).call(this)?(V({}).success(K("initSuccess","Twitch")),Pt(this,Kt,!0),!0):(GM_setValue("twitchAuth",null),await Vt(this,qt,te).call(this)?(V({}).success(K("initSuccess","Twitch")),Pt(this,Kt,!0),!0):(V({}).error(K("initFailed","Twitch")),!1)):!!await Vt(this,qt,te).call(this)&&(Pt(this,Kt,!0),!0)}catch(t){return R(t,"Twitch.init"),!1}}async toggle(t){var{doTask:e=!0,channelLinks:t=[]}=t;try{if(!Nt(this,Kt))return V({text:K("needInit")}),!1;const i=[];if(e&&!N.doTask.twitch.channels||!e&&!N.undoTask.twitch.channels)V({type:"globalOptionsSkip",text:"twitch.channels"});else{var s=this.getRealParams("channels",t,e,t=>{return null===(t=t.match(/https:\/\/(www\.)?twitch\.tv\/(.+)/))||void 0===t?void 0:t[2]});if(0!0)}catch(t){return R(t,"Twitch.toggle"),!1}}};function ne(t,e){re(t,e),e.add(t)}function oe(t,e,s){re(t,e),e.set(t,s)}function re(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function le(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function ce(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,he(t,e,"set"),s),s}function ue(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function de(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,he(t,e,"get"))}function he(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const pe=JSON.stringify({users:[],retweets:[],likes:[]});var fe=new WeakMap,we=new WeakMap,ge=new WeakMap,me=new WeakMap,ve=new WeakSet,ke=new WeakSet,ye=new WeakSet,be=new WeakSet,Te=new WeakSet;async function $e(){try{return await ue(this,ye,Se).call(this,{name:"verify",doTask:!0,verify:!0})}catch(t){return R(t,"Twitter.verifyAuth"),!1}}async function xe(){try{const s=V({text:K("updatingAuth","Twitter")});return await new Promise(e=>{const t=GM_openInTab("https://twitter.com/settings/account?k#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=GM_getValue("twitterAuth");t?(ce(this,we,t),s.success(),e(await ue(this,ve,$e).call(this))):(s.error("Error: Update twitter auth failed!"),e(!1))}})}catch(t){return R(t,"Twitter.updateToken"),!1}}async function Se(t){var{name:e,doTask:s=!0,verify:t=!1}=t;try{if(!s&&!t&&this.whiteList.users.includes(e))return V({type:"whiteList",text:"Twitter.unfollowUser",id:e}),!0;var i=t?de(this,fe):await this.userName2id(e);if(!i)return!1;const d=t?V({text:K("verifyingAuth","Twitter")}):V({type:`${s?"":"un"}followingTwitterUser`,text:e});var a,n,o,{result:r,statusText:l,status:c,data:u}=await L({url:`https://api.twitter.com/1.1/friendships/${s?"create":"destroy"}.json`,method:"POST",headers:{authorization:"Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA","Content-Type":"application/x-www-form-urlencoded","x-csrf-token":de(this,we).ct0},responseType:"json",data:$.param({include_profile_interstitial_type:1,include_blocking:1,include_blocked_by:1,include_followed_by:1,include_want_retweets:1,include_mute_edge:1,include_can_dm:1,include_can_media_tag:1,skip_status:1,id:i})});return"Success"===r?200===(null==u?void 0:u.status)?(d.success(),s&&!t&&(this.tasks.users=I([...this.tasks.users,e])),!0):t&&403===(null==u?void 0:u.status)&&158===(null===(a=u.response)||void 0===a||null===(n=a.errors)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.code)?(d.success(),!0):(d.error(`Error:${null==u?void 0:u.statusText}(${null==u?void 0:u.status})`),!1):(d.error(r+`:${l}(${c})`),!1)}catch(t){return R(t,"Twitter.toggleUser"),!1}}async function Le(t){var{retweetId:e,doTask:t=!0}=t;try{if(!t&&this.whiteList.retweets.includes(e))return V({type:"whiteList",text:"Twitter.unretweet",id:e}),!0;const c=V({type:`${t?"":"un"}retweetting`,text:e});var s,i,a,{result:n,statusText:o,status:r,data:l}=await L({url:`https://api.twitter.com/1.1/statuses/${t?"":"un"}retweet.json`,method:"POST",headers:{authorization:"Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA","Content-Type":"application/x-www-form-urlencoded","x-csrf-token":de(this,we).ct0},data:$.param({tweet_mode:"extended",id:e}),responseType:"json"});return"Success"===n?200===(null==l?void 0:l.status)||403===(null==l?void 0:l.status)&&327===(null===(s=l.response)||void 0===s||null===(i=s.errors)||void 0===i||null===(a=i[0])||void 0===a?void 0:a.code)?(c.success(),t&&(this.tasks.retweets=I([...this.tasks.retweets,e])),!0):(c.error(`Error:${null==l?void 0:l.statusText}(${null==l?void 0:l.status})`),!1):(c.error(n+`:${o}(${r})`),!1)}catch(t){return R(t,"Twitter.toggleRetweet"),!1}}function Ie(t,e){try{de(this,ge)[t]=e,GM_setValue("twitterCache",de(this,ge))}catch(t){R(t,"Twitter.setCache")}}const Ge=class extends g{constructor(){var t;super(...arguments),ne(this,Te),ne(this,be),ne(this,ye),ne(this,ke),ne(this,ve),le(this,"tasks",JSON.parse(pe)),le(this,"whiteList",{...JSON.parse(pe),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.twitter}),oe(this,fe,{writable:!0,value:N.other.twitterVerifyId}),oe(this,we,{writable:!0,value:GM_getValue("twitterAuth")||{}}),oe(this,ge,{writable:!0,value:GM_getValue("twitterCache")||{}}),oe(this,me,{writable:!0,value:!1})}async init(){try{return de(this,me)?!0:de(this,we).ct0?await ue(this,ve,$e).call(this)?(V({}).success(K("initSuccess","Twitter")),ce(this,me,!0),!0):(GM_setValue("twitterAuth",null),await ue(this,ke,xe).call(this)?(V({}).success(K("initSuccess","Twitter")),ce(this,me,!0),!0):(V({}).error(K("initFailed","Twitter")),!1)):!!await ue(this,ke,xe).call(this)&&(ce(this,me,!0),!0)}catch(t){return R(t,"Twitter.init"),!1}}async userName2id(t){try{const d=V({type:"gettingTwitterUserId",text:t});var e=de(this,ge)[t];if(e)return d.success(),e;var s,i,a,n,{result:o,statusText:r,status:l,data:c}=await L({url:"https://api.twitter.com/graphql/mCbpQvZAw6zu_4PvuAUVVQ/UserByScreenName"+`?variables=%7B%22screen_name%22%3A%22${t}%22%2C%22withSafetyModeUserFields%22%3Atrue%2C%22withSuperFollowsUserFields%22%3Atrue%7D`,method:"GET",headers:{authorization:"Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA","content-type":"application/json",referer:"https://twitter.com/"+t,"x-csrf-token":de(this,we).ct0},responseType:"json"});if("Success"!==o)return d.error(o+`:${r}(${l})`),!1;if(200!==(null==c?void 0:c.status))return d.error(`Error:${null==c?void 0:c.statusText}(${null==c?void 0:c.status})`),!1;{let e=c.response||("object"==typeof c.responseText?c.responseText:null);if(!e)try{e=JSON.parse(c.responseText)}catch(t){e=null}var u=String(null===(s=e)||void 0===s||null===(i=s.data)||void 0===i||null===(a=i.user)||void 0===a||null===(n=a.result)||void 0===n?void 0:n.rest_id);return u?(ue(this,Te,Ie).call(this,t,u),d.success(),u):(d.error(`Error:${c.statusText}(${c.status})`),!1)}}catch(t){return R(t,"Twitter.getUserId"),!1}}async toggle(t){var{doTask:e=!0,userLinks:s=[],retweetLinks:t=[]}=t;try{if(!de(this,me))return V({text:K("needInit")}),!1;const n=[];if(e&&!N.doTask.twitter.users||!e&&!N.undoTask.twitter.users)V({type:"globalOptionsSkip",text:"twitter.users"});else{var i=this.getRealParams("users",s,e,t=>{return null===(t=t.match(/https:\/\/twitter\.com\/(.+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/https:\/\/twitter\.com\/.*?\/status\/([\d]+)/))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return R(t,"Twitter.toggle"),!1}}};function _e(t,e){Ae(t,e),e.add(t)}function Ce(t,e,s){Ae(t,e),e.set(t,s)}function Ae(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Oe(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Ee(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,We(t,e,"set"),s),s}function De(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function je(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,We(t,e,"get"))}function We(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const Pe=JSON.stringify({names:[]});var Ve=new WeakMap,Ne=new WeakMap,Fe=new WeakMap,Me=new WeakSet,Ue=new WeakSet,Be=new WeakSet,Ke=new WeakSet,Re=new WeakSet,ze=new WeakSet,Ye=new WeakSet,qe=new WeakSet;async function Je(){try{const e=V({text:K("verifyAuth","Vk")}),{result:s,statusText:i,status:a,data:n}=await L({url:"https://vk.com/im",method:"GET"});var t;return"Success"===s?null!==n&&void 0!==n&&n.finalUrl.includes("vk.com/login")?(e.error("Error:"+K("loginVk"),!0),!1):200===(null===n||void 0===n?void 0:n.status)?(Ee(this,Ve,(null===(t=n.responseText.match(/TopNavBtn__profileLink" href="\/(.*?)"/))||void 0===t?void 0:t[1])||""),e.success(),!0):(e.error(`Error:${null===n||void 0===n?void 0:n.statusText}(${null===n||void 0===n?void 0:n.status})`),!1):(e.error(s+`:${i}(${a})`),!1)}catch(t){return R(t,"Vk.verifyAuth"),!1}}async function He(t,e){var s=!(2{return null===(t=t.match(/https:\/\/vk\.com\/([^/]+)/))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return R(t,"Vk.toggle"),!1}}};function as(t,e){os(t,e),e.add(t)}function ns(t,e,s){os(t,e),e.set(t,s)}function os(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function rs(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function ls(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,ds(t,e,"set"),s),s}function cs(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function us(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,ds(t,e,"get"))}function ds(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const hs=JSON.stringify({channels:[],likes:[]}),ps=async function(t,e){try{const h=V({text:K("gettingYtbToken")}),{result:p,statusText:f,status:w,data:g}=await L({url:t,method:"GET"});if("Success"!==p)return h.error(p+`:${f}(${w})`),{};if(200!==(null===g||void 0===g?void 0:g.status))return h.error(`Error:${null===g||void 0===g?void 0:g.statusText}(${null===g||void 0===g?void 0:g.status})`),{};{var s,i;if(g.responseText.includes("accounts.google.com/ServiceLogin?service=youtube"))return h.error("Error:"+K("loginYtb"),!0),{needLogin:!0};var a=null===(s=g.responseText.match(/"INNERTUBE_API_KEY":"(.*?)"/))||void 0===s?void 0:s[1],n=(null===(i=g.responseText.match(/\(\{"INNERTUBE_CONTEXT":([\w\W]*?)\}\)/)||g.responseText.match(/"INNERTUBE_CONTEXT":([\w\W]*?\}),"INNERTUBE/))||void 0===i?void 0:i[1])||"{}";const{client:m,request:v}=JSON.parse(n);if(a&&m&&v){if(m.hl="en","channel"===e){var o,r=null===(o=g.responseText.match(//))||void 0===o?void 0:o[1];return r?(h.success(),{params:{apiKey:a,client:m,request:v,channelId:r}}):(h.error('Error: Get "channelId" failed!'),{})}if("likeVideo"!==e)return h.error("Error: Unknown type"),{};var l,c,u=null===(l=g.responseText.match(//))||void 0===l?void 0:l[1],d=null===(c=g.responseText.match(/"likeParams":"(.*?)"/))||void 0===c?void 0:c[1];return u?(h.success(),{params:{apiKey:a,client:m,request:v,videoId:u,likeParams:d}}):(h.error('Error: Get "videoId" failed!'),{})}return h.error('Error: Parameter "apiKey" not found!'),{}}}catch(t){return R(t,"Youtube.getInfo"),{}}};var fs=new WeakMap,ws=new WeakMap,gs=new WeakMap,ms=new WeakSet,vs=new WeakSet,ks=new WeakSet,ys=new WeakSet,bs=new WeakSet;class Ts extends g{constructor(){var t;super(...arguments),as(this,bs),as(this,ys),as(this,ks),as(this,vs),as(this,ms),rs(this,"tasks",JSON.parse(hs)),rs(this,"whiteList",{...JSON.parse(hs),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.youtube}),ns(this,fs,{writable:!0,value:GM_getValue("youtubeAuth")||{}}),ns(this,ws,{writable:!0,value:!1}),ns(this,gs,{writable:!0,value:"https://www.youtube.com/channel/"+N.other.youtubeVerifyChannel})}async init(){try{return us(this,ws)?!0:us(this,fs).PAPISID?await cs(this,ms,$s).call(this)?(V({}).success(K("initSuccess","Youtube")),ls(this,ws,!0),!0):(GM_setValue("youtubeAuth",null),await cs(this,vs,xs).call(this)?(V({}).success(K("initSuccess","Youtube")),ls(this,ws,!0),!0):(V({}).error(K("initFailed","Youtube")),!1)):!!await cs(this,vs,xs).call(this)&&(ls(this,ws,!0),!0)}catch(t){return R(t,"Youtube.init"),!1}}async toggle(t){var{doTask:e=!0,channelLinks:s=[],videoLinks:t=[]}=t;try{if(!us(this,ws))return V({text:K("needInit")}),!1;const n=[];if(e&&!N.doTask.youtube.channels||!e&&!N.undoTask.youtube.channels)V({type:"globalOptionsSkip",text:"youtube.channels"});else{var i=this.getRealParams("channels",s,e,t=>{var e;return/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(t)?null===(e=t.match(/url=(https:\/\/www\.youtube\.com\/.*)/))||void 0===e?void 0:e[1]:t});if(0{var e;return/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(t)?null===(e=t.match(/url=(https:\/\/www\.youtube\.com\/.*)/))||void 0===e?void 0:e[1]:t});if(0!0)}catch(t){return R(t,"Youtube.toggle"),!1}}}async function $s(){try{return await cs(this,ys,Ls).call(this,{link:us(this,gs),doTask:!0,verify:!0})}catch(t){return R(t,"Youtube.verifyAuth"),!1}}async function xs(){try{const s=V({text:K("updatingAuth","Youtube")});return await new Promise(e=>{const t=GM_openInTab("https://www.youtube.com/#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=GM_getValue("youtubeAuth");t?(ls(this,fs,t),s.success(),cs(this,ms,$s).call(this).then(t=>{e(t)})):(s.error("Error: Update youtube auth failed!"),e(!1))}})}catch(t){return R(t,"Discord.updateAuth"),!1}}function Ss(t,e){return ps(t,e)}async function Ls(t){var{link:e,doTask:s=!0,verify:t=!1}=t;try{var{params:i,needLogin:a}=await cs(this,ks,Ss).call(this,e,"channel"),{apiKey:n,client:o,request:r,channelId:l}=i||{};if(a)return V({html:K("loginYtb")}),!1;if(!(n&&o&&r&&l))return V({text:'"getYtbToken" failed'}),!1;if(!s&&!t&&this.whiteList.channels.includes(l))return V({type:"whiteList",text:"Youtube.unfollowChannel",id:l}),!0;const u=t?V({text:K("verifyingAuth","Youtube")}):V({type:s?"followingYtbChannel":"unfollowingYtbChannel",text:l});var c=parseInt(String((new Date).getTime()/1e3),10);const{result:d,statusText:h,status:p,data:f}=await L({url:`https://www.youtube.com/youtubei/v1/subscription/${s?"":"un"}subscribe?key=`+n,method:"POST",headers:{origin:"https://www.youtube.com",referer:"https://www.youtube.com/channel/"+l,"content-type":"application/json","x-goog-authuser":"0","x-goog-visitor-id":null==o?void 0:o.visitorData,"x-origin":"https://www.youtube.com",authorization:`SAPISIDHASH ${c}_`+sha1(`${c} ${us(this,fs).PAPISID} https://www.youtube.com`)},data:JSON.stringify({context:{client:o,request:{sessionId:null==r?void 0:r.sessionId,internalExperimentFlags:[],consistencyTokenJars:[]},user:{}},channelIds:[l],params:s?"EgIIAhgA":"CgIIAhgA"})});return"Success"===d?200===(null===f||void 0===f?void 0:f.status)?s&&(/"subscribed": true/.test(f.responseText)||f.responseText.includes("The subscription already exists"))||!s&&/"subscribed": false/.test(f.responseText)?(u.success(),s&&!t&&(this.tasks.channels=I([...this.tasks.channels,e])),!0):t&&f.responseText.includes("You may not subscribe to yourself")?(u.success(),!0):(u.error(K("tryUpdateYtbAuth"),!0),!1):(u.error(`Error:${null===f||void 0===f?void 0:f.statusText}(${null===f||void 0===f?void 0:f.status})`),!1):(u.error(d+`:${h}(${p})`),!1)}catch(t){return R(t,"Youtube.toggleChannel"),!1}}async function Is(t){var{link:e,doTask:t=!0}=t;try{var{params:s,needLogin:i}=await cs(this,ks,Ss).call(this,e,"likeVideo"),{apiKey:a,client:n,request:o,videoId:r,likeParams:l}=s||{};if(i)return V({html:""+K("loginYtb")}),!1;if(!(a&&n&&o&&r&&l))return V({text:'"getYtbToken" failed'}),!1;if(!t&&this.whiteList.likes.includes(r))return V({type:"whiteList",text:"Youtube.unlikeVideo",id:r}),!0;const u=V({type:t?"likingYtbVideo":"unlikingYtbVideo",text:r});var c=parseInt(String((new Date).getTime()/1e3),10);const d={context:{client:n,request:{sessionId:o.sessionId,internalExperimentFlags:[],consistencyTokenJars:[]},user:{}},target:{videoId:r}};if(t){if(!l)return u.error("Empty likeParams"),!1;d.params=l}const{result:h,statusText:p,status:f,data:w}=await L({url:`https://www.youtube.com/youtubei/v1/like/${t?"":"remove"}like?key=`+a,method:"POST",headers:{origin:"https://www.youtube.com",referer:"https://www.youtube.com/watch?v="+r,"content-type":"application/json","x-goog-authuser":"0","x-goog-visitor-id":n.visitorData,"x-origin":"https://www.youtube.com",authorization:`SAPISIDHASH ${c}_`+sha1(`${c} ${us(this,fs).PAPISID} https://www.youtube.com`)},data:JSON.stringify(d)});return"Success"===h?200===(null===w||void 0===w?void 0:w.status)?t&&w.responseText.includes("Added to Liked videos")||!t&&(w.responseText.includes("Removed from Liked videos")||w.responseText.includes("Dislike removed"))?(u.success(),t&&(this.tasks.likes=I([...this.tasks.likes,e])),!0):(u.error(K("tryUpdateYtbAuth"),!0),!1):(u.error(`Error:${null===w||void 0===w?void 0:w.statusText}(${null===w||void 0===w?void 0:w.status})`),!1):(u.error(h+`:${p}(${f})`),!1)}catch(t){return R(t,"Youtube.toggleLikeVideo"),!1}}function Gs(t,e){Cs(t,e),e.add(t)}function _s(t,e,s){Cs(t,e),e.set(t,s)}function Cs(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function As(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Os(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function Es(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,js(t,e,"set"),s),s}function Ds(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,js(t,e,"get"))}function js(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const Ws=JSON.stringify({groups:[],officialGroups:[],wishlists:[],follows:[],forums:[],workshops:[],workshopVotes:[],curators:[],curatorLikes:[],announcements:[],licenses:[],playtests:[]});var Ps=new WeakMap,Vs=new WeakMap,Ns=new WeakMap,Fs=new WeakMap,Ms=new WeakMap,Us=new WeakMap,Bs=new WeakSet,Ks=new WeakSet,Rs=new WeakSet,zs=new WeakSet,Ys=new WeakSet,qs=new WeakSet,Js=new WeakSet,Hs=new WeakSet,Xs=new WeakSet,Zs=new WeakSet,Qs=new WeakSet,ti=new WeakSet,ei=new WeakSet,si=new WeakSet,ii=new WeakSet,ai=new WeakSet,ni=new WeakSet,oi=new WeakSet,ri=new WeakSet,li=new WeakSet,ci=new WeakSet,ui=new WeakSet,di=new WeakSet,hi=new WeakSet,pi=new WeakSet,fi=new WeakSet,wi=new WeakSet,gi=new WeakSet,mi=new WeakSet;async function vi(){try{const s=V({text:K("updatingAuth",K("steamStore"))}),{result:i,statusText:a,status:n,data:o}=await L({url:"https://store.steampowered.com/",method:"GET",headers:{Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Cache-Control":"max-age=0","Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Upgrade-Insecure-Requests":"1"}});if("Success"!==i)return s.error(i+`:${a}(${n})`),!1;if(200!==(null===o||void 0===o?void 0:o.status))return s.error(`Error:${null===o||void 0===o?void 0:o.statusText}(${null===o||void 0===o?void 0:o.status})`),!1;var t;if(!o.responseText.includes("data-miniprofile="))return s.error("Error:"+K("needLoginSteamStore"),!0),!1;var e=null===(t=o.responseText.match(/g_sessionID = "(.+?)";/))||void 0===t?void 0:t[1];return e?(Ds(this,Vs).storeSessionID=e,s.success(),!0):(s.error('Error: Get "sessionID" failed'),!1)}catch(t){return R(t,"Steam.updateStoreAuth"),!1}}async function ki(){try{const o=V({text:K("updatingAuth",K("steamCommunity"))}),{result:r,statusText:l,status:c,data:u}=await L({url:"https://steamcommunity.com/my",method:"GET",headers:{Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Cache-Control":"max-age=0","Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Upgrade-Insecure-Requests":"1"}});if("Success"!==r)return o.error(r+`:${l}(${c})`),!1;if(200!==(null===u||void 0===u?void 0:u.status))return o.error(`Error:${null===u||void 0===u?void 0:u.statusText}(${null===u||void 0===u?void 0:u.status})`),!1;var t,e,s;if(u.responseText.includes('href="https://steamcommunity.com/login/home/'))return o.error("Error:"+K("needLoginSteamCommunity"),!0),!1;var i=null===(t=u.responseText.match(/g_steamID = "(.+?)";/))||void 0===t?void 0:t[1],a=null===(e=u.responseText.match(/g_sessionID = "(.+?)";/))||void 0===e?void 0:e[1],n=null===(s=u.responseText.match(/steamcommunity.com\/id\/(.+?)\/friends\//))||void 0===s?void 0:s[1];return(i&&(Ds(this,Vs).steam64Id=i),n&&(Ds(this,Vs).userName=n),a)?(Ds(this,Vs).communitySessionID=a,o.success(),!0):(o.error('Error: Get "sessionID" failed'),!1)}catch(t){return R(t,"Steam.updateCommunityAuth"),!1}}async function yi(){try{const i=V({text:K("gettingAreaInfo")}),{result:a,statusText:n,status:o,data:r}=await L({url:"https://store.steampowered.com/cart/",method:"GET"});if("Success"!==a)return i.error(a+`:${n}(${o})`),{};if(200!==(null===r||void 0===r?void 0:r.status))return i.error(`Error:${null===r||void 0===r?void 0:r.statusText}(${null===r||void 0===r?void 0:r.status})`),{};var t,e=null===(t=r.responseText.match(//g)].map(t=>t[1]);return e&&0{const e=setInterval(()=>{"waiting"!==Ds(this,Us)&&(clearInterval(e),t(!0))})}),Ds(this,Ms)===e||!e&&"CN"!==Ds(this,Ms))return!0;Es(this,Us,"waiting");let t=e;if(!t){const{currentArea:c,areas:u}=await Os(this,Rs,yi).call(this);if(!c||!u)return Es(this,Us,"error"),!1;if("CN"!==c)return Es(this,Us,"skip"),V({text:"notNeededChangeArea"}),"skip";var s=u.filter(t=>t&&"CN"!==t);if(!s||0===s.length)return Es(this,Us,"noAnotherArea"),V({text:"noAnotherArea"}),!1;[t]=s}const l=V({text:K("changingArea",t)});var{result:i,statusText:a,status:n,data:o}=await L({url:"https://store.steampowered.com/account/setcountry",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({cc:t,sessionid:Ds(this,Vs).storeSessionID})});if("Success"!==i)return Es(this,Us,"error"),l.error(i+`:${a}(${n})`),"CN";if(200!==(null==o?void 0:o.status)||"true"!==o.responseText)return Es(this,Us,"error"),l.error(`Error:${null==o?void 0:o.statusText}(${null==o?void 0:o.status})`),"CN";var r=(await Os(this,Rs,yi).call(this))["currentArea"];return r===t?(Es(this,Us,"success"),l.success(),r):(Es(this,Us,"error"),l.error("Error: change country filed"),"CN")}catch(t){return Es(this,Us,"error"),R(t,"Steam.changeArea"),!1}}async function Ti(t){try{const e=V({type:"joiningSteamGroup",text:t}),{result:s,statusText:i,status:a,data:n}=await L({url:"https://steamcommunity.com/groups/"+t,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({action:"join",sessionID:Ds(this,Vs).communitySessionID})});return"Success"===s?200!==(null===n||void 0===n?void 0:n.status)||n.responseText.includes("grouppage_join_area")?(e.error(`Error:${null===n||void 0===n?void 0:n.statusText}(${null===n||void 0===n?void 0:n.status})`),!1):(e.success(),this.tasks.groups=I([...this.tasks.groups,t]),!0):(e.error(s+`:${i}(${a})`),!1)}catch(t){return R(t,"Steam.joinGroup"),!1}}async function $i(t){try{if(this.whiteList.groups.includes(t))return V({type:"whiteList",text:"Steam.leaveGroup",id:t}),!0;var e=await Os(this,Js,xi).call(this,t);if(!e)return!1;const s=V({type:"leavingSteamGroup",text:t}),{result:i,statusText:a,status:n,data:o}=await L({url:`https://steamcommunity.com/id/${Ds(this,Vs).userName}/home_process`,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionID:Ds(this,Vs).communitySessionID,action:"leaveGroup",groupId:e})});return"Success"===i?200===(null===o||void 0===o?void 0:o.status)&&o.finalUrl.includes("groups")&&0===$(o.responseText.replace(//g,"").toLowerCase()).find(`a[href='https://steamcommunity.com/groups/${t.toLowerCase()}']`).length?(s.success(),!0):(s.error(`Error:${null===o||void 0===o?void 0:o.statusText}(${null===o||void 0===o?void 0:o.status})`),!1):(s.error(i+`:${a}(${n})`),!1)}catch(t){return R(t,"Steam.leaveGroup"),!1}}async function xi(t){try{const a=V({type:"gettingSteamGroupId",text:t});var e=Ds(this,Ps).group[t];if(e)return a.success(),e;const{result:n,statusText:o,status:r,data:l}=await L({url:"https://steamcommunity.com/groups/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==n)return a.error(n+`:${o}(${r})`),!1;if(200!==(null===l||void 0===l?void 0:l.status))return a.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1;var s,i=null===(s=l.responseText.match(/OpenGroupChat\( '([0-9]+)'/))||void 0===s?void 0:s[1];return i?(Os(this,mi,zi).call(this,"group",t,i),a.success(),i):(a.error(`Error:${l.statusText}(${l.status})`),!1)}catch(t){return R(t,"Steam.getGroupID"),!1}}async function Si(t){try{const i=V({type:"joiningSteamOfficialGroup",text:t}),{result:a,statusText:n,status:o,data:r}=await L({url:`https://steamcommunity.com/games/${t}?action=join&sessionID=`+Ds(this,Vs).communitySessionID,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==a)return i.error(a+`:${n}(${o})`),!1;if(200!==(null===r||void 0===r?void 0:r.status)||r.responseText.includes('id="publicGroupJoin"'))return i.error(`Error:${null===r||void 0===r?void 0:r.statusText}(${null===r||void 0===r?void 0:r.status})`),!1;var e;i.success(),this.tasks.officialGroups=I([...this.tasks.officialGroups,t]);var s=null===(e=r.responseText.match(/steam:\/\/friends\/joinchat\/([0-9]+)/))||void 0===e?void 0:e[1];return s&&Os(this,mi,zi).call(this,"officialGroup",t,s),!0}catch(t){return R(t,"Steam.joinOfficialGroup"),!1}}async function Li(t){try{if(this.whiteList.officialGroups.includes(t))return V({type:"whiteList",text:"Steam.leaveOfficialGroup",id:t}),!0;var e=await Os(this,Zs,Ii).call(this,t);if(!e)return!1;const o=V({type:"leavingSteamOfficialGroup",text:t});var{result:s,statusText:i,status:a,data:n}=await L({url:`https://steamcommunity.com/id/${Ds(this,Vs).userName}/home_process`,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionID:Ds(this,Vs).communitySessionID,action:"leaveGroup",groupId:e})});if("Success"!==s)return o.error(s+`:${i}(${a})`),!1;if(200!==(null==n?void 0:n.status))return o.error(`Error:${null==n?void 0:n.statusText}(${null==n?void 0:n.status})`),!1;{const{result:r,statusText:l,status:c,data:u}=await L({url:"https://steamcommunity.com/games/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});return"Success"===r?200===(null===u||void 0===u?void 0:u.status)&&u.responseText.includes('id="publicGroupJoin"')?(o.success(),!0):(o.error(`Error:${null===u||void 0===u?void 0:u.statusText}(${null===u||void 0===u?void 0:u.status})`),!1):(o.error(r+`:${l}(${c})`),!1)}}catch(t){return R(t,"Steam.leaveOfficialGroup"),!1}}async function Ii(t){try{const a=V({type:"gettingSteamOfficialGroupId",text:t});var e=Ds(this,Ps).officialGroup[t];if(e)return a.success(),e;const{result:n,statusText:o,status:r,data:l}=await L({url:"https://steamcommunity.com/games/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==n)return a.error(n+`:${o}(${r})`),!1;if(200!==(null===l||void 0===l?void 0:l.status))return a.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1;var s,i=null===(s=l.responseText.match(/steam:\/\/friends\/joinchat\/([0-9]+)/))||void 0===s?void 0:s[1];return i?(Os(this,mi,zi).call(this,"officialGroup",t,i),a.success(),i):(a.error(`Error:${l.statusText}(${l.status})`),!1)}catch(t){return R(t,"Steam.getGroupID"),!1}}async function Gi(t){try{var e;const a=V({type:"addingToWishlist",text:t});var{result:s,data:i}=await L({url:"https://store.steampowered.com/api/addtowishlist",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionid:Ds(this,Vs).storeSessionID,appid:t}),dataType:"json"});if("Success"===s&&200===(null==i?void 0:i.status)&&!0===(null===(e=i.response)||void 0===e?void 0:e.success))return a.success(),this.tasks.wishlists=I([...this.tasks.wishlists,t]),!0;const{result:n,statusText:o,status:r,data:l}=await L({url:"https://store.steampowered.com/app/"+t,method:"GET"});return"Success"===n?200===(null===l||void 0===l?void 0:l.status)?"CN"===Ds(this,Ms)&&l.responseText.includes('id="error_box"')?(a.warning(K("changeAreaNotice")),!!await Os(this,zs,bi).call(this)&&await Os(this,Qs,Gi).call(this,t)):(!l.responseText.includes('class="queue_actions_ctn"')||!l.responseText.includes('class="already_in_library"'))&&(l.responseText.includes('class="queue_actions_ctn"')&&l.responseText.includes('id="add_to_wishlist_area_success" style="display: none;')||!l.responseText.includes('class="queue_actions_ctn"'))?(a.error(`Error:${l.statusText}(${l.status})`),!1):(a.success(),this.tasks.wishlists=I([...this.tasks.wishlists,t]),!0):(a.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1):(a.error(n+`:${o}(${r})`),!1)}catch(t){return R(t,"Steam.addToWishlist"),!1}}async function _i(t){try{var e;if(this.whiteList.wishlists.includes(t))return V({type:"whiteList",text:"Steam.removeFromWishlist",id:t}),!0;const n=V({type:"removingFromWishlist",text:t});var{result:s,data:i}=await L({url:"https://store.steampowered.com/api/removefromwishlist",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionid:Ds(this,Vs).storeSessionID,appid:t}),dataType:"json"});if("Success"===s&&200===(null==i?void 0:i.status)&&!0===(null===(e=i.response)||void 0===e?void 0:e.success))return n.success(),!0;const{result:o,statusText:r,status:l,data:c}=await L({url:"https://store.steampowered.com/app/"+t,method:"GET"});if("Success"!==o)return n.error(o+`:${r}(${l})`),!1;if(200!==(null===c||void 0===c?void 0:c.status))return n.error(`Error:${null===c||void 0===c?void 0:c.statusText}(${null===c||void 0===c?void 0:c.status})`),!1;if("CN"===Ds(this,Ms)&&c.responseText.includes('id="error_box"')){n.warning(K("changeAreaNotice"));var a=await Os(this,zs,bi).call(this);return a&&"CN"!==a&&"skip"!==a?await Os(this,ti,_i).call(this,t):!1}return c.responseText.includes('class="queue_actions_ctn"')&&(c.responseText.includes("ds_owned_flag ds_flag")||c.responseText.includes("add_to_wishlist_area"))?(n.success(),!0):(n.error(`Error:${c.statusText}(${c.status})`),!1)}catch(t){return R(t,"Steam.removeFromWishlist"),!1}}async function Ci(t,e){try{if(!e&&this.whiteList.follows.includes(t))return V({type:"whiteList",text:"Steam.unfollowGame",id:t}),!0;const n=V({type:`${e?"":"un"}followingGame`,text:t}),o={sessionid:Ds(this,Vs).storeSessionID,appid:t};e||(o.unfollow="1");var{result:s,data:i}=await L({url:"https://store.steampowered.com/explore/followgame/",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param(o)});if("Success"===s&&200===(null==i?void 0:i.status)&&"true"===i.responseText)return n.success(),!0;var a=await Os(this,si,Ai).call(this,t);return"CN"===Ds(this,Ms)&&"areaLocked"===a?(n.warning(K("changeAreaNotice")),!!await Os(this,zs,bi).call(this)&&await Os(this,ti,_i).call(this,t)):e===a?(n.success(),e&&(this.tasks.follows=I([...this.tasks.follows,t])),!0):(n.error(`Error:${null==i?void 0:i.statusText}(${null==i?void 0:i.status})`),!1)}catch(t){return R(t,"Steam.toggleFollowGame"),!1}}async function Ai(t){try{const{result:e,data:s}=await L({url:"https://store.steampowered.com/app/"+t,method:"GET"});return"Success"===e?200===(null===s||void 0===s?void 0:s.status)&&("CN"===Ds(this,Ms)&&s.responseText.includes('id="error_box"')?"areaLocked":"none"!==$(s.responseText.replace(//g,"")).find(".queue_control_button.queue_btn_follow>.btnv6_blue_hoverfade.btn_medium.queue_btn_active").css("display")):!1}catch(t){return R(t,"Steam.isFollowedGame"),!1}}async function Oi(t){var e=!(1/))||void 0===s?void 0:s[1];return i?(Os(this,mi,zi).call(this,"workshop",t,i),a.success(),i):(a.error("Error: getWorkshopAppId failed"),!1)}catch(t){return R(t,"Steam.getWorkshopAppId"),!1}}async function Wi(t){try{const o=V({type:"votingUpWorkshop",text:t});var e,{result:s,statusText:i,status:a,data:n}=await L({url:"https://steamcommunity.com/sharedfiles/voteup",method:"POST",responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({id:t,sessionid:Ds(this,Vs).communitySessionID})});return"Success"===s?(200===(null==n?void 0:n.status)&&1===(null===(e=n.response)||void 0===e?void 0:e.success)?o.success():o.error(`Error:${null==n?void 0:n.statusText}(${null==n?void 0:n.status})`),!0):(o.error(s+`:${i}(${a})`),!0)}catch(t){return R(t,"Steam.voteupWorkshop"),!0}}async function Pi(t){var e=!(1{return null===(t=t.match(/groups\/(.+)\/?/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/games\/(.+)\/?/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/\?id=([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/\?id=([\d]+)/))||void 0===t?void 0:t[1]});if(e&&0{return null===(t=t.match(/curator\/([\d]+)/))||void 0===t?void 0:t[1]}),b=this.getRealParams("curatorLikes",u,e,t=>{return null===(t=t.match(/https?:\/\/store\.steampowered\.com\/(.*?)\/([^/?]+)/))||void 0===t?void 0:t.slice(1,3).join("/")});if(0{var e;return t.includes("store.steampowered.com")?null===(e=t.match(/store\.steampowered\.com\/news\/app\/([\d]+)\/view\/([\d]+)/))||void 0===e?void 0:e.slice(1,3).join("/"):null===(t=t.match(/steamcommunity\.com\/games\/([\d]+)\/announcements\/detail\/([\d]+)/))||void 0===t?void 0:t.slice(1,3).join("/")});if(e&&0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(e&&N.doTask.steam.playtests&&0<$.length)for(const W of $)x.push(Os(this,gi,Ri).call(this,W)),await P(1e3)}return Promise.all(x).then(async()=>("CN"!==Ds(this,Ms)&&(V({}).warning(K("steamFinishNotice")),await Os(this,zs,bi).call(this,"CN")),!0))}catch(t){return R(t,"Steam.toggle"),!1}}};function qi(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function Ji(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Hi(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}var Xi=new WeakSet;async function Zi(e,t){try{return{name:e,result:await t}}catch(t){return R(t,"Website.bind"),{name:e,result:!1}}}var Qi=class{constructor(){qi(this,Xi),Ji(this,"undoneTasks",void 0),Ji(this,"socialTasks",void 0),Ji(this,"giveawayId",void 0),Ji(this,"socialInitialized",{discord:!1,instagram:!1,reddit:!1,twitch:!1,twitter:!1,vk:!1,youtube:!1,steamStore:!1,steamCommunity:!1}),Ji(this,"initialized",!1),Ji(this,"social",{})}async initSocial(t){try{const i=[],a="do"===t?this.undoneTasks:this.socialTasks;var e,s;return a.discord&&(!(0[...t,...e]).length)||this.socialInitialized.discord&&this.social.discord||(this.social.discord=new J,i.push(Hi(this,Xi,Zi).call(this,"discord",this.social.discord.init())))),a.instagram&&(!(0[...t,...e]).length)||this.socialInitialized.instagram&&this.social.instagram||(this.social.instagram=new gt,i.push(Hi(this,Xi,Zi).call(this,"instagram",this.social.instagram.init())))),a.reddit&&(!(0[...t,...e]).length)||this.socialInitialized.reddit&&this.social.reddit||(this.social.reddit=new Ot,i.push(Hi(this,Xi,Zi).call(this,"reddit",this.social.reddit.init())))),a.twitch&&(!(0[...t,...e]).length)||this.socialInitialized.twitch&&this.social.twitch||(this.social.twitch=new ae,i.push(Hi(this,Xi,Zi).call(this,"twitch",this.social.twitch.init())))),a.twitter&&(!(0[...t,...e]).length)||this.socialInitialized.twitter&&this.social.twitter||(this.social.twitter=new Ge,i.push(Hi(this,Xi,Zi).call(this,"twitter",this.social.twitter.init())))),a.vk&&(!(0[...t,...e]).length)||this.socialInitialized.vk&&this.social.vk||(this.social.vk=new is,i.push(Hi(this,Xi,Zi).call(this,"vk",this.social.vk.init())))),a.youtube&&(!(0[...t,...e]).length)||this.socialInitialized.youtube&&this.social.youtube||(this.social.youtube=new Ts,i.push(Hi(this,Xi,Zi).call(this,"youtube",this.social.youtube.init())))),!a.steam||0<(e=Object.values(a.steam).reduce((t,e)=>[...t,...e]).length)&&(this.social.steam||(this.social.steam=new Yi),0{var e,s;return["groupLinks","officialGroupLinks","forumLinks","workshopLinks","workshopVoteLinks"].includes(t)&&(null===(e=a.steam)||void 0===e||null===(s=e[t])||void 0===s?void 0:s.length)||0}).reduce((t,e)=>t+e,0))&&!this.socialInitialized.steamStore&&i.push(Hi(this,Xi,Zi).call(this,"steamStore",this.social.steam.init("store"))),0{let e=!0;for(const s of t)s.result?this.socialInitialized[s.name]=s.result:e=!1;return e})}catch(t){return R(t,"Website.initSocial"),!1}}uniqueTasks(t){const e={};for(var[s,i]of Object.entries(t)){e[s]={};for(var[a,n]of Object.entries(i))e[s][a]=I(n)}return e}async toggleTask(t){try{if(!this.initialized&&!this.init())return!1;if(!await this.classifyTask(t))return!1;if(!await this.initSocial(t))return!1;const i=[];var e="do"===t,s=e?this.undoneTasks:this.socialTasks;if("skip"!==this.socialInitialized.discord&&this.social.discord&&i.push(this.social.discord.toggle({doTask:e,...s.discord})),this.social.instagram&&i.push(this.social.instagram.toggle({doTask:e,...s.instagram})),this.social.reddit&&i.push(this.social.reddit.toggle({doTask:e,...s.reddit})),this.social.twitch&&i.push(this.social.twitch.toggle({doTask:e,...s.twitch})),this.social.twitter&&i.push(this.social.twitter.toggle({doTask:e,...s.twitter})),this.social.vk&&i.push(this.social.vk.toggle({doTask:e,...s.vk})),this.social.youtube&&i.push(this.social.youtube.toggle({doTask:e,...s.youtube})),this.social.steam&&i.push(this.social.steam.toggle({doTask:e,...s.steam})),this.social.visitLink&&s.links&&e)for(const a of s.links)i.push(this.social.visitLink(a));return e&&s.extra&&this.extraDoTask&&0[...t,...e]).length&&i.push(this.extraDoTask(s.extra)),await Promise.all(i),V({}).success(K("allTasksComplete")),!0}catch(t){return R(t,"Website.toggleTask"),!1}}async doTask(){try{return await this.toggleTask("do")}catch(t){return R(t,"Website.doTask"),!1}}async undoTask(){try{return await this.toggleTask("undo")}catch(t){return R(t,"Website.undoTask"),!1}}};function ta(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function ea(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function sa(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}const ia=JSON.stringify({steam:{groupLinks:[],wishlistLinks:[],curatorLinks:[],followLinks:[]},vk:{nameLinks:[]}});var aa=new WeakSet,na=new WeakSet,oa=new WeakSet;function ra(){try{var t,e=null===(t=window.location.href.match(/\/giveaway\/([\d]+)/))||void 0===t?void 0:t[1];return e?(this.giveawayId=e,!0):(V({}).error(K("getFailed","GiveawayId")),!1)}catch(t){R(t,"FreeAnyWhere.getGiveawayId")}}async function la(t){try{const o=V({html:`
  • ${K("verifyingTask")}${t.title.trim()}...
  • `});var e,{result:s,statusText:i,status:a,data:n}=await L({url:`https://freeanywhere.net/api/v1/giveaway/${this.giveawayId}/challenge-status/${t.id}/?format=json`,method:"GET",dataType:"json",headers:{authorization:"Token "+window.localStorage.getItem("token"),"x-csrftoken":f.get("csrftoken")}});return"Success"===s?null!=n&&null!==(e=n.response)&&void 0!==e&&e.status?(o.success(),!0):(o.error(`Error:${null==n?void 0:n.statusText}(${null==n?void 0:n.status})`),!1):(o.error(s+`:${i}(${a})`),!1)}catch(t){return R(t,"Freeanywhere.verify"),!1}}async function ca(){try{var t;if(!N.other.checkLeftKey)return!0;var e=(await L({url:"https://freeanywhere.net/api/v1/widget/?format=json",method:"GET",dataType:"json",headers:{authorization:"Token "+window.localStorage.getItem("token")}}))["data"];return null!=e&&null!==(t=e.response)&&void 0!==t&&t.giveaways.find(t=>""+(null==t?void 0:t.id)===this.giveawayId)?!0:(await p().fire({icon:"warning",title:K("notice"),text:K("noKeysLeft"),confirmButtonText:K("confirm"),cancelButtonText:K("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0)}catch(t){return R(t,"Giveawaysu.checkLeftKey"),!1}}var ua=class extends Qi{constructor(){super(...arguments),ta(this,oa),ta(this,na),ta(this,aa),ea(this,"name","FreeAnyWhere"),ea(this,"tasks",[]),ea(this,"socialTasks",JSON.parse(ia)),ea(this,"undoneTasks",JSON.parse(ia)),ea(this,"buttons",["doTask","undoTask","verifyTask","getKey"])}static test(){return"freeanywhere.net"===window.location.host}async init(){try{const s=V({text:K("initing")});if(0<$('a[href="#/login"]').length)return window.open("/#/login","_self"),s.warning(K("needLogin")),!1;if(window.location.href.includes("/login"))return s.warning(K("needLogin")),!1;if(!/^https?:\/\/freeanywhere\.net\/#\/giveaway\/[\d]+/.test(window.location.href)){var t,e=null===(t=window.location.href.match(/https?:\/\/freeanywhere\.net\/.*?#\/giveaway\/([\d]+)/))||void 0===t?void 0:t[1];if(!e)return s.error(K("getFailed","Id")),!1;window.location.href="https://freeanywhere.net/#/giveaway/"+e}return sa(this,aa,ra).call(this)?(await sa(this,oa,ca).call(this)||V({}).warning(K("checkLeftKeyFailed")),this.initialized=!0,s.success(),!0):!1}catch(t){return R(t,"Freeanywhere.init"),!1}}async classifyTask(t){try{const u=V({text:K("getTasksInfo")});var e;"undo"===t&&(this.socialTasks=(null===(e=GM_getValue("fawTasks-"+this.giveawayId))||void 0===e?void 0:e.tasks)||JSON.parse(ia));var{result:s,statusText:i,status:a,data:n}=await L({url:`https://freeanywhere.net/api/v1/giveaway/${this.giveawayId}/?format=json`,method:"GET",headers:{authorization:"Token "+window.localStorage.getItem("token"),"x-csrftoken":f.get("csrftoken")},responseType:"json"});if("Success"!==s)return u.error(s+`:${i}(${a})`),!1;var o,r=null==n||null===(o=n.response)||void 0===o?void 0:o.challenges;if(r){"verify"===t&&(this.tasks=[]);for(const d of r){var l=d.challenge,c=d.challenge_provider;const h={id:d.id,title:d.title};if("verify"!==t||d.is_success)switch(c){case"steam":switch(h.social="steam",l){case"WL":"undo"===t&&this.socialTasks.steam.wishlistLinks.push(d.link),"do"!==t||d.is_success||this.undoneTasks.steam.wishlistLinks.push(d.link);break;case"JTG":"undo"===t&&this.socialTasks.steam.groupLinks.push(d.link),"do"!==t||d.is_success||this.undoneTasks.steam.groupLinks.push(d.link);break;case"STC":"undo"===t&&this.socialTasks.steam.curatorLinks.push(d.link),"do"!==t||d.is_success||this.undoneTasks.steam.curatorLinks.push(d.link);break;case"GF":"undo"===t&&this.socialTasks.steam.followLinks.push(d.link),"do"!==t||d.is_success||this.undoneTasks.steam.followLinks.push(d.link)}break;case"vk-oauth2":"undo"===t&&this.socialTasks.vk.nameLinks.push(d.link),"do"!==t||d.is_success||this.undoneTasks.vk.nameLinks.push(d.link);break;case"website":break;default:V({}).warning(K("unKnownTaskType")+": "+c)}else this.tasks.push(h)}return u.success(),this.undoneTasks=this.uniqueTasks(this.undoneTasks),this.socialTasks=this.uniqueTasks(this.socialTasks),window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:blue",JSON.stringify(this)),GM_setValue("fawTasks-"+this.giveawayId,{tasks:this.socialTasks,time:(new Date).getTime()}),!0}return u.error(`Error:${null==n?void 0:n.statusText}(${null==n?void 0:n.status})`),!1}catch(t){return R(t,"Freeanywhere.classifyTask"),!1}}async verifyTask(){try{if(!this.initialized&&!this.init())return!1;if(0===this.tasks.length&&!await this.classifyTask("verify"))return!1;const t=[];for(const e of this.tasks)t.push(sa(this,na,la).call(this,e)),await P(1e3);return await Promise.all(t),V({}).success(K("allTasksComplete")),!!await this.getKey(!0)}catch(t){return R(t,"Freeanywhere.verifyTask"),!1}}async getKey(t){try{if(!t&&!this.initialized&&!this.init())return!1;const o=V({text:K("gettingKey")});var e,{result:s,statusText:i,status:a,data:n}=await L({url:`https://freeanywhere.net/api/v1/giveaway/${this.giveawayId}/reward/?format=json`,method:"GET",dataType:"json",headers:{authorization:"Token "+window.localStorage.getItem("token")}});return"Success"===s?null!=n&&null!==(e=n.response)&&void 0!==e&&e.reward?(o.success(),V({}).success(n.response.reward),n.response.reward):(o.error(`Error:${null==n?void 0:n.statusText}(${null==n?void 0:n.status})`),!1):(o.error(s+`:${i}(${a})`),!1)}catch(t){return R(t,"FreeAnyWhere.getGiveawayId"),!1}}};function da(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function ha(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function pa(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}const fa={steam:{groupLinks:[],wishlistLinks:[],curatorLinks:[],curatorLikeLinks:[],followLinks:[],forumLinks:[],announcementLinks:[],workshopVoteLinks:[],playtestLinks:[]},discord:{serverLinks:[]},instagram:{userLinks:[]},vk:{nameLinks:[]},twitch:{channelLinks:[]},reddit:{redditLinks:[]},youtube:{channelLinks:[],likeLinks:[]}};var wa=new WeakSet,ga=new WeakSet,ma=new WeakSet;class va extends Qi{constructor(){super(...arguments),da(this,ma),da(this,ga),da(this,wa),ha(this,"name","GiveawaySu"),ha(this,"socialTasks",fa),ha(this,"undoneTasks",fa),ha(this,"buttons",["doTask","undoTask"])}static test(){return/^https?:\/\/giveaway\.su\/giveaway\/view\/[\d]+/.test(window.location.href)}async after(){try{pa(this,wa,ka).call(this)||V({}).warning(K("checkLoginFailed")),await pa(this,ga,ya).call(this)||V({}).warning(K("checkLeftKeyFailed")),V({}).warning(K("gsNotice"))}catch(t){R(t,"Giveawaysu.after")}}init(){try{const t=V({text:K("initing")});return 0<$("a.steam-login").length?(window.open("/steam/redirect","_self"),t.warning(K("needLogin")),!1):!!pa(this,ma,ba).call(this)&&(this.initialized=!0,t.success(),!0)}catch(t){return R(t,"Giveawaysu.init"),!1}}async classifyTask(t){try{const i=V({text:K("getTasksInfo")});var e;if("undo"===t)return this.socialTasks=(null===(e=GM_getValue("gasTasks-"+this.giveawayId))||void 0===e?void 0:e.tasks)||fa,!0;const a=[];var s=$("#actions tr");$("div.bind-discord").is(":visible")&&$("div.bind-discord a")[0].click(),$("div.bind-twitch").is(":visible")&&$("div.bind-twitch a")[0].click();for(const r of s)a.push(new Promise(e=>{const t=$(r).find('td:not(".hidden")');var s=t.eq(1).find('a:not([data-trigger="link"])'),i=t.eq(2).find('a:not([data-trigger="link"])');const a=0t?(n.includes("steam")&&/join/gi.test(o)?this.undoneTasks.steam.groupLinks.push(t):/like.*announcement/gi.test(o)?this.undoneTasks.steam.announcementLinks.push(t):/(follow|subscribe).*curator/gim.test(o)&&/^https?:\/\/store\.steampowered\.com\/curator\//.test(t)?this.undoneTasks.steam.curatorLinks.push(t):n.includes("steam")&&/follow|subscribe/gim.test(o)?this.undoneTasks.steam.curatorLikeLinks.push(t):/subscribe.*steam.*forum/gim.test(o)?this.undoneTasks.steam.forumLinks.push(t):n.includes("thumbs-up")&&/^https?:\/\/steamcommunity\.com\/sharedfiles\/filedetails\/\?id=[\d]+/.test(t)?this.undoneTasks.steam.workshopVoteLinks.push(t):n.includes("plus")&&/request.*playtest/gim.test(o)?this.undoneTasks.steam.playtestLinks.push(t):n.includes("discord")||/join.*discord/gim.test(o)?this.undoneTasks.discord.serverLinks.push(t):n.includes("instagram")||/follow.*instagram/gim.test(o)?this.undoneTasks.instagram.userLinks.push(t):n.includes("twitch")||/follow.*twitch.*channel/gim.test(o)?this.undoneTasks.twitch.channelLinks.push(t):n.includes("reddit")||/subscribe.*subreddit/gim.test(o)||/follow.*reddit/gim.test(o)?this.undoneTasks.reddit.redditLinks.push(t):/watch.*art/gim.test(o)?this.undoneTasks.steam.workshopVoteLinks.push(t):/subscribe.*youtube.*channel/gim.test(o)?this.undoneTasks.youtube.channelLinks.push(t):/(watch|like).*youtube.*video/gim.test(o)||(n.includes("youtube")||n.includes("thumbs-up"))&&/(watch|like).*video/gim.test(o)?this.undoneTasks.youtube.likeLinks.push(t):n.includes("vk")||/join.*vk.*group/gim.test(o)?this.undoneTasks.vk.nameLinks.push(t):/(on twitter)|(Follow.*on.*Facebook)/gim.test(o)||(/wishlist.*game|add.*wishlist/gim.test(o)&&this.undoneTasks.steam.wishlistLinks.push(t),/follow.*button/gim.test(o)&&this.undoneTasks.steam.followLinks.push(t)),void e(!0)):e(!1)).catch(t=>(R(t,"Giveawaysu.classifyTask->getRedirectLink"),!1))}));return await Promise.all(a),i.success(),this.undoneTasks=this.uniqueTasks(this.undoneTasks),this.socialTasks=this.undoneTasks,window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:blue",JSON.stringify(this)),GM_setValue("gasTasks-"+this.giveawayId,{tasks:this.socialTasks,time:(new Date).getTime()}),!0}catch(t){return R(t,"Giveawaysu.classifyTask"),!1}}}function ka(){try{return N.other.checkLogin?(0<$("a.steam-login").length&&window.open("/steam/redirect","_self"),!0):!0}catch(t){return R(t,"Giveawaysu.checkLogin"),!1}}async function ya(){try{return N.other.checkLeftKey?(0<$(".giveaway-ended").length&&0===$(".giveaway-key").length&&await p().fire({icon:"warning",title:K("notice"),text:K("noKeysLeft"),confirmButtonText:K("confirm"),cancelButtonText:K("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0):!0}catch(t){return R(t,"Giveawaysu.checkLeftKey"),!1}}function ba(){var t=null===(t=window.location.href.match(/\/view\/([\d]+)/))||void 0===t?void 0:t[1];return t?(this.giveawayId=t,!0):(V({text:K("getFailed","GiveawayId")}),!1)}function Ta(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function $a(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function xa(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}var Sa=new WeakSet,La=new WeakSet,Ia=new WeakSet,Ga=new WeakSet;async function _a(){try{if(0<$("a.buttonenter:contains(Register to join)").length)return V({}).error(K("needLogin")),!1;const c=$("a.buttonenter.buttongiveaway");if(/join giveaway/gim.test(c.text())){const u=V({text:K("joiningGiveaway")+"..."});var t,e,s,i,a,{result:n,statusText:o,status:r,data:l}=await L({url:c.attr("href"),method:"POST",data:"ajax=t",dataType:"json",headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8",accept:"application/json, text/javascript, */*; q=0.01",origin:window.location.origin}});return"Success"===n?200===(null==l?void 0:l.status)?null!==(t=l.response)&&void 0!==t&&t.success?(c.addClass("buttonentered").text("Success - Giveaway joined"),$("#giveawaysjoined").slideDown(),$("#giveawaysrecommend").slideDown(),u.success("Success"+(null!==(i=l.response)&&void 0!==i&&i.text?":"+(null===(a=l.response)||void 0===a?void 0:a.text):"")),!0):(u.error("Error"+(null!==(e=l.response)&&void 0!==e&&e.text?":"+(null===(s=l.response)||void 0===s?void 0:s.text):"")),!1):(u.error(`Error:${null==l?void 0:l.statusText}(${null==l?void 0:l.status})`),!1):(u.error(n+`:${o}(${r})`),!1)}return/success/gim.test($("a.buttonenter.buttongiveaway").text())?!0:(V({}).warning(K("needJoinGiveaway")),!1)}catch(t){return R(t,"Indiedb.init"),!1}}async function Ca(){try{const e=$("script").map((t,e)=>{var s,i,a,n,o;return/\$\(document\)/gim.test(e.innerHTML)?[null===(s=e.innerHTML.match(/"\/[\d]+"/gim))||void 0===s||null===(i=s[0])||void 0===i||null===(a=i.match(/[\d]+/))||void 0===a?void 0:a[0],null===(e=e.innerHTML.match(/"\/newsletter\/ajax\/subscribeprofile\/optin\/[\d]+"/gim))||void 0===e||null===(n=e[0])||void 0===n||null===(o=n.match(/[\d]+/))||void 0===o?void 0:o[0]]:null});if(2!==e.length)return V({}).error(K("getFailed","TaskId")),!1;{const s=[];for(const t of $("#giveawaysjoined a[class*=promo]")){const a=$(t);if(!a.hasClass("buttonentered")){const n=V({text:`${K("doing")}:${a.parents("p").text()}...`});if(/facebookpromo|twitterpromo|visitpromo/gim.test(t.className)){let t="";t=a.hasClass("facebookpromo")?"facebookpromo":a.hasClass("twitterpromo")?"twitterpromo":"visitpromo",s.push(new Promise(i=>{$.ajax({type:"POST",url:urlPath(`/giveaways/ajax/${t}/`+e[0]),timeout:6e4,dataType:"json",data:{ajax:"t"},error(t,e,s){window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:red",{response:t,error:e,exception:s}),n.error("Error:An error has occurred performing the action requested. Please try again shortly."),i(!0)},success(t){t.success?(n.success("Success:"+t.text),a.addClass("buttonentered").closest("p").html(a.closest("p").find("span").html())):n.error("Error:"+t.text),i(!0)}})}))}else a.hasClass("emailoptinpromo")?s.push(new Promise(i=>{$.ajax({type:"POST",url:urlPath("/newsletter/ajax/subscribeprofile/optin/"+e[1]),timeout:6e4,dataType:"json",data:{ajax:"t",emailsystoggle:4},error(t,e,s){window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:red",{response:t,error:e,exception:s}),n.error("Error:An error has occurred performing the action requested. Please try again shortly."),i(!0)},success(t){t.success?(n.success("Success:"+t.text),a.toggleClass("buttonentered").closest("p").html(a.closest("p").find("span").html())):n.error("Error:"+t.text),i(!0)}})})):a.hasClass("watchingpromo")?s.push(new Promise(i=>{var t;const e=(t=>{try{const i={};return t?t.includes("?")&&t.split("?")[1].replace(/([^?&=]+)=([^&]+)/g,(t,e,s)=>(i[e]=s,t)):window.location.search.replace(/([^?&=]+)=([^&]+)/g,(t,e,s)=>(i[e]=s,t)),i}catch(t){return R(t,"getUrlQuery"),{}}})(a.attr("href"));e.ajax="t",$.ajax({type:"POST",url:urlPath(null===(t=a.attr("href"))||void 0===t?void 0:t.split(/[?#]/)[0]),timeout:6e4,dataType:"json",data:e,error(t,e,s){window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:red",{response:t,error:e,exception:s}),n.error("Error:An error has occurred performing the action requested. Please try again shortly."),i(!0)},success(t){t.success?(n.success("Success:"+t.text),a.toggleClass("buttonentered").closest("p").html(a.closest("p").find("span").html())):n.error("Error:"+t.text),i(!0)}})})):/the-challenge-of-adblock/gim.test(a.attr("href"))?n.error("Error:"+K("unKnownTaskType")):s.push(new Promise(i=>{$.ajax({type:"POST",url:urlPath(a.attr("href")),timeout:6e4,dataType:"json",data:{ajax:"t"},error(t,e,s){window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:red",{response:t,error:e,exception:s}),n.error("Error:An error has occurred performing the action requested. Please try again shortly."),i(!0)},success(t){t.success?(n.success("Success:"+t.text),a.toggleClass("buttonentered").closest("p").html(a.closest("p").find("span").html())):n.error("Error:"+t.text),i(!0)}})}))}}return await Promise.all(s),V({}).success(K("allTasksComplete")),!0}}catch(t){return R(t,"Indiedb.classifyTask"),!1}}function Aa(){try{return N.other.checkLogin?(0<$("a.buttonenter:contains(Register to join)").length&&window.open("/members/login","_self"),!0):!0}catch(t){return R(t,"Indiedb.checkLogin"),!1}}async function Oa(){try{return N.other.checkLeftKey?(0<$('a.buttonenter:contains("next time"),a.buttonenter:contains("Giveaway is closed")').length&&await p().fire({icon:"warning",title:K("notice"),text:K("giveawayEnded"),confirmButtonText:K("confirm"),cancelButtonText:K("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0):!0}catch(t){return R(t,"Indiedb.checkLeftKey"),!1}}var Ea=class{constructor(){Ta(this,Ga),Ta(this,Ia),Ta(this,La),Ta(this,Sa),$a(this,"name","Indiedb"),$a(this,"buttons",["doTask"])}static test(){return"www.indiedb.com"===window.location.host}async after(){try{xa(this,Ia,Aa).call(this)||V({}).warning(K("checkLoginFailed")),await xa(this,Ga,Oa).call(this)||V({}).warning(K("checkLeftKeyFailed"))}catch(t){R(t,"Indiedb.after")}}async doTask(){try{return await xa(this,Sa,_a).call(this)?await xa(this,La,Ca).call(this):!1}catch(t){return R(t,"Indiedb.doTask"),!1}}};function Da(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function ja(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Wa(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}const Pa=JSON.stringify({steam:{groupLinks:[],officialGroupLinks:[],wishlistLinks:[],curatorLinks:[]},discord:{serverLinks:[]},extra:{videoTasks:[]},links:[]});var Va=new WeakSet,Na=new WeakSet,Fa=new WeakSet,Ma=new WeakSet;async function Ua(t){try{const n=V({text:K("doingKeyhubTask")});var{result:e,statusText:s,status:i,data:a}=await L({url:"/away?data="+t,method:"GET",headers:{origin:"https://key-hub.eu",referer:"https://key-hub.eu/"}});return"Success"===e?200===(null==a?void 0:a.status)?(n.success(),!0):(n.error(`Error:${null==a?void 0:a.statusText}(${null==a?void 0:a.status})`),!1):(n.error(e+`:${s}(${i})`),!1)}catch(t){return R(t,"Keyhub.doScriptTask"),!1}}function Ba(){try{var t,e=null===(t=window.location.href.match(/giveaway\/([\d]+)/))||void 0===t?void 0:t[1];return e?(this.giveawayId=e,!0):(V({}).error(K("getFailed","GiveawayId")),!1)}catch(t){return R(t,"Keyhub.getGiveawayId"),!1}}async function Ka(){try{return N.other.checkLeftKey?("0"===$("#keysleft").text().trim()&&await p().fire({icon:"warning",title:K("notice"),text:K("noKeysLeft"),confirmButtonText:K("confirm"),cancelButtonText:K("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0):!0}catch(t){return R(t,"Keyhub.checkLeftKey"),!1}}function Ra(){try{return N.other.checkLogin?(0<$('a[href*="/connect/steam"]').length&&window.open("/connect/steam","_self"),!0):!0}catch(t){return R(t,"Keyhub.checkLogin"),!1}}var za=class extends Qi{constructor(){super(...arguments),Da(this,Ma),Da(this,Fa),Da(this,Na),Da(this,Va),ja(this,"name","Keyhub"),ja(this,"socialTasks",JSON.parse(Pa)),ja(this,"undoneTasks",JSON.parse(Pa)),ja(this,"buttons",["doTask","undoTask"])}static test(){return"key-hub.eu"===window.location.host}async after(){try{Wa(this,Ma,Ra).call(this)||V({}).warning(K("checkLoginFailed")),await Wa(this,Fa,Ka).call(this)||V({}).warning(K("checkLeftKeyFailed")),$(".NSFW").hide()}catch(t){R(t,"Keyhub.after")}}init(){try{const t=V({text:K("initing")});return 0<$('a[href*="/connect/steam"]').length?(window.open("/connect/steam","_self"),t.warning(K("needLogin")),!1):!!Wa(this,Na,Ba).call(this)&&($("#VPNoverlay").hide(),$("#mainArticleSection").show(),this.initialized=!0,t.success(),!0)}catch(t){return R(t,"Keyhub.init"),!1}}async classifyTask(s){try{const n=V({text:K("getTasksInfo")});var t;"undo"===s&&(this.socialTasks=(null===(t=GM_getValue("khTasks-"+this.giveawayId))||void 0===t?void 0:t.tasks)||JSON.parse(Pa));for(const o of $('.task:not(".googleads")').filter((t,e)=>"do"!==s||0===$(e).find("i.fa-check-circle:visible").length).find("a")){let t=$(o).attr("href");var e,i,a=$(o).text().trim();t&&((/\/away\?data=/.test(t)||/steamcommunity\.com\/gid\//.test(t))&&(t=await u(t)||t),/https?:\/\/key-hub\.eu\/connect\/discord/.test(t)?window.open(t,"_blank"):/steamcommunity\.com\/groups\//.test(t)?("undo"===s&&this.socialTasks.steam.groupLinks.push(t),"do"===s&&this.undoneTasks.steam.groupLinks.push(t)):/steamcommunity\.com\/games\/[\d]+/.test(t)?("undo"===s&&this.socialTasks.steam.officialGroupLinks.push(t),"do"===s&&this.undoneTasks.steam.officialGroupLinks.push(t)):/store\.steampowered\.com\/app\//.test(t)&&/wishlist/gim.test(a)?("undo"===s&&this.socialTasks.steam.wishlistLinks.push(t),"do"===s&&this.undoneTasks.steam.wishlistLinks.push(t)):/store\.steampowered\.com\/curator\//.test(t)?("undo"===s&&this.socialTasks.steam.curatorLinks.push(t),"do"===s&&this.undoneTasks.steam.curatorLinks.push(t)):/^https?:\/\/discord\.com\/invite\//.test(t)?("undo"===s&&this.socialTasks.discord.serverLinks.push(t),"do"===s&&this.undoneTasks.discord.serverLinks.push(t)):/^javascript:videoTask.+/.test(t)?"do"!==s||(i=null===(e=t.match(/javascript:videoTask\('.+?','(.+?)'/))||void 0===e?void 0:e[1])&&this.undoneTasks.extra.videoTasks.push(i):/^https?:\/\/www\.instagram\.com\/.*/.test(t)||/^https?:\/\/twitter\.com\/.*/.test(t)||/^https?:\/\/www\.twitch\.tv\/.*/.test(t)||/^https?:\/\/www\.facebook\.com\/.*/.test(t)||/^https?:\/\/www\.youtube\.com\/.*/.test(t)||/^https?:\/\/store\.steampowered\.com\/developer\//.test(t)||/^https?:\/\/.*?\.itch\.io\/.*/.test(t)||/^https?:\/\/key-hub\.eu.*/.test(t)||/^https?:\/\/store\.steampowered\.com\/app\/.*/.test(t)||/^https?:\/\/qr\.streamelements\.com\/.*/.test(t)||/^https?:\/\/store\.steampowered\.com\/news\/app\/.*/.test(t)||V({}).warning(`${K("unKnownTaskType")}: ${a}(${t})`))}return n.success(),this.undoneTasks=this.uniqueTasks(this.undoneTasks),this.socialTasks=this.uniqueTasks(this.socialTasks),window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:blue",JSON.stringify(this)),GM_setValue("khTasks-"+this.giveawayId,{tasks:this.socialTasks,time:(new Date).getTime()}),!0}catch(t){return R(t,"Keyhub.classifyTask"),!1}}async extraDoTask(t){t=t.videoTasks;try{const e=[];for(const s of t)e.push(Wa(this,Va,Ua).call(this,s));return Promise.all(e).then(()=>!0)}catch(t){return R(t,"Keyhub.extraDoTask"),!1}}};function Ya(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function qa(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Ja(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}const Ha=JSON.stringify({steam:{groupLinks:[],wishlistLinks:[],curatorLinks:[],curatorLikeLinks:[]},twitter:{userLinks:[]},vk:{nameLinks:[]},discord:{serverLinks:[]}});var Xa=new WeakSet,Za=new WeakSet,Qa=new WeakSet;async function tn(t){try{const s=V({html:`
  • ${K("verifyingTask")}${t}...
  • `});return await new Promise(e=>{$.ajax({url:"https://givekey.ru/giveaway/task",method:"POST",data:`id=${t}&user_id=`+this.userId,dataType:"json",headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content")},success:t=>{t.btn&&$(`button[data-id=${this.userId}]`).html(t.btn),"ok"===t.status?($(".task_check_"+t.id).html(``),s.success(),e(!0)):"end"===t.status?(s.success(),V({}).success(t.key),e(!0)):(s.error("Error:"+t.msg),e(!1))},error:t=>{s.error(`Error:${t.statusText}(${t.status})`),e(!1)}})})}catch(t){return R(t,"Givekey.verify"),!1}}function en(){try{var t,e=null===(t=window.location.href.match(/giveaway\/([\d]+)/))||void 0===t?void 0:t[1];return e?(this.giveawayId=e,!0):(V({text:K("getFailed","GiveawayId")}),!1)}catch(t){return R(t,"Givekey.getGiveawayId"),!1}}async function sn(){try{return N.other.checkLeftKey?($("#keys_count").text()||await p().fire({icon:"warning",title:K("notice"),text:K("noKeysLeft"),confirmButtonText:K("confirm"),cancelButtonText:K("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0):!0}catch(t){return R(t,"Givekey.checkLeftKey"),!1}}var an=class extends Qi{constructor(){super(...arguments),Ya(this,Qa),Ya(this,Za),Ya(this,Xa),qa(this,"name","Givekey"),qa(this,"tasks",[]),qa(this,"socialTasks",JSON.parse(Ha)),qa(this,"undoneTasks",JSON.parse(Ha)),qa(this,"userId",void 0),qa(this,"buttons",["doTask","undoTask","verifyTask"])}static test(){return"givekey.ru"===window.location.host}async after(){try{await new Promise(t=>{const e=setInterval(()=>{0<$("#navbarDropdown").length&&(clearInterval(e),t(!0))})}),await Ja(this,Qa,sn).call(this)||V({}).warning(K("checkLeftKeyFailed"))}catch(t){return R(t,"Givekey.after"),!1}}init(){try{const e=V({text:K("initing")});if(0<$('a[href*="/auth/steam"]').length)return window.open("/auth/steam","_self"),e.warning(K("needLogin")),!1;if(!Ja(this,Za,en).call(this))return!1;var t=$('meta[name="user-id"]').attr("content");return t?(this.userId=t,this.initialized=!0,e.success(),!0):(e.error(K("getFailed",K("userId"))),!1)}catch(t){return R(t,"Givekey.init"),!1}}async classifyTask(e){try{const n=V({text:K("getTasksInfo")});var t;"undo"===e&&(this.socialTasks=(null===(t=GM_getValue("gkTasks-"+this.giveawayId))||void 0===t?void 0:t.tasks)||JSON.parse(Ha));for(const o of $('.card-body:has("button") .row')){const r=$(o);var s=/Complete/i.test(r.find("button").text().trim());if(!s||"undo"===e){const l=r.find("#task_check");var i=l.attr("data-id");if(i&&this.tasks.push(i),"verify"!==e){let t=r.find("a").attr("href")||null;var a=r.find("a").text().trim();const c=r.find("i");t&&a&&(/^https?:\/\/givekey\.ru\/giveaway\/[\d]+\/execution_task/.test(t)&&(t=await u(t)),t&&(/^https?:\/\/vk\.com\//.test(t)?(this.socialTasks.vk.nameLinks.push(t),"do"!==e||s||this.undoneTasks.vk.nameLinks.push(t)):/^https?:\/\/steamcommunity\.com\/groups/.test(t)?(this.socialTasks.steam.groupLinks.push(t),"do"!==e||s||this.undoneTasks.steam.groupLinks.push(t)):/^https?:\/\/store\.steampowered\.com\/app\//.test(t)?(this.socialTasks.steam.wishlistLinks.push(t),"do"!==e||s||this.undoneTasks.steam.wishlistLinks.push(t)):/Subscribe/gi.test(a)&&c.hasClass("fa-steam-square")?/^https?:\/\/store\.steampowered\.com\/curator\//.test(t)?(this.socialTasks.steam.curatorLinks.push(t),"do"!==e||s||this.undoneTasks.steam.curatorLinks.push(t)):(this.socialTasks.steam.curatorLikeLinks.push(t),"do"!==e||s||this.undoneTasks.steam.curatorLikeLinks.push(t)):/^https?:\/\/twitter\.com\//.test(t)&&/Subscribe/gi.test(a)?(this.socialTasks.twitter.userLinks.push(t),"do"!==e||s||this.undoneTasks.twitter.userLinks.push(t)):c.hasClass("fa-discord")||/^https?:\/\/discord\.com\/invite\//.test(t)?(this.socialTasks.discord.serverLinks.push(t),"do"!==e||s||this.undoneTasks.discord.serverLinks.push(t)):V({}).warning(`${K("unKnownTaskType")}: ${a}(${t})`)))}}}return n.success(),this.tasks=I(this.tasks),this.undoneTasks=this.uniqueTasks(this.undoneTasks),this.socialTasks=this.uniqueTasks(this.socialTasks),window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:blue",JSON.stringify(this)),GM_setValue("gkTasks-"+this.giveawayId,{tasks:this.socialTasks,time:(new Date).getTime()}),!0}catch(t){return R(t,"Givekey.classifyTask"),!1}}async verifyTask(){try{if(!this.initialized&&!this.init())return!1;if(0===this.tasks.length&&!await this.classifyTask("verify"))return!1;V({}).warning(K("giveKeyNoticeBefore"));var e=this.tasks.length;for(let t=0;t${K("giveKeyNoticeAfter")}`}),!0}catch(t){return R(t,"Givekey.verifyTask"),!1}}};function nn(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function on(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function rn(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}var ln=new WeakSet,cn=new WeakSet,un=new WeakSet;function dn(){try{return N.other.checkLogin?(0<$('a[href*="/account/auth"]').length&&window.open($('a[href*="/account/auth"]').attr("href"),"_self"),!0):!0}catch(t){return R(t,"GiveeClub.checkLogin"),!1}}function hn(){var t=null===(t=window.location.href.match(/\/event\/([\d]+)/))||void 0===t?void 0:t[1];return t?(this.giveawayId=t,!0):(V({text:K("getFailed","GiveawayId")}),!1)}async function pn(){try{return N.other.checkLeftKey?(0<$(".event-ended").length&&0===$(".event-winner").length&&await p().fire({icon:"warning",title:K("notice"),text:K("giveawayEnded"),confirmButtonText:K("confirm"),cancelButtonText:K("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0):!0}catch(t){return R(t,"Giveawaysu.checkLeftKey"),!1}}var fn=class extends va{constructor(){super(...arguments),nn(this,un),nn(this,cn),nn(this,ln),on(this,"name","GiveeClub"),on(this,"buttons",["doTask","undoTask","verifyTask"])}static test(){return/^https?:\/\/givee\.club\/.*?\/event\/[\d]+/.test(window.location.href)}async after(){try{rn(this,ln,dn).call(this)||V({}).warning(K("checkLoginFailed")),await rn(this,un,pn).call(this)||V({}).warning(K("checkLeftKeyFailed"))}catch(t){R(t,"GiveeClub.after")}}init(){try{const t=V({text:K("initing")});return rn(this,ln,dn).call(this)?!!rn(this,cn,hn).call(this)&&(this.initialized=!0,t.success(),!0):(t.warning(K("needLogin")),!1)}catch(t){return R(t,"GiveeClub.init"),!1}}async classifyTask(t){try{const s=V({text:K("getTasksInfo")});var e;if("undo"===t)return this.socialTasks=(null===(e=GM_getValue("gcTasks-"+this.giveawayId))||void 0===e?void 0:e.tasks)||fa,!0;const i=[];for(const o of $(".event-actions tr"))i.push(new Promise(e=>{var t;const s=$(o).find(".event-action-label a"),i=$(o).find(".event-action-icon i").attr("class")||"",a=s.text().trim(),n=null===(t=$(o).find("button[data-type]"))||void 0===t?void 0:t.attr("data-type");if(i.includes("ban")||/AdBlock/i.test(a)||i.includes("envelope"))return e(!0);u(s.attr("href")).then(t=>t?("steam.group.join"===n&&/^https?:\/\/steamcommunity\.com\/groups/.test(t)?this.undoneTasks.steam.groupLinks.push(t):/like.*announcement/gi.test(a)?this.undoneTasks.steam.announcementLinks.push(t):"steam.game.wishlist"===n&&/^https?:\/\/store\.steampowered\.com\/app\//.test(t)?this.undoneTasks.steam.wishlistLinks.push(t):"steam.game.wishlist"===n&&s.attr("data-steam-wishlist-appid")?this.undoneTasks.steam.wishlistLinks.push("https://store.steampowered.com/app/"+s.attr("data-steam-wishlist-appid")):"steam.game.follow"===n&&/^https?:\/\/store\.steampowered\.com\/app\//.test(t)?this.undoneTasks.steam.followLinks.push(t):/^https?:\/\/store\.steampowered\.com\/curator\//.test(t)?this.undoneTasks.steam.curatorLinks.push(t):i.includes("steam")&&/follow|subscribe/gim.test(a)?this.undoneTasks.steam.curatorLikeLinks.push(t):/subscribe.*steam.*forum/gim.test(a)?this.undoneTasks.steam.forumLinks.push(t):i.includes("discord")?this.undoneTasks.discord.serverLinks.push(t):i.includes("instagram")?this.undoneTasks.instagram.userLinks.push(t):i.includes("twitch")?this.undoneTasks.twitch.channelLinks.push(t):i.includes("reddit")?this.undoneTasks.reddit.redditLinks.push(t):/watch.*art/gim.test(a)?this.undoneTasks.steam.workshopVoteLinks.push(t):/subscribe.*youtube.*channel/gim.test(a)?this.undoneTasks.youtube.channelLinks.push(t):/(watch|like).*youtube.*video/gim.test(a)||(i.includes("youtube")||i.includes("thumbs-up"))&&/(watch|like).*video/gim.test(a)?this.undoneTasks.youtube.likeLinks.push(t):i.includes("vk")||/join.*vk.*group/gim.test(a)?this.undoneTasks.vk.nameLinks.push(t):/(on twitter)|(Follow.*on.*Facebook)/gim.test(a)||/follow.*button/gim.test(a)&&this.undoneTasks.steam.followLinks.push(t),void e(!0)):e(!1)).catch(t=>(R(t,"GiveeClub.classifyTask->getRedirectLink"),!1))}));return await Promise.all(i),s.success(),this.undoneTasks=this.uniqueTasks(this.undoneTasks),this.socialTasks=this.undoneTasks,window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:blue",JSON.stringify(this)),GM_setValue("gcTasks-"+this.giveawayId,{tasks:this.socialTasks,time:(new Date).getTime()}),!0}catch(t){return R(t,"GiveeClub.classifyTask"),!1}}async verifyTask(){try{const t=V({text:K("giveeClubVerifyNotice")});for(const e of $(".event-actions tr button").has("i.glyphicon-refresh").not('[data-type="user.adblock"]'))e.click(),"steam.game.wishlist"!==$(e).attr("data-type")&&await P(1e3);return t.warning(K("giveeClubVerifyFinished")),!0}catch(t){return R(t,"Givekey.verifyTask"),!1}}};function wn(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function gn(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function mn(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}const vn={maxPoint:"99999999"};var kn=new WeakSet,yn=new WeakSet;async function bn(t){try{for(const u of $(`.giveaways-page-item:contains('${t}'):not(:contains('ENTERED'))`)){var e,s,i,a,n,o,r,l=parseInt((null===(e=$(u).find(".giveaways-page-item-header-points").text().match(/[\d]+/gim))||void 0===e?void 0:e[0])||"999999",10),c=$(u).find(".giveaways-page-item-footer-name").text().trim();if("points"===t&&l>this.myPoints)V({}).warning(K("noPoints")+": "+c);else if("points"!==t||l){if(!("points"===t&&l>this.maxPoints)){const d=V({text:`${K("joiningLottery")}${c}...`}),h=$(u).find("a.giveaways-page-item-img-btn-enter:contains('enter')");if(null===h||void 0===h||null===(s=h.attr("onclick"))||void 0===s||!s.includes("checkUser")||(n=null===(i=h.attr("onclick"))||void 0===i||null===(a=i.match(/[\d]+/))||void 0===a?void 0:a[0])&&checkUser(n),h.attr("href")){const{result:p,statusText:f,status:w,data:g}=await L({url:h.attr("href"),method:"GET"});"Success"===p?null!==g&&void 0!==g&&g.responseText&&/You've entered this giveaway/gim.test(g.responseText)?(d.success(),r=null===(o=g.responseText.match(/Points:[\s]*?([\d]+)/))||void 0===o?void 0:o[1],"points"===t&&r&&(this.myPoints=parseInt(r,10))):d.error(`Error:${null===g||void 0===g?void 0:g.statusText}(${null===g||void 0===g?void 0:g.status})`):d.error(p+`:${f}(${w})`)}else d.error('Error: No "href".')}}else V({}).warning(K("getNeedPointsFailed")+": "+c)}V({text:"-----END-----"})}catch(t){R(t,"OpiumPulses.toggleTask")}}function Tn(){try{return N.other.checkLogin?(1<$('a[href*="/site/login"]').length&&window.open("/site/login","_self"),!0):!0}catch(t){return R(t,"OpiumPulses.checkLogin"),!1}}var t=class{constructor(){wn(this,yn),wn(this,kn),gn(this,"name","OpiumPulses"),gn(this,"options",{...vn,...GM_getValue("OpiumPulsesOptions")}),gn(this,"maxPoints",99999999),gn(this,"myPoints",0),gn(this,"buttons",["doFreeTask","doPointTask"])}static test(){return"www.opiumpulses.com"===window.location.host}async after(){try{mn(this,yn,Tn).call(this)||V({}).warning(K("checkLoginFailed")),this.maxPoints=parseInt(this.options.maxPoint,10)}catch(t){R(t,"OpiumPulses.after")}}async doFreeTask(){try{mn(this,kn,bn).call(this,"FREE")}catch(t){R(t,"OpiumPulses.doFreeTask")}}async doPointTask(){try{var t;this.myPoints=parseInt((null===(t=$(".page-header__nav-func-user-nav-items.points-items").text().match(/[\d]+/gim))||void 0===t?void 0:t[0])||"0",10),mn(this,kn,bn).call(this,"points")}catch(t){R(t,"OpiumPulses.doPointTask")}}init(){return!0}classifyTask(){return!0}},$n=Fo(698),xn=Fo.n($n);const Sn={async classify(t){try{return/^https?:\/\/giveaway\.su\/giveaway\/view\/[\d]+/.test(t)?await this.giveawaySu(t):/^https?:\/\/givee\.club\/[\w]+?\/event\/[\d]+/.test(t)?await this.giveeClub(t):/^https?:\/\/gleam\.io\/.+?\/.+/.test(t)?await this.gleam(t):/^https?:\/\/www\.indiedb\.com\/giveaways\/.+/.test(t)?await this.indieDb(t):/^https?:\/\/key-hub\.eu\/giveaway\/[\d]+/.test(t)?await this.keyhub(t):/^https?:\/\/opquests\.com\/quests\/[\d]+/.test(t)?await this.opquests(t):!!/^https?:\/\/itch\.io\/s\/[\d]+?\/.*/.test(t)&&await this.itch(t)}catch(t){return R(t,"leftKeyChecker.classify"),!1}},async giveawaySu(t){try{const{result:e,data:s}=await L({url:t,method:"GET"});return"Success"===e&&200===(null===s||void 0===s?void 0:s.status)?!s.responseText.includes('class="steam-login"')&&(s.responseText.includes('class="giveaway-ended"')?"Ended":"Active"):!1}catch(t){return R(t,"leftKeyChecker.giveawaySu"),!1}},async giveeClub(t){try{const{result:e,data:s}=await L({url:t,method:"GET"});return"Success"===e&&200===(null===s||void 0===s?void 0:s.status)?s.responseText.includes('class="event-winner"')?"Won":s.responseText.includes('class="event-ended"')?"Ended":"Active":!1}catch(t){return R(t,"leftKeyChecker.giveeClub"),!1}},async gleam(t){try{const{result:r,data:l}=await L({url:t,method:"GET"});if("Success"!==r||200!==(null===l||void 0===l?void 0:l.status))return!1;var e,s,i;if(/incentives":{"[\d]+?":\[".+?"\]/.test(l.responseText))return"Won";var a=null===(e=l.responseText.match(/`),await n.after(),$("#auto-do-task").on("click",()=>{n.doTask()}),$("#auto-verify-task").on("click",()=>{n.verifyTask()}),console.log("%c%s","color:#1bbe1a","Auto Task GS特供脚本初始化完成!")}})}()}(); \ No newline at end of file diff --git a/page/dist/auto-task-v4.all.user.js b/page/dist/auto-task-v4.all.user.js index a5d0661..300126f 100644 --- a/page/dist/auto-task-v4.all.user.js +++ b/page/dist/auto-task-v4.all.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name auto-task-v4 // @namespace auto-task-v4 -// @version 4.2.23 +// @version 4.2.24 // @description 自动完成 Freeanywhere,Giveawaysu,GiveeClub,Givekey,Gleam,Indiedb,keyhub,OpiumPulses,Opquests,SweepWidget 等网站的任务。 // @description:en Automatically complete the tasks of FreeAnyWhere, GiveawaySu, GiveeClub, Givekey, Gleam, Indiedb, keyhub, OpiumPulses, Opquests, SweepWidget websites. // @author HCLonely @@ -7393,6 +7393,10 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); youtube: { channelLinks: [], likeLinks: [] + }, + twitter: { + userLinks: [], + retweetLinks: [] } }; var _checkLogin = new WeakSet(); @@ -8640,12 +8644,13 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); const tasks = $('.event-actions tr'); for (const task of tasks) { pro.push(new Promise(resolve => { - var _$$find; + var _$$find, _$$find2; const taskDes = $(task).find('.event-action-label a'); const taskIcon = $(task).find('.event-action-icon i').attr('class') || ''; const taskName = taskDes.text().trim(); const taskType = (_$$find = $(task).find('button[data-type]')) === null || _$$find === void 0 ? void 0 : _$$find.attr('data-type'); - if (taskIcon.includes('ban') || /AdBlock/i.test(taskName) || taskIcon.includes('envelope')) { + const taskFinished = (_$$find2 = $(task).find('.event-action-buttons .btn-success')) === null || _$$find2 === void 0 ? void 0 : _$$find2.length; + if (taskIcon.includes('ban') || /AdBlock/i.test(taskName) || taskIcon.includes('envelope') || taskFinished) { return resolve(true); } getRedirectLink(taskDes.attr('href')).then(taskLink => { @@ -8684,6 +8689,12 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); this.undoneTasks.youtube.likeLinks.push(taskLink); } else if (taskIcon.includes('vk') || /join.*vk.*group/gim.test(taskName)) { this.undoneTasks.vk.nameLinks.push(taskLink); + } else if (taskIcon.includes('twitter')) { + if (/https?:\/\/twitter\.com\/[^/]+\/?$/gim.test(taskLink)) { + this.undoneTasks.twitter.userLinks.push(taskLink); + } else if (/https?:\/\/twitter\.com\/[^/]+?\/status\/[\d]+/gim.test(taskLink)) { + this.undoneTasks.twitter.retweetLinks.push(taskLink); + } } else { if (/(on twitter)|(Follow.*on.*Facebook)/gim.test(taskName)) {} else { if (/follow.*button/gim.test(taskName)) { diff --git a/page/dist/auto-task-v4.compatibility.all.user.js b/page/dist/auto-task-v4.compatibility.all.user.js index f5da5f6..9c36d8c 100644 --- a/page/dist/auto-task-v4.compatibility.all.user.js +++ b/page/dist/auto-task-v4.compatibility.all.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name auto-task-v4.compatibility // @namespace auto-task-v4.compatibility -// @version 4.2.23 +// @version 4.2.24 // @description 自动完成 Freeanywhere,Giveawaysu,GiveeClub,Givekey,Gleam,Indiedb,keyhub,OpiumPulses,Opquests,SweepWidget 等网站的任务。 // @description:en Automatically complete the tasks of FreeAnyWhere, GiveawaySu, GiveeClub, Givekey, Gleam, Indiedb, keyhub, OpiumPulses, Opquests, SweepWidget websites. // @author HCLonely @@ -116,15 +116,15 @@ var runtime=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); -!function(){var s={588:function(t,e){!function(t){"use strict";var i=function(){return(i=Object.assign||function(t){for(var e,s=1,i=arguments.length;s[a-z\d]+)(\/|\s)(?(\d+\.)+\d+)/i))||void 0===e?void 0:e.groups)&&void 0!==s?s:{},o=n.name,r=n.version,l={},c=0,u=Object.entries(this.browserNameMap);c(.*)=.+)/.exec(decodeURIComponent(t)))||void 0===t?void 0:t.groups;if(!t)return{};for(var e=t.params.split("&"),i={},s=0;s=e?t:""+Array(e+1-i.length).join(s)+t},e={s:n,z:function(t){var e=-t.utcOffset(),s=Math.abs(e),i=Math.floor(s/60),a=s%60;return(e<=0?"+":"-")+n(i,2,"0")+":"+n(a,2,"0")},m:function t(e,s){if(e.date(){s.dataType&&(s.responseType=s.dataType);var t={timeout:3e4,ontimeout(t){e({result:"Error",statusText:"Timeout",status:601,data:t,options:s})},onabort(t){e({result:"Error",statusText:"Aborted",status:602,data:t,options:s})},onerror(t){e({result:"Error",statusText:"Error",status:603,data:t,options:s})},onload(t){e({result:"Success",statusText:"Load",status:600,data:t,options:s})},...s};GM_xmlhttpRequest(t)});return window.DEBUG&&console.log("%cAuto-Task[httpRequest]:","color:blue",JSON.stringify(e)),600!==e.status&&t<2?await i(s,t+1):e}catch(t){return console.log("%cAuto-Task[httpRequest]:","color:red",JSON.stringify({errorMsg:t,options:s})),R(t,"httpRequest"),{result:"JsError",statusText:"Error",status:604,error:t,options:s}}}const L=i;function P(){let e=0{setTimeout(()=>{t(!0)},e)})}const V=t=>{let{type:e,text:s,html:i,id:a}=t;const n={success:()=>n,error:()=>n,warning:()=>n,info:()=>n,view:()=>n};try{var o;let t;if(e)switch(e){case"joiningSteamGroup":case"leavingSteamGroup":case"gettingSteamGroupId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"joiningSteamOfficialGroup":case"leavingSteamOfficialGroup":case"gettingSteamOfficialGroupId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"subscribingForum":case"unsubscribingForum":case"gettingForumId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"followingCurator":case"unfollowingCurator":case"gettingCuratorId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"addingToWishlist":case"removingFromWishlist":case"followingGame":case"unfollowingGame":case"gettingSubid":case"addingFreeLicense":case"requestingPlayTestAccess":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"addingFreeLicenseSubid":t=$(`
  • ${K("addingFreeLicense")}[${s}]...
  • `);break;case"favoritingWorkshop":case"unfavoritingWorkshop":case"gettingWorkshopAppId":case"votingUpWorkshop":t=$(`
  • ${K(e)}[ - ${s}]...
  • `);break;case"gettingAnnouncementParams":case"likingAnnouncement":t=$(`
  • ${K(e)}[ - ${a}]...
  • `);break;case"joiningDiscordServer":case"gettingDiscordGuild":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"leavingDiscordServer":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"updateDiscordAuth":t=$(`
  • ${K("updateDiscordAuth")}
  • `);break;case"followingTwitchChannel":case"unfollowingTwitchChannel":case"gettingTwitchChannelId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"gettingInsUserId":case"followingIns":case"unfollowingIns":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"gettingTwitterUserId":case"followingTwitterUser":case"unfollowingTwitterUser":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"retweetting":case"unretweetting":t=$(`
  • ${K(e)}${s}...
  • `);break;case"joiningReddit":case"leavingReddit":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"followingRedditUser":case"unfollowingRedditUser":t=$(`
  • ${K(e)}[ - ${null===s||void 0===s?void 0:s.replace("u_","")}]...
  • `);break;case"followingYtbChannel":case"unfollowingYtbChannel":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"likingYtbVideo":case"unlikingYtbVideo":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"gettingVkId":case"joiningVkGroup":case"leavingVkGroup":case"joiningVkPublic":case"leavingVkPublic":case"sendingVkWall":case"deletingVkWall":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"visitingLink":t=$(`
  • ${K("visitingLink")}[${s}]...
  • `);break;case"verifyingInsAuth":case"text":t=$(`
  • ${K(s)}
  • `);break;case"html":t=$(s||i);break;case"whiteList":t=$(`
  • ${K("skipTask")}[${s}(${a})](${K("whiteList")})
  • `);break;case"globalOptionsSkip":t=$(`
  • ${K("skipTaskOption")}${s}
  • `);break;default:t=$(`
  • ${K("unKnown")}:${e}(${s})...
  • `)}else t=s?$(`
  • ${K(s)}
  • `):i?$(i):$("
  • ");return t.addClass("card-text"),$("#auto-task-info").append(t),null!==(o=t[0])&&void 0!==o&&o.scrollIntoView(),{font:t.find("font"),success(){var t,e,s=0{try{return[...new Set(t)]}catch(t){return R(t,"unique"),[]}},u=async e=>{try{if(!e)return null;const s=GM_getValue("redirectLinks")||{};return s[e]&&s[e],await L({url:e,method:"GET"}).then(t=>{t=t.data;return null!=t&&t.finalUrl?(s[e]=t.finalUrl,GM_setValue("redirectLinks",s),t.finalUrl):null})}catch(t){return R(t,"getRedirectLink"),null}},n=async(t,e)=>{try{const i=V({type:"visitLink",text:t});return await L({url:t,method:"GET",...e}).then(t=>{var{result:e,statusText:s,status:t}=t;return"Success"===e?(i.success(),!0):(i.error(e+`:${s}(${t})`),!1)})}catch(t){return R(t,"visitLink"),!1}};const l=i=>{try{let e=0;for(let t=0;t>8*t&255;s+=("00"+a.toString(16)).slice(-2)}return s}catch(t){return R(t,"stringToColour"),"#fff"}},o={doTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0,workshopVotes:!0,announcements:!0,licenses:!0,playtests:!0}},undoTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0}},position:{buttonSideX:"right",buttonSideY:"top",buttonDistance:"15,30",showButtonSideX:"right",showButtonSideY:"top",showButtonDistance:"15,30",logSideX:"right",logSideY:"bottom",logDistance:"10,10"},hotKey:{doTaskKey:"alt + d",undoTaskKey:"alt + u",toggleLogKey:"alt + l"},other:{twitterVerifyId:"783214",youtubeVerifyChannel:"UCrXUsMBcfTVqwAS7DKg9C0Q",autoUpdateSource:"jsdelivr",language:"zh",checkLogin:!0,checkLeftKey:!0,defaultShowButton:!0,defaultShowLog:!0,debug:!1,receivePreview:!0}};var s=GM_getValue("globalOptions")||{};const r=(t,e)=>{try{const a={};for(var[s,i]of Object.entries(t))"[object Object]"===Object.prototype.toString.call(i)&&"[object Object]"===Object.prototype.toString.call(e[s])?a[s]=r(i,e[s]):a[s]=e[s]??i;return a}catch(t){return R(t,"assignObject"),o}},N=r(o,s),c=()=>{try{const i={};$("#globalOptionsForm").serializeArray().map(t=>(i[t.name]=t.value,t)),$.makeArray($("#globalOptionsForm input")).map(t=>{const e=$(t).attr("name");var s=e.split(".");return 3===s.length?N[s[0]][s[1]][s[2]]=!!i[e]&&("on"===i[e]||i[e]):2===s.length&&(N[s[0]][s[1]]=!!i[e]&&("on"===i[e]||i[e])),t}),GM_setValue("globalOptions",N),p().fire({title:K("changeGlobalOptionsSuccess"),icon:"success"})}catch(t){R(t,"saveData")}},w=e=>{try{let t=`
    - `;for(const[o,r]of Object.entries(N))for(var[s,i]of Object.entries(r))if(["other","position","hotKey"].includes(o))"boolean"==typeof i?t+=`${0===Object.keys(r).indexOf(s)?``:""}`:t+=`${0===Object.keys(r).indexOf(s)?``:""}`;else for(var[a,n]of Object.entries(i))t+=`${0===Object.keys(r).indexOf(s)?``:""}`;t+="
    ${K("type")}${K("option")}${K("value")}
    ${K(o)}${K(s)}
    ${K(o)}${K(s)}
    ${K(o)}${s}.${K(a)}
    ","swal"===e?p().fire({title:K("globalOptions"),html:t,showConfirmButton:!0,confirmButtonText:K("save"),showCancelButton:!0,cancelButtonText:K("close")}).then(t=>{t=t.isConfirmed;t&&c()}):$("body").append(`

    ${K("globalOptions")}

    `+t)}catch(t){R(t,"changeGlobalOptions")}};const d={zh:{website:"网站",type:"类型",edit:"编辑",whiteList:"白名单",skipTask:"跳过撤销任务",whiteListOptions:"白名单设置",changeWhiteListOption:"设置白名单(%0)",whiteListNotFound:"找不到此项白名单: %0",changeWhiteListSuccess:"白名单修改成功,刷新生效!",changeWebsiteOptions:"网站设置",changeGlobalOptions:"全局设置",ok:"是",save:"保存",close:"关闭",return:"返回",option:"选项",value:"值",websiteOptions:"当前网站设置",changeWebsiteOptionsSuccess:"更改当前网站设置成功,刷新生效!",changeGlobalOptionsSuccess:"更改全局设置成功,刷新生效!",needLogin:"请先登录!",getTasksInfo:"正在获取并处理任务信息...",gettingKey:"正在获取Key...",verifyingTask:"正在验证任务",notice:"自动任务脚本提醒",noKeysLeft:"此页面已经没有剩余key了,是否关闭?",giveawayEnded:"此活动已结束,是否关闭?",giveawayNotWork:"此活动因某些原因(已结束/暂停/未开始...)不可用(如果是脚本误判请及时反馈),是否关闭?",confirm:"确定",cancel:"取消",unKnown:"未知",unKnownTaskType:"未识别的任务",doing:"正在做任务",allTasksComplete:"所有任务已完成!",getTaskIdFailed:"获取任务Id失败!",initSuccess:"%0 初始化成功!",initFailed:"%0 初始化失败!",errorLink:"链接错误: %0",needInit:"请先初始化",verifyingAuth:"正在验证%0凭证...",updatingAuth:"正在更新%0凭证...",initing:"正在初始化...",getFailed:"获取%0失败!",checkLoginFailed:"检测登录状态失败!",checkLeftKeyFailed:"检测剩余Key失败!",userId:"用户Id",joiningGiveaway:"正在加入赠Key",needJoinGiveaway:"需要先加入赠Key",cannotUndo:"此网站不支持取消任务",verifyAuth:"正在验证 %0 凭证...",closePageNotice:"如果此页面没有自动关闭,请自行关闭本页面。",errorReport:"检测到脚本报错,是否前往反馈BUG?",visitingLink:"正在访问链接: ",doTask:"做任务",undoTask:"撤销任务",verifyTask:"验证任务",getKey:"获取Key",selectAll:"全选",selectNone:"全不选",invertSelect:"反选",doFreeTask:"加入免费赠品",doPointTask:"加入点数赠品",skipTaskOption:"设置中已配置跳过任务",other:"其他",globalOptions:"全局设置",checkLogin:"登录检测
    需要登录的网站自动登录,部分本网站支持",checkLeftKey:"剩余Key检测
    赠Key活动结束提示是否关闭,部分本网站支持",twitterVerifyId:"通过尝试关注该账号验证Twitter凭证
    默认为Twitter官方帐号 783214
    不想关注官方账号可以改为自己的帐号",youtubeVerifyChannel:"通过尝试订阅该频道验证YouTube凭证
    默认为YouTube官方频道 UCrXUsMBcfTVqwAS7DKg9C0Q
    不想关注官方频道可以改为自己的频道",autoUpdateSource:"更新源
    github: 需代理,实时更新
    jsdelivr: 可不用代理,更新有延迟
    standby: 备用
    auto: 依次使用github, jsdelivr, standby源进行尝试更新",saveGlobalOptions:"保存全局设置",settingPage:"设置页面",name:"名称",version:"版本",scriptManager:"脚本管理器",script:"脚本",environment:"环境",os:"系统",browser:"浏览器",getId:"获取 %0 id",getTwitterUserId:"获取Twitter用户id(获取id功能仅在设置页面可用)",getYoutubeChannelId:"获取Youtube频道id(获取id功能仅在设置页面可用)",showButton:"显示按钮",hideButton:"隐藏按钮",showLog:"显示日志",hideLog:"隐藏日志",defaultShowButton:"默认显示按钮",defaultShowLog:"默认显示日志",debug:"输出调试日志,不要开启此选项!",receivePreview:"接收预览版更新",position:"组件位置",buttonSideX:"按钮区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",buttonSideY:"按钮区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",buttonDistance:"按钮区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",showButtonSideX:"显示按钮水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",showButtonSideY:"显示按钮垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",showButtonDistance:"显示按钮距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",logSideX:"日志区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",logSideY:"日志区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",logDistance:"日志区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",hotKey:"快捷键",doTaskKey:"做任务快捷键
    (实时预览功能仅在设置页面可用)",undoTaskKey:"撤销任务快捷键
    (实时预览功能仅在设置页面可用)",toggleLogKey:"显示/隐藏日志快捷键
    (实时预览功能仅在设置页面可用)",tasksHistory:"任务历史",clearHistory:"清空历史",clearHistoryFinished:"已清空任务历史!",deleteTask:"删除任务",lastChangeTime:"最后一次修改时间",clearTaskFinished:"删除以下任务完成!",clearTaskFailed:"删除任务失败,没有找到任务名!",syncData:"数据同步",settingData:"正在上传数据...",gettingData:"正在获取数据...",help:"帮助",fileName:"文件名",upload2gist:"同步到Gist",downloadFromGist:"从Gist同步",saveAndTest:"保存配置并测试",testSuccess:"测试成功!",testFailed:"测试失败!",saveAndTestNotice:"请先保存配置并测试!",processingData:"正在处理数据...",updatingData:"正在上传数据...",syncDataSuccess:"同步数据成功!",syncDataFailed:"同步数据失败,请在控制台查看错误信息!",downloadingData:"正在下载数据...",checkedNoData:"没有检测到远程数据,请确认配置是否正确!",savingData:"正在保存数据...",syncHistory:"同步任务历史",checkUpdateFailed:"检测更新失败",newVersionNotice:'检测到新版本V%0, 点此更新',language:"语言
    目前仅支持zh: 中文, en: 英文",gistOptions:"Gist 设置",swalNotice:"检测到您第一次安装V4版本脚本,请前往阅读用前必读内容!",echoNotice:'检测到您第一次安装V4版本脚本,请点此前往阅读用前必读内容!',noticeLink:"https://auto-task-doc.js.org/guide/#用前必读",toGithub:"前往Github反馈",toKeylol:"前往其乐论坛反馈",copySuccess:"错误信息已复制到剪切板,是否前往其乐论坛反馈?",copyFailed:"请复制下方错误信息后前往Keylol论坛反馈!",updateText:"%0 版本更新内容:",Active:"进行中",Ended:"已结束",Banned:"已封禁",Paused:"已暂停",notStart:"未开始",noRemoteData:"检测到远程无数据",errorRemoteDataFormat:"远程数据格式错误",updateHistory:'历史更新记录点此查看',groups:"组",officialGroups:"官方组",wishlists:"愿望单",follows:"游戏关注",forums:"论坛",workshops:"创意工坊收藏",curators:"鉴赏家",workshopVotes:"创意工坊点赞",announcements:"社区通知",steamCommunity:"Steam社区",steamStore:"Steam商店",licenses:"入库免费游戏",playtests:"请求访问权限",needLoginSteamStore:'请先登录Steam商店',needLoginSteamCommunity:'请先登录Steam社区',joiningSteamGroup:"正在加入Steam组",leavingSteamGroup:"正在退出Steam组",gettingSteamGroupId:"正在获取Steam组Id",joiningSteamOfficialGroup:"正在加入Steam官方组",leavingSteamOfficialGroup:"正在退出Steam官方组",gettingSteamOfficialGroupId:"正在获取Steam官方组Id",subscribingForum:"正在订阅Steam论坛",unsubscribingForum:"正在取消订阅Steam论坛",gettingForumId:"正在获取Steam论坛Id",followingCurator:"正在关注Steam鉴赏家",unfollowingCurator:"正在取关Steam鉴赏家",gettingCuratorId:"正在获取Steam鉴赏家Id",addingToWishlist:"正在添加游戏到Steam愿望单",removingFromWishlist:"正在从Steam愿望单移除游戏",followingGame:"正在关注Steam游戏",unfollowingGame:"正在取关Steam游戏",favoritingWorkshop:"正在收藏Steam创意工坊物品",unfavoritingWorkshop:"正在取消收藏Steam创意工坊物品",gettingWorkshopAppId:"正在获取Steam创意工坊物品Id",votingUpWorkshop:"正在点赞Steam创意工坊物品",gettingAnnouncementParams:"正在获取Steam通知信息",likingAnnouncement:"正在点赞Steam通知",changingArea:"正在更换Steam地区: %0...",notNeededChangeArea:"当前地区不需要更换",noAnotherArea:"请检测是否开启正确开启代理",gettingAreaInfo:"正在获取Steam地区信息...",changeAreaNotice:"疑似锁区游戏,尝试换区执行",steamFinishNotice:"Steam任务完成,尝试将购物车地区换回CN",gettingSubid:"正在获取游戏subid",addingFreeLicense:"正在入库",missParams:"缺少参数",gettingLicenses:"正在获取Licenses...",requestingPlayTestAccess:"正在请求访问权限",tryChangeAreaNotice:"此功能无法检测游戏是否限区,因此会尝试换区后再入库,换区失败也不影响后续入库",servers:"服务器",joiningDiscordServer:"正在加入Discord服务器",leavingDiscordServer:"正在退出Discord服务器",gettingDiscordGuild:"正在获取Discord服务器Id",getDiscordAuthFailed:"获取Discord凭证失败,请检测Discord帐号是否已登录",discordImportantNotice:"重要提醒!!!",discordImportantNoticeText:"由于Discord网站后台更新,目前使用此脚本加组后可能会导致Discord帐号被强制退出,且需要两步验证才能正常登录,请谨慎使用!!!",continue:"继续",skipDiscordTask:"跳过Discord任务",continueAndDontRemindAgain:"继续且不再提醒",users:"用户",loginIns:'请先登录Instagram',insBanned:"您的Instagram账户已被封禁",verifyingInsAuth:"正在验证Instagram凭证...",gettingInsUserId:"正在获取Instagram用户Id",followingIns:"正在关注Instagram用户",unfollowingIns:"正在取关Instagram用户",reddits:"社区/用户",loginReddit:'请先登录Reddit',changingRedditVersion:"正在切换Reddit为新版页面...",joiningReddit:"正在加入Reddit社区",leavingReddit:"正在退出Reddit社区",followingRedditUser:"正在关注Reddit用户",unfollowingRedditUser:"正在取关Reddit用户",channels:"频道",followingTwitchChannel:"正在关注Twitch频道",unfollowingTwitchChannel:"正在取关Twitch频道",gettingTwitchChannelId:"正在获取Twitch频道Id",checkingTwitchIntegrity:"正在检查Twitch完整性...",twitterUser:"推特用户",retweets:"转推",gettingTwitterUserId:"正在获取推特用户Id",followingTwitterUser:"正在关注推特用户",unfollowingTwitterUser:"正在取关推特用户",retweetting:"正在转推",unretweetting:"正在撤销转推",names:"组/社区/动态",loginVk:'请先登录Vk',gettingVkId:"正在获取Vk任务Id",joiningVkGroup:"正在加入Vk组",leavingVkGroup:"正在退出Vk组",joiningVkPublic:"正在加入Vk社区",leavingVkPublic:"正在退出Vk社区",sendingVkWall:"正在转发Vk动态",deletingVkWall:"正在撤销转发Vk动态",youtubeChannel:"YouTube频道",likes:"点赞",loginYtb:'请先登录YouTube',tryUpdateYtbAuth:'请尝试更新YouTube凭证',gettingYtbToken:"正在获取YouTube Token...",followingYtbChannel:"正在订阅YouTube频道",unfollowingYtbChannel:"正在退订YouTube频道",likingYtbVideo:"正在点赞YouTube视频",unlikingYtbVideo:"正在取消点赞YouTube视频",giveKeyNoticeBefore:"每次验证间隔15s",giveKeyNoticeAfter:'如果没有key, 请在https://givekey.ru/profile查看',noPoints:"点数不够,跳过抽奖",getNeedPointsFailed:"获取所需点数失败,跳过抽奖",joiningLottery:"正在加入抽奖",doingGleamTask:"正在做Gleam任务...",gettingGleamLink:"正在获取Gleam任务链接...",gleamTaskNotice:"如果此页面长时间未关闭,请完成任一任务后自行关闭!",verifiedGleamTasks:"已尝试验证所有任务,验证失败的任务请尝试手动验证或完成!",gsNotice:'为避免得到"0000-0000-0000"key, 已自动屏蔽"Grab Key"按钮,获取key时请关闭脚本!',giveeClubVerifyNotice:"正在验证任务...",giveeClubVerifyFinished:"请等待验证完成后自行加入赠Key",doingKeyhubTask:"正在做Keyhub任务...",SweepWidgetNotice:"正在处理并验证任务,每次验证任务有1~3s间隔防止触发验证过快警告..."},en:{website:"Website",type:"Type",edit:"Edit",whiteList:"Whitelist",skipTask:"Skip undo task",whiteListOptions:"Whitelist options",changeWhiteListOption:"Whitelist option(%0)",whiteListNotFound:"Cannot find this whitelist: %0",changeWhiteListSuccess:"The whitelist is successfully modified, and the page refresh will take effect!",changeWebsiteOptions:"Website options",changeGlobalOptions:"Global options",ok:"OK",save:"Save",close:"Close",return:"Return",option:"Option",value:"Value",websiteOptions:"Current website settings",changeWebsiteOptionsSuccess:"The current website setting is changed successfully, and the page refresh will take effect!",changeGlobalOptionsSuccess:"The global setting is changed successfully, and the refresh will take effect!",needLogin:"Please log in first!",getTasksInfo:"Obtaining and processing task information...",gettingKey:"Getting Key...",verifyingTask:"Verifying task",notice:"Automatic task script notice",noKeysLeft:"There are no more keys left on this page. Do you want to close it?",giveawayEnded:"This event has ended, do you want to close it?",giveawayNotWork:"This activity is unavailable for some reasons (banned/ended/paused/not started...) (if it is a script misjudgment, please give us feedback in time), is it closed?",confirm:"Confirm",cancel:"Cancel",unKnown:"Unknown",unKnownTaskType:"Unrecognized task",doing:"Doing a task",allTasksComplete:"All tasks have been completed!",getTaskIdFailed:"Failed to obtain task Id!",initSuccess:"%0 was initialized successfully!",initFailed:"%0 initialization failed!",errorLink:"Link error: %0",needInit:"Please initialize first",verifyingAuth:"Verifying %0 token...",updatingAuth:"Update %0 token...",initing:"Initializing...",getFailed:"Failed to get %0!",checkLoginFailed:"Failed to detect login status!",checkLeftKeyFailed:"Failed to detect the remaining keys!",userId:"User Id",joiningGiveaway:"Joining giveaway",needJoinGiveaway:"Need to join the giveaway first",cannotUndo:"This website does not support canceling tasks",verifyAuth:"Verifying %0 token...",closePageNotice:"f this page does not close automatically, please close this page yourself.",errorReport:"A script error is detected, do you want to report the BUG?",visitingLink:"Visiting link: ",doTask:"DoTask",undoTask:"UndoTask",verifyTask:"Verify",getKey:"GetKey",selectAll:"SelectAll",selectNone:"SelectNone",invertSelect:"InvertSelect",doFreeTask:"FreeTask",doPointTask:"PointTask",skipTaskOption:"Skip task has been configured in the settings",other:"Other",globalOptions:"Global Options",checkLogin:"Login detection
    Need to log in to the website automatically log in, part of this website supports.",checkLeftKey:"Key remaining detection
    The end of the giveaway event prompts whether to close or not, part of this website supports.",twitterVerifyId:"Verify Twitter token by trying to follow the account.
    The default is the official Twitter account 783214.
    If you don't want to follow the official account, you can change it to your own account.",youtubeVerifyChannel:"Verify YouTube token by trying to subscribe to the channel.
    The default is the official YouTube channel UCrXUsMBcfTVqwAS7DKg9C0Q.
    If you don't want to follow the official channel, you can change it to your own channel.",autoUpdateSource:"The source to update
    github: Fast update.
    jsdelivr: Update is delayed.
    standby: Standby source.
    auto: Try to update using github, jsdelivr, standby sources in turn.",saveGlobalOptions:"SaveSettings",settingPage:"Setting Page",name:"Name",version:"Version",scriptManager:"Script Manager",script:"Script",environment:"Environment",os:"OS",browser:"Browser",getId:"Get %0 id",getTwitterUserId:"Get Twitter user id (Get id function is only available on the settings page).",getYoutubeChannelId:"Get Youtube channel id (Get id function is only available on the settings page).",showButton:"ShowButton",hideButton:"HideButton",showLog:"ShowLog",hideLog:"HideLog",defaultShowButton:"Default display button",defaultShowLog:"Display log by default",debug:"Output debug log, do not enable this option!",receivePreview:"Receive preview updates",position:"Component position",buttonSideX:"Horizontal positioning of the button area (real-time preview function is only available on the setting page).
    left: left | right: right",buttonSideY:"The button area is positioned in the vertical direction (real-time preview function is only available on the settings page).
    top: top | bottom: bottom",buttonDistance:"The distance between the button area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",showButtonSideX:"ShowButton horizontal positioning (real-time preview function is only available on the setting page).
    left: left | right: right",showButtonSideY:"ShowButton vertical positioning (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",showButtonDistance:"The distance between the ShowButton and the edge (real-time preview function is only available on the setting page).
    Format: X distance, Y distance",logSideX:"Horizontal positioning of the log area (real-time preview function is only available on the setting page).
    left: left | right: right",logSideY:"Vertical positioning of the log area (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",logDistance:"The distance between the log area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",hotKey:"Shortcut key",doTaskKey:"DoTask shortcut keys
    (real-time preview function is only available on the settings page).",undoTaskKey:"UndoTask shortcut keys
    (real-time preview function is only available on the settings page).",toggleLogKey:"ShowLog/HideLog shortcut keys
    (real-time preview function is only available on the settings page).",tasksHistory:"TasksHistory",clearHistory:"Clear history",clearHistoryFinished:"The mission history has been cleared!",deleteTask:"Delete task",lastChangeTime:"Last Change Time",clearTaskFinished:"Delete the following tasks completed!",clearTaskFailed:"Failed to delete the task, the task name was not found!",syncData:"DataSync",settingData:"Uploading data...",gettingData:"Getting data...",help:"Help",fileName:"Filename",upload2gist:"Sync to Gist",downloadFromGist:"Sync from Gist",saveAndTest:"Save configuration and test",testSuccess:"Test success!",testFailed:"Test failed!",saveAndTestNotice:"Please save the configuration and test first!",processingData:"Processing data...",updatingData:"Uploading data...",syncDataSuccess:"Synchronized data successfully!",syncDataFailed:"Failed to synchronize data, please check the error message on the console!",downloadingData:"Downloading data...",checkedNoData:"No remote data is detected, please confirm whether the configuration is correct!",savingData:"Saving data...",syncHistory:"Synchronize tasks history",checkUpdateFailed:"Check update failed",newVersionNotice:'Checked a new version V%0, click to update',language:"Language
    Currently only supports zh: Chinese, en: English",gistOptions:"Gist Settings",swalNotice:"It is detected that you are installing the V4 version script for the first time, please go to read the READ ME FIRST content before use!",echoNotice:'It is detected that you are installing the V4 version script for the first time, please click here to read the READ ME FIRST content before use!',noticeLink:"https://auto-task-doc.js.org/en/guide/#read-me-first",toGithub:"Feedback(Github)",toKeylol:"Feedback(Keylol)",copySuccess:"The error message has been copied to the clipboard. Do you want to go to the Keylol forum to give feedback?",copyFailed:"Please copy the error information below and report back to the Keylol forum!",updateText:"Updates in version %0:",Active:"Active",Ended:"Ended",Banned:"Banned",Paused:"Paused",notStart:"notStart",noRemoteData:"No data remotely",errorRemoteDataFormat:"Remote data has wrong format",updateHistory:'Click here to view the historical update record.',groups:"Group",officialGroups:"Official Group",wishlists:"Wishlist",follows:"Follow Game",forums:"Forum",workshops:"Favorite Workshop",curators:"Curator",workshopVotes:"Voteup Workshop",announcements:"Announcement",steamCommunity:"Steam Community",steamStore:"Steam Store",licenses:"Add License",playtests:"Playtest Access",needLoginSteamStore:'Please log in to the Steam Store',needLoginSteamCommunity:'Please log in to the Steam Community',joiningSteamGroup:"Joining Steam Group",leavingSteamGroup:"Leaving Steam Group",gettingSteamGroupId:"Getting Steam Group Id",joiningSteamOfficialGroup:"Joining Steam Official Group",leavingSteamOfficialGroup:"Leaving Steam Official Group",gettingSteamOfficialGroupId:"Getting Steam Official Group Id",subscribingForum:"Subscribing the Steam Forum",unsubscribingForum:"Unsubscribing the Steam Forum",gettingForumId:"Getting Steam Forum Id",followingCurator:"Following Steam Curator",unfollowingCurator:"Unfollowing Steam Curator",gettingCuratorId:"Getting Steam Curator Id",addingToWishlist:"Adding the game to the Steam wishlist",removingFromWishlist:"Removing the game from the Steam wishlist",followingGame:"Following Steam games",unfollowingGame:"Unfollowing Steam games",favoritingWorkshop:"Favouring Steam Workshop Items",unfavoritingWorkshop:"Unfavoriting Steam Workshop Items",gettingWorkshopAppId:"Getting Steam Workshop Item Id",votingUpWorkshop:"Liking Steam workshop items",gettingAnnouncementParams:"Getting Steam announcement information",likingAnnouncement:"Liking Steam announcement",changingArea:"Changing Steam area: %0...",notNeededChangeArea:"The current area does not need to be changed",noAnotherArea:"Please check whether the proxy is turned on correctly",gettingAreaInfo:"Getting Steam area information...",changeAreaNotice:"Suspected of a locked zone game, try to change the zone to execute",steamFinishNotice:"Steam task completed, try to change the shopping cart area back to CN",gettingSubid:"Getting subid",addingFreeLicense:"Adding free license",missParams:"Missing parameters",gettingLicenses:"Getting licenses...",requestingPlayTestAccess:"Requesting play test access",tryChangeAreaNotice:"This function cannot detect whether the game is limited, so it will try to change the area before entering the library. Failure to change the area will not affect the subsequent storage.",servers:"Server",joiningDiscordServer:"Joining Discord Server",leavingDiscordServer:"Leaving Discord Server",gettingDiscordGuild:"Getting Discord server Id",getDiscordAuthFailed:"Failed to get Discord token, please check whether the Discord account is logged in",discordImportantNotice:"Important Reminder! ! !",discordImportantNoticeText:"Due to the background update of the Discord website, currently using this script to join a group may cause the Discord account to be forcibly logged out, and two-step verification is required to log in normally, please use it with caution! ! !",continue:"Continue",skipDiscordTask:"Skip",continueAndDontRemindAgain:"Continue without Reminders",users:"User",loginIns:'Please log in to Instagram',insBanned:"Your Instagram account has been banned",verifyingInsAuth:"Verifying Instagram token...",gettingInsUserId:"Getting Instagram user Id",followingIns:"Following Instagram user",unfollowingIns:"Unfollowing Instagram user",reddits:"Reddit/User",loginReddit:'Please log in to Reddit',changingRedditVersion:"Switching Reddit to a new version page...",joiningReddit:"Joining the Reddit",leavingReddit:"Leaving the Reddit",followingRedditUser:"Following Reddit User",unfollowingRedditUser:"Unfollowing Reddit User",channels:"Channel",followingTwitchChannel:"Following Twitch Channel",unfollowingTwitchChannel:"Unfollowing Twitch Channel",gettingTwitchChannelId:"Getting Twitch Channel Id",checkingTwitchIntegrity:"Checking Twitch integrity...",twitterUser:"Twitter User",retweets:"Retweet",gettingTwitterUserId:"Getting Twitter User Id",followingTwitterUser:"Following Twitter User",unfollowingTwitterUser:"Unfollowing Twitter User",retweetting:"Retweetting",unretweetting:"Unretweetting",names:"Group/Public/Wall",loginVk:'Please log in to Vk',gettingVkId:"Getting Vk task Id",joiningVkGroup:"Joining Vk Group",leavingVkGroup:"Leaving Vk Group",joiningVkPublic:"Joining Vk Public",leavingVkPublic:"Leaving Vk Public",sendingVkWall:"Sending Vk Wall",deletingVkWall:"Deleting Vk Wall",youtubeChannel:"YouTube Channel",likes:"Like",loginYtb:'Please log in to YouTube',tryUpdateYtbAuth:'Please try to update YouTube token',gettingYtbToken:"Getting YouTube Token...",followingYtbChannel:"Subscribing to YouTube channel",unfollowingYtbChannel:"Unsubscribing to YouTube channel",likingYtbVideo:"Liking YouTube video",unlikingYtbVideo:"Unliking YouTube video",giveKeyNoticeBefore:"Each verification interval is 15s",giveKeyNoticeAfter:'If there is no key, please check at https://givekey.ru/profile',noPoints:"Not enough points, skip the lottery",getNeedPointsFailed:"ailed to obtain the required points, skip the lottery",joiningLottery:"Joining the lottery",doingGleamTask:"Doing Gleam Task...",gettingGleamLink:"Getting Gleam task link...",gleamTaskNotice:"If this page has not been closed for a long time, please close it yourself after completing any task!",verifiedGleamTasks:"Attempted to verify all tasks. If the verification fails, please try to verify manually or complete it!",gsNotice:'In order to avoid getting the "0000-0000-0000" key, the "Grab Key" button has been hidden, please close the script when obtaining the key!',giveeClubVerifyNotice:"Verifying task...",giveeClubVerifyFinished:"Wait for the verification to complete and join it by yourself",doingKeyhubTask:"Doing Keyhub Task...",SweepWidgetNotice:"The task is being processed and verified. There is an interval of 1~3s for each verification task to prevent the triggering of too fast verification warning..."}},h=["zh","en"].includes(N.other.language)?N.other.language:"en";const K=function(t){for(var e,s=arguments.length,i=new Array(1i[parseInt(e,10)]):t};function R(s,i){window.TRACE&&console.trace("%cAuto-Task[Debug]:","color:blue"),p().fire({title:K("errorReport"),icon:"error",showCancelButton:!0,confirmButtonText:K("toGithub"),showDenyButton:!0,denyButtonText:K("toKeylol"),cancelButtonText:K("close")}).then(t=>{var{isDenied:e,isConfirmed:t}=t;t?window.open(`https://github.com/HCLonely/auto-task-v4/issues/new?title=${encodeURIComponent("[BUG] 脚本报错: "+i)}&labels=bug&template=bug_report.yml&website=${encodeURIComponent(window.location.href)}&browser=${encodeURIComponent(JSON.stringify((0,a.ua)(),null,4))}&manager=${encodeURIComponent(GM_info.scriptHandler+" "+GM_info.version)}&user-script=${encodeURIComponent(GM_info.script.version)}&logs=${encodeURIComponent(s.stack||"null")}&run-logs=`+encodeURIComponent($.makeArray($("#auto-task-info>li")).map(t=>t.innerText).join("\n")),"_blank"):e&&(e=`错误链接: [url=${window.location.href}]${window.location.href}[/url] +!function(){var s={588:function(t,e){!function(t){"use strict";var i=function(){return(i=Object.assign||function(t){for(var e,s=1,i=arguments.length;s[a-z\d]+)(\/|\s)(?(\d+\.)+\d+)/i))||void 0===e?void 0:e.groups)&&void 0!==s?s:{},o=a.name,r=a.version,l={},c=0,u=Object.entries(this.browserNameMap);c(.*)=.+)/.exec(decodeURIComponent(t)))||void 0===t?void 0:t.groups;if(!t)return{};for(var e=t.params.split("&"),i={},s=0;s=e?t:""+Array(e+1-i.length).join(s)+t},e={s:a,z:function(t){var e=-t.utcOffset(),s=Math.abs(e),i=Math.floor(s/60),n=s%60;return(e<=0?"+":"-")+a(i,2,"0")+":"+a(n,2,"0")},m:function t(e,s){if(e.date(){s.dataType&&(s.responseType=s.dataType);var t={timeout:3e4,ontimeout(t){e({result:"Error",statusText:"Timeout",status:601,data:t,options:s})},onabort(t){e({result:"Error",statusText:"Aborted",status:602,data:t,options:s})},onerror(t){e({result:"Error",statusText:"Error",status:603,data:t,options:s})},onload(t){e({result:"Success",statusText:"Load",status:600,data:t,options:s})},...s};GM_xmlhttpRequest(t)});return window.DEBUG&&console.log("%cAuto-Task[httpRequest]:","color:blue",JSON.stringify(e)),600!==e.status&&t<2?await i(s,t+1):e}catch(t){return console.log("%cAuto-Task[httpRequest]:","color:red",JSON.stringify({errorMsg:t,options:s})),R(t,"httpRequest"),{result:"JsError",statusText:"Error",status:604,error:t,options:s}}}const L=i;function P(){let e=0{setTimeout(()=>{t(!0)},e)})}const V=t=>{let{type:e,text:s,html:i,id:n}=t;const a={success:()=>a,error:()=>a,warning:()=>a,info:()=>a,view:()=>a};try{var o;let t;if(e)switch(e){case"joiningSteamGroup":case"leavingSteamGroup":case"gettingSteamGroupId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"joiningSteamOfficialGroup":case"leavingSteamOfficialGroup":case"gettingSteamOfficialGroupId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"subscribingForum":case"unsubscribingForum":case"gettingForumId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"followingCurator":case"unfollowingCurator":case"gettingCuratorId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"addingToWishlist":case"removingFromWishlist":case"followingGame":case"unfollowingGame":case"gettingSubid":case"addingFreeLicense":case"requestingPlayTestAccess":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"addingFreeLicenseSubid":t=$(`
  • ${K("addingFreeLicense")}[${s}]...
  • `);break;case"favoritingWorkshop":case"unfavoritingWorkshop":case"gettingWorkshopAppId":case"votingUpWorkshop":t=$(`
  • ${K(e)}[ + ${s}]...
  • `);break;case"gettingAnnouncementParams":case"likingAnnouncement":t=$(`
  • ${K(e)}[ + ${n}]...
  • `);break;case"joiningDiscordServer":case"gettingDiscordGuild":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"leavingDiscordServer":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"updateDiscordAuth":t=$(`
  • ${K("updateDiscordAuth")}
  • `);break;case"followingTwitchChannel":case"unfollowingTwitchChannel":case"gettingTwitchChannelId":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"gettingInsUserId":case"followingIns":case"unfollowingIns":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"gettingTwitterUserId":case"followingTwitterUser":case"unfollowingTwitterUser":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"retweetting":case"unretweetting":t=$(`
  • ${K(e)}${s}...
  • `);break;case"joiningReddit":case"leavingReddit":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"followingRedditUser":case"unfollowingRedditUser":t=$(`
  • ${K(e)}[ + ${null===s||void 0===s?void 0:s.replace("u_","")}]...
  • `);break;case"followingYtbChannel":case"unfollowingYtbChannel":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"likingYtbVideo":case"unlikingYtbVideo":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"gettingVkId":case"joiningVkGroup":case"leavingVkGroup":case"joiningVkPublic":case"leavingVkPublic":case"sendingVkWall":case"deletingVkWall":t=$(`
  • ${K(e)}[${s}]...
  • `);break;case"visitingLink":t=$(`
  • ${K("visitingLink")}[${s}]...
  • `);break;case"verifyingInsAuth":case"text":t=$(`
  • ${K(s)}
  • `);break;case"html":t=$(s||i);break;case"whiteList":t=$(`
  • ${K("skipTask")}[${s}(${n})](${K("whiteList")})
  • `);break;case"globalOptionsSkip":t=$(`
  • ${K("skipTaskOption")}${s}
  • `);break;default:t=$(`
  • ${K("unKnown")}:${e}(${s})...
  • `)}else t=s?$(`
  • ${K(s)}
  • `):i?$(i):$("
  • ");return t.addClass("card-text"),$("#auto-task-info").append(t),null!==(o=t[0])&&void 0!==o&&o.scrollIntoView(),{font:t.find("font"),success(){var t,e,s=0{try{return[...new Set(t)]}catch(t){return R(t,"unique"),[]}},u=async e=>{try{if(!e)return null;const s=GM_getValue("redirectLinks")||{};return s[e]&&s[e],await L({url:e,method:"GET"}).then(t=>{t=t.data;return null!=t&&t.finalUrl?(s[e]=t.finalUrl,GM_setValue("redirectLinks",s),t.finalUrl):null})}catch(t){return R(t,"getRedirectLink"),null}},a=async(t,e)=>{try{const i=V({type:"visitLink",text:t});return await L({url:t,method:"GET",...e}).then(t=>{var{result:e,statusText:s,status:t}=t;return"Success"===e?(i.success(),!0):(i.error(e+`:${s}(${t})`),!1)})}catch(t){return R(t,"visitLink"),!1}};const l=i=>{try{let e=0;for(let t=0;t>8*t&255;s+=("00"+n.toString(16)).slice(-2)}return s}catch(t){return R(t,"stringToColour"),"#fff"}},o={doTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0,workshopVotes:!0,announcements:!0,licenses:!0,playtests:!0}},undoTask:{discord:{servers:!0},instagram:{users:!0},twitch:{channels:!0},twitter:{users:!0,retweets:!0},vk:{names:!0},youtube:{channels:!0,likes:!0},reddit:{reddits:!0},steam:{groups:!0,officialGroups:!0,wishlists:!0,follows:!0,forums:!0,workshops:!0,curators:!0}},position:{buttonSideX:"right",buttonSideY:"top",buttonDistance:"15,30",showButtonSideX:"right",showButtonSideY:"top",showButtonDistance:"15,30",logSideX:"right",logSideY:"bottom",logDistance:"10,10"},hotKey:{doTaskKey:"alt + d",undoTaskKey:"alt + u",toggleLogKey:"alt + l"},other:{twitterVerifyId:"783214",youtubeVerifyChannel:"UCrXUsMBcfTVqwAS7DKg9C0Q",autoUpdateSource:"jsdelivr",language:"zh",checkLogin:!0,checkLeftKey:!0,defaultShowButton:!0,defaultShowLog:!0,debug:!1,receivePreview:!0}};var s=GM_getValue("globalOptions")||{};const r=(t,e)=>{try{const n={};for(var[s,i]of Object.entries(t))"[object Object]"===Object.prototype.toString.call(i)&&"[object Object]"===Object.prototype.toString.call(e[s])?n[s]=r(i,e[s]):n[s]=e[s]??i;return n}catch(t){return R(t,"assignObject"),o}},N=r(o,s),c=()=>{try{const i={};$("#globalOptionsForm").serializeArray().map(t=>(i[t.name]=t.value,t)),$.makeArray($("#globalOptionsForm input")).map(t=>{const e=$(t).attr("name");var s=e.split(".");return 3===s.length?N[s[0]][s[1]][s[2]]=!!i[e]&&("on"===i[e]||i[e]):2===s.length&&(N[s[0]][s[1]]=!!i[e]&&("on"===i[e]||i[e])),t}),GM_setValue("globalOptions",N),p().fire({title:K("changeGlobalOptionsSuccess"),icon:"success"})}catch(t){R(t,"saveData")}},w=e=>{try{let t=`
    + `;for(const[o,r]of Object.entries(N))for(var[s,i]of Object.entries(r))if(["other","position","hotKey"].includes(o))"boolean"==typeof i?t+=`${0===Object.keys(r).indexOf(s)?``:""}`:t+=`${0===Object.keys(r).indexOf(s)?``:""}`;else for(var[n,a]of Object.entries(i))t+=`${0===Object.keys(r).indexOf(s)?``:""}`;t+="
    ${K("type")}${K("option")}${K("value")}
    ${K(o)}${K(s)}
    ${K(o)}${K(s)}
    ${K(o)}${s}.${K(n)}
    ","swal"===e?p().fire({title:K("globalOptions"),html:t,showConfirmButton:!0,confirmButtonText:K("save"),showCancelButton:!0,cancelButtonText:K("close")}).then(t=>{t=t.isConfirmed;t&&c()}):$("body").append(`

    ${K("globalOptions")}

    `+t)}catch(t){R(t,"changeGlobalOptions")}};const d={zh:{website:"网站",type:"类型",edit:"编辑",whiteList:"白名单",skipTask:"跳过撤销任务",whiteListOptions:"白名单设置",changeWhiteListOption:"设置白名单(%0)",whiteListNotFound:"找不到此项白名单: %0",changeWhiteListSuccess:"白名单修改成功,刷新生效!",changeWebsiteOptions:"网站设置",changeGlobalOptions:"全局设置",ok:"是",save:"保存",close:"关闭",return:"返回",option:"选项",value:"值",websiteOptions:"当前网站设置",changeWebsiteOptionsSuccess:"更改当前网站设置成功,刷新生效!",changeGlobalOptionsSuccess:"更改全局设置成功,刷新生效!",needLogin:"请先登录!",getTasksInfo:"正在获取并处理任务信息...",gettingKey:"正在获取Key...",verifyingTask:"正在验证任务",notice:"自动任务脚本提醒",noKeysLeft:"此页面已经没有剩余key了,是否关闭?",giveawayEnded:"此活动已结束,是否关闭?",giveawayNotWork:"此活动因某些原因(已结束/暂停/未开始...)不可用(如果是脚本误判请及时反馈),是否关闭?",confirm:"确定",cancel:"取消",unKnown:"未知",unKnownTaskType:"未识别的任务",doing:"正在做任务",allTasksComplete:"所有任务已完成!",getTaskIdFailed:"获取任务Id失败!",initSuccess:"%0 初始化成功!",initFailed:"%0 初始化失败!",errorLink:"链接错误: %0",needInit:"请先初始化",verifyingAuth:"正在验证%0凭证...",updatingAuth:"正在更新%0凭证...",initing:"正在初始化...",getFailed:"获取%0失败!",checkLoginFailed:"检测登录状态失败!",checkLeftKeyFailed:"检测剩余Key失败!",userId:"用户Id",joiningGiveaway:"正在加入赠Key",needJoinGiveaway:"需要先加入赠Key",cannotUndo:"此网站不支持取消任务",verifyAuth:"正在验证 %0 凭证...",closePageNotice:"如果此页面没有自动关闭,请自行关闭本页面。",errorReport:"检测到脚本报错,是否前往反馈BUG?",visitingLink:"正在访问链接: ",doTask:"做任务",undoTask:"撤销任务",verifyTask:"验证任务",getKey:"获取Key",selectAll:"全选",selectNone:"全不选",invertSelect:"反选",doFreeTask:"加入免费赠品",doPointTask:"加入点数赠品",skipTaskOption:"设置中已配置跳过任务",other:"其他",globalOptions:"全局设置",checkLogin:"登录检测
    需要登录的网站自动登录,部分本网站支持",checkLeftKey:"剩余Key检测
    赠Key活动结束提示是否关闭,部分本网站支持",twitterVerifyId:"通过尝试关注该账号验证Twitter凭证
    默认为Twitter官方帐号 783214
    不想关注官方账号可以改为自己的帐号",youtubeVerifyChannel:"通过尝试订阅该频道验证YouTube凭证
    默认为YouTube官方频道 UCrXUsMBcfTVqwAS7DKg9C0Q
    不想关注官方频道可以改为自己的频道",autoUpdateSource:"更新源
    github: 需代理,实时更新
    jsdelivr: 可不用代理,更新有延迟
    standby: 备用
    auto: 依次使用github, jsdelivr, standby源进行尝试更新",saveGlobalOptions:"保存全局设置",settingPage:"设置页面",name:"名称",version:"版本",scriptManager:"脚本管理器",script:"脚本",environment:"环境",os:"系统",browser:"浏览器",getId:"获取 %0 id",getTwitterUserId:"获取Twitter用户id(获取id功能仅在设置页面可用)",getYoutubeChannelId:"获取Youtube频道id(获取id功能仅在设置页面可用)",showButton:"显示按钮",hideButton:"隐藏按钮",showLog:"显示日志",hideLog:"隐藏日志",defaultShowButton:"默认显示按钮",defaultShowLog:"默认显示日志",debug:"输出调试日志,不要开启此选项!",receivePreview:"接收预览版更新",position:"组件位置",buttonSideX:"按钮区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",buttonSideY:"按钮区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",buttonDistance:"按钮区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",showButtonSideX:"显示按钮水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",showButtonSideY:"显示按钮垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",showButtonDistance:"显示按钮距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",logSideX:"日志区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右",logSideY:"日志区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下",logDistance:"日志区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离",hotKey:"快捷键",doTaskKey:"做任务快捷键
    (实时预览功能仅在设置页面可用)",undoTaskKey:"撤销任务快捷键
    (实时预览功能仅在设置页面可用)",toggleLogKey:"显示/隐藏日志快捷键
    (实时预览功能仅在设置页面可用)",tasksHistory:"任务历史",clearHistory:"清空历史",clearHistoryFinished:"已清空任务历史!",deleteTask:"删除任务",lastChangeTime:"最后一次修改时间",clearTaskFinished:"删除以下任务完成!",clearTaskFailed:"删除任务失败,没有找到任务名!",syncData:"数据同步",settingData:"正在上传数据...",gettingData:"正在获取数据...",help:"帮助",fileName:"文件名",upload2gist:"同步到Gist",downloadFromGist:"从Gist同步",saveAndTest:"保存配置并测试",testSuccess:"测试成功!",testFailed:"测试失败!",saveAndTestNotice:"请先保存配置并测试!",processingData:"正在处理数据...",updatingData:"正在上传数据...",syncDataSuccess:"同步数据成功!",syncDataFailed:"同步数据失败,请在控制台查看错误信息!",downloadingData:"正在下载数据...",checkedNoData:"没有检测到远程数据,请确认配置是否正确!",savingData:"正在保存数据...",syncHistory:"同步任务历史",checkUpdateFailed:"检测更新失败",newVersionNotice:'检测到新版本V%0, 点此更新',language:"语言
    目前仅支持zh: 中文, en: 英文",gistOptions:"Gist 设置",swalNotice:"检测到您第一次安装V4版本脚本,请前往阅读用前必读内容!",echoNotice:'检测到您第一次安装V4版本脚本,请点此前往阅读用前必读内容!',noticeLink:"https://auto-task-doc.js.org/guide/#用前必读",toGithub:"前往Github反馈",toKeylol:"前往其乐论坛反馈",copySuccess:"错误信息已复制到剪切板,是否前往其乐论坛反馈?",copyFailed:"请复制下方错误信息后前往Keylol论坛反馈!",updateText:"%0 版本更新内容:",Active:"进行中",Ended:"已结束",Banned:"已封禁",Paused:"已暂停",notStart:"未开始",noRemoteData:"检测到远程无数据",errorRemoteDataFormat:"远程数据格式错误",updateHistory:'历史更新记录点此查看',groups:"组",officialGroups:"官方组",wishlists:"愿望单",follows:"游戏关注",forums:"论坛",workshops:"创意工坊收藏",curators:"鉴赏家",workshopVotes:"创意工坊点赞",announcements:"社区通知",steamCommunity:"Steam社区",steamStore:"Steam商店",licenses:"入库免费游戏",playtests:"请求访问权限",needLoginSteamStore:'请先登录Steam商店',needLoginSteamCommunity:'请先登录Steam社区',joiningSteamGroup:"正在加入Steam组",leavingSteamGroup:"正在退出Steam组",gettingSteamGroupId:"正在获取Steam组Id",joiningSteamOfficialGroup:"正在加入Steam官方组",leavingSteamOfficialGroup:"正在退出Steam官方组",gettingSteamOfficialGroupId:"正在获取Steam官方组Id",subscribingForum:"正在订阅Steam论坛",unsubscribingForum:"正在取消订阅Steam论坛",gettingForumId:"正在获取Steam论坛Id",followingCurator:"正在关注Steam鉴赏家",unfollowingCurator:"正在取关Steam鉴赏家",gettingCuratorId:"正在获取Steam鉴赏家Id",addingToWishlist:"正在添加游戏到Steam愿望单",removingFromWishlist:"正在从Steam愿望单移除游戏",followingGame:"正在关注Steam游戏",unfollowingGame:"正在取关Steam游戏",favoritingWorkshop:"正在收藏Steam创意工坊物品",unfavoritingWorkshop:"正在取消收藏Steam创意工坊物品",gettingWorkshopAppId:"正在获取Steam创意工坊物品Id",votingUpWorkshop:"正在点赞Steam创意工坊物品",gettingAnnouncementParams:"正在获取Steam通知信息",likingAnnouncement:"正在点赞Steam通知",changingArea:"正在更换Steam地区: %0...",notNeededChangeArea:"当前地区不需要更换",noAnotherArea:"请检测是否开启正确开启代理",gettingAreaInfo:"正在获取Steam地区信息...",changeAreaNotice:"疑似锁区游戏,尝试换区执行",steamFinishNotice:"Steam任务完成,尝试将购物车地区换回CN",gettingSubid:"正在获取游戏subid",addingFreeLicense:"正在入库",missParams:"缺少参数",gettingLicenses:"正在获取Licenses...",requestingPlayTestAccess:"正在请求访问权限",tryChangeAreaNotice:"此功能无法检测游戏是否限区,因此会尝试换区后再入库,换区失败也不影响后续入库",servers:"服务器",joiningDiscordServer:"正在加入Discord服务器",leavingDiscordServer:"正在退出Discord服务器",gettingDiscordGuild:"正在获取Discord服务器Id",getDiscordAuthFailed:"获取Discord凭证失败,请检测Discord帐号是否已登录",discordImportantNotice:"重要提醒!!!",discordImportantNoticeText:"由于Discord网站后台更新,目前使用此脚本加组后可能会导致Discord帐号被强制退出,且需要两步验证才能正常登录,请谨慎使用!!!",continue:"继续",skipDiscordTask:"跳过Discord任务",continueAndDontRemindAgain:"继续且不再提醒",users:"用户",loginIns:'请先登录Instagram',insBanned:"您的Instagram账户已被封禁",verifyingInsAuth:"正在验证Instagram凭证...",gettingInsUserId:"正在获取Instagram用户Id",followingIns:"正在关注Instagram用户",unfollowingIns:"正在取关Instagram用户",reddits:"社区/用户",loginReddit:'请先登录Reddit',changingRedditVersion:"正在切换Reddit为新版页面...",joiningReddit:"正在加入Reddit社区",leavingReddit:"正在退出Reddit社区",followingRedditUser:"正在关注Reddit用户",unfollowingRedditUser:"正在取关Reddit用户",channels:"频道",followingTwitchChannel:"正在关注Twitch频道",unfollowingTwitchChannel:"正在取关Twitch频道",gettingTwitchChannelId:"正在获取Twitch频道Id",checkingTwitchIntegrity:"正在检查Twitch完整性...",twitterUser:"推特用户",retweets:"转推",gettingTwitterUserId:"正在获取推特用户Id",followingTwitterUser:"正在关注推特用户",unfollowingTwitterUser:"正在取关推特用户",retweetting:"正在转推",unretweetting:"正在撤销转推",names:"组/社区/动态",loginVk:'请先登录Vk',gettingVkId:"正在获取Vk任务Id",joiningVkGroup:"正在加入Vk组",leavingVkGroup:"正在退出Vk组",joiningVkPublic:"正在加入Vk社区",leavingVkPublic:"正在退出Vk社区",sendingVkWall:"正在转发Vk动态",deletingVkWall:"正在撤销转发Vk动态",youtubeChannel:"YouTube频道",likes:"点赞",loginYtb:'请先登录YouTube',tryUpdateYtbAuth:'请尝试更新YouTube凭证',gettingYtbToken:"正在获取YouTube Token...",followingYtbChannel:"正在订阅YouTube频道",unfollowingYtbChannel:"正在退订YouTube频道",likingYtbVideo:"正在点赞YouTube视频",unlikingYtbVideo:"正在取消点赞YouTube视频",giveKeyNoticeBefore:"每次验证间隔15s",giveKeyNoticeAfter:'如果没有key, 请在https://givekey.ru/profile查看',noPoints:"点数不够,跳过抽奖",getNeedPointsFailed:"获取所需点数失败,跳过抽奖",joiningLottery:"正在加入抽奖",doingGleamTask:"正在做Gleam任务...",gettingGleamLink:"正在获取Gleam任务链接...",gleamTaskNotice:"如果此页面长时间未关闭,请完成任一任务后自行关闭!",verifiedGleamTasks:"已尝试验证所有任务,验证失败的任务请尝试手动验证或完成!",gsNotice:'为避免得到"0000-0000-0000"key, 已自动屏蔽"Grab Key"按钮,获取key时请关闭脚本!',giveeClubVerifyNotice:"正在验证任务...",giveeClubVerifyFinished:"请等待验证完成后自行加入赠Key",doingKeyhubTask:"正在做Keyhub任务...",SweepWidgetNotice:"正在处理并验证任务,每次验证任务有1~3s间隔防止触发验证过快警告..."},en:{website:"Website",type:"Type",edit:"Edit",whiteList:"Whitelist",skipTask:"Skip undo task",whiteListOptions:"Whitelist options",changeWhiteListOption:"Whitelist option(%0)",whiteListNotFound:"Cannot find this whitelist: %0",changeWhiteListSuccess:"The whitelist is successfully modified, and the page refresh will take effect!",changeWebsiteOptions:"Website options",changeGlobalOptions:"Global options",ok:"OK",save:"Save",close:"Close",return:"Return",option:"Option",value:"Value",websiteOptions:"Current website settings",changeWebsiteOptionsSuccess:"The current website setting is changed successfully, and the page refresh will take effect!",changeGlobalOptionsSuccess:"The global setting is changed successfully, and the refresh will take effect!",needLogin:"Please log in first!",getTasksInfo:"Obtaining and processing task information...",gettingKey:"Getting Key...",verifyingTask:"Verifying task",notice:"Automatic task script notice",noKeysLeft:"There are no more keys left on this page. Do you want to close it?",giveawayEnded:"This event has ended, do you want to close it?",giveawayNotWork:"This activity is unavailable for some reasons (banned/ended/paused/not started...) (if it is a script misjudgment, please give us feedback in time), is it closed?",confirm:"Confirm",cancel:"Cancel",unKnown:"Unknown",unKnownTaskType:"Unrecognized task",doing:"Doing a task",allTasksComplete:"All tasks have been completed!",getTaskIdFailed:"Failed to obtain task Id!",initSuccess:"%0 was initialized successfully!",initFailed:"%0 initialization failed!",errorLink:"Link error: %0",needInit:"Please initialize first",verifyingAuth:"Verifying %0 token...",updatingAuth:"Update %0 token...",initing:"Initializing...",getFailed:"Failed to get %0!",checkLoginFailed:"Failed to detect login status!",checkLeftKeyFailed:"Failed to detect the remaining keys!",userId:"User Id",joiningGiveaway:"Joining giveaway",needJoinGiveaway:"Need to join the giveaway first",cannotUndo:"This website does not support canceling tasks",verifyAuth:"Verifying %0 token...",closePageNotice:"f this page does not close automatically, please close this page yourself.",errorReport:"A script error is detected, do you want to report the BUG?",visitingLink:"Visiting link: ",doTask:"DoTask",undoTask:"UndoTask",verifyTask:"Verify",getKey:"GetKey",selectAll:"SelectAll",selectNone:"SelectNone",invertSelect:"InvertSelect",doFreeTask:"FreeTask",doPointTask:"PointTask",skipTaskOption:"Skip task has been configured in the settings",other:"Other",globalOptions:"Global Options",checkLogin:"Login detection
    Need to log in to the website automatically log in, part of this website supports.",checkLeftKey:"Key remaining detection
    The end of the giveaway event prompts whether to close or not, part of this website supports.",twitterVerifyId:"Verify Twitter token by trying to follow the account.
    The default is the official Twitter account 783214.
    If you don't want to follow the official account, you can change it to your own account.",youtubeVerifyChannel:"Verify YouTube token by trying to subscribe to the channel.
    The default is the official YouTube channel UCrXUsMBcfTVqwAS7DKg9C0Q.
    If you don't want to follow the official channel, you can change it to your own channel.",autoUpdateSource:"The source to update
    github: Fast update.
    jsdelivr: Update is delayed.
    standby: Standby source.
    auto: Try to update using github, jsdelivr, standby sources in turn.",saveGlobalOptions:"SaveSettings",settingPage:"Setting Page",name:"Name",version:"Version",scriptManager:"Script Manager",script:"Script",environment:"Environment",os:"OS",browser:"Browser",getId:"Get %0 id",getTwitterUserId:"Get Twitter user id (Get id function is only available on the settings page).",getYoutubeChannelId:"Get Youtube channel id (Get id function is only available on the settings page).",showButton:"ShowButton",hideButton:"HideButton",showLog:"ShowLog",hideLog:"HideLog",defaultShowButton:"Default display button",defaultShowLog:"Display log by default",debug:"Output debug log, do not enable this option!",receivePreview:"Receive preview updates",position:"Component position",buttonSideX:"Horizontal positioning of the button area (real-time preview function is only available on the setting page).
    left: left | right: right",buttonSideY:"The button area is positioned in the vertical direction (real-time preview function is only available on the settings page).
    top: top | bottom: bottom",buttonDistance:"The distance between the button area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",showButtonSideX:"ShowButton horizontal positioning (real-time preview function is only available on the setting page).
    left: left | right: right",showButtonSideY:"ShowButton vertical positioning (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",showButtonDistance:"The distance between the ShowButton and the edge (real-time preview function is only available on the setting page).
    Format: X distance, Y distance",logSideX:"Horizontal positioning of the log area (real-time preview function is only available on the setting page).
    left: left | right: right",logSideY:"Vertical positioning of the log area (real-time preview function is only available on the setting page).
    top: top | bottom: bottom",logDistance:"The distance between the log area and the edge (the real-time preview function is only available on the setting page).
    Format: X distance, Y distance",hotKey:"Shortcut key",doTaskKey:"DoTask shortcut keys
    (real-time preview function is only available on the settings page).",undoTaskKey:"UndoTask shortcut keys
    (real-time preview function is only available on the settings page).",toggleLogKey:"ShowLog/HideLog shortcut keys
    (real-time preview function is only available on the settings page).",tasksHistory:"TasksHistory",clearHistory:"Clear history",clearHistoryFinished:"The mission history has been cleared!",deleteTask:"Delete task",lastChangeTime:"Last Change Time",clearTaskFinished:"Delete the following tasks completed!",clearTaskFailed:"Failed to delete the task, the task name was not found!",syncData:"DataSync",settingData:"Uploading data...",gettingData:"Getting data...",help:"Help",fileName:"Filename",upload2gist:"Sync to Gist",downloadFromGist:"Sync from Gist",saveAndTest:"Save configuration and test",testSuccess:"Test success!",testFailed:"Test failed!",saveAndTestNotice:"Please save the configuration and test first!",processingData:"Processing data...",updatingData:"Uploading data...",syncDataSuccess:"Synchronized data successfully!",syncDataFailed:"Failed to synchronize data, please check the error message on the console!",downloadingData:"Downloading data...",checkedNoData:"No remote data is detected, please confirm whether the configuration is correct!",savingData:"Saving data...",syncHistory:"Synchronize tasks history",checkUpdateFailed:"Check update failed",newVersionNotice:'Checked a new version V%0, click to update',language:"Language
    Currently only supports zh: Chinese, en: English",gistOptions:"Gist Settings",swalNotice:"It is detected that you are installing the V4 version script for the first time, please go to read the READ ME FIRST content before use!",echoNotice:'It is detected that you are installing the V4 version script for the first time, please click here to read the READ ME FIRST content before use!',noticeLink:"https://auto-task-doc.js.org/en/guide/#read-me-first",toGithub:"Feedback(Github)",toKeylol:"Feedback(Keylol)",copySuccess:"The error message has been copied to the clipboard. Do you want to go to the Keylol forum to give feedback?",copyFailed:"Please copy the error information below and report back to the Keylol forum!",updateText:"Updates in version %0:",Active:"Active",Ended:"Ended",Banned:"Banned",Paused:"Paused",notStart:"notStart",noRemoteData:"No data remotely",errorRemoteDataFormat:"Remote data has wrong format",updateHistory:'Click here to view the historical update record.',groups:"Group",officialGroups:"Official Group",wishlists:"Wishlist",follows:"Follow Game",forums:"Forum",workshops:"Favorite Workshop",curators:"Curator",workshopVotes:"Voteup Workshop",announcements:"Announcement",steamCommunity:"Steam Community",steamStore:"Steam Store",licenses:"Add License",playtests:"Playtest Access",needLoginSteamStore:'Please log in to the Steam Store',needLoginSteamCommunity:'Please log in to the Steam Community',joiningSteamGroup:"Joining Steam Group",leavingSteamGroup:"Leaving Steam Group",gettingSteamGroupId:"Getting Steam Group Id",joiningSteamOfficialGroup:"Joining Steam Official Group",leavingSteamOfficialGroup:"Leaving Steam Official Group",gettingSteamOfficialGroupId:"Getting Steam Official Group Id",subscribingForum:"Subscribing the Steam Forum",unsubscribingForum:"Unsubscribing the Steam Forum",gettingForumId:"Getting Steam Forum Id",followingCurator:"Following Steam Curator",unfollowingCurator:"Unfollowing Steam Curator",gettingCuratorId:"Getting Steam Curator Id",addingToWishlist:"Adding the game to the Steam wishlist",removingFromWishlist:"Removing the game from the Steam wishlist",followingGame:"Following Steam games",unfollowingGame:"Unfollowing Steam games",favoritingWorkshop:"Favouring Steam Workshop Items",unfavoritingWorkshop:"Unfavoriting Steam Workshop Items",gettingWorkshopAppId:"Getting Steam Workshop Item Id",votingUpWorkshop:"Liking Steam workshop items",gettingAnnouncementParams:"Getting Steam announcement information",likingAnnouncement:"Liking Steam announcement",changingArea:"Changing Steam area: %0...",notNeededChangeArea:"The current area does not need to be changed",noAnotherArea:"Please check whether the proxy is turned on correctly",gettingAreaInfo:"Getting Steam area information...",changeAreaNotice:"Suspected of a locked zone game, try to change the zone to execute",steamFinishNotice:"Steam task completed, try to change the shopping cart area back to CN",gettingSubid:"Getting subid",addingFreeLicense:"Adding free license",missParams:"Missing parameters",gettingLicenses:"Getting licenses...",requestingPlayTestAccess:"Requesting play test access",tryChangeAreaNotice:"This function cannot detect whether the game is limited, so it will try to change the area before entering the library. Failure to change the area will not affect the subsequent storage.",servers:"Server",joiningDiscordServer:"Joining Discord Server",leavingDiscordServer:"Leaving Discord Server",gettingDiscordGuild:"Getting Discord server Id",getDiscordAuthFailed:"Failed to get Discord token, please check whether the Discord account is logged in",discordImportantNotice:"Important Reminder! ! !",discordImportantNoticeText:"Due to the background update of the Discord website, currently using this script to join a group may cause the Discord account to be forcibly logged out, and two-step verification is required to log in normally, please use it with caution! ! !",continue:"Continue",skipDiscordTask:"Skip",continueAndDontRemindAgain:"Continue without Reminders",users:"User",loginIns:'Please log in to Instagram',insBanned:"Your Instagram account has been banned",verifyingInsAuth:"Verifying Instagram token...",gettingInsUserId:"Getting Instagram user Id",followingIns:"Following Instagram user",unfollowingIns:"Unfollowing Instagram user",reddits:"Reddit/User",loginReddit:'Please log in to Reddit',changingRedditVersion:"Switching Reddit to a new version page...",joiningReddit:"Joining the Reddit",leavingReddit:"Leaving the Reddit",followingRedditUser:"Following Reddit User",unfollowingRedditUser:"Unfollowing Reddit User",channels:"Channel",followingTwitchChannel:"Following Twitch Channel",unfollowingTwitchChannel:"Unfollowing Twitch Channel",gettingTwitchChannelId:"Getting Twitch Channel Id",checkingTwitchIntegrity:"Checking Twitch integrity...",twitterUser:"Twitter User",retweets:"Retweet",gettingTwitterUserId:"Getting Twitter User Id",followingTwitterUser:"Following Twitter User",unfollowingTwitterUser:"Unfollowing Twitter User",retweetting:"Retweetting",unretweetting:"Unretweetting",names:"Group/Public/Wall",loginVk:'Please log in to Vk',gettingVkId:"Getting Vk task Id",joiningVkGroup:"Joining Vk Group",leavingVkGroup:"Leaving Vk Group",joiningVkPublic:"Joining Vk Public",leavingVkPublic:"Leaving Vk Public",sendingVkWall:"Sending Vk Wall",deletingVkWall:"Deleting Vk Wall",youtubeChannel:"YouTube Channel",likes:"Like",loginYtb:'Please log in to YouTube',tryUpdateYtbAuth:'Please try to update YouTube token',gettingYtbToken:"Getting YouTube Token...",followingYtbChannel:"Subscribing to YouTube channel",unfollowingYtbChannel:"Unsubscribing to YouTube channel",likingYtbVideo:"Liking YouTube video",unlikingYtbVideo:"Unliking YouTube video",giveKeyNoticeBefore:"Each verification interval is 15s",giveKeyNoticeAfter:'If there is no key, please check at https://givekey.ru/profile',noPoints:"Not enough points, skip the lottery",getNeedPointsFailed:"ailed to obtain the required points, skip the lottery",joiningLottery:"Joining the lottery",doingGleamTask:"Doing Gleam Task...",gettingGleamLink:"Getting Gleam task link...",gleamTaskNotice:"If this page has not been closed for a long time, please close it yourself after completing any task!",verifiedGleamTasks:"Attempted to verify all tasks. If the verification fails, please try to verify manually or complete it!",gsNotice:'In order to avoid getting the "0000-0000-0000" key, the "Grab Key" button has been hidden, please close the script when obtaining the key!',giveeClubVerifyNotice:"Verifying task...",giveeClubVerifyFinished:"Wait for the verification to complete and join it by yourself",doingKeyhubTask:"Doing Keyhub Task...",SweepWidgetNotice:"The task is being processed and verified. There is an interval of 1~3s for each verification task to prevent the triggering of too fast verification warning..."}},h=["zh","en"].includes(N.other.language)?N.other.language:"en";const K=function(t){for(var e,s=arguments.length,i=new Array(1i[parseInt(e,10)]):t};function R(s,i){window.TRACE&&console.trace("%cAuto-Task[Debug]:","color:blue"),p().fire({title:K("errorReport"),icon:"error",showCancelButton:!0,confirmButtonText:K("toGithub"),showDenyButton:!0,denyButtonText:K("toKeylol"),cancelButtonText:K("close")}).then(t=>{var{isDenied:e,isConfirmed:t}=t;t?window.open(`https://github.com/HCLonely/auto-task-v4/issues/new?title=${encodeURIComponent("[BUG] 脚本报错: "+i)}&labels=bug&template=bug_report.yml&website=${encodeURIComponent(window.location.href)}&browser=${encodeURIComponent(JSON.stringify((0,n.ua)(),null,4))}&manager=${encodeURIComponent(GM_info.scriptHandler+" "+GM_info.version)}&user-script=${encodeURIComponent(GM_info.script.version)}&logs=${encodeURIComponent(s.stack||"null")}&run-logs=`+encodeURIComponent($.makeArray($("#auto-task-info>li")).map(t=>t.innerText).join("\n")),"_blank"):e&&(e=`错误链接: [url=${window.location.href}]${window.location.href}[/url] 环境: -[code]${JSON.stringify((0,a.ua)(),null,4)}[/code] +[code]${JSON.stringify((0,n.ua)(),null,4)}[/code] 脚本管理器: ${GM_info.scriptHandler} ${GM_info.version} 脚本版本: ${GM_info.script.version} @@ -134,19 +134,19 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); 执行日志: [code]${$.makeArray($("#auto-task-info>li")).map(t=>t.innerText).join("\n")}[/code]`,GM_setClipboard(e),p().fire({title:K("copySuccess"),icon:"success",confirmButtonText:K("ok")}).then(()=>{window.open("https://keylol.com/forum.php?mod=post&action=reply&fid=319&tid=777450","_blank")}))}),console.log("%c%s","color:white;background:red",`Auto-Task[Error]: ${i} -`+s.stack)}var g=class{constructor(){var t,e,s;s=void 0,(e="tasks")in(t=this)?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s}getRealParams(e,s,i,a){try{let t=[];return 0a(t)).filter(t=>t)]),!i&&0{const t=GM_openInTab("https://discord.com/channels/@me#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=null===(t=GM_getValue("discordAuth"))||void 0===t?void 0:t.auth;t?(x(this,_,{auth:t}),s.success(),e(await b(this,O,M).call(this))):(s.error("Error: Update discord auth failed!"),e(!1))}})}catch(t){return R(t,"Discord.updateAuth"),!1}}async function B(t){try{const l=V({type:"joiningDiscordServer",text:t});var e,s,{result:i,statusText:a,status:n,data:o}=await L({url:"https://discord.com/api/v9/invites/"+t,method:"POST",dataType:"json",headers:{authorization:T(this,_).auth,origin:"https://discord.com",referer:"https://discord.com/invite/"+t}});if("Success"!==i||200!==(null==o?void 0:o.status))return l.error(i+`:${a}(${n})`),!1;l.success();var r=String(null===(e=o.response)||void 0===e||null===(s=e.guild)||void 0===s?void 0:s.id);return r&&(b(this,F,q).call(this,t,r),this.tasks.servers=I([...this.tasks.servers,t])),!0}catch(t){return R(t,"Discord.joinServer"),!1}}async function z(t){try{if(this.whiteList.servers.includes(t))return V({type:"whiteList",text:"Discord.leaveServer",id:t}),!0;var e=await b(this,W,Y).call(this,t);if(!e)return!1;const o=V({type:"leavingDiscordServer",text:e});var{result:s,statusText:i,status:a,data:n}=await L({url:"https://discord.com/api/v9/users/@me/guilds/"+e,method:"DELETE",headers:{authorization:T(this,_).auth}});return"Success"===s&&204===(null==n?void 0:n.status)?(o.success(),!0):(o.error(s+`:${i}(${a})`),!1)}catch(t){return R(t,"Discord.leaveServer"),!1}}async function Y(t){try{const c=V({type:"gettingDiscordGuild",text:t});var e=T(this,C)[t];if(e)return c.success(),e;var{result:s,statusText:i,status:a,data:n}=await L({url:"https://discord.com/api/v9/invites/"+t,responseType:"json",method:"GET"});if("Success"!==s||200!==(null==n?void 0:n.status))return c.error(s+`:${i}(${a})`),!1;var o,r,l=null===(o=n.response)||void 0===o||null===(r=o.guild)||void 0===r?void 0:r.id;return l?(c.success(),b(this,F,q).call(this,t,l),l):(c.error(s+`:${i}(${a})`),!1)}catch(t){return R(t,"Discord.getGuild"),!1}}function q(t,e){try{T(this,C)[t]=e,GM_setValue("discordCache",T(this,C))}catch(t){R(t,"Discord.setCache")}}const J=class extends g{constructor(){var t;super(...arguments),m(this,F),m(this,W),m(this,j),m(this,D),m(this,E),m(this,O),y(this,"tasks",JSON.parse(G)),y(this,"whiteList",{...JSON.parse(G),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.discord}),v(this,_,{writable:!0,value:GM_getValue("discordAuth")||{}}),v(this,C,{writable:!0,value:GM_getValue("discordCache")||{}}),v(this,A,{writable:!0,value:!1})}async init(){try{if(!GM_getValue("dontRemindDiscordAgain"))if(!await p().fire({title:K("discordImportantNotice"),text:K("discordImportantNoticeText"),showCancelButton:!0,showDenyButton:!0,confirmButtonText:K("continue"),cancelButtonText:K("skipDiscordTask"),denyButtonText:K("continueAndDontRemindAgain")}).then(t=>{var{isConfirmed:e,isDenied:t}=t;return!!e||!!t&&(GM_setValue("dontRemindDiscordAgain",!0),!0)}))return x(this,A,!1),"skip";return T(this,A)?!0:T(this,_).auth?await b(this,O,M).call(this)?(V({}).success(K("initSuccess","Discord")),x(this,A,!0),!0):(GM_setValue("discordAuth",{auth:null}),await b(this,E,U).call(this)?(V({}).success(K("initSuccess","Discord")),x(this,A,!0),!0):(V({}).error(K("initFailed","Discord")),!1)):!!await b(this,E,U).call(this)&&(x(this,A,!0),!0)}catch(t){return R(t,"Discord.init"),!1}}async toggle(t){var{doTask:e=!0,serverLinks:t=[]}=t;try{if(!T(this,A))return V({text:K("needInit")}),!1;const i=[];if(e&&!N.doTask.discord.servers||!e&&!N.undoTask.discord.servers)V({type:"globalOptionsSkip",text:"discord.servers"});else{var s=this.getRealParams("servers",t,e,t=>{return null===(t=t.match(/invite\/(.+)/))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return R(t,"Discord.toggleServers"),!1}}};function H(t,e){Z(t,e),e.add(t)}function X(t,e,s){Z(t,e),e.set(t,s)}function Z(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Q(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function tt(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,it(t,e,"set"),s),s}function et(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function st(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,it(t,e,"get"))}function it(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const at=JSON.stringify({users:[]});var nt=new WeakMap,ot=new WeakMap,rt=new WeakMap,lt=new WeakSet,ct=new WeakSet,ut=new WeakSet,dt=new WeakSet;async function ht(){var t=0{return null===(t=t.match(/https:\/\/www\.instagram\.com\/(.+)?\//))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return R(t,"Instagram.toggleUsers"),!1}}};function mt(t,e){kt(t,e),e.add(t)}function vt(t,e,s){kt(t,e),e.set(t,s)}function kt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function yt(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function bt(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,xt(t,e,"set"),s),s}function Tt(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function $t(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,xt(t,e,"get"))}function xt(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const St=JSON.stringify({reddits:[]});var Lt=new WeakMap,It=new WeakMap,Gt=new WeakSet,_t=new WeakSet;async function Ct(){try{const s=V({text:K("changingRedditVersion")});return GM_setValue("redditAuth",null),await new Promise(t=>{const e=GM_openInTab("https://www.reddit.com/#auth",{active:!0,insert:!0,setParent:!0});e.onclose=async()=>{s.success(),t(await Tt(this,_t,At).call(this,!0))}})}catch(t){return R(t,"Reddit.useBeta"),!1}}async function At(){var t,e=0{var e=null===(e=t.match(/https?:\/\/www\.reddit\.com\/r\/([^/]*)/))||void 0===e?void 0:e[1],t=null===(t=t.match(/https?:\/\/www\.reddit\.com\/user\/([^/]*)/))||void 0===t?void 0:t[1];return t?e||t:e});if(0!0)}catch(t){return R(t,"Reddit.toggle"),!1}}};function Et(t,e){jt(t,e),e.add(t)}function Dt(t,e,s){jt(t,e),e.set(t,s)}function jt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wt(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Pt(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,Ft(t,e,"set"),s),s}function Vt(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function Nt(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,Ft(t,e,"get"))}function Ft(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const Mt=JSON.stringify({channels:[]});var Ut=new WeakMap,Bt=new WeakMap,Kt=new WeakMap,Rt=new WeakMap,zt=new WeakSet,Yt=new WeakSet,qt=new WeakSet,Jt=new WeakSet,Ht=new WeakSet,Xt=new WeakSet;async function Zt(){try{const r=V({text:K("verifyingAuth","Twitch")});var t,e,s,{result:i,statusText:a,status:n,data:o}=await L({url:"https://gql.twitch.tv/gql",method:"POST",dataType:"json",headers:{Authorization:"OAuth "+Nt(this,Ut).authToken,"Client-Id":Nt(this,Ut).clientId},data:'[{"operationName":"FrontPageNew_User","variables":{"limit":1},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"64bd07a2cbaca80699d62636d966cf6395a5d14a1f0a14282067dcb28b13eb11"}}}]'});return"Success"===i?200===(null==o?void 0:o.status)&&null!==(t=o.response)&&void 0!==t&&null!==(e=t[0])&&void 0!==e&&null!==(s=e.data)&&void 0!==s&&s.currentUser?(await Vt(this,Yt,Qt).call(this),r.success(),!0):(r.error(`Error:${null==o?void 0:o.statusText}(${null==o?void 0:o.status})`),!1):(r.error(i+`:${a}(${n})`),!1)}catch(t){return R(t,"Twitch.verifyAuth"),!1}}async function Qt(){var t=0{const t=GM_openInTab("https://www.twitch.tv/#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=GM_getValue("twitchAuth");t?(Pt(this,Ut,t),s.success(),e(await Vt(this,zt,Zt).call(this))):(s.error("Error: Update twitch auth failed!"),e(!1))}})}catch(t){return R(t,"Twitch.updateAuth"),!1}}async function ee(t){var{name:e,doTask:t=!0}=t;try{if(!t&&this.whiteList.channels.includes(e))return V({type:"whiteList",text:"Twitch.unfollowChannel",id:e}),!0;var s=await Vt(this,Ht,se).call(this,e);if(!s)return!1;const p=V({type:`${t?"":"un"}followingTwitchChannel`,text:e});var i,a,n,o,r='[{"operationName":"FollowButton_FollowUser","variables":{"input":{"disableNotifications":false,"targetID":"'+s+'"}},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"800e7346bdf7e5278a3c1d3f21b2b56e2639928f86815677a7126b093b2fdd08"}}}]',l=`[{"operationName":"FollowButton_UnfollowUser","variables":{"input":{"targetID":"${s}"}},`+'"extensions":{"persistedQuery":{"version":1,"sha256Hash":"f7dae976ebf41c755ae2d758546bfd176b4eeb856656098bb40e0a672ca0d880"}}}]',{result:c,statusText:u,status:d,data:h}=await L({url:"https://gql.twitch.tv/gql",method:"POST",dataType:"json",anonymous:!0,headers:{Origin:"https://www.twitch.tv",Referer:"https://www.twitch.tv/",Authorization:"OAuth "+Nt(this,Ut).authToken,"Client-Id":Nt(this,Ut).clientId,"Client-Version":Nt(this,Ut).clientVersion,"X-Device-Id":Nt(this,Ut).deviceId,"Client-Session-Id":Nt(this,Ut).clientSessionId,"Client-Integrity":Nt(this,Rt)},data:t?r:l});return"Success"===c?200===(null==h?void 0:h.status)&&null!==(i=h.response)&&void 0!==i&&i[0]&&!h.response[0].errors?(p.success(),t&&(this.tasks.channels=I([...this.tasks.channels,e])),!0):(p.error("Error:"+((null==h||null===(a=h.response)||void 0===a||null===(n=a[0].errors)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.message)||`${null==h?void 0:h.statusText}(${null==h?void 0:h.status})`)),!1):(p.error(c+`:${u}(${d})`),!1)}catch(t){return R(t,"Twitch.toggleChannel"),!1}}async function se(t){try{const d=V({type:"gettingTwitchChannelId",text:t});var e=Nt(this,Bt)[t];if(e)return d.success(),e;var{result:s,statusText:i,status:a,data:n}=await L({url:"https://gql.twitch.tv/gql",method:"POST",headers:{Authorization:"OAuth "+Nt(this,Ut).authToken,"Client-Id":Nt(this,Ut).clientId},responseType:"json",data:`[{"operationName":"ActiveWatchParty","variables":{"channelLogin":"${t}"},`+'"extensions":{"persistedQuery":{"version":1,"sha256Hash":"4a8156c97b19e3a36e081cf6d6ddb5dbf9f9b02ae60e4d2ff26ed70aebc80a30"}}}]'});if("Success"!==s)return d.error(s+`:${i}(${a})`),!1;if(200!==(null==n?void 0:n.status))return d.error(`Error:${null==n?void 0:n.statusText}(${null==n?void 0:n.status})`),!1;var o,r,l,c,u=null===(o=n.response)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l||null===(c=l.user)||void 0===c?void 0:c.id;return u?(Vt(this,Xt,ie).call(this,t,String(u)),d.success(),u):(d.error(`Error:${n.statusText}(${n.status})`),!1)}catch(t){return R(t,"Twitch.getChannelId"),!1}}function ie(t,e){try{Nt(this,Bt)[t]=e,GM_setValue("twitchCache",Nt(this,Bt))}catch(t){R(t,"Twitch.setCache")}}const ae=class extends g{constructor(){var t;super(...arguments),Et(this,Xt),Et(this,Ht),Et(this,Jt),Et(this,qt),Et(this,Yt),Et(this,zt),Wt(this,"tasks",JSON.parse(Mt)),Wt(this,"whiteList",{...JSON.parse(Mt),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.twitch}),Dt(this,Ut,{writable:!0,value:GM_getValue("twitchAuth")||{}}),Dt(this,Bt,{writable:!0,value:GM_getValue("twitchCache")||{}}),Dt(this,Kt,{writable:!0,value:!1}),Dt(this,Rt,{writable:!0,value:void 0})}async init(){try{return Nt(this,Kt)?!0:Nt(this,Ut).authToken&&Nt(this,Ut).clientId&&Nt(this,Ut).clientVersion&&Nt(this,Ut).deviceId&&Nt(this,Ut).clientSessionId?await Vt(this,zt,Zt).call(this)?(V({}).success(K("initSuccess","Twitch")),Pt(this,Kt,!0),!0):(GM_setValue("twitchAuth",null),await Vt(this,qt,te).call(this)?(V({}).success(K("initSuccess","Twitch")),Pt(this,Kt,!0),!0):(V({}).error(K("initFailed","Twitch")),!1)):!!await Vt(this,qt,te).call(this)&&(Pt(this,Kt,!0),!0)}catch(t){return R(t,"Twitch.init"),!1}}async toggle(t){var{doTask:e=!0,channelLinks:t=[]}=t;try{if(!Nt(this,Kt))return V({text:K("needInit")}),!1;const i=[];if(e&&!N.doTask.twitch.channels||!e&&!N.undoTask.twitch.channels)V({type:"globalOptionsSkip",text:"twitch.channels"});else{var s=this.getRealParams("channels",t,e,t=>{return null===(t=t.match(/https:\/\/(www\.)?twitch\.tv\/(.+)/))||void 0===t?void 0:t[2]});if(0!0)}catch(t){return R(t,"Twitch.toggle"),!1}}};function ne(t,e){re(t,e),e.add(t)}function oe(t,e,s){re(t,e),e.set(t,s)}function re(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function le(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function ce(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,he(t,e,"set"),s),s}function ue(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function de(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,he(t,e,"get"))}function he(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const pe=JSON.stringify({users:[],retweets:[],likes:[]});var fe=new WeakMap,we=new WeakMap,ge=new WeakMap,me=new WeakMap,ve=new WeakSet,ke=new WeakSet,ye=new WeakSet,be=new WeakSet,Te=new WeakSet;async function $e(){try{return await ue(this,ye,Se).call(this,{name:"verify",doTask:!0,verify:!0})}catch(t){return R(t,"Twitter.verifyAuth"),!1}}async function xe(){try{const s=V({text:K("updatingAuth","Twitter")});return await new Promise(e=>{const t=GM_openInTab("https://twitter.com/settings/account?k#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=GM_getValue("twitterAuth");t?(ce(this,we,t),s.success(),e(await ue(this,ve,$e).call(this))):(s.error("Error: Update twitter auth failed!"),e(!1))}})}catch(t){return R(t,"Twitter.updateToken"),!1}}async function Se(t){var{name:e,doTask:s=!0,verify:t=!1}=t;try{if(!s&&!t&&this.whiteList.users.includes(e))return V({type:"whiteList",text:"Twitter.unfollowUser",id:e}),!0;var i=t?de(this,fe):await this.userName2id(e);if(!i)return!1;const d=t?V({text:K("verifyingAuth","Twitter")}):V({type:`${s?"":"un"}followingTwitterUser`,text:e});var a,n,o,{result:r,statusText:l,status:c,data:u}=await L({url:`https://api.twitter.com/1.1/friendships/${s?"create":"destroy"}.json`,method:"POST",headers:{authorization:"Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA","Content-Type":"application/x-www-form-urlencoded","x-csrf-token":de(this,we).ct0},responseType:"json",data:$.param({include_profile_interstitial_type:1,include_blocking:1,include_blocked_by:1,include_followed_by:1,include_want_retweets:1,include_mute_edge:1,include_can_dm:1,include_can_media_tag:1,skip_status:1,id:i})});return"Success"===r?200===(null==u?void 0:u.status)?(d.success(),s&&!t&&(this.tasks.users=I([...this.tasks.users,e])),!0):t&&403===(null==u?void 0:u.status)&&158===(null===(a=u.response)||void 0===a||null===(n=a.errors)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.code)?(d.success(),!0):(d.error(`Error:${null==u?void 0:u.statusText}(${null==u?void 0:u.status})`),!1):(d.error(r+`:${l}(${c})`),!1)}catch(t){return R(t,"Twitter.toggleUser"),!1}}async function Le(t){var{retweetId:e,doTask:t=!0}=t;try{if(!t&&this.whiteList.retweets.includes(e))return V({type:"whiteList",text:"Twitter.unretweet",id:e}),!0;const c=V({type:`${t?"":"un"}retweetting`,text:e});var s,i,a,{result:n,statusText:o,status:r,data:l}=await L({url:`https://api.twitter.com/1.1/statuses/${t?"":"un"}retweet.json`,method:"POST",headers:{authorization:"Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA","Content-Type":"application/x-www-form-urlencoded","x-csrf-token":de(this,we).ct0},data:$.param({tweet_mode:"extended",id:e}),responseType:"json"});return"Success"===n?200===(null==l?void 0:l.status)||403===(null==l?void 0:l.status)&&327===(null===(s=l.response)||void 0===s||null===(i=s.errors)||void 0===i||null===(a=i[0])||void 0===a?void 0:a.code)?(c.success(),t&&(this.tasks.retweets=I([...this.tasks.retweets,e])),!0):(c.error(`Error:${null==l?void 0:l.statusText}(${null==l?void 0:l.status})`),!1):(c.error(n+`:${o}(${r})`),!1)}catch(t){return R(t,"Twitter.toggleRetweet"),!1}}function Ie(t,e){try{de(this,ge)[t]=e,GM_setValue("twitterCache",de(this,ge))}catch(t){R(t,"Twitter.setCache")}}const Ge=class extends g{constructor(){var t;super(...arguments),ne(this,Te),ne(this,be),ne(this,ye),ne(this,ke),ne(this,ve),le(this,"tasks",JSON.parse(pe)),le(this,"whiteList",{...JSON.parse(pe),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.twitter}),oe(this,fe,{writable:!0,value:N.other.twitterVerifyId}),oe(this,we,{writable:!0,value:GM_getValue("twitterAuth")||{}}),oe(this,ge,{writable:!0,value:GM_getValue("twitterCache")||{}}),oe(this,me,{writable:!0,value:!1})}async init(){try{return de(this,me)?!0:de(this,we).ct0?await ue(this,ve,$e).call(this)?(V({}).success(K("initSuccess","Twitter")),ce(this,me,!0),!0):(GM_setValue("twitterAuth",null),await ue(this,ke,xe).call(this)?(V({}).success(K("initSuccess","Twitter")),ce(this,me,!0),!0):(V({}).error(K("initFailed","Twitter")),!1)):!!await ue(this,ke,xe).call(this)&&(ce(this,me,!0),!0)}catch(t){return R(t,"Twitter.init"),!1}}async userName2id(t){try{const d=V({type:"gettingTwitterUserId",text:t});var e=de(this,ge)[t];if(e)return d.success(),e;var s,i,a,n,{result:o,statusText:r,status:l,data:c}=await L({url:"https://api.twitter.com/graphql/mCbpQvZAw6zu_4PvuAUVVQ/UserByScreenName"+`?variables=%7B%22screen_name%22%3A%22${t}%22%2C%22withSafetyModeUserFields%22%3Atrue%2C%22withSuperFollowsUserFields%22%3Atrue%7D`,method:"GET",headers:{authorization:"Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA","content-type":"application/json",referer:"https://twitter.com/"+t,"x-csrf-token":de(this,we).ct0},responseType:"json"});if("Success"!==o)return d.error(o+`:${r}(${l})`),!1;if(200!==(null==c?void 0:c.status))return d.error(`Error:${null==c?void 0:c.statusText}(${null==c?void 0:c.status})`),!1;{let e=c.response||("object"==typeof c.responseText?c.responseText:null);if(!e)try{e=JSON.parse(c.responseText)}catch(t){e=null}var u=String(null===(s=e)||void 0===s||null===(i=s.data)||void 0===i||null===(a=i.user)||void 0===a||null===(n=a.result)||void 0===n?void 0:n.rest_id);return u?(ue(this,Te,Ie).call(this,t,u),d.success(),u):(d.error(`Error:${c.statusText}(${c.status})`),!1)}}catch(t){return R(t,"Twitter.getUserId"),!1}}async toggle(t){var{doTask:e=!0,userLinks:s=[],retweetLinks:t=[]}=t;try{if(!de(this,me))return V({text:K("needInit")}),!1;const n=[];if(e&&!N.doTask.twitter.users||!e&&!N.undoTask.twitter.users)V({type:"globalOptionsSkip",text:"twitter.users"});else{var i=this.getRealParams("users",s,e,t=>{return null===(t=t.match(/https:\/\/twitter\.com\/(.+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/https:\/\/twitter\.com\/.*?\/status\/([\d]+)/))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return R(t,"Twitter.toggle"),!1}}};function _e(t,e){Ae(t,e),e.add(t)}function Ce(t,e,s){Ae(t,e),e.set(t,s)}function Ae(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Oe(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Ee(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,We(t,e,"set"),s),s}function De(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function je(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,We(t,e,"get"))}function We(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const Pe=JSON.stringify({names:[]});var Ve=new WeakMap,Ne=new WeakMap,Fe=new WeakMap,Me=new WeakSet,Ue=new WeakSet,Be=new WeakSet,Ke=new WeakSet,Re=new WeakSet,ze=new WeakSet,Ye=new WeakSet,qe=new WeakSet;async function Je(){try{const e=V({text:K("verifyAuth","Vk")}),{result:s,statusText:i,status:a,data:n}=await L({url:"https://vk.com/im",method:"GET"});var t;return"Success"===s?null!==n&&void 0!==n&&n.finalUrl.includes("vk.com/login")?(e.error("Error:"+K("loginVk"),!0),!1):200===(null===n||void 0===n?void 0:n.status)?(Ee(this,Ve,(null===(t=n.responseText.match(/TopNavBtn__profileLink" href="\/(.*?)"/))||void 0===t?void 0:t[1])||""),e.success(),!0):(e.error(`Error:${null===n||void 0===n?void 0:n.statusText}(${null===n||void 0===n?void 0:n.status})`),!1):(e.error(s+`:${i}(${a})`),!1)}catch(t){return R(t,"Vk.verifyAuth"),!1}}async function He(t,e){var s=!(2{return null===(t=t.match(/https:\/\/vk\.com\/([^/]+)/))||void 0===t?void 0:t[1]});if(0!0)}catch(t){return R(t,"Vk.toggle"),!1}}};function as(t,e){os(t,e),e.add(t)}function ns(t,e,s){os(t,e),e.set(t,s)}function os(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function rs(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function ls(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,ds(t,e,"set"),s),s}function cs(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function us(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,ds(t,e,"get"))}function ds(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const hs=JSON.stringify({channels:[],likes:[]}),ps=async function(t,e){try{const h=V({text:K("gettingYtbToken")}),{result:p,statusText:f,status:w,data:g}=await L({url:t,method:"GET"});if("Success"!==p)return h.error(p+`:${f}(${w})`),{};if(200!==(null===g||void 0===g?void 0:g.status))return h.error(`Error:${null===g||void 0===g?void 0:g.statusText}(${null===g||void 0===g?void 0:g.status})`),{};{var s,i;if(g.responseText.includes("accounts.google.com/ServiceLogin?service=youtube"))return h.error("Error:"+K("loginYtb"),!0),{needLogin:!0};var a=null===(s=g.responseText.match(/"INNERTUBE_API_KEY":"(.*?)"/))||void 0===s?void 0:s[1],n=(null===(i=g.responseText.match(/\(\{"INNERTUBE_CONTEXT":([\w\W]*?)\}\)/)||g.responseText.match(/"INNERTUBE_CONTEXT":([\w\W]*?\}),"INNERTUBE/))||void 0===i?void 0:i[1])||"{}";const{client:m,request:v}=JSON.parse(n);if(a&&m&&v){if(m.hl="en","channel"===e){var o,r=null===(o=g.responseText.match(//))||void 0===o?void 0:o[1];return r?(h.success(),{params:{apiKey:a,client:m,request:v,channelId:r}}):(h.error('Error: Get "channelId" failed!'),{})}if("likeVideo"!==e)return h.error("Error: Unknown type"),{};var l,c,u=null===(l=g.responseText.match(//))||void 0===l?void 0:l[1],d=null===(c=g.responseText.match(/"likeParams":"(.*?)"/))||void 0===c?void 0:c[1];return u?(h.success(),{params:{apiKey:a,client:m,request:v,videoId:u,likeParams:d}}):(h.error('Error: Get "videoId" failed!'),{})}return h.error('Error: Parameter "apiKey" not found!'),{}}}catch(t){return R(t,"Youtube.getInfo"),{}}};var fs=new WeakMap,ws=new WeakMap,gs=new WeakMap,ms=new WeakSet,vs=new WeakSet,ks=new WeakSet,ys=new WeakSet,bs=new WeakSet;class Ts extends g{constructor(){var t;super(...arguments),as(this,bs),as(this,ys),as(this,ks),as(this,vs),as(this,ms),rs(this,"tasks",JSON.parse(hs)),rs(this,"whiteList",{...JSON.parse(hs),...null===(t=GM_getValue("whiteList"))||void 0===t?void 0:t.youtube}),ns(this,fs,{writable:!0,value:GM_getValue("youtubeAuth")||{}}),ns(this,ws,{writable:!0,value:!1}),ns(this,gs,{writable:!0,value:"https://www.youtube.com/channel/"+N.other.youtubeVerifyChannel})}async init(){try{return us(this,ws)?!0:us(this,fs).PAPISID?await cs(this,ms,$s).call(this)?(V({}).success(K("initSuccess","Youtube")),ls(this,ws,!0),!0):(GM_setValue("youtubeAuth",null),await cs(this,vs,xs).call(this)?(V({}).success(K("initSuccess","Youtube")),ls(this,ws,!0),!0):(V({}).error(K("initFailed","Youtube")),!1)):!!await cs(this,vs,xs).call(this)&&(ls(this,ws,!0),!0)}catch(t){return R(t,"Youtube.init"),!1}}async toggle(t){var{doTask:e=!0,channelLinks:s=[],videoLinks:t=[]}=t;try{if(!us(this,ws))return V({text:K("needInit")}),!1;const n=[];if(e&&!N.doTask.youtube.channels||!e&&!N.undoTask.youtube.channels)V({type:"globalOptionsSkip",text:"youtube.channels"});else{var i=this.getRealParams("channels",s,e,t=>{var e;return/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(t)?null===(e=t.match(/url=(https:\/\/www\.youtube\.com\/.*)/))||void 0===e?void 0:e[1]:t});if(0{var e;return/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(t)?null===(e=t.match(/url=(https:\/\/www\.youtube\.com\/.*)/))||void 0===e?void 0:e[1]:t});if(0!0)}catch(t){return R(t,"Youtube.toggle"),!1}}}async function $s(){try{return await cs(this,ys,Ls).call(this,{link:us(this,gs),doTask:!0,verify:!0})}catch(t){return R(t,"Youtube.verifyAuth"),!1}}async function xs(){try{const s=V({text:K("updatingAuth","Youtube")});return await new Promise(e=>{const t=GM_openInTab("https://www.youtube.com/#auth",{active:!0,insert:!0,setParent:!0});t.onclose=async()=>{var t=GM_getValue("youtubeAuth");t?(ls(this,fs,t),s.success(),cs(this,ms,$s).call(this).then(t=>{e(t)})):(s.error("Error: Update youtube auth failed!"),e(!1))}})}catch(t){return R(t,"Discord.updateAuth"),!1}}function Ss(t,e){return ps(t,e)}async function Ls(t){var{link:e,doTask:s=!0,verify:t=!1}=t;try{var{params:i,needLogin:a}=await cs(this,ks,Ss).call(this,e,"channel"),{apiKey:n,client:o,request:r,channelId:l}=i||{};if(a)return V({html:K("loginYtb")}),!1;if(!(n&&o&&r&&l))return V({text:'"getYtbToken" failed'}),!1;if(!s&&!t&&this.whiteList.channels.includes(l))return V({type:"whiteList",text:"Youtube.unfollowChannel",id:l}),!0;const u=t?V({text:K("verifyingAuth","Youtube")}):V({type:s?"followingYtbChannel":"unfollowingYtbChannel",text:l});var c=parseInt(String((new Date).getTime()/1e3),10);const{result:d,statusText:h,status:p,data:f}=await L({url:`https://www.youtube.com/youtubei/v1/subscription/${s?"":"un"}subscribe?key=`+n,method:"POST",headers:{origin:"https://www.youtube.com",referer:"https://www.youtube.com/channel/"+l,"content-type":"application/json","x-goog-authuser":"0","x-goog-visitor-id":null==o?void 0:o.visitorData,"x-origin":"https://www.youtube.com",authorization:`SAPISIDHASH ${c}_`+sha1(`${c} ${us(this,fs).PAPISID} https://www.youtube.com`)},data:JSON.stringify({context:{client:o,request:{sessionId:null==r?void 0:r.sessionId,internalExperimentFlags:[],consistencyTokenJars:[]},user:{}},channelIds:[l],params:s?"EgIIAhgA":"CgIIAhgA"})});return"Success"===d?200===(null===f||void 0===f?void 0:f.status)?s&&(/"subscribed": true/.test(f.responseText)||f.responseText.includes("The subscription already exists"))||!s&&/"subscribed": false/.test(f.responseText)?(u.success(),s&&!t&&(this.tasks.channels=I([...this.tasks.channels,e])),!0):t&&f.responseText.includes("You may not subscribe to yourself")?(u.success(),!0):(u.error(K("tryUpdateYtbAuth"),!0),!1):(u.error(`Error:${null===f||void 0===f?void 0:f.statusText}(${null===f||void 0===f?void 0:f.status})`),!1):(u.error(d+`:${h}(${p})`),!1)}catch(t){return R(t,"Youtube.toggleChannel"),!1}}async function Is(t){var{link:e,doTask:t=!0}=t;try{var{params:s,needLogin:i}=await cs(this,ks,Ss).call(this,e,"likeVideo"),{apiKey:a,client:n,request:o,videoId:r,likeParams:l}=s||{};if(i)return V({html:""+K("loginYtb")}),!1;if(!(a&&n&&o&&r&&l))return V({text:'"getYtbToken" failed'}),!1;if(!t&&this.whiteList.likes.includes(r))return V({type:"whiteList",text:"Youtube.unlikeVideo",id:r}),!0;const u=V({type:t?"likingYtbVideo":"unlikingYtbVideo",text:r});var c=parseInt(String((new Date).getTime()/1e3),10);const d={context:{client:n,request:{sessionId:o.sessionId,internalExperimentFlags:[],consistencyTokenJars:[]},user:{}},target:{videoId:r}};if(t){if(!l)return u.error("Empty likeParams"),!1;d.params=l}const{result:h,statusText:p,status:f,data:w}=await L({url:`https://www.youtube.com/youtubei/v1/like/${t?"":"remove"}like?key=`+a,method:"POST",headers:{origin:"https://www.youtube.com",referer:"https://www.youtube.com/watch?v="+r,"content-type":"application/json","x-goog-authuser":"0","x-goog-visitor-id":n.visitorData,"x-origin":"https://www.youtube.com",authorization:`SAPISIDHASH ${c}_`+sha1(`${c} ${us(this,fs).PAPISID} https://www.youtube.com`)},data:JSON.stringify(d)});return"Success"===h?200===(null===w||void 0===w?void 0:w.status)?t&&w.responseText.includes("Added to Liked videos")||!t&&(w.responseText.includes("Removed from Liked videos")||w.responseText.includes("Dislike removed"))?(u.success(),t&&(this.tasks.likes=I([...this.tasks.likes,e])),!0):(u.error(K("tryUpdateYtbAuth"),!0),!1):(u.error(`Error:${null===w||void 0===w?void 0:w.statusText}(${null===w||void 0===w?void 0:w.status})`),!1):(u.error(h+`:${p}(${f})`),!1)}catch(t){return R(t,"Youtube.toggleLikeVideo"),!1}}function Gs(t,e){Cs(t,e),e.add(t)}function _s(t,e,s){Cs(t,e),e.set(t,s)}function Cs(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function As(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Os(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function Es(t,e,s){return function(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}(t,js(t,e,"set"),s),s}function Ds(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,js(t,e,"get"))}function js(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}const Ws=JSON.stringify({groups:[],officialGroups:[],wishlists:[],follows:[],forums:[],workshops:[],workshopVotes:[],curators:[],curatorLikes:[],announcements:[],licenses:[],playtests:[]});var Ps=new WeakMap,Vs=new WeakMap,Ns=new WeakMap,Fs=new WeakMap,Ms=new WeakMap,Us=new WeakMap,Bs=new WeakSet,Ks=new WeakSet,Rs=new WeakSet,zs=new WeakSet,Ys=new WeakSet,qs=new WeakSet,Js=new WeakSet,Hs=new WeakSet,Xs=new WeakSet,Zs=new WeakSet,Qs=new WeakSet,ti=new WeakSet,ei=new WeakSet,si=new WeakSet,ii=new WeakSet,ai=new WeakSet,ni=new WeakSet,oi=new WeakSet,ri=new WeakSet,li=new WeakSet,ci=new WeakSet,ui=new WeakSet,di=new WeakSet,hi=new WeakSet,pi=new WeakSet,fi=new WeakSet,wi=new WeakSet,gi=new WeakSet,mi=new WeakSet;async function vi(){try{const s=V({text:K("updatingAuth",K("steamStore"))}),{result:i,statusText:a,status:n,data:o}=await L({url:"https://store.steampowered.com/",method:"GET",headers:{Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Cache-Control":"max-age=0","Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Upgrade-Insecure-Requests":"1"}});if("Success"!==i)return s.error(i+`:${a}(${n})`),!1;if(200!==(null===o||void 0===o?void 0:o.status))return s.error(`Error:${null===o||void 0===o?void 0:o.statusText}(${null===o||void 0===o?void 0:o.status})`),!1;var t;if(!o.responseText.includes("data-miniprofile="))return s.error("Error:"+K("needLoginSteamStore"),!0),!1;var e=null===(t=o.responseText.match(/g_sessionID = "(.+?)";/))||void 0===t?void 0:t[1];return e?(Ds(this,Vs).storeSessionID=e,s.success(),!0):(s.error('Error: Get "sessionID" failed'),!1)}catch(t){return R(t,"Steam.updateStoreAuth"),!1}}async function ki(){try{const o=V({text:K("updatingAuth",K("steamCommunity"))}),{result:r,statusText:l,status:c,data:u}=await L({url:"https://steamcommunity.com/my",method:"GET",headers:{Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Cache-Control":"max-age=0","Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Upgrade-Insecure-Requests":"1"}});if("Success"!==r)return o.error(r+`:${l}(${c})`),!1;if(200!==(null===u||void 0===u?void 0:u.status))return o.error(`Error:${null===u||void 0===u?void 0:u.statusText}(${null===u||void 0===u?void 0:u.status})`),!1;var t,e,s;if(u.responseText.includes('href="https://steamcommunity.com/login/home/'))return o.error("Error:"+K("needLoginSteamCommunity"),!0),!1;var i=null===(t=u.responseText.match(/g_steamID = "(.+?)";/))||void 0===t?void 0:t[1],a=null===(e=u.responseText.match(/g_sessionID = "(.+?)";/))||void 0===e?void 0:e[1],n=null===(s=u.responseText.match(/steamcommunity.com\/id\/(.+?)\/friends\//))||void 0===s?void 0:s[1];return(i&&(Ds(this,Vs).steam64Id=i),n&&(Ds(this,Vs).userName=n),a)?(Ds(this,Vs).communitySessionID=a,o.success(),!0):(o.error('Error: Get "sessionID" failed'),!1)}catch(t){return R(t,"Steam.updateCommunityAuth"),!1}}async function yi(){try{const i=V({text:K("gettingAreaInfo")}),{result:a,statusText:n,status:o,data:r}=await L({url:"https://store.steampowered.com/cart/",method:"GET"});if("Success"!==a)return i.error(a+`:${n}(${o})`),{};if(200!==(null===r||void 0===r?void 0:r.status))return i.error(`Error:${null===r||void 0===r?void 0:r.statusText}(${null===r||void 0===r?void 0:r.status})`),{};var t,e=null===(t=r.responseText.match(//g)].map(t=>t[1]);return e&&0{const e=setInterval(()=>{"waiting"!==Ds(this,Us)&&(clearInterval(e),t(!0))})}),Ds(this,Ms)===e||!e&&"CN"!==Ds(this,Ms))return!0;Es(this,Us,"waiting");let t=e;if(!t){const{currentArea:c,areas:u}=await Os(this,Rs,yi).call(this);if(!c||!u)return Es(this,Us,"error"),!1;if("CN"!==c)return Es(this,Us,"skip"),V({text:"notNeededChangeArea"}),"skip";var s=u.filter(t=>t&&"CN"!==t);if(!s||0===s.length)return Es(this,Us,"noAnotherArea"),V({text:"noAnotherArea"}),!1;[t]=s}const l=V({text:K("changingArea",t)});var{result:i,statusText:a,status:n,data:o}=await L({url:"https://store.steampowered.com/account/setcountry",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({cc:t,sessionid:Ds(this,Vs).storeSessionID})});if("Success"!==i)return Es(this,Us,"error"),l.error(i+`:${a}(${n})`),"CN";if(200!==(null==o?void 0:o.status)||"true"!==o.responseText)return Es(this,Us,"error"),l.error(`Error:${null==o?void 0:o.statusText}(${null==o?void 0:o.status})`),"CN";var r=(await Os(this,Rs,yi).call(this))["currentArea"];return r===t?(Es(this,Us,"success"),l.success(),r):(Es(this,Us,"error"),l.error("Error: change country filed"),"CN")}catch(t){return Es(this,Us,"error"),R(t,"Steam.changeArea"),!1}}async function Ti(t){try{const e=V({type:"joiningSteamGroup",text:t}),{result:s,statusText:i,status:a,data:n}=await L({url:"https://steamcommunity.com/groups/"+t,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({action:"join",sessionID:Ds(this,Vs).communitySessionID})});return"Success"===s?200!==(null===n||void 0===n?void 0:n.status)||n.responseText.includes("grouppage_join_area")?(e.error(`Error:${null===n||void 0===n?void 0:n.statusText}(${null===n||void 0===n?void 0:n.status})`),!1):(e.success(),this.tasks.groups=I([...this.tasks.groups,t]),!0):(e.error(s+`:${i}(${a})`),!1)}catch(t){return R(t,"Steam.joinGroup"),!1}}async function $i(t){try{if(this.whiteList.groups.includes(t))return V({type:"whiteList",text:"Steam.leaveGroup",id:t}),!0;var e=await Os(this,Js,xi).call(this,t);if(!e)return!1;const s=V({type:"leavingSteamGroup",text:t}),{result:i,statusText:a,status:n,data:o}=await L({url:`https://steamcommunity.com/id/${Ds(this,Vs).userName}/home_process`,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionID:Ds(this,Vs).communitySessionID,action:"leaveGroup",groupId:e})});return"Success"===i?200===(null===o||void 0===o?void 0:o.status)&&o.finalUrl.includes("groups")&&0===$(o.responseText.replace(//g,"").toLowerCase()).find(`a[href='https://steamcommunity.com/groups/${t.toLowerCase()}']`).length?(s.success(),!0):(s.error(`Error:${null===o||void 0===o?void 0:o.statusText}(${null===o||void 0===o?void 0:o.status})`),!1):(s.error(i+`:${a}(${n})`),!1)}catch(t){return R(t,"Steam.leaveGroup"),!1}}async function xi(t){try{const a=V({type:"gettingSteamGroupId",text:t});var e=Ds(this,Ps).group[t];if(e)return a.success(),e;const{result:n,statusText:o,status:r,data:l}=await L({url:"https://steamcommunity.com/groups/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==n)return a.error(n+`:${o}(${r})`),!1;if(200!==(null===l||void 0===l?void 0:l.status))return a.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1;var s,i=null===(s=l.responseText.match(/OpenGroupChat\( '([0-9]+)'/))||void 0===s?void 0:s[1];return i?(Os(this,mi,zi).call(this,"group",t,i),a.success(),i):(a.error(`Error:${l.statusText}(${l.status})`),!1)}catch(t){return R(t,"Steam.getGroupID"),!1}}async function Si(t){try{const i=V({type:"joiningSteamOfficialGroup",text:t}),{result:a,statusText:n,status:o,data:r}=await L({url:`https://steamcommunity.com/games/${t}?action=join&sessionID=`+Ds(this,Vs).communitySessionID,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==a)return i.error(a+`:${n}(${o})`),!1;if(200!==(null===r||void 0===r?void 0:r.status)||r.responseText.includes('id="publicGroupJoin"'))return i.error(`Error:${null===r||void 0===r?void 0:r.statusText}(${null===r||void 0===r?void 0:r.status})`),!1;var e;i.success(),this.tasks.officialGroups=I([...this.tasks.officialGroups,t]);var s=null===(e=r.responseText.match(/steam:\/\/friends\/joinchat\/([0-9]+)/))||void 0===e?void 0:e[1];return s&&Os(this,mi,zi).call(this,"officialGroup",t,s),!0}catch(t){return R(t,"Steam.joinOfficialGroup"),!1}}async function Li(t){try{if(this.whiteList.officialGroups.includes(t))return V({type:"whiteList",text:"Steam.leaveOfficialGroup",id:t}),!0;var e=await Os(this,Zs,Ii).call(this,t);if(!e)return!1;const o=V({type:"leavingSteamOfficialGroup",text:t});var{result:s,statusText:i,status:a,data:n}=await L({url:`https://steamcommunity.com/id/${Ds(this,Vs).userName}/home_process`,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionID:Ds(this,Vs).communitySessionID,action:"leaveGroup",groupId:e})});if("Success"!==s)return o.error(s+`:${i}(${a})`),!1;if(200!==(null==n?void 0:n.status))return o.error(`Error:${null==n?void 0:n.statusText}(${null==n?void 0:n.status})`),!1;{const{result:r,statusText:l,status:c,data:u}=await L({url:"https://steamcommunity.com/games/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});return"Success"===r?200===(null===u||void 0===u?void 0:u.status)&&u.responseText.includes('id="publicGroupJoin"')?(o.success(),!0):(o.error(`Error:${null===u||void 0===u?void 0:u.statusText}(${null===u||void 0===u?void 0:u.status})`),!1):(o.error(r+`:${l}(${c})`),!1)}}catch(t){return R(t,"Steam.leaveOfficialGroup"),!1}}async function Ii(t){try{const a=V({type:"gettingSteamOfficialGroupId",text:t});var e=Ds(this,Ps).officialGroup[t];if(e)return a.success(),e;const{result:n,statusText:o,status:r,data:l}=await L({url:"https://steamcommunity.com/games/"+t,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}});if("Success"!==n)return a.error(n+`:${o}(${r})`),!1;if(200!==(null===l||void 0===l?void 0:l.status))return a.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1;var s,i=null===(s=l.responseText.match(/steam:\/\/friends\/joinchat\/([0-9]+)/))||void 0===s?void 0:s[1];return i?(Os(this,mi,zi).call(this,"officialGroup",t,i),a.success(),i):(a.error(`Error:${l.statusText}(${l.status})`),!1)}catch(t){return R(t,"Steam.getGroupID"),!1}}async function Gi(t){try{var e;const a=V({type:"addingToWishlist",text:t});var{result:s,data:i}=await L({url:"https://store.steampowered.com/api/addtowishlist",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionid:Ds(this,Vs).storeSessionID,appid:t}),dataType:"json"});if("Success"===s&&200===(null==i?void 0:i.status)&&!0===(null===(e=i.response)||void 0===e?void 0:e.success))return a.success(),this.tasks.wishlists=I([...this.tasks.wishlists,t]),!0;const{result:n,statusText:o,status:r,data:l}=await L({url:"https://store.steampowered.com/app/"+t,method:"GET"});return"Success"===n?200===(null===l||void 0===l?void 0:l.status)?"CN"===Ds(this,Ms)&&l.responseText.includes('id="error_box"')?(a.warning(K("changeAreaNotice")),!!await Os(this,zs,bi).call(this)&&await Os(this,Qs,Gi).call(this,t)):(!l.responseText.includes('class="queue_actions_ctn"')||!l.responseText.includes('class="already_in_library"'))&&(l.responseText.includes('class="queue_actions_ctn"')&&l.responseText.includes('id="add_to_wishlist_area_success" style="display: none;')||!l.responseText.includes('class="queue_actions_ctn"'))?(a.error(`Error:${l.statusText}(${l.status})`),!1):(a.success(),this.tasks.wishlists=I([...this.tasks.wishlists,t]),!0):(a.error(`Error:${null===l||void 0===l?void 0:l.statusText}(${null===l||void 0===l?void 0:l.status})`),!1):(a.error(n+`:${o}(${r})`),!1)}catch(t){return R(t,"Steam.addToWishlist"),!1}}async function _i(t){try{var e;if(this.whiteList.wishlists.includes(t))return V({type:"whiteList",text:"Steam.removeFromWishlist",id:t}),!0;const n=V({type:"removingFromWishlist",text:t});var{result:s,data:i}=await L({url:"https://store.steampowered.com/api/removefromwishlist",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({sessionid:Ds(this,Vs).storeSessionID,appid:t}),dataType:"json"});if("Success"===s&&200===(null==i?void 0:i.status)&&!0===(null===(e=i.response)||void 0===e?void 0:e.success))return n.success(),!0;const{result:o,statusText:r,status:l,data:c}=await L({url:"https://store.steampowered.com/app/"+t,method:"GET"});if("Success"!==o)return n.error(o+`:${r}(${l})`),!1;if(200!==(null===c||void 0===c?void 0:c.status))return n.error(`Error:${null===c||void 0===c?void 0:c.statusText}(${null===c||void 0===c?void 0:c.status})`),!1;if("CN"===Ds(this,Ms)&&c.responseText.includes('id="error_box"')){n.warning(K("changeAreaNotice"));var a=await Os(this,zs,bi).call(this);return a&&"CN"!==a&&"skip"!==a?await Os(this,ti,_i).call(this,t):!1}return c.responseText.includes('class="queue_actions_ctn"')&&(c.responseText.includes("ds_owned_flag ds_flag")||c.responseText.includes("add_to_wishlist_area"))?(n.success(),!0):(n.error(`Error:${c.statusText}(${c.status})`),!1)}catch(t){return R(t,"Steam.removeFromWishlist"),!1}}async function Ci(t,e){try{if(!e&&this.whiteList.follows.includes(t))return V({type:"whiteList",text:"Steam.unfollowGame",id:t}),!0;const n=V({type:`${e?"":"un"}followingGame`,text:t}),o={sessionid:Ds(this,Vs).storeSessionID,appid:t};e||(o.unfollow="1");var{result:s,data:i}=await L({url:"https://store.steampowered.com/explore/followgame/",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param(o)});if("Success"===s&&200===(null==i?void 0:i.status)&&"true"===i.responseText)return n.success(),!0;var a=await Os(this,si,Ai).call(this,t);return"CN"===Ds(this,Ms)&&"areaLocked"===a?(n.warning(K("changeAreaNotice")),!!await Os(this,zs,bi).call(this)&&await Os(this,ti,_i).call(this,t)):e===a?(n.success(),e&&(this.tasks.follows=I([...this.tasks.follows,t])),!0):(n.error(`Error:${null==i?void 0:i.statusText}(${null==i?void 0:i.status})`),!1)}catch(t){return R(t,"Steam.toggleFollowGame"),!1}}async function Ai(t){try{const{result:e,data:s}=await L({url:"https://store.steampowered.com/app/"+t,method:"GET"});return"Success"===e?200===(null===s||void 0===s?void 0:s.status)&&("CN"===Ds(this,Ms)&&s.responseText.includes('id="error_box"')?"areaLocked":"none"!==$(s.responseText.replace(//g,"")).find(".queue_control_button.queue_btn_follow>.btnv6_blue_hoverfade.btn_medium.queue_btn_active").css("display")):!1}catch(t){return R(t,"Steam.isFollowedGame"),!1}}async function Oi(t){var e=!(1/))||void 0===s?void 0:s[1];return i?(Os(this,mi,zi).call(this,"workshop",t,i),a.success(),i):(a.error("Error: getWorkshopAppId failed"),!1)}catch(t){return R(t,"Steam.getWorkshopAppId"),!1}}async function Wi(t){try{const o=V({type:"votingUpWorkshop",text:t});var e,{result:s,statusText:i,status:a,data:n}=await L({url:"https://steamcommunity.com/sharedfiles/voteup",method:"POST",responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},data:$.param({id:t,sessionid:Ds(this,Vs).communitySessionID})});return"Success"===s?(200===(null==n?void 0:n.status)&&1===(null===(e=n.response)||void 0===e?void 0:e.success)?o.success():o.error(`Error:${null==n?void 0:n.statusText}(${null==n?void 0:n.status})`),!0):(o.error(s+`:${i}(${a})`),!0)}catch(t){return R(t,"Steam.voteupWorkshop"),!0}}async function Pi(t){var e=!(1{return null===(t=t.match(/groups\/(.+)\/?/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/games\/(.+)\/?/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/\?id=([\d]+)/))||void 0===t?void 0:t[1]});if(0{return null===(t=t.match(/\?id=([\d]+)/))||void 0===t?void 0:t[1]});if(e&&0{return null===(t=t.match(/curator\/([\d]+)/))||void 0===t?void 0:t[1]}),b=this.getRealParams("curatorLikes",u,e,t=>{return null===(t=t.match(/https?:\/\/store\.steampowered\.com\/(.*?)\/([^/?]+)/))||void 0===t?void 0:t.slice(1,3).join("/")});if(0{var e;return t.includes("store.steampowered.com")?null===(e=t.match(/store\.steampowered\.com\/news\/app\/([\d]+)\/view\/([\d]+)/))||void 0===e?void 0:e.slice(1,3).join("/"):null===(t=t.match(/steamcommunity\.com\/games\/([\d]+)\/announcements\/detail\/([\d]+)/))||void 0===t?void 0:t.slice(1,3).join("/")});if(e&&0{return null===(t=t.match(/app\/([\d]+)/))||void 0===t?void 0:t[1]});if(e&&N.doTask.steam.playtests&&0<$.length)for(const W of $)x.push(Os(this,gi,Ri).call(this,W)),await P(1e3)}return Promise.all(x).then(async()=>("CN"!==Ds(this,Ms)&&(V({}).warning(K("steamFinishNotice")),await Os(this,zs,bi).call(this,"CN")),!0))}catch(t){return R(t,"Steam.toggle"),!1}}};function qi(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function Ji(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Hi(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}var Xi=new WeakSet;async function Zi(e,t){try{return{name:e,result:await t}}catch(t){return R(t,"Website.bind"),{name:e,result:!1}}}var Qi=class{constructor(){qi(this,Xi),Ji(this,"undoneTasks",void 0),Ji(this,"socialTasks",void 0),Ji(this,"giveawayId",void 0),Ji(this,"socialInitialized",{discord:!1,instagram:!1,reddit:!1,twitch:!1,twitter:!1,vk:!1,youtube:!1,steamStore:!1,steamCommunity:!1}),Ji(this,"initialized",!1),Ji(this,"social",{})}async initSocial(t){try{const i=[],a="do"===t?this.undoneTasks:this.socialTasks;var e,s;return a.discord&&(!(0[...t,...e]).length)||this.socialInitialized.discord&&this.social.discord||(this.social.discord=new J,i.push(Hi(this,Xi,Zi).call(this,"discord",this.social.discord.init())))),a.instagram&&(!(0[...t,...e]).length)||this.socialInitialized.instagram&&this.social.instagram||(this.social.instagram=new gt,i.push(Hi(this,Xi,Zi).call(this,"instagram",this.social.instagram.init())))),a.reddit&&(!(0[...t,...e]).length)||this.socialInitialized.reddit&&this.social.reddit||(this.social.reddit=new Ot,i.push(Hi(this,Xi,Zi).call(this,"reddit",this.social.reddit.init())))),a.twitch&&(!(0[...t,...e]).length)||this.socialInitialized.twitch&&this.social.twitch||(this.social.twitch=new ae,i.push(Hi(this,Xi,Zi).call(this,"twitch",this.social.twitch.init())))),a.twitter&&(!(0[...t,...e]).length)||this.socialInitialized.twitter&&this.social.twitter||(this.social.twitter=new Ge,i.push(Hi(this,Xi,Zi).call(this,"twitter",this.social.twitter.init())))),a.vk&&(!(0[...t,...e]).length)||this.socialInitialized.vk&&this.social.vk||(this.social.vk=new is,i.push(Hi(this,Xi,Zi).call(this,"vk",this.social.vk.init())))),a.youtube&&(!(0[...t,...e]).length)||this.socialInitialized.youtube&&this.social.youtube||(this.social.youtube=new Ts,i.push(Hi(this,Xi,Zi).call(this,"youtube",this.social.youtube.init())))),!a.steam||0<(e=Object.values(a.steam).reduce((t,e)=>[...t,...e]).length)&&(this.social.steam||(this.social.steam=new Yi),0{var e,s;return["groupLinks","officialGroupLinks","forumLinks","workshopLinks","workshopVoteLinks"].includes(t)&&(null===(e=a.steam)||void 0===e||null===(s=e[t])||void 0===s?void 0:s.length)||0}).reduce((t,e)=>t+e,0))&&!this.socialInitialized.steamStore&&i.push(Hi(this,Xi,Zi).call(this,"steamStore",this.social.steam.init("store"))),0{let e=!0;for(const s of t)s.result?this.socialInitialized[s.name]=s.result:e=!1;return e})}catch(t){return R(t,"Website.initSocial"),!1}}uniqueTasks(t){const e={};for(var[s,i]of Object.entries(t)){e[s]={};for(var[a,n]of Object.entries(i))e[s][a]=I(n)}return e}async toggleTask(t){try{if(!this.initialized&&!this.init())return!1;if(!await this.classifyTask(t))return!1;if(!await this.initSocial(t))return!1;const i=[];var e="do"===t,s=e?this.undoneTasks:this.socialTasks;if("skip"!==this.socialInitialized.discord&&this.social.discord&&i.push(this.social.discord.toggle({doTask:e,...s.discord})),this.social.instagram&&i.push(this.social.instagram.toggle({doTask:e,...s.instagram})),this.social.reddit&&i.push(this.social.reddit.toggle({doTask:e,...s.reddit})),this.social.twitch&&i.push(this.social.twitch.toggle({doTask:e,...s.twitch})),this.social.twitter&&i.push(this.social.twitter.toggle({doTask:e,...s.twitter})),this.social.vk&&i.push(this.social.vk.toggle({doTask:e,...s.vk})),this.social.youtube&&i.push(this.social.youtube.toggle({doTask:e,...s.youtube})),this.social.steam&&i.push(this.social.steam.toggle({doTask:e,...s.steam})),this.social.visitLink&&s.links&&e)for(const a of s.links)i.push(this.social.visitLink(a));return e&&s.extra&&this.extraDoTask&&0[...t,...e]).length&&i.push(this.extraDoTask(s.extra)),await Promise.all(i),V({}).success(K("allTasksComplete")),!0}catch(t){return R(t,"Website.toggleTask"),!1}}async doTask(){try{return await this.toggleTask("do")}catch(t){return R(t,"Website.doTask"),!1}}async undoTask(){try{return await this.toggleTask("undo")}catch(t){return R(t,"Website.undoTask"),!1}}};function ta(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function ea(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function sa(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}const ia=JSON.stringify({steam:{groupLinks:[],wishlistLinks:[],curatorLinks:[],followLinks:[]},vk:{nameLinks:[]}});var aa=new WeakSet,na=new WeakSet,oa=new WeakSet;function ra(){try{var t,e=null===(t=window.location.href.match(/\/giveaway\/([\d]+)/))||void 0===t?void 0:t[1];return e?(this.giveawayId=e,!0):(V({}).error(K("getFailed","GiveawayId")),!1)}catch(t){R(t,"FreeAnyWhere.getGiveawayId")}}async function la(t){try{const o=V({html:`
  • ${K("verifyingTask")}${t.title.trim()}...
  • `});var e,{result:s,statusText:i,status:a,data:n}=await L({url:`https://freeanywhere.net/api/v1/giveaway/${this.giveawayId}/challenge-status/${t.id}/?format=json`,method:"GET",dataType:"json",headers:{authorization:"Token "+window.localStorage.getItem("token"),"x-csrftoken":f.get("csrftoken")}});return"Success"===s?null!=n&&null!==(e=n.response)&&void 0!==e&&e.status?(o.success(),!0):(o.error(`Error:${null==n?void 0:n.statusText}(${null==n?void 0:n.status})`),!1):(o.error(s+`:${i}(${a})`),!1)}catch(t){return R(t,"Freeanywhere.verify"),!1}}async function ca(){try{var t;if(!N.other.checkLeftKey)return!0;var e=(await L({url:"https://freeanywhere.net/api/v1/widget/?format=json",method:"GET",dataType:"json",headers:{authorization:"Token "+window.localStorage.getItem("token")}}))["data"];return null!=e&&null!==(t=e.response)&&void 0!==t&&t.giveaways.find(t=>""+(null==t?void 0:t.id)===this.giveawayId)?!0:(await p().fire({icon:"warning",title:K("notice"),text:K("noKeysLeft"),confirmButtonText:K("confirm"),cancelButtonText:K("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0)}catch(t){return R(t,"Giveawaysu.checkLeftKey"),!1}}var ua=class extends Qi{constructor(){super(...arguments),ta(this,oa),ta(this,na),ta(this,aa),ea(this,"name","FreeAnyWhere"),ea(this,"tasks",[]),ea(this,"socialTasks",JSON.parse(ia)),ea(this,"undoneTasks",JSON.parse(ia)),ea(this,"buttons",["doTask","undoTask","verifyTask","getKey"])}static test(){return"freeanywhere.net"===window.location.host}async init(){try{const s=V({text:K("initing")});if(0<$('a[href="#/login"]').length)return window.open("/#/login","_self"),s.warning(K("needLogin")),!1;if(window.location.href.includes("/login"))return s.warning(K("needLogin")),!1;if(!/^https?:\/\/freeanywhere\.net\/#\/giveaway\/[\d]+/.test(window.location.href)){var t,e=null===(t=window.location.href.match(/https?:\/\/freeanywhere\.net\/.*?#\/giveaway\/([\d]+)/))||void 0===t?void 0:t[1];if(!e)return s.error(K("getFailed","Id")),!1;window.location.href="https://freeanywhere.net/#/giveaway/"+e}return sa(this,aa,ra).call(this)?(await sa(this,oa,ca).call(this)||V({}).warning(K("checkLeftKeyFailed")),this.initialized=!0,s.success(),!0):!1}catch(t){return R(t,"Freeanywhere.init"),!1}}async classifyTask(t){try{const u=V({text:K("getTasksInfo")});var e;"undo"===t&&(this.socialTasks=(null===(e=GM_getValue("fawTasks-"+this.giveawayId))||void 0===e?void 0:e.tasks)||JSON.parse(ia));var{result:s,statusText:i,status:a,data:n}=await L({url:`https://freeanywhere.net/api/v1/giveaway/${this.giveawayId}/?format=json`,method:"GET",headers:{authorization:"Token "+window.localStorage.getItem("token"),"x-csrftoken":f.get("csrftoken")},responseType:"json"});if("Success"!==s)return u.error(s+`:${i}(${a})`),!1;var o,r=null==n||null===(o=n.response)||void 0===o?void 0:o.challenges;if(r){"verify"===t&&(this.tasks=[]);for(const d of r){var l=d.challenge,c=d.challenge_provider;const h={id:d.id,title:d.title};if("verify"!==t||d.is_success)switch(c){case"steam":switch(h.social="steam",l){case"WL":"undo"===t&&this.socialTasks.steam.wishlistLinks.push(d.link),"do"!==t||d.is_success||this.undoneTasks.steam.wishlistLinks.push(d.link);break;case"JTG":"undo"===t&&this.socialTasks.steam.groupLinks.push(d.link),"do"!==t||d.is_success||this.undoneTasks.steam.groupLinks.push(d.link);break;case"STC":"undo"===t&&this.socialTasks.steam.curatorLinks.push(d.link),"do"!==t||d.is_success||this.undoneTasks.steam.curatorLinks.push(d.link);break;case"GF":"undo"===t&&this.socialTasks.steam.followLinks.push(d.link),"do"!==t||d.is_success||this.undoneTasks.steam.followLinks.push(d.link)}break;case"vk-oauth2":"undo"===t&&this.socialTasks.vk.nameLinks.push(d.link),"do"!==t||d.is_success||this.undoneTasks.vk.nameLinks.push(d.link);break;case"website":break;default:V({}).warning(K("unKnownTaskType")+": "+c)}else this.tasks.push(h)}return u.success(),this.undoneTasks=this.uniqueTasks(this.undoneTasks),this.socialTasks=this.uniqueTasks(this.socialTasks),window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:blue",JSON.stringify(this)),GM_setValue("fawTasks-"+this.giveawayId,{tasks:this.socialTasks,time:(new Date).getTime()}),!0}return u.error(`Error:${null==n?void 0:n.statusText}(${null==n?void 0:n.status})`),!1}catch(t){return R(t,"Freeanywhere.classifyTask"),!1}}async verifyTask(){try{if(!this.initialized&&!this.init())return!1;if(0===this.tasks.length&&!await this.classifyTask("verify"))return!1;const t=[];for(const e of this.tasks)t.push(sa(this,na,la).call(this,e)),await P(1e3);return await Promise.all(t),V({}).success(K("allTasksComplete")),!!await this.getKey(!0)}catch(t){return R(t,"Freeanywhere.verifyTask"),!1}}async getKey(t){try{if(!t&&!this.initialized&&!this.init())return!1;const o=V({text:K("gettingKey")});var e,{result:s,statusText:i,status:a,data:n}=await L({url:`https://freeanywhere.net/api/v1/giveaway/${this.giveawayId}/reward/?format=json`,method:"GET",dataType:"json",headers:{authorization:"Token "+window.localStorage.getItem("token")}});return"Success"===s?null!=n&&null!==(e=n.response)&&void 0!==e&&e.reward?(o.success(),V({}).success(n.response.reward),n.response.reward):(o.error(`Error:${null==n?void 0:n.statusText}(${null==n?void 0:n.status})`),!1):(o.error(s+`:${i}(${a})`),!1)}catch(t){return R(t,"FreeAnyWhere.getGiveawayId"),!1}}};function da(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function ha(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function pa(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}const fa={steam:{groupLinks:[],wishlistLinks:[],curatorLinks:[],curatorLikeLinks:[],followLinks:[],forumLinks:[],announcementLinks:[],workshopVoteLinks:[],playtestLinks:[]},discord:{serverLinks:[]},instagram:{userLinks:[]},vk:{nameLinks:[]},twitch:{channelLinks:[]},reddit:{redditLinks:[]},youtube:{channelLinks:[],likeLinks:[]}};var wa=new WeakSet,ga=new WeakSet,ma=new WeakSet;class va extends Qi{constructor(){super(...arguments),da(this,ma),da(this,ga),da(this,wa),ha(this,"name","GiveawaySu"),ha(this,"socialTasks",fa),ha(this,"undoneTasks",fa),ha(this,"buttons",["doTask","undoTask"])}static test(){return/^https?:\/\/giveaway\.su\/giveaway\/view\/[\d]+/.test(window.location.href)}async after(){try{pa(this,wa,ka).call(this)||V({}).warning(K("checkLoginFailed")),await pa(this,ga,ya).call(this)||V({}).warning(K("checkLeftKeyFailed")),V({}).warning(K("gsNotice"))}catch(t){R(t,"Giveawaysu.after")}}init(){try{const t=V({text:K("initing")});return 0<$("a.steam-login").length?(window.open("/steam/redirect","_self"),t.warning(K("needLogin")),!1):!!pa(this,ma,ba).call(this)&&(this.initialized=!0,t.success(),!0)}catch(t){return R(t,"Giveawaysu.init"),!1}}async classifyTask(t){try{const i=V({text:K("getTasksInfo")});var e;if("undo"===t)return this.socialTasks=(null===(e=GM_getValue("gasTasks-"+this.giveawayId))||void 0===e?void 0:e.tasks)||fa,!0;const a=[];var s=$("#actions tr");$("div.bind-discord").is(":visible")&&$("div.bind-discord a")[0].click(),$("div.bind-twitch").is(":visible")&&$("div.bind-twitch a")[0].click();for(const r of s)a.push(new Promise(e=>{const t=$(r).find('td:not(".hidden")');var s=t.eq(1).find('a:not([data-trigger="link"])'),i=t.eq(2).find('a:not([data-trigger="link"])');const a=0t?(n.includes("steam")&&/join/gi.test(o)?this.undoneTasks.steam.groupLinks.push(t):/like.*announcement/gi.test(o)?this.undoneTasks.steam.announcementLinks.push(t):/(follow|subscribe).*curator/gim.test(o)&&/^https?:\/\/store\.steampowered\.com\/curator\//.test(t)?this.undoneTasks.steam.curatorLinks.push(t):n.includes("steam")&&/follow|subscribe/gim.test(o)?this.undoneTasks.steam.curatorLikeLinks.push(t):/subscribe.*steam.*forum/gim.test(o)?this.undoneTasks.steam.forumLinks.push(t):n.includes("thumbs-up")&&/^https?:\/\/steamcommunity\.com\/sharedfiles\/filedetails\/\?id=[\d]+/.test(t)?this.undoneTasks.steam.workshopVoteLinks.push(t):n.includes("plus")&&/request.*playtest/gim.test(o)?this.undoneTasks.steam.playtestLinks.push(t):n.includes("discord")||/join.*discord/gim.test(o)?this.undoneTasks.discord.serverLinks.push(t):n.includes("instagram")||/follow.*instagram/gim.test(o)?this.undoneTasks.instagram.userLinks.push(t):n.includes("twitch")||/follow.*twitch.*channel/gim.test(o)?this.undoneTasks.twitch.channelLinks.push(t):n.includes("reddit")||/subscribe.*subreddit/gim.test(o)||/follow.*reddit/gim.test(o)?this.undoneTasks.reddit.redditLinks.push(t):/watch.*art/gim.test(o)?this.undoneTasks.steam.workshopVoteLinks.push(t):/subscribe.*youtube.*channel/gim.test(o)?this.undoneTasks.youtube.channelLinks.push(t):/(watch|like).*youtube.*video/gim.test(o)||(n.includes("youtube")||n.includes("thumbs-up"))&&/(watch|like).*video/gim.test(o)?this.undoneTasks.youtube.likeLinks.push(t):n.includes("vk")||/join.*vk.*group/gim.test(o)?this.undoneTasks.vk.nameLinks.push(t):/(on twitter)|(Follow.*on.*Facebook)/gim.test(o)||(/wishlist.*game|add.*wishlist/gim.test(o)&&this.undoneTasks.steam.wishlistLinks.push(t),/follow.*button/gim.test(o)&&this.undoneTasks.steam.followLinks.push(t)),void e(!0)):e(!1)).catch(t=>(R(t,"Giveawaysu.classifyTask->getRedirectLink"),!1))}));return await Promise.all(a),i.success(),this.undoneTasks=this.uniqueTasks(this.undoneTasks),this.socialTasks=this.undoneTasks,window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:blue",JSON.stringify(this)),GM_setValue("gasTasks-"+this.giveawayId,{tasks:this.socialTasks,time:(new Date).getTime()}),!0}catch(t){return R(t,"Giveawaysu.classifyTask"),!1}}}function ka(){try{return N.other.checkLogin?(0<$("a.steam-login").length&&window.open("/steam/redirect","_self"),!0):!0}catch(t){return R(t,"Giveawaysu.checkLogin"),!1}}async function ya(){try{return N.other.checkLeftKey?(0<$(".giveaway-ended").length&&0===$(".giveaway-key").length&&await p().fire({icon:"warning",title:K("notice"),text:K("noKeysLeft"),confirmButtonText:K("confirm"),cancelButtonText:K("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0):!0}catch(t){return R(t,"Giveawaysu.checkLeftKey"),!1}}function ba(){var t=null===(t=window.location.href.match(/\/view\/([\d]+)/))||void 0===t?void 0:t[1];return t?(this.giveawayId=t,!0):(V({text:K("getFailed","GiveawayId")}),!1)}function Ta(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function $a(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function xa(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}var Sa=new WeakSet,La=new WeakSet,Ia=new WeakSet,Ga=new WeakSet;async function _a(){try{if(0<$("a.buttonenter:contains(Register to join)").length)return V({}).error(K("needLogin")),!1;const c=$("a.buttonenter.buttongiveaway");if(/join giveaway/gim.test(c.text())){const u=V({text:K("joiningGiveaway")+"..."});var t,e,s,i,a,{result:n,statusText:o,status:r,data:l}=await L({url:c.attr("href"),method:"POST",data:"ajax=t",dataType:"json",headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8",accept:"application/json, text/javascript, */*; q=0.01",origin:window.location.origin}});return"Success"===n?200===(null==l?void 0:l.status)?null!==(t=l.response)&&void 0!==t&&t.success?(c.addClass("buttonentered").text("Success - Giveaway joined"),$("#giveawaysjoined").slideDown(),$("#giveawaysrecommend").slideDown(),u.success("Success"+(null!==(i=l.response)&&void 0!==i&&i.text?":"+(null===(a=l.response)||void 0===a?void 0:a.text):"")),!0):(u.error("Error"+(null!==(e=l.response)&&void 0!==e&&e.text?":"+(null===(s=l.response)||void 0===s?void 0:s.text):"")),!1):(u.error(`Error:${null==l?void 0:l.statusText}(${null==l?void 0:l.status})`),!1):(u.error(n+`:${o}(${r})`),!1)}return/success/gim.test($("a.buttonenter.buttongiveaway").text())?!0:(V({}).warning(K("needJoinGiveaway")),!1)}catch(t){return R(t,"Indiedb.init"),!1}}async function Ca(){try{const e=$("script").map((t,e)=>{var s,i,a,n,o;return/\$\(document\)/gim.test(e.innerHTML)?[null===(s=e.innerHTML.match(/"\/[\d]+"/gim))||void 0===s||null===(i=s[0])||void 0===i||null===(a=i.match(/[\d]+/))||void 0===a?void 0:a[0],null===(e=e.innerHTML.match(/"\/newsletter\/ajax\/subscribeprofile\/optin\/[\d]+"/gim))||void 0===e||null===(n=e[0])||void 0===n||null===(o=n.match(/[\d]+/))||void 0===o?void 0:o[0]]:null});if(2!==e.length)return V({}).error(K("getFailed","TaskId")),!1;{const s=[];for(const t of $("#giveawaysjoined a[class*=promo]")){const a=$(t);if(!a.hasClass("buttonentered")){const n=V({text:`${K("doing")}:${a.parents("p").text()}...`});if(/facebookpromo|twitterpromo|visitpromo/gim.test(t.className)){let t="";t=a.hasClass("facebookpromo")?"facebookpromo":a.hasClass("twitterpromo")?"twitterpromo":"visitpromo",s.push(new Promise(i=>{$.ajax({type:"POST",url:urlPath(`/giveaways/ajax/${t}/`+e[0]),timeout:6e4,dataType:"json",data:{ajax:"t"},error(t,e,s){window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:red",{response:t,error:e,exception:s}),n.error("Error:An error has occurred performing the action requested. Please try again shortly."),i(!0)},success(t){t.success?(n.success("Success:"+t.text),a.addClass("buttonentered").closest("p").html(a.closest("p").find("span").html())):n.error("Error:"+t.text),i(!0)}})}))}else a.hasClass("emailoptinpromo")?s.push(new Promise(i=>{$.ajax({type:"POST",url:urlPath("/newsletter/ajax/subscribeprofile/optin/"+e[1]),timeout:6e4,dataType:"json",data:{ajax:"t",emailsystoggle:4},error(t,e,s){window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:red",{response:t,error:e,exception:s}),n.error("Error:An error has occurred performing the action requested. Please try again shortly."),i(!0)},success(t){t.success?(n.success("Success:"+t.text),a.toggleClass("buttonentered").closest("p").html(a.closest("p").find("span").html())):n.error("Error:"+t.text),i(!0)}})})):a.hasClass("watchingpromo")?s.push(new Promise(i=>{var t;const e=(t=>{try{const i={};return t?t.includes("?")&&t.split("?")[1].replace(/([^?&=]+)=([^&]+)/g,(t,e,s)=>(i[e]=s,t)):window.location.search.replace(/([^?&=]+)=([^&]+)/g,(t,e,s)=>(i[e]=s,t)),i}catch(t){return R(t,"getUrlQuery"),{}}})(a.attr("href"));e.ajax="t",$.ajax({type:"POST",url:urlPath(null===(t=a.attr("href"))||void 0===t?void 0:t.split(/[?#]/)[0]),timeout:6e4,dataType:"json",data:e,error(t,e,s){window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:red",{response:t,error:e,exception:s}),n.error("Error:An error has occurred performing the action requested. Please try again shortly."),i(!0)},success(t){t.success?(n.success("Success:"+t.text),a.toggleClass("buttonentered").closest("p").html(a.closest("p").find("span").html())):n.error("Error:"+t.text),i(!0)}})})):/the-challenge-of-adblock/gim.test(a.attr("href"))?n.error("Error:"+K("unKnownTaskType")):s.push(new Promise(i=>{$.ajax({type:"POST",url:urlPath(a.attr("href")),timeout:6e4,dataType:"json",data:{ajax:"t"},error(t,e,s){window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:red",{response:t,error:e,exception:s}),n.error("Error:An error has occurred performing the action requested. Please try again shortly."),i(!0)},success(t){t.success?(n.success("Success:"+t.text),a.toggleClass("buttonentered").closest("p").html(a.closest("p").find("span").html())):n.error("Error:"+t.text),i(!0)}})}))}}return await Promise.all(s),V({}).success(K("allTasksComplete")),!0}}catch(t){return R(t,"Indiedb.classifyTask"),!1}}function Aa(){try{return N.other.checkLogin?(0<$("a.buttonenter:contains(Register to join)").length&&window.open("/members/login","_self"),!0):!0}catch(t){return R(t,"Indiedb.checkLogin"),!1}}async function Oa(){try{return N.other.checkLeftKey?(0<$('a.buttonenter:contains("next time"),a.buttonenter:contains("Giveaway is closed")').length&&await p().fire({icon:"warning",title:K("notice"),text:K("giveawayEnded"),confirmButtonText:K("confirm"),cancelButtonText:K("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0):!0}catch(t){return R(t,"Indiedb.checkLeftKey"),!1}}var Ea=class{constructor(){Ta(this,Ga),Ta(this,Ia),Ta(this,La),Ta(this,Sa),$a(this,"name","Indiedb"),$a(this,"buttons",["doTask"])}static test(){return"www.indiedb.com"===window.location.host}async after(){try{xa(this,Ia,Aa).call(this)||V({}).warning(K("checkLoginFailed")),await xa(this,Ga,Oa).call(this)||V({}).warning(K("checkLeftKeyFailed"))}catch(t){R(t,"Indiedb.after")}}async doTask(){try{return await xa(this,Sa,_a).call(this)?await xa(this,La,Ca).call(this):!1}catch(t){return R(t,"Indiedb.doTask"),!1}}};function Da(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function ja(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Wa(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}const Pa=JSON.stringify({steam:{groupLinks:[],officialGroupLinks:[],wishlistLinks:[],curatorLinks:[]},discord:{serverLinks:[]},extra:{videoTasks:[]},links:[]});var Va=new WeakSet,Na=new WeakSet,Fa=new WeakSet,Ma=new WeakSet;async function Ua(t){try{const n=V({text:K("doingKeyhubTask")});var{result:e,statusText:s,status:i,data:a}=await L({url:"/away?data="+t,method:"GET",headers:{origin:"https://key-hub.eu",referer:"https://key-hub.eu/"}});return"Success"===e?200===(null==a?void 0:a.status)?(n.success(),!0):(n.error(`Error:${null==a?void 0:a.statusText}(${null==a?void 0:a.status})`),!1):(n.error(e+`:${s}(${i})`),!1)}catch(t){return R(t,"Keyhub.doScriptTask"),!1}}function Ba(){try{var t,e=null===(t=window.location.href.match(/giveaway\/([\d]+)/))||void 0===t?void 0:t[1];return e?(this.giveawayId=e,!0):(V({}).error(K("getFailed","GiveawayId")),!1)}catch(t){return R(t,"Keyhub.getGiveawayId"),!1}}async function Ka(){try{return N.other.checkLeftKey?("0"===$("#keysleft").text().trim()&&await p().fire({icon:"warning",title:K("notice"),text:K("noKeysLeft"),confirmButtonText:K("confirm"),cancelButtonText:K("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0):!0}catch(t){return R(t,"Keyhub.checkLeftKey"),!1}}function Ra(){try{return N.other.checkLogin?(0<$('a[href*="/connect/steam"]').length&&window.open("/connect/steam","_self"),!0):!0}catch(t){return R(t,"Keyhub.checkLogin"),!1}}var za=class extends Qi{constructor(){super(...arguments),Da(this,Ma),Da(this,Fa),Da(this,Na),Da(this,Va),ja(this,"name","Keyhub"),ja(this,"socialTasks",JSON.parse(Pa)),ja(this,"undoneTasks",JSON.parse(Pa)),ja(this,"buttons",["doTask","undoTask"])}static test(){return"key-hub.eu"===window.location.host}async after(){try{Wa(this,Ma,Ra).call(this)||V({}).warning(K("checkLoginFailed")),await Wa(this,Fa,Ka).call(this)||V({}).warning(K("checkLeftKeyFailed")),$(".NSFW").hide()}catch(t){R(t,"Keyhub.after")}}init(){try{const t=V({text:K("initing")});return 0<$('a[href*="/connect/steam"]').length?(window.open("/connect/steam","_self"),t.warning(K("needLogin")),!1):!!Wa(this,Na,Ba).call(this)&&($("#VPNoverlay").hide(),$("#mainArticleSection").show(),this.initialized=!0,t.success(),!0)}catch(t){return R(t,"Keyhub.init"),!1}}async classifyTask(s){try{const n=V({text:K("getTasksInfo")});var t;"undo"===s&&(this.socialTasks=(null===(t=GM_getValue("khTasks-"+this.giveawayId))||void 0===t?void 0:t.tasks)||JSON.parse(Pa));for(const o of $('.task:not(".googleads")').filter((t,e)=>"do"!==s||0===$(e).find("i.fa-check-circle:visible").length).find("a")){let t=$(o).attr("href");var e,i,a=$(o).text().trim();t&&((/\/away\?data=/.test(t)||/steamcommunity\.com\/gid\//.test(t))&&(t=await u(t)||t),/https?:\/\/key-hub\.eu\/connect\/discord/.test(t)?window.open(t,"_blank"):/steamcommunity\.com\/groups\//.test(t)?("undo"===s&&this.socialTasks.steam.groupLinks.push(t),"do"===s&&this.undoneTasks.steam.groupLinks.push(t)):/steamcommunity\.com\/games\/[\d]+/.test(t)?("undo"===s&&this.socialTasks.steam.officialGroupLinks.push(t),"do"===s&&this.undoneTasks.steam.officialGroupLinks.push(t)):/store\.steampowered\.com\/app\//.test(t)&&/wishlist/gim.test(a)?("undo"===s&&this.socialTasks.steam.wishlistLinks.push(t),"do"===s&&this.undoneTasks.steam.wishlistLinks.push(t)):/store\.steampowered\.com\/curator\//.test(t)?("undo"===s&&this.socialTasks.steam.curatorLinks.push(t),"do"===s&&this.undoneTasks.steam.curatorLinks.push(t)):/^https?:\/\/discord\.com\/invite\//.test(t)?("undo"===s&&this.socialTasks.discord.serverLinks.push(t),"do"===s&&this.undoneTasks.discord.serverLinks.push(t)):/^javascript:videoTask.+/.test(t)?"do"!==s||(i=null===(e=t.match(/javascript:videoTask\('.+?','(.+?)'/))||void 0===e?void 0:e[1])&&this.undoneTasks.extra.videoTasks.push(i):/^https?:\/\/www\.instagram\.com\/.*/.test(t)||/^https?:\/\/twitter\.com\/.*/.test(t)||/^https?:\/\/www\.twitch\.tv\/.*/.test(t)||/^https?:\/\/www\.facebook\.com\/.*/.test(t)||/^https?:\/\/www\.youtube\.com\/.*/.test(t)||/^https?:\/\/store\.steampowered\.com\/developer\//.test(t)||/^https?:\/\/.*?\.itch\.io\/.*/.test(t)||/^https?:\/\/key-hub\.eu.*/.test(t)||/^https?:\/\/store\.steampowered\.com\/app\/.*/.test(t)||/^https?:\/\/qr\.streamelements\.com\/.*/.test(t)||/^https?:\/\/store\.steampowered\.com\/news\/app\/.*/.test(t)||V({}).warning(`${K("unKnownTaskType")}: ${a}(${t})`))}return n.success(),this.undoneTasks=this.uniqueTasks(this.undoneTasks),this.socialTasks=this.uniqueTasks(this.socialTasks),window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:blue",JSON.stringify(this)),GM_setValue("khTasks-"+this.giveawayId,{tasks:this.socialTasks,time:(new Date).getTime()}),!0}catch(t){return R(t,"Keyhub.classifyTask"),!1}}async extraDoTask(t){t=t.videoTasks;try{const e=[];for(const s of t)e.push(Wa(this,Va,Ua).call(this,s));return Promise.all(e).then(()=>!0)}catch(t){return R(t,"Keyhub.extraDoTask"),!1}}};function Ya(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function qa(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Ja(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}const Ha=JSON.stringify({steam:{groupLinks:[],wishlistLinks:[],curatorLinks:[],curatorLikeLinks:[]},twitter:{userLinks:[]},vk:{nameLinks:[]},discord:{serverLinks:[]}});var Xa=new WeakSet,Za=new WeakSet,Qa=new WeakSet;async function tn(t){try{const s=V({html:`
  • ${K("verifyingTask")}${t}...
  • `});return await new Promise(e=>{$.ajax({url:"https://givekey.ru/giveaway/task",method:"POST",data:`id=${t}&user_id=`+this.userId,dataType:"json",headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content")},success:t=>{t.btn&&$(`button[data-id=${this.userId}]`).html(t.btn),"ok"===t.status?($(".task_check_"+t.id).html(``),s.success(),e(!0)):"end"===t.status?(s.success(),V({}).success(t.key),e(!0)):(s.error("Error:"+t.msg),e(!1))},error:t=>{s.error(`Error:${t.statusText}(${t.status})`),e(!1)}})})}catch(t){return R(t,"Givekey.verify"),!1}}function en(){try{var t,e=null===(t=window.location.href.match(/giveaway\/([\d]+)/))||void 0===t?void 0:t[1];return e?(this.giveawayId=e,!0):(V({text:K("getFailed","GiveawayId")}),!1)}catch(t){return R(t,"Givekey.getGiveawayId"),!1}}async function sn(){try{return N.other.checkLeftKey?($("#keys_count").text()||await p().fire({icon:"warning",title:K("notice"),text:K("noKeysLeft"),confirmButtonText:K("confirm"),cancelButtonText:K("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0):!0}catch(t){return R(t,"Givekey.checkLeftKey"),!1}}var an=class extends Qi{constructor(){super(...arguments),Ya(this,Qa),Ya(this,Za),Ya(this,Xa),qa(this,"name","Givekey"),qa(this,"tasks",[]),qa(this,"socialTasks",JSON.parse(Ha)),qa(this,"undoneTasks",JSON.parse(Ha)),qa(this,"userId",void 0),qa(this,"buttons",["doTask","undoTask","verifyTask"])}static test(){return"givekey.ru"===window.location.host}async after(){try{await new Promise(t=>{const e=setInterval(()=>{0<$("#navbarDropdown").length&&(clearInterval(e),t(!0))})}),await Ja(this,Qa,sn).call(this)||V({}).warning(K("checkLeftKeyFailed"))}catch(t){return R(t,"Givekey.after"),!1}}init(){try{const e=V({text:K("initing")});if(0<$('a[href*="/auth/steam"]').length)return window.open("/auth/steam","_self"),e.warning(K("needLogin")),!1;if(!Ja(this,Za,en).call(this))return!1;var t=$('meta[name="user-id"]').attr("content");return t?(this.userId=t,this.initialized=!0,e.success(),!0):(e.error(K("getFailed",K("userId"))),!1)}catch(t){return R(t,"Givekey.init"),!1}}async classifyTask(e){try{const n=V({text:K("getTasksInfo")});var t;"undo"===e&&(this.socialTasks=(null===(t=GM_getValue("gkTasks-"+this.giveawayId))||void 0===t?void 0:t.tasks)||JSON.parse(Ha));for(const o of $('.card-body:has("button") .row')){const r=$(o);var s=/Complete/i.test(r.find("button").text().trim());if(!s||"undo"===e){const l=r.find("#task_check");var i=l.attr("data-id");if(i&&this.tasks.push(i),"verify"!==e){let t=r.find("a").attr("href")||null;var a=r.find("a").text().trim();const c=r.find("i");t&&a&&(/^https?:\/\/givekey\.ru\/giveaway\/[\d]+\/execution_task/.test(t)&&(t=await u(t)),t&&(/^https?:\/\/vk\.com\//.test(t)?(this.socialTasks.vk.nameLinks.push(t),"do"!==e||s||this.undoneTasks.vk.nameLinks.push(t)):/^https?:\/\/steamcommunity\.com\/groups/.test(t)?(this.socialTasks.steam.groupLinks.push(t),"do"!==e||s||this.undoneTasks.steam.groupLinks.push(t)):/^https?:\/\/store\.steampowered\.com\/app\//.test(t)?(this.socialTasks.steam.wishlistLinks.push(t),"do"!==e||s||this.undoneTasks.steam.wishlistLinks.push(t)):/Subscribe/gi.test(a)&&c.hasClass("fa-steam-square")?/^https?:\/\/store\.steampowered\.com\/curator\//.test(t)?(this.socialTasks.steam.curatorLinks.push(t),"do"!==e||s||this.undoneTasks.steam.curatorLinks.push(t)):(this.socialTasks.steam.curatorLikeLinks.push(t),"do"!==e||s||this.undoneTasks.steam.curatorLikeLinks.push(t)):/^https?:\/\/twitter\.com\//.test(t)&&/Subscribe/gi.test(a)?(this.socialTasks.twitter.userLinks.push(t),"do"!==e||s||this.undoneTasks.twitter.userLinks.push(t)):c.hasClass("fa-discord")||/^https?:\/\/discord\.com\/invite\//.test(t)?(this.socialTasks.discord.serverLinks.push(t),"do"!==e||s||this.undoneTasks.discord.serverLinks.push(t)):V({}).warning(`${K("unKnownTaskType")}: ${a}(${t})`)))}}}return n.success(),this.tasks=I(this.tasks),this.undoneTasks=this.uniqueTasks(this.undoneTasks),this.socialTasks=this.uniqueTasks(this.socialTasks),window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:blue",JSON.stringify(this)),GM_setValue("gkTasks-"+this.giveawayId,{tasks:this.socialTasks,time:(new Date).getTime()}),!0}catch(t){return R(t,"Givekey.classifyTask"),!1}}async verifyTask(){try{if(!this.initialized&&!this.init())return!1;if(0===this.tasks.length&&!await this.classifyTask("verify"))return!1;V({}).warning(K("giveKeyNoticeBefore"));var e=this.tasks.length;for(let t=0;t${K("giveKeyNoticeAfter")}`}),!0}catch(t){return R(t,"Givekey.verifyTask"),!1}}};function nn(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function on(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function rn(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}var ln=new WeakSet,cn=new WeakSet,un=new WeakSet;function dn(){try{return N.other.checkLogin?(0<$('a[href*="/account/auth"]').length&&window.open($('a[href*="/account/auth"]').attr("href"),"_self"),!0):!0}catch(t){return R(t,"GiveeClub.checkLogin"),!1}}function hn(){var t=null===(t=window.location.href.match(/\/event\/([\d]+)/))||void 0===t?void 0:t[1];return t?(this.giveawayId=t,!0):(V({text:K("getFailed","GiveawayId")}),!1)}async function pn(){try{return N.other.checkLeftKey?(0<$(".event-ended").length&&0===$(".event-winner").length&&await p().fire({icon:"warning",title:K("notice"),text:K("giveawayEnded"),confirmButtonText:K("confirm"),cancelButtonText:K("cancel"),showCancelButton:!0}).then(t=>{t=t.value;t&&window.close()}),!0):!0}catch(t){return R(t,"Giveawaysu.checkLeftKey"),!1}}var fn=class extends va{constructor(){super(...arguments),nn(this,un),nn(this,cn),nn(this,ln),on(this,"name","GiveeClub"),on(this,"buttons",["doTask","undoTask","verifyTask"])}static test(){return/^https?:\/\/givee\.club\/.*?\/event\/[\d]+/.test(window.location.href)}async after(){try{rn(this,ln,dn).call(this)||V({}).warning(K("checkLoginFailed")),await rn(this,un,pn).call(this)||V({}).warning(K("checkLeftKeyFailed"))}catch(t){R(t,"GiveeClub.after")}}init(){try{const t=V({text:K("initing")});return rn(this,ln,dn).call(this)?!!rn(this,cn,hn).call(this)&&(this.initialized=!0,t.success(),!0):(t.warning(K("needLogin")),!1)}catch(t){return R(t,"GiveeClub.init"),!1}}async classifyTask(t){try{const s=V({text:K("getTasksInfo")});var e;if("undo"===t)return this.socialTasks=(null===(e=GM_getValue("gcTasks-"+this.giveawayId))||void 0===e?void 0:e.tasks)||fa,!0;const i=[];for(const o of $(".event-actions tr"))i.push(new Promise(e=>{var t;const s=$(o).find(".event-action-label a"),i=$(o).find(".event-action-icon i").attr("class")||"",a=s.text().trim(),n=null===(t=$(o).find("button[data-type]"))||void 0===t?void 0:t.attr("data-type");if(i.includes("ban")||/AdBlock/i.test(a)||i.includes("envelope"))return e(!0);u(s.attr("href")).then(t=>t?("steam.group.join"===n&&/^https?:\/\/steamcommunity\.com\/groups/.test(t)?this.undoneTasks.steam.groupLinks.push(t):/like.*announcement/gi.test(a)?this.undoneTasks.steam.announcementLinks.push(t):"steam.game.wishlist"===n&&/^https?:\/\/store\.steampowered\.com\/app\//.test(t)?this.undoneTasks.steam.wishlistLinks.push(t):"steam.game.wishlist"===n&&s.attr("data-steam-wishlist-appid")?this.undoneTasks.steam.wishlistLinks.push("https://store.steampowered.com/app/"+s.attr("data-steam-wishlist-appid")):"steam.game.follow"===n&&/^https?:\/\/store\.steampowered\.com\/app\//.test(t)?this.undoneTasks.steam.followLinks.push(t):/^https?:\/\/store\.steampowered\.com\/curator\//.test(t)?this.undoneTasks.steam.curatorLinks.push(t):i.includes("steam")&&/follow|subscribe/gim.test(a)?this.undoneTasks.steam.curatorLikeLinks.push(t):/subscribe.*steam.*forum/gim.test(a)?this.undoneTasks.steam.forumLinks.push(t):i.includes("discord")?this.undoneTasks.discord.serverLinks.push(t):i.includes("instagram")?this.undoneTasks.instagram.userLinks.push(t):i.includes("twitch")?this.undoneTasks.twitch.channelLinks.push(t):i.includes("reddit")?this.undoneTasks.reddit.redditLinks.push(t):/watch.*art/gim.test(a)?this.undoneTasks.steam.workshopVoteLinks.push(t):/subscribe.*youtube.*channel/gim.test(a)?this.undoneTasks.youtube.channelLinks.push(t):/(watch|like).*youtube.*video/gim.test(a)||(i.includes("youtube")||i.includes("thumbs-up"))&&/(watch|like).*video/gim.test(a)?this.undoneTasks.youtube.likeLinks.push(t):i.includes("vk")||/join.*vk.*group/gim.test(a)?this.undoneTasks.vk.nameLinks.push(t):/(on twitter)|(Follow.*on.*Facebook)/gim.test(a)||/follow.*button/gim.test(a)&&this.undoneTasks.steam.followLinks.push(t),void e(!0)):e(!1)).catch(t=>(R(t,"GiveeClub.classifyTask->getRedirectLink"),!1))}));return await Promise.all(i),s.success(),this.undoneTasks=this.uniqueTasks(this.undoneTasks),this.socialTasks=this.undoneTasks,window.DEBUG&&console.log("%cAuto-Task[Debug]:","color:blue",JSON.stringify(this)),GM_setValue("gcTasks-"+this.giveawayId,{tasks:this.socialTasks,time:(new Date).getTime()}),!0}catch(t){return R(t,"GiveeClub.classifyTask"),!1}}async verifyTask(){try{const t=V({text:K("giveeClubVerifyNotice")});for(const e of $(".event-actions tr button").has("i.glyphicon-refresh").not('[data-type="user.adblock"]'))e.click(),"steam.game.wishlist"!==$(e).attr("data-type")&&await P(1e3);return t.warning(K("giveeClubVerifyFinished")),!0}catch(t){return R(t,"Givekey.verifyTask"),!1}}};function wn(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function gn(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function mn(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}const vn={maxPoint:"99999999"};var kn=new WeakSet,yn=new WeakSet;async function bn(t){try{for(const u of $(`.giveaways-page-item:contains('${t}'):not(:contains('ENTERED'))`)){var e,s,i,a,n,o,r,l=parseInt((null===(e=$(u).find(".giveaways-page-item-header-points").text().match(/[\d]+/gim))||void 0===e?void 0:e[0])||"999999",10),c=$(u).find(".giveaways-page-item-footer-name").text().trim();if("points"===t&&l>this.myPoints)V({}).warning(K("noPoints")+": "+c);else if("points"!==t||l){if(!("points"===t&&l>this.maxPoints)){const d=V({text:`${K("joiningLottery")}${c}...`}),h=$(u).find("a.giveaways-page-item-img-btn-enter:contains('enter')");if(null===h||void 0===h||null===(s=h.attr("onclick"))||void 0===s||!s.includes("checkUser")||(n=null===(i=h.attr("onclick"))||void 0===i||null===(a=i.match(/[\d]+/))||void 0===a?void 0:a[0])&&checkUser(n),h.attr("href")){const{result:p,statusText:f,status:w,data:g}=await L({url:h.attr("href"),method:"GET"});"Success"===p?null!==g&&void 0!==g&&g.responseText&&/You've entered this giveaway/gim.test(g.responseText)?(d.success(),r=null===(o=g.responseText.match(/Points:[\s]*?([\d]+)/))||void 0===o?void 0:o[1],"points"===t&&r&&(this.myPoints=parseInt(r,10))):d.error(`Error:${null===g||void 0===g?void 0:g.statusText}(${null===g||void 0===g?void 0:g.status})`):d.error(p+`:${f}(${w})`)}else d.error('Error: No "href".')}}else V({}).warning(K("getNeedPointsFailed")+": "+c)}V({text:"-----END-----"})}catch(t){R(t,"OpiumPulses.toggleTask")}}function Tn(){try{return N.other.checkLogin?(1<$('a[href*="/site/login"]').length&&window.open("/site/login","_self"),!0):!0}catch(t){return R(t,"OpiumPulses.checkLogin"),!1}}var t=class{constructor(){wn(this,yn),wn(this,kn),gn(this,"name","OpiumPulses"),gn(this,"options",{...vn,...GM_getValue("OpiumPulsesOptions")}),gn(this,"maxPoints",99999999),gn(this,"myPoints",0),gn(this,"buttons",["doFreeTask","doPointTask"])}static test(){return"www.opiumpulses.com"===window.location.host}async after(){try{mn(this,yn,Tn).call(this)||V({}).warning(K("checkLoginFailed")),this.maxPoints=parseInt(this.options.maxPoint,10)}catch(t){R(t,"OpiumPulses.after")}}async doFreeTask(){try{mn(this,kn,bn).call(this,"FREE")}catch(t){R(t,"OpiumPulses.doFreeTask")}}async doPointTask(){try{var t;this.myPoints=parseInt((null===(t=$(".page-header__nav-func-user-nav-items.points-items").text().match(/[\d]+/gim))||void 0===t?void 0:t[0])||"0",10),mn(this,kn,bn).call(this,"points")}catch(t){R(t,"OpiumPulses.doPointTask")}}init(){return!0}classifyTask(){return!0}},$n=Fo(698),xn=Fo.n($n);const Sn={async classify(t){try{return/^https?:\/\/giveaway\.su\/giveaway\/view\/[\d]+/.test(t)?await this.giveawaySu(t):/^https?:\/\/givee\.club\/[\w]+?\/event\/[\d]+/.test(t)?await this.giveeClub(t):/^https?:\/\/gleam\.io\/.+?\/.+/.test(t)?await this.gleam(t):/^https?:\/\/www\.indiedb\.com\/giveaways\/.+/.test(t)?await this.indieDb(t):/^https?:\/\/key-hub\.eu\/giveaway\/[\d]+/.test(t)?await this.keyhub(t):/^https?:\/\/opquests\.com\/quests\/[\d]+/.test(t)?await this.opquests(t):!!/^https?:\/\/itch\.io\/s\/[\d]+?\/.*/.test(t)&&await this.itch(t)}catch(t){return R(t,"leftKeyChecker.classify"),!1}},async giveawaySu(t){try{const{result:e,data:s}=await L({url:t,method:"GET"});return"Success"===e&&200===(null===s||void 0===s?void 0:s.status)?!s.responseText.includes('class="steam-login"')&&(s.responseText.includes('class="giveaway-ended"')?"Ended":"Active"):!1}catch(t){return R(t,"leftKeyChecker.giveawaySu"),!1}},async giveeClub(t){try{const{result:e,data:s}=await L({url:t,method:"GET"});return"Success"===e&&200===(null===s||void 0===s?void 0:s.status)?s.responseText.includes('class="event-winner"')?"Won":s.responseText.includes('class="event-ended"')?"Ended":"Active":!1}catch(t){return R(t,"leftKeyChecker.giveeClub"),!1}},async gleam(t){try{const{result:r,data:l}=await L({url:t,method:"GET"});if("Success"!==r||200!==(null===l||void 0===l?void 0:l.status))return!1;var e,s,i;if(/incentives":{"[\d]+?":\[".+?"\]/.test(l.responseText))return"Won";var a=null===(e=l.responseText.match(/