diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 7b54047..961c9ec 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -20,9 +20,9 @@ jobs: uses: softprops/action-gh-release@v1 with: prerelease: false - tag_name: v4.2.17 - name: 4.2.17 - body: '- 修复Givee无法识别Steam加组任务的BUG' + tag_name: v4.2.18 + name: 4.2.18 + body: '- Gleam任务识别优化' 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 106ff98..db7d301 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.17 +// @version 4.2.18 // @description 赠Key站自动任务 // @author HCLonely // @license MIT diff --git a/dist/auto-task-v4-for-giveawaysu.user.js b/dist/auto-task-v4-for-giveawaysu.user.js index b8cb84f..33e0640 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.17 +// @version 4.2.18 // @description 赠Key站自动任务 // @author HCLonely // @license MIT diff --git a/dist/auto-task-v4.all.user.js b/dist/auto-task-v4.all.user.js index 888c3c8..6426b6d 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.17 +// @version 4.2.18 // @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 @@ -9716,7 +9716,7 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); this.undoneTasks.steam.curatorLinks.push(link); } } - } else if (socialIcon.hasClass('fa-shield') && taskText.includes('earn.vloot.io') || socialIcon.hasClass('fa-tiktok')) { + } else if (socialIcon.hasClass('fa-shield') && taskText.includes('vloot.io') || socialIcon.hasClass('fa-tiktok')) { const continueBtn = expandInfo.find('span:contains(Continue),button:contains(Continue)'); for (const button of continueBtn) { button.click(); @@ -9730,7 +9730,7 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); await delay(500); expandInfo.find('input').val(this.options.gameroundUsername); } - } else if (socialIcon.hasClass('fa-bullhorn') && taskText.includes('Complete')) { + } else if (socialIcon.hasClass('fa-bullhorn') && /Complete/gi.test(taskText)) { if (action !== 'do') { continue; } @@ -9743,7 +9743,7 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); continue; } this.undoneTasks.extra.gleam.push(gleamLink); - } else if (socialIcon.hasClass('fa-question') || socialIcon.hasClass('fa-reddit') || socialIcon.hasClass('fa-instagram') || socialIcon.hasClass('fa-facebook-f') || socialIcon.hasClass('fa-telegram-plane') || socialIcon.hasClass('fa-shield') && taskText.includes('Check out')) {} else { + } else if (socialIcon.hasClass('fa-question') || socialIcon.hasClass('fa-reddit') || socialIcon.hasClass('fa-instagram') || socialIcon.hasClass('fa-facebook-f') || socialIcon.hasClass('fa-telegram-plane') || socialIcon.hasClass('fa-envelope') || socialIcon.hasClass('fa-shield') && taskText.includes('Check out')) {} else { scripts_echoLog({}).warning(`${i18n('unKnownTaskType')}: ${taskText}`); } } diff --git a/dist/auto-task-v4.compatibility.all.user.js b/dist/auto-task-v4.compatibility.all.user.js index e5659bb..d6926f5 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.17 +// @version 4.2.18 // @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 @@ -145,7 +145,7 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); ${R("browser")}${t.browserZH}${t.browserVersion} ${R("scriptManager")}${GM_info.scriptHandler}${GM_info.version} ${R("script")}${GM_info.script.name}${GM_info.script.version} - `;$("body").append(`

${R("environment")}

`+e)}catch(t){K(t,"Setting.environment")}}function bo(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 To(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var $o=new WeakSet;function xo(i){try{var a=GM_getValue(i);if(null==a||!a.tasks)return;let t="",e="",s="";var n,o,[r,l]=i.split("-");switch(r){case"fawTasks":e=`Freeanywhere[${l}]`,s="https://freeanywhere.net/#/giveaway/"+l;break;case"gasTasks":e=`Giveawaysu[${l}]`,s="https://giveaway.su/giveaway/view/"+l;break;case"gcTasks":e=`GiveeClub[${l}]`,s="https://givee.club/event/"+l;break;case"gkTasks":e=`Givekey[${l}]`,s="https://givekey.ru/giveaway/"+l;break;case"gleamTasks":e=`Gleam[${l}]`,s="https://gleam.io"+l;break;case"khTasks":e=`keyhub[${l}]`,s="https://key-hub.eu/giveaway/"+l;break;case"prysTasks":e=`Prys[${l}]`,s="https://prys.revadike.com/giveaway/?id="+l;break;default:return}for([n,o]of Object.entries(a.tasks))for(var[c,u]of Object.entries(o))for(const d of u)t+=`
  • ${n}.${R(c.replace("Link",""))}: ${55
  • `;$(".container").append(`
    ${e}
    ${R("lastChangeTime")}: ${gn(a.time).format("YYYY-MM-DD HH:mm:ss")}
    `),$("span.delete-task").on("click",function(){var t=$(this).attr("data-name");t?(GM_deleteValue(t),$(`div.card[data-name="${t}"]`).remove(),p().fire({title:R("clearTaskFinished"),text:t,icon:"success"})):p().fire({title:R("clearTaskFailed"),icon:"error"})})}catch(t){K(t,"History.addItem")}}const So=[na,pa,Ga,Va,Ha,rn,t,s,g,class extends Hi{constructor(){super(...arguments),En(this,Un),En(this,Mn),En(this,Fn),En(this,Vn),En(this,Nn),Dn(this,"name","Gleam"),Dn(this,"undoneTasks",JSON.parse(Pn)),Dn(this,"socialTasks",JSON.parse(Pn)),Dn(this,"options",{...Wn,...GM_getValue("GleamOptions")}),Dn(this,"buttons",["doTask","undoTask","verifyTask"])}static test(){return"gleam.io"===window.location.host}async after(){try{if(window.location.search.includes("8b07d23f4bfa65f9")){const s=setInterval(()=>{0<$(".entry-content .entry-method i.fa-check").length&&(clearInterval(s),window.close())});for(const i of $(".entry-content .entry-method")){const a=$(i).find(".user-links"),n=$(i).find(".expandable");var t=n.find("a.btn,a:contains(Continue),button:contains(Continue)");if(0!0)}catch(t){return K(t,"Gleam.extraDoTask"),!1}}async verifyTask(){try{N({text:R("verifyingTask")+"..."});for(const t of $(".entry-content .entry-method")){const e=$(t);if(0!==e.find("i.fa-question").length){const s=e.find(".user-links");s[0].click(),await W(500),await jn(this,Nn,Bn).call(this);for(const i of e.find(".expandable").find("span:contains(Continue),button:contains(Continue)"))i.click(),await W(500),await jn(this,Nn,Bn).call(this)}}N({text:R("verifiedGleamTasks")})}catch(t){return K(t,"Gleam.verifyTask"),!1}}},class extends Hi{constructor(){super(...arguments),qn(this,eo),qn(this,to),qn(this,Qn),qn(this,Zn),Jn(this,"name","SweepWidget"),Jn(this,"options",{...Xn,...GM_getValue("SweepWidgetOptions")}),Jn(this,"buttons",["doTask"])}static test(){return/^https?:\/\/sweepwidget\.com\/view\/[\d]+/.test(window.location.href)}async after(){try{Hn(this,Zn,so).call(this)||N({}).warning(R("checkLoginFailed"))}catch(t){K(t,"SweepWidget.after")}}init(){try{const t=N({text:R("initing")});return Hn(this,Zn,so).call(this)?!!Hn(this,Qn,io).call(this)&&(this.initialized=!0,t.success(),!0):(t.warning(R("needLogin")),!1)}catch(t){return K(t,"SweepWidget.init"),!1}}classifyTask(){return!0}async doTask(){try{if(0===$("#unlock_rewards_main_wrapper").length&&(0<$('input[name="sw__login_name"]:visible').length&&$('input[name="sw__login_name"]').val(this.options.username),0<$('input[name="sw__login_email"]:visible').length&&$('input[name="sw__login_email"]').val(this.options.email),0<$("#sw_login_button:visible").length&&$("#sw_login_button")[0].click(),!await Hn(this,to,ao).call(this)))return!1;const i=N({text:R("SweepWidgetNotice")});var t,e;for(const a of $("#sw_inner_entry_methods_l2_wrapper>div.sw_entry")){const n=$(a);if(!(0${R("getTwitterUserId")}`),$("#getTwitterUserId").on("click",()=>{go(this,mo,ko).call(this,"twitterUser")}),$('input[name="other.youtubeVerifyChannel"]').after(``),$("#getYoutubeChannelId").on("click",()=>{go(this,mo,ko).call(this,"youtubeChannel")}),$('input[name^="position"]').on("input",function(){var t="rightleft",e="topbottpm";switch($(this).attr("name").replace("position.","")){case"buttonSideX":case"buttonSideY":case"buttonDistance":{const l=$('input[name="position.buttonDistance"]').val();var s=$('input[name="position.buttonSideX"]').val(),i=$('input[name="position.buttonSideY"]').val();if(!["right","left"].includes(s))break;if(!["top","bottom"].includes(i))break;if(!/^[\d]+?,[\d]+$/.test(l))break;var a=l.split(",");$("#auto-task-buttons").css(s,a[0]+"px").css(i,a[1]+"px").css(t.replace(s,""),"").css(e.replace(i,""),"");break}case"showButtonSideX":case"showButtonSideY":case"showButtonDistance":{const c=$('input[name="position.showButtonDistance"]').val();var n=$('input[name="position.showButtonSideX"]').val(),o=$('input[name="position.showButtonSideY"]').val();if(!["right","left"].includes(n))break;if(!["top","bottom"].includes(o))break;if(!/^[\d]+?,[\d]+$/.test(c))break;var r=c.split(",");$("div.show-button-div").css(n,r[0]+"px").css(o,r[1]+"px").css(t.replace(n,""),"").css(e.replace(o,""),"");break}case"logSideX":case"logSideY":case"logDistance":{const u=$('input[name="position.logDistance"]').val();r=$('input[name="position.logSideX"]').val(),n=$('input[name="position.logSideY"]').val();if(!["right","left"].includes(r))break;if(!["top","bottom"].includes(n))break;if(!/^[\d]+?,[\d]+$/.test(u))break;o=u.split(",");$("#auto-task-info").css(r,o[0]+"px").css(n,o[1]+"px").css(t.replace(r,""),"").css(e.replace(n,""),"");break}}}),$('input[name^="hotKey"]').attr("readonly","readonly").off("keydown").on("keydown",function(t){let e="";t.altKey?e+="alt + ":t.ctrlKey?e+="ctrl + ":t.shiftKey&&(e+="shift + "),$(this).val(e+(1===t.key.length?t.key.toLowerCase():""))})}catch(t){K(t,"Setting.after")}}saveGlobalOptions(){c()}},class extends s{constructor(){super(...arguments),bo(this,$o),To(this,"name","History"),To(this,"buttons",["doTask","undoTask","selectAll","selectNone","invertSelect","clearHistory"])}static test(){return"auto-task-v4.hclonely.com"===window.location.host&&"/history.html"===window.location.pathname}before(){try{$("body").html('
    ').addClass("auto-task-history");const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))!function(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}(this,$o,xo).call(this,e)}catch(t){K(t,"History.before")}}clearHistory(){try{const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))GM_deleteValue(e);p().fire({title:R("clearHistoryFinished"),icon:"success"})}catch(t){K(t,"History.after")}}}];const Lo=function(e,s){try{let t=`
    +
    `;$("body").append(`

    ${R("environment")}

    `+e)}catch(t){K(t,"Setting.environment")}}function bo(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 To(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var $o=new WeakSet;function xo(i){try{var a=GM_getValue(i);if(null==a||!a.tasks)return;let t="",e="",s="";var n,o,[r,l]=i.split("-");switch(r){case"fawTasks":e=`Freeanywhere[${l}]`,s="https://freeanywhere.net/#/giveaway/"+l;break;case"gasTasks":e=`Giveawaysu[${l}]`,s="https://giveaway.su/giveaway/view/"+l;break;case"gcTasks":e=`GiveeClub[${l}]`,s="https://givee.club/event/"+l;break;case"gkTasks":e=`Givekey[${l}]`,s="https://givekey.ru/giveaway/"+l;break;case"gleamTasks":e=`Gleam[${l}]`,s="https://gleam.io"+l;break;case"khTasks":e=`keyhub[${l}]`,s="https://key-hub.eu/giveaway/"+l;break;case"prysTasks":e=`Prys[${l}]`,s="https://prys.revadike.com/giveaway/?id="+l;break;default:return}for([n,o]of Object.entries(a.tasks))for(var[c,u]of Object.entries(o))for(const d of u)t+=`
  • ${n}.${R(c.replace("Link",""))}: ${55
  • `;$(".container").append(`
      ${t}
    ${R("lastChangeTime")}: ${gn(a.time).format("YYYY-MM-DD HH:mm:ss")}
    `),$("span.delete-task").on("click",function(){var t=$(this).attr("data-name");t?(GM_deleteValue(t),$(`div.card[data-name="${t}"]`).remove(),p().fire({title:R("clearTaskFinished"),text:t,icon:"success"})):p().fire({title:R("clearTaskFailed"),icon:"error"})})}catch(t){K(t,"History.addItem")}}const So=[na,pa,Ga,Va,Ha,rn,t,s,g,class extends Hi{constructor(){super(...arguments),En(this,Un),En(this,Mn),En(this,Fn),En(this,Vn),En(this,Nn),Dn(this,"name","Gleam"),Dn(this,"undoneTasks",JSON.parse(Pn)),Dn(this,"socialTasks",JSON.parse(Pn)),Dn(this,"options",{...Wn,...GM_getValue("GleamOptions")}),Dn(this,"buttons",["doTask","undoTask","verifyTask"])}static test(){return"gleam.io"===window.location.host}async after(){try{if(window.location.search.includes("8b07d23f4bfa65f9")){const s=setInterval(()=>{0<$(".entry-content .entry-method i.fa-check").length&&(clearInterval(s),window.close())});for(const i of $(".entry-content .entry-method")){const a=$(i).find(".user-links"),n=$(i).find(".expandable");var t=n.find("a.btn,a:contains(Continue),button:contains(Continue)");if(0!0)}catch(t){return K(t,"Gleam.extraDoTask"),!1}}async verifyTask(){try{N({text:R("verifyingTask")+"..."});for(const t of $(".entry-content .entry-method")){const e=$(t);if(0!==e.find("i.fa-question").length){const s=e.find(".user-links");s[0].click(),await W(500),await jn(this,Nn,Bn).call(this);for(const i of e.find(".expandable").find("span:contains(Continue),button:contains(Continue)"))i.click(),await W(500),await jn(this,Nn,Bn).call(this)}}N({text:R("verifiedGleamTasks")})}catch(t){return K(t,"Gleam.verifyTask"),!1}}},class extends Hi{constructor(){super(...arguments),qn(this,eo),qn(this,to),qn(this,Qn),qn(this,Zn),Jn(this,"name","SweepWidget"),Jn(this,"options",{...Xn,...GM_getValue("SweepWidgetOptions")}),Jn(this,"buttons",["doTask"])}static test(){return/^https?:\/\/sweepwidget\.com\/view\/[\d]+/.test(window.location.href)}async after(){try{Hn(this,Zn,so).call(this)||N({}).warning(R("checkLoginFailed"))}catch(t){K(t,"SweepWidget.after")}}init(){try{const t=N({text:R("initing")});return Hn(this,Zn,so).call(this)?!!Hn(this,Qn,io).call(this)&&(this.initialized=!0,t.success(),!0):(t.warning(R("needLogin")),!1)}catch(t){return K(t,"SweepWidget.init"),!1}}classifyTask(){return!0}async doTask(){try{if(0===$("#unlock_rewards_main_wrapper").length&&(0<$('input[name="sw__login_name"]:visible').length&&$('input[name="sw__login_name"]').val(this.options.username),0<$('input[name="sw__login_email"]:visible').length&&$('input[name="sw__login_email"]').val(this.options.email),0<$("#sw_login_button:visible").length&&$("#sw_login_button")[0].click(),!await Hn(this,to,ao).call(this)))return!1;const i=N({text:R("SweepWidgetNotice")});var t,e;for(const a of $("#sw_inner_entry_methods_l2_wrapper>div.sw_entry")){const n=$(a);if(!(0${R("getTwitterUserId")}`),$("#getTwitterUserId").on("click",()=>{go(this,mo,ko).call(this,"twitterUser")}),$('input[name="other.youtubeVerifyChannel"]').after(``),$("#getYoutubeChannelId").on("click",()=>{go(this,mo,ko).call(this,"youtubeChannel")}),$('input[name^="position"]').on("input",function(){var t="rightleft",e="topbottpm";switch($(this).attr("name").replace("position.","")){case"buttonSideX":case"buttonSideY":case"buttonDistance":{const l=$('input[name="position.buttonDistance"]').val();var s=$('input[name="position.buttonSideX"]').val(),i=$('input[name="position.buttonSideY"]').val();if(!["right","left"].includes(s))break;if(!["top","bottom"].includes(i))break;if(!/^[\d]+?,[\d]+$/.test(l))break;var a=l.split(",");$("#auto-task-buttons").css(s,a[0]+"px").css(i,a[1]+"px").css(t.replace(s,""),"").css(e.replace(i,""),"");break}case"showButtonSideX":case"showButtonSideY":case"showButtonDistance":{const c=$('input[name="position.showButtonDistance"]').val();var n=$('input[name="position.showButtonSideX"]').val(),o=$('input[name="position.showButtonSideY"]').val();if(!["right","left"].includes(n))break;if(!["top","bottom"].includes(o))break;if(!/^[\d]+?,[\d]+$/.test(c))break;var r=c.split(",");$("div.show-button-div").css(n,r[0]+"px").css(o,r[1]+"px").css(t.replace(n,""),"").css(e.replace(o,""),"");break}case"logSideX":case"logSideY":case"logDistance":{const u=$('input[name="position.logDistance"]').val();r=$('input[name="position.logSideX"]').val(),n=$('input[name="position.logSideY"]').val();if(!["right","left"].includes(r))break;if(!["top","bottom"].includes(n))break;if(!/^[\d]+?,[\d]+$/.test(u))break;o=u.split(",");$("#auto-task-info").css(r,o[0]+"px").css(n,o[1]+"px").css(t.replace(r,""),"").css(e.replace(n,""),"");break}}}),$('input[name^="hotKey"]').attr("readonly","readonly").off("keydown").on("keydown",function(t){let e="";t.altKey?e+="alt + ":t.ctrlKey?e+="ctrl + ":t.shiftKey&&(e+="shift + "),$(this).val(e+(1===t.key.length?t.key.toLowerCase():""))})}catch(t){K(t,"Setting.after")}}saveGlobalOptions(){c()}},class extends s{constructor(){super(...arguments),bo(this,$o),To(this,"name","History"),To(this,"buttons",["doTask","undoTask","selectAll","selectNone","invertSelect","clearHistory"])}static test(){return"auto-task-v4.hclonely.com"===window.location.host&&"/history.html"===window.location.pathname}before(){try{$("body").html('
    ').addClass("auto-task-history");const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))!function(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}(this,$o,xo).call(this,e)}catch(t){K(t,"History.before")}}clearHistory(){try{const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))GM_deleteValue(e);p().fire({title:R("clearHistoryFinished"),icon:"success"})}catch(t){K(t,"History.after")}}}];const Lo=function(e,s){try{let t=`
    `;for(var[i,a]of Object.entries(s))t+=``;t+="
    ${R("option")}${R("value")}
    ${i}
    ",p().fire({title:R("websiteOptions"),html:t,showConfirmButton:!0,confirmButtonText:R("save"),showCancelButton:!0,cancelButtonText:R("close")}).then(t=>{t=t.isConfirmed;t&&($("#websiteOptionsForm").serializeArray().map(t=>(s[t.name]=t.value,t)),GM_setValue(e+"Options",s),p().fire({title:R("changeWebsiteOptionsSuccess"),icon:"success"}))})}catch(t){K(t,"websiteOptions")}};var s=keyboardJS,Io=Eo.n(s);const Go=async(t,e)=>{try{var s,i=t+"package.json?time="+(new Date).getTime(),{result:a,statusText:n,status:o,data:r}=await L({url:i,responseType:"json",method:"GET",timeout:3e4});return"Success"===a?null!=r&&null!==(s=r.response)&&void 0!==s&&s.version?r.response:(e||N({}).error(`${R("checkUpdateFailed")}[${null==r?void 0:r.statusText}(${null==r?void 0:r.status})]`),!1):(e||N({}).error(R("checkUpdateFailed")+`[${a}:${n}(${o})]`),!1)}catch(t){return K(t,"checkUpdate"),!1}};const _o=async()=>{try{var i,a=GM_info.script.version,n=V.other.autoUpdateSource.toLowerCase(),o={github:"https://github.com/HCLonely/auto-task-new/raw/main/",jsdelivr:"https://cdn.jsdelivr.net/gh/HCLonely/auto-task-v4@main/",standby:"https://auto-task-v4.hclonely.com/"};let t,e="",s;["github","jsdelivr","standby"].includes(n)?(e=o[n],s=await Go(e,!1)):(e=o.github,s=await Go(e,!0),s||(e=o.jsdelivr,s=await Go(e,!0),s||(e=o.standby,s=await Go(e,!0)))),s?t=s.version||a:(t=a,N({}).error(R("checkUpdateFailed"))),s&&((t,e)=>{try{const[l]=t.split("-"),[c,u]=e.split("-");if(u&&!V.other.receivePreview)return!1;var[s,i,a]=l.split(".").map(t=>parseInt(t,10)),[n,o,r]=c.split(".").map(t=>parseInt(t,10));return s${R("newVersionNotice",t,`${e}dist/${GM_info.script.name}.user.js`)}`}),N({html:`
  • ${R("updateText",t)}
    1. ${null===(i=s.change)||void 0===i?void 0:i.map(t=>`
    2. ${t}
    3. `).join("")}
    4. ${R("updateHistory")}
    `}))}catch(t){K(t,"updateChecker")}};window.STYLE=GM_addStyle(e.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}`),window.DEBUG=!(null===(e=V.other)||void 0===e||!e.debug),window.TRACE=!(null===(e=V.other)||void 0===e||!e.debug)&&"function"==typeof console.trace;var Co,Ao,e=async()=>{var e,s;if("www.twitch.tv"!==window.location.hostname||"#auth"!==window.location.hash)if("twitter.com"!==window.location.hostname||"#auth"!==window.location.hash)if("www.youtube.com"!==window.location.hostname||"#auth"!==window.location.hash){if("www.reddit.com"===window.location.hostname&&("#auth"===window.location.hash||"#auth"===GM_getValue("redditAuth"))){const o=$("#redesign-beta-optin-btn");return 0
    `),$("div.show-button-div").on("click",()=>{$("#auto-task-buttons").show(),$("div.show-button-div").hide()});var i=()=>{const t=$("#toggle-log");"show"===t.attr("data-status")?($("#auto-task-info").hide(),t.attr("data-status","hide").text(R("showLog"))):($("#auto-task-info").show(),t.attr("data-status","show").text(R("hideLog")))};if(Io().bind(V.hotKey.doTaskKey,()=>{t.doTask&&t.doTask()}),Io().bind(V.hotKey.undoTaskKey,()=>{t.undoTask&&t.doTask()}),Io().bind(V.hotKey.toggleLogKey,i),null!==(e=t)&&void 0!==e&&e.after&&await(null===(s=t)||void 0===s?void 0:s.after()),null!==(s=t)&&void 0!==s&&s.buttons&&0===$("#auto-task-buttons").children().length){$("#auto-task-buttons").addClass(t.name+"-buttons");for(const u of t.buttons)if(t[u]){const d=$(`

    ${R(u)}

    `);d.find("a.auto-task-website-btn").on("click",()=>{t[u]()}),$("#auto-task-buttons").append(d)}}const l=$(`

    ${R("hideButton")}

    `);l.find("a.auto-task-website-btn").on("click",()=>{$("#auto-task-buttons").hide(),$("div.show-button-div").show()});const c=$(`

    ${V.other.defaultShowLog?R("hideLog"):R("showLog")}

    `);c.find("a.auto-task-website-btn").on("click",i),$("#auto-task-buttons").append(l).append(c),null!==(i=t)&&void 0!==i&&i.options&&GM_registerMenuCommand(R("changeWebsiteOptions"),()=>{Lo(t.name,t.options)}),"Setting"!==t.name&&(GM_registerMenuCommand(R("changeGlobalOptions"),()=>{h("swal")}),GM_registerMenuCommand(R("settingPage"),()=>{window.open("https://auto-task-v4.hclonely.com/setting.html","_blank")})),console.log("%c%s","color:#1bbe1a","Auto-Task[Load]: 脚本加载完成"),GM_getValue("notice")||(p().fire({title:R("swalNotice"),icon:"warning"}).then(()=>{window.open(R("noticeLink"),"_blank"),GM_setValue("notice",(new Date).getTime())}),null!==(a=N({html:`
  • ${R("echoNotice",R("noticeLink"))}
  • `}).font)&&void 0!==a&&a.find("a").on("click",()=>{GM_setValue("notice",(new Date).getTime())})),_o()}else console.log("%c%s","color:#ff0000","Auto-Task[Warning]: 脚本停止加载,当前网站不支持!")}else{var a=f.get("__Secure-3PAPISID");a?(GM_setValue("youtubeAuth",{PAPISID:a}),window.close(),p().fire("",R("closePageNotice"))):p().fire("",R("needLogin"))}else{var t=f.get("ct0");!!f.get("twid")&&t?(GM_setValue("twitterAuth",{ct0:t}),window.close(),p().fire("",R("closePageNotice"))):p().fire("",R("needLogin"))}else{var n,t=f.get("auth-token");!!f.get("login")?(GM_setValue("twitchAuth",{authToken:t,clientId:null===(t=commonOptions)||void 0===t||null===(n=t.headers)||void 0===n?void 0:n["Client-ID"]}),window.close(),p().fire("",R("closePageNotice"))):p().fire("",R("needLogin"))}};if("discord.com"===window.location.hostname){const Oo=window.localStorage;"#auth"===window.location.hash?(window.localStorage.removeItem=()=>!0,(Co=null===Oo||void 0===Oo||null===(Co=Oo.getItem("token"))||void 0===Co?void 0:Co.replace(/^"|"$/g,""))&&0${R("browser")}${t.browserZH}${t.browserVersion} ${R("scriptManager")}${GM_info.scriptHandler}${GM_info.version} ${R("script")}${GM_info.script.name}${GM_info.script.version} - `;$("body").append(`

    ${R("environment")}

    `+e)}catch(t){K(t,"Setting.environment")}}function bo(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 To(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var $o=new WeakSet;function xo(i){try{var a=GM_getValue(i);if(null==a||!a.tasks)return;let t="",e="",s="";var n,o,[r,l]=i.split("-");switch(r){case"fawTasks":e=`Freeanywhere[${l}]`,s="https://freeanywhere.net/#/giveaway/"+l;break;case"gasTasks":e=`Giveawaysu[${l}]`,s="https://giveaway.su/giveaway/view/"+l;break;case"gcTasks":e=`GiveeClub[${l}]`,s="https://givee.club/event/"+l;break;case"gkTasks":e=`Givekey[${l}]`,s="https://givekey.ru/giveaway/"+l;break;case"gleamTasks":e=`Gleam[${l}]`,s="https://gleam.io"+l;break;case"khTasks":e=`keyhub[${l}]`,s="https://key-hub.eu/giveaway/"+l;break;case"prysTasks":e=`Prys[${l}]`,s="https://prys.revadike.com/giveaway/?id="+l;break;default:return}for([n,o]of Object.entries(a.tasks))for(var[c,u]of Object.entries(o))for(const d of u)t+=`
  • ${n}.${R(c.replace("Link",""))}: ${55
  • `;$(".container").append(`
      ${t}
    ${R("lastChangeTime")}: ${gn(a.time).format("YYYY-MM-DD HH:mm:ss")}
    `),$("span.delete-task").on("click",function(){var t=$(this).attr("data-name");t?(GM_deleteValue(t),$(`div.card[data-name="${t}"]`).remove(),p().fire({title:R("clearTaskFinished"),text:t,icon:"success"})):p().fire({title:R("clearTaskFailed"),icon:"error"})})}catch(t){K(t,"History.addItem")}}const So=[na,pa,Ga,Va,Ha,rn,t,s,g,class extends Hi{constructor(){super(...arguments),En(this,Un),En(this,Mn),En(this,Fn),En(this,Vn),En(this,Nn),Dn(this,"name","Gleam"),Dn(this,"undoneTasks",JSON.parse(Pn)),Dn(this,"socialTasks",JSON.parse(Pn)),Dn(this,"options",{...Wn,...GM_getValue("GleamOptions")}),Dn(this,"buttons",["doTask","undoTask","verifyTask"])}static test(){return"gleam.io"===window.location.host}async after(){try{if(window.location.search.includes("8b07d23f4bfa65f9")){const s=setInterval(()=>{0<$(".entry-content .entry-method i.fa-check").length&&(clearInterval(s),window.close())});for(const i of $(".entry-content .entry-method")){const a=$(i).find(".user-links"),n=$(i).find(".expandable");var t=n.find("a.btn,a:contains(Continue),button:contains(Continue)");if(0!0)}catch(t){return K(t,"Gleam.extraDoTask"),!1}}async verifyTask(){try{N({text:R("verifyingTask")+"..."});for(const t of $(".entry-content .entry-method")){const e=$(t);if(0!==e.find("i.fa-question").length){const s=e.find(".user-links");s[0].click(),await W(500),await jn(this,Nn,Bn).call(this);for(const i of e.find(".expandable").find("span:contains(Continue),button:contains(Continue)"))i.click(),await W(500),await jn(this,Nn,Bn).call(this)}}N({text:R("verifiedGleamTasks")})}catch(t){return K(t,"Gleam.verifyTask"),!1}}},class extends Hi{constructor(){super(...arguments),qn(this,eo),qn(this,to),qn(this,Qn),qn(this,Zn),Jn(this,"name","SweepWidget"),Jn(this,"options",{...Xn,...GM_getValue("SweepWidgetOptions")}),Jn(this,"buttons",["doTask"])}static test(){return/^https?:\/\/sweepwidget\.com\/view\/[\d]+/.test(window.location.href)}async after(){try{Hn(this,Zn,so).call(this)||N({}).warning(R("checkLoginFailed"))}catch(t){K(t,"SweepWidget.after")}}init(){try{const t=N({text:R("initing")});return Hn(this,Zn,so).call(this)?!!Hn(this,Qn,io).call(this)&&(this.initialized=!0,t.success(),!0):(t.warning(R("needLogin")),!1)}catch(t){return K(t,"SweepWidget.init"),!1}}classifyTask(){return!0}async doTask(){try{if(0===$("#unlock_rewards_main_wrapper").length&&(0<$('input[name="sw__login_name"]:visible').length&&$('input[name="sw__login_name"]').val(this.options.username),0<$('input[name="sw__login_email"]:visible').length&&$('input[name="sw__login_email"]').val(this.options.email),0<$("#sw_login_button:visible").length&&$("#sw_login_button")[0].click(),!await Hn(this,to,ao).call(this)))return!1;const i=N({text:R("SweepWidgetNotice")});var t,e;for(const a of $("#sw_inner_entry_methods_l2_wrapper>div.sw_entry")){const n=$(a);if(!(0${R("getTwitterUserId")}`),$("#getTwitterUserId").on("click",()=>{go(this,mo,ko).call(this,"twitterUser")}),$('input[name="other.youtubeVerifyChannel"]').after(``),$("#getYoutubeChannelId").on("click",()=>{go(this,mo,ko).call(this,"youtubeChannel")}),$('input[name^="position"]').on("input",function(){var t="rightleft",e="topbottpm";switch($(this).attr("name").replace("position.","")){case"buttonSideX":case"buttonSideY":case"buttonDistance":{const l=$('input[name="position.buttonDistance"]').val();var s=$('input[name="position.buttonSideX"]').val(),i=$('input[name="position.buttonSideY"]').val();if(!["right","left"].includes(s))break;if(!["top","bottom"].includes(i))break;if(!/^[\d]+?,[\d]+$/.test(l))break;var a=l.split(",");$("#auto-task-buttons").css(s,a[0]+"px").css(i,a[1]+"px").css(t.replace(s,""),"").css(e.replace(i,""),"");break}case"showButtonSideX":case"showButtonSideY":case"showButtonDistance":{const c=$('input[name="position.showButtonDistance"]').val();var n=$('input[name="position.showButtonSideX"]').val(),o=$('input[name="position.showButtonSideY"]').val();if(!["right","left"].includes(n))break;if(!["top","bottom"].includes(o))break;if(!/^[\d]+?,[\d]+$/.test(c))break;var r=c.split(",");$("div.show-button-div").css(n,r[0]+"px").css(o,r[1]+"px").css(t.replace(n,""),"").css(e.replace(o,""),"");break}case"logSideX":case"logSideY":case"logDistance":{const u=$('input[name="position.logDistance"]').val();r=$('input[name="position.logSideX"]').val(),n=$('input[name="position.logSideY"]').val();if(!["right","left"].includes(r))break;if(!["top","bottom"].includes(n))break;if(!/^[\d]+?,[\d]+$/.test(u))break;o=u.split(",");$("#auto-task-info").css(r,o[0]+"px").css(n,o[1]+"px").css(t.replace(r,""),"").css(e.replace(n,""),"");break}}}),$('input[name^="hotKey"]').attr("readonly","readonly").off("keydown").on("keydown",function(t){let e="";t.altKey?e+="alt + ":t.ctrlKey?e+="ctrl + ":t.shiftKey&&(e+="shift + "),$(this).val(e+(1===t.key.length?t.key.toLowerCase():""))})}catch(t){K(t,"Setting.after")}}saveGlobalOptions(){c()}},class extends s{constructor(){super(...arguments),bo(this,$o),To(this,"name","History"),To(this,"buttons",["doTask","undoTask","selectAll","selectNone","invertSelect","clearHistory"])}static test(){return"auto-task-v4.hclonely.com"===window.location.host&&"/history.html"===window.location.pathname}before(){try{$("body").html('
    ').addClass("auto-task-history");const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))!function(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}(this,$o,xo).call(this,e)}catch(t){K(t,"History.before")}}clearHistory(){try{const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))GM_deleteValue(e);p().fire({title:R("clearHistoryFinished"),icon:"success"})}catch(t){K(t,"History.after")}}}];const Lo=function(e,s){try{let t=`
    +
    `;$("body").append(`

    ${R("environment")}

    `+e)}catch(t){K(t,"Setting.environment")}}function bo(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 To(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var $o=new WeakSet;function xo(i){try{var a=GM_getValue(i);if(null==a||!a.tasks)return;let t="",e="",s="";var n,o,[r,l]=i.split("-");switch(r){case"fawTasks":e=`Freeanywhere[${l}]`,s="https://freeanywhere.net/#/giveaway/"+l;break;case"gasTasks":e=`Giveawaysu[${l}]`,s="https://giveaway.su/giveaway/view/"+l;break;case"gcTasks":e=`GiveeClub[${l}]`,s="https://givee.club/event/"+l;break;case"gkTasks":e=`Givekey[${l}]`,s="https://givekey.ru/giveaway/"+l;break;case"gleamTasks":e=`Gleam[${l}]`,s="https://gleam.io"+l;break;case"khTasks":e=`keyhub[${l}]`,s="https://key-hub.eu/giveaway/"+l;break;case"prysTasks":e=`Prys[${l}]`,s="https://prys.revadike.com/giveaway/?id="+l;break;default:return}for([n,o]of Object.entries(a.tasks))for(var[c,u]of Object.entries(o))for(const d of u)t+=`
  • ${n}.${R(c.replace("Link",""))}: ${55
  • `;$(".container").append(`
      ${t}
    ${R("lastChangeTime")}: ${gn(a.time).format("YYYY-MM-DD HH:mm:ss")}
    `),$("span.delete-task").on("click",function(){var t=$(this).attr("data-name");t?(GM_deleteValue(t),$(`div.card[data-name="${t}"]`).remove(),p().fire({title:R("clearTaskFinished"),text:t,icon:"success"})):p().fire({title:R("clearTaskFailed"),icon:"error"})})}catch(t){K(t,"History.addItem")}}const So=[na,pa,Ga,Va,Ha,rn,t,s,g,class extends Hi{constructor(){super(...arguments),En(this,Un),En(this,Mn),En(this,Fn),En(this,Vn),En(this,Nn),Dn(this,"name","Gleam"),Dn(this,"undoneTasks",JSON.parse(Pn)),Dn(this,"socialTasks",JSON.parse(Pn)),Dn(this,"options",{...Wn,...GM_getValue("GleamOptions")}),Dn(this,"buttons",["doTask","undoTask","verifyTask"])}static test(){return"gleam.io"===window.location.host}async after(){try{if(window.location.search.includes("8b07d23f4bfa65f9")){const s=setInterval(()=>{0<$(".entry-content .entry-method i.fa-check").length&&(clearInterval(s),window.close())});for(const i of $(".entry-content .entry-method")){const a=$(i).find(".user-links"),n=$(i).find(".expandable");var t=n.find("a.btn,a:contains(Continue),button:contains(Continue)");if(0!0)}catch(t){return K(t,"Gleam.extraDoTask"),!1}}async verifyTask(){try{N({text:R("verifyingTask")+"..."});for(const t of $(".entry-content .entry-method")){const e=$(t);if(0!==e.find("i.fa-question").length){const s=e.find(".user-links");s[0].click(),await W(500),await jn(this,Nn,Bn).call(this);for(const i of e.find(".expandable").find("span:contains(Continue),button:contains(Continue)"))i.click(),await W(500),await jn(this,Nn,Bn).call(this)}}N({text:R("verifiedGleamTasks")})}catch(t){return K(t,"Gleam.verifyTask"),!1}}},class extends Hi{constructor(){super(...arguments),qn(this,eo),qn(this,to),qn(this,Qn),qn(this,Zn),Jn(this,"name","SweepWidget"),Jn(this,"options",{...Xn,...GM_getValue("SweepWidgetOptions")}),Jn(this,"buttons",["doTask"])}static test(){return/^https?:\/\/sweepwidget\.com\/view\/[\d]+/.test(window.location.href)}async after(){try{Hn(this,Zn,so).call(this)||N({}).warning(R("checkLoginFailed"))}catch(t){K(t,"SweepWidget.after")}}init(){try{const t=N({text:R("initing")});return Hn(this,Zn,so).call(this)?!!Hn(this,Qn,io).call(this)&&(this.initialized=!0,t.success(),!0):(t.warning(R("needLogin")),!1)}catch(t){return K(t,"SweepWidget.init"),!1}}classifyTask(){return!0}async doTask(){try{if(0===$("#unlock_rewards_main_wrapper").length&&(0<$('input[name="sw__login_name"]:visible').length&&$('input[name="sw__login_name"]').val(this.options.username),0<$('input[name="sw__login_email"]:visible').length&&$('input[name="sw__login_email"]').val(this.options.email),0<$("#sw_login_button:visible").length&&$("#sw_login_button")[0].click(),!await Hn(this,to,ao).call(this)))return!1;const i=N({text:R("SweepWidgetNotice")});var t,e;for(const a of $("#sw_inner_entry_methods_l2_wrapper>div.sw_entry")){const n=$(a);if(!(0${R("getTwitterUserId")}`),$("#getTwitterUserId").on("click",()=>{go(this,mo,ko).call(this,"twitterUser")}),$('input[name="other.youtubeVerifyChannel"]').after(``),$("#getYoutubeChannelId").on("click",()=>{go(this,mo,ko).call(this,"youtubeChannel")}),$('input[name^="position"]').on("input",function(){var t="rightleft",e="topbottpm";switch($(this).attr("name").replace("position.","")){case"buttonSideX":case"buttonSideY":case"buttonDistance":{const l=$('input[name="position.buttonDistance"]').val();var s=$('input[name="position.buttonSideX"]').val(),i=$('input[name="position.buttonSideY"]').val();if(!["right","left"].includes(s))break;if(!["top","bottom"].includes(i))break;if(!/^[\d]+?,[\d]+$/.test(l))break;var a=l.split(",");$("#auto-task-buttons").css(s,a[0]+"px").css(i,a[1]+"px").css(t.replace(s,""),"").css(e.replace(i,""),"");break}case"showButtonSideX":case"showButtonSideY":case"showButtonDistance":{const c=$('input[name="position.showButtonDistance"]').val();var n=$('input[name="position.showButtonSideX"]').val(),o=$('input[name="position.showButtonSideY"]').val();if(!["right","left"].includes(n))break;if(!["top","bottom"].includes(o))break;if(!/^[\d]+?,[\d]+$/.test(c))break;var r=c.split(",");$("div.show-button-div").css(n,r[0]+"px").css(o,r[1]+"px").css(t.replace(n,""),"").css(e.replace(o,""),"");break}case"logSideX":case"logSideY":case"logDistance":{const u=$('input[name="position.logDistance"]').val();r=$('input[name="position.logSideX"]').val(),n=$('input[name="position.logSideY"]').val();if(!["right","left"].includes(r))break;if(!["top","bottom"].includes(n))break;if(!/^[\d]+?,[\d]+$/.test(u))break;o=u.split(",");$("#auto-task-info").css(r,o[0]+"px").css(n,o[1]+"px").css(t.replace(r,""),"").css(e.replace(n,""),"");break}}}),$('input[name^="hotKey"]').attr("readonly","readonly").off("keydown").on("keydown",function(t){let e="";t.altKey?e+="alt + ":t.ctrlKey?e+="ctrl + ":t.shiftKey&&(e+="shift + "),$(this).val(e+(1===t.key.length?t.key.toLowerCase():""))})}catch(t){K(t,"Setting.after")}}saveGlobalOptions(){c()}},class extends s{constructor(){super(...arguments),bo(this,$o),To(this,"name","History"),To(this,"buttons",["doTask","undoTask","selectAll","selectNone","invertSelect","clearHistory"])}static test(){return"auto-task-v4.hclonely.com"===window.location.host&&"/history.html"===window.location.pathname}before(){try{$("body").html('
    ').addClass("auto-task-history");const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))!function(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}(this,$o,xo).call(this,e)}catch(t){K(t,"History.before")}}clearHistory(){try{const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))GM_deleteValue(e);p().fire({title:R("clearHistoryFinished"),icon:"success"})}catch(t){K(t,"History.after")}}}];const Lo=function(e,s){try{let t=`
    `;for(var[i,a]of Object.entries(s))t+=``;t+="
    ${R("option")}${R("value")}
    ${i}
    ",p().fire({title:R("websiteOptions"),html:t,showConfirmButton:!0,confirmButtonText:R("save"),showCancelButton:!0,cancelButtonText:R("close")}).then(t=>{t=t.isConfirmed;t&&($("#websiteOptionsForm").serializeArray().map(t=>(s[t.name]=t.value,t)),GM_setValue(e+"Options",s),p().fire({title:R("changeWebsiteOptionsSuccess"),icon:"success"}))})}catch(t){K(t,"websiteOptions")}};var s=keyboardJS,Io=Eo.n(s);const Go=async(t,e)=>{try{var s,i=t+"package.json?time="+(new Date).getTime(),{result:a,statusText:n,status:o,data:r}=await L({url:i,responseType:"json",method:"GET",timeout:3e4});return"Success"===a?null!=r&&null!==(s=r.response)&&void 0!==s&&s.version?r.response:(e||N({}).error(`${R("checkUpdateFailed")}[${null==r?void 0:r.statusText}(${null==r?void 0:r.status})]`),!1):(e||N({}).error(R("checkUpdateFailed")+`[${a}:${n}(${o})]`),!1)}catch(t){return K(t,"checkUpdate"),!1}};const _o=async()=>{try{var i,a=GM_info.script.version,n=V.other.autoUpdateSource.toLowerCase(),o={github:"https://github.com/HCLonely/auto-task-new/raw/main/",jsdelivr:"https://cdn.jsdelivr.net/gh/HCLonely/auto-task-v4@main/",standby:"https://auto-task-v4.hclonely.com/"};let t,e="",s;["github","jsdelivr","standby"].includes(n)?(e=o[n],s=await Go(e,!1)):(e=o.github,s=await Go(e,!0),s||(e=o.jsdelivr,s=await Go(e,!0),s||(e=o.standby,s=await Go(e,!0)))),s?t=s.version||a:(t=a,N({}).error(R("checkUpdateFailed"))),s&&((t,e)=>{try{const[l]=t.split("-"),[c,u]=e.split("-");if(u&&!V.other.receivePreview)return!1;var[s,i,a]=l.split(".").map(t=>parseInt(t,10)),[n,o,r]=c.split(".").map(t=>parseInt(t,10));return s${R("newVersionNotice",t,`${e}dist/${GM_info.script.name}.user.js`)}`}),N({html:`
  • ${R("updateText",t)}
    1. ${null===(i=s.change)||void 0===i?void 0:i.map(t=>`
    2. ${t}
    3. `).join("")}
    4. ${R("updateHistory")}
    `}))}catch(t){K(t,"updateChecker")}};window.STYLE=GM_addStyle(e.Z+GM_getResourceText("style")),window.DEBUG=!(null===(e=V.other)||void 0===e||!e.debug),window.TRACE=!(null===(e=V.other)||void 0===e||!e.debug)&&"function"==typeof console.trace;var Co,Ao,e=async()=>{var e,s;if("www.twitch.tv"!==window.location.hostname||"#auth"!==window.location.hash)if("twitter.com"!==window.location.hostname||"#auth"!==window.location.hash)if("www.youtube.com"!==window.location.hostname||"#auth"!==window.location.hash){if("www.reddit.com"===window.location.hostname&&("#auth"===window.location.hash||"#auth"===GM_getValue("redditAuth"))){const o=$("#redesign-beta-optin-btn");return 0
    `),$("div.show-button-div").on("click",()=>{$("#auto-task-buttons").show(),$("div.show-button-div").hide()});var i=()=>{const t=$("#toggle-log");"show"===t.attr("data-status")?($("#auto-task-info").hide(),t.attr("data-status","hide").text(R("showLog"))):($("#auto-task-info").show(),t.attr("data-status","show").text(R("hideLog")))};if(Io().bind(V.hotKey.doTaskKey,()=>{t.doTask&&t.doTask()}),Io().bind(V.hotKey.undoTaskKey,()=>{t.undoTask&&t.doTask()}),Io().bind(V.hotKey.toggleLogKey,i),null!==(e=t)&&void 0!==e&&e.after&&await(null===(s=t)||void 0===s?void 0:s.after()),null!==(s=t)&&void 0!==s&&s.buttons&&0===$("#auto-task-buttons").children().length){$("#auto-task-buttons").addClass(t.name+"-buttons");for(const u of t.buttons)if(t[u]){const d=$(`

    ${R(u)}

    `);d.find("a.auto-task-website-btn").on("click",()=>{t[u]()}),$("#auto-task-buttons").append(d)}}const l=$(`

    ${R("hideButton")}

    `);l.find("a.auto-task-website-btn").on("click",()=>{$("#auto-task-buttons").hide(),$("div.show-button-div").show()});const c=$(`

    ${V.other.defaultShowLog?R("hideLog"):R("showLog")}

    `);c.find("a.auto-task-website-btn").on("click",i),$("#auto-task-buttons").append(l).append(c),null!==(i=t)&&void 0!==i&&i.options&&GM_registerMenuCommand(R("changeWebsiteOptions"),()=>{Lo(t.name,t.options)}),"Setting"!==t.name&&(GM_registerMenuCommand(R("changeGlobalOptions"),()=>{h("swal")}),GM_registerMenuCommand(R("settingPage"),()=>{window.open("https://auto-task-v4.hclonely.com/setting.html","_blank")})),console.log("%c%s","color:#1bbe1a","Auto-Task[Load]: 脚本加载完成"),GM_getValue("notice")||(p().fire({title:R("swalNotice"),icon:"warning"}).then(()=>{window.open(R("noticeLink"),"_blank"),GM_setValue("notice",(new Date).getTime())}),null!==(a=N({html:`
  • ${R("echoNotice",R("noticeLink"))}
  • `}).font)&&void 0!==a&&a.find("a").on("click",()=>{GM_setValue("notice",(new Date).getTime())})),_o()}else console.log("%c%s","color:#ff0000","Auto-Task[Warning]: 脚本停止加载,当前网站不支持!")}else{var a=f.get("__Secure-3PAPISID");a?(GM_setValue("youtubeAuth",{PAPISID:a}),window.close(),p().fire("",R("closePageNotice"))):p().fire("",R("needLogin"))}else{var t=f.get("ct0");!!f.get("twid")&&t?(GM_setValue("twitterAuth",{ct0:t}),window.close(),p().fire("",R("closePageNotice"))):p().fire("",R("needLogin"))}else{var n,t=f.get("auth-token");!!f.get("login")?(GM_setValue("twitchAuth",{authToken:t,clientId:null===(t=commonOptions)||void 0===t||null===(n=t.headers)||void 0===n?void 0:n["Client-ID"]}),window.close(),p().fire("",R("closePageNotice"))):p().fire("",R("needLogin"))}};if("discord.com"===window.location.hostname){const Oo=window.localStorage;"#auth"===window.location.hash?(window.localStorage.removeItem=()=>!0,(Co=null===Oo||void 0===Oo||null===(Co=Oo.getItem("token"))||void 0===Co?void 0:Co.replace(/^"|"$/g,""))&&0 - auto-task-v4 [15 Jul 2022 at 10:35] + auto-task-v4 [29 Jul 2022 at 16:50] diff --git a/doc/docs/logs/README.md b/doc/docs/logs/README.md index 3d566a7..dee4f1b 100644 --- a/doc/docs/logs/README.md +++ b/doc/docs/logs/README.md @@ -5,6 +5,12 @@ lang: zh-CN ## V4.2 +### V4.2.18 + +[Release](https://github.com/HCLonely/auto-task-v4/releases/tag/v4.2.18) + +- Gleam任务识别优化 + ### V4.2.17 [Release](https://github.com/HCLonely/auto-task-v4/releases/tag/v4.2.17) diff --git a/package.json b/package.json index e14db39..2631e9f 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "auto-task-v4", - "version": "4.2.17", + "version": "4.2.18", "change": [ - "修复Givee无法识别Steam加组任务的BUG" + "Gleam任务识别优化" ], "description": "赠Key站自动任务脚本", "main": "package.json", diff --git a/page/dist/auto-task-v4-for-giveawaysu.all.user.js b/page/dist/auto-task-v4-for-giveawaysu.all.user.js index 106ff98..db7d301 100644 --- a/page/dist/auto-task-v4-for-giveawaysu.all.user.js +++ b/page/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.17 +// @version 4.2.18 // @description 赠Key站自动任务 // @author HCLonely // @license MIT diff --git a/page/dist/auto-task-v4-for-giveawaysu.user.js b/page/dist/auto-task-v4-for-giveawaysu.user.js index b8cb84f..33e0640 100644 --- a/page/dist/auto-task-v4-for-giveawaysu.user.js +++ b/page/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.17 +// @version 4.2.18 // @description 赠Key站自动任务 // @author HCLonely // @license MIT diff --git a/page/dist/auto-task-v4.all.user.js b/page/dist/auto-task-v4.all.user.js index 888c3c8..6426b6d 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.17 +// @version 4.2.18 // @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 @@ -9716,7 +9716,7 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); this.undoneTasks.steam.curatorLinks.push(link); } } - } else if (socialIcon.hasClass('fa-shield') && taskText.includes('earn.vloot.io') || socialIcon.hasClass('fa-tiktok')) { + } else if (socialIcon.hasClass('fa-shield') && taskText.includes('vloot.io') || socialIcon.hasClass('fa-tiktok')) { const continueBtn = expandInfo.find('span:contains(Continue),button:contains(Continue)'); for (const button of continueBtn) { button.click(); @@ -9730,7 +9730,7 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); await delay(500); expandInfo.find('input').val(this.options.gameroundUsername); } - } else if (socialIcon.hasClass('fa-bullhorn') && taskText.includes('Complete')) { + } else if (socialIcon.hasClass('fa-bullhorn') && /Complete/gi.test(taskText)) { if (action !== 'do') { continue; } @@ -9743,7 +9743,7 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); continue; } this.undoneTasks.extra.gleam.push(gleamLink); - } else if (socialIcon.hasClass('fa-question') || socialIcon.hasClass('fa-reddit') || socialIcon.hasClass('fa-instagram') || socialIcon.hasClass('fa-facebook-f') || socialIcon.hasClass('fa-telegram-plane') || socialIcon.hasClass('fa-shield') && taskText.includes('Check out')) {} else { + } else if (socialIcon.hasClass('fa-question') || socialIcon.hasClass('fa-reddit') || socialIcon.hasClass('fa-instagram') || socialIcon.hasClass('fa-facebook-f') || socialIcon.hasClass('fa-telegram-plane') || socialIcon.hasClass('fa-envelope') || socialIcon.hasClass('fa-shield') && taskText.includes('Check out')) {} else { scripts_echoLog({}).warning(`${i18n('unKnownTaskType')}: ${taskText}`); } } diff --git a/page/dist/auto-task-v4.compatibility.all.user.js b/page/dist/auto-task-v4.compatibility.all.user.js index e5659bb..d6926f5 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.17 +// @version 4.2.18 // @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 @@ -145,7 +145,7 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载'); ${R("browser")}${t.browserZH}${t.browserVersion} ${R("scriptManager")}${GM_info.scriptHandler}${GM_info.version} ${R("script")}${GM_info.script.name}${GM_info.script.version} - `;$("body").append(`

    ${R("environment")}

    `+e)}catch(t){K(t,"Setting.environment")}}function bo(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 To(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var $o=new WeakSet;function xo(i){try{var a=GM_getValue(i);if(null==a||!a.tasks)return;let t="",e="",s="";var n,o,[r,l]=i.split("-");switch(r){case"fawTasks":e=`Freeanywhere[${l}]`,s="https://freeanywhere.net/#/giveaway/"+l;break;case"gasTasks":e=`Giveawaysu[${l}]`,s="https://giveaway.su/giveaway/view/"+l;break;case"gcTasks":e=`GiveeClub[${l}]`,s="https://givee.club/event/"+l;break;case"gkTasks":e=`Givekey[${l}]`,s="https://givekey.ru/giveaway/"+l;break;case"gleamTasks":e=`Gleam[${l}]`,s="https://gleam.io"+l;break;case"khTasks":e=`keyhub[${l}]`,s="https://key-hub.eu/giveaway/"+l;break;case"prysTasks":e=`Prys[${l}]`,s="https://prys.revadike.com/giveaway/?id="+l;break;default:return}for([n,o]of Object.entries(a.tasks))for(var[c,u]of Object.entries(o))for(const d of u)t+=`
  • ${n}.${R(c.replace("Link",""))}: ${55
  • `;$(".container").append(`
      ${t}
    ${R("lastChangeTime")}: ${gn(a.time).format("YYYY-MM-DD HH:mm:ss")}
    `),$("span.delete-task").on("click",function(){var t=$(this).attr("data-name");t?(GM_deleteValue(t),$(`div.card[data-name="${t}"]`).remove(),p().fire({title:R("clearTaskFinished"),text:t,icon:"success"})):p().fire({title:R("clearTaskFailed"),icon:"error"})})}catch(t){K(t,"History.addItem")}}const So=[na,pa,Ga,Va,Ha,rn,t,s,g,class extends Hi{constructor(){super(...arguments),En(this,Un),En(this,Mn),En(this,Fn),En(this,Vn),En(this,Nn),Dn(this,"name","Gleam"),Dn(this,"undoneTasks",JSON.parse(Pn)),Dn(this,"socialTasks",JSON.parse(Pn)),Dn(this,"options",{...Wn,...GM_getValue("GleamOptions")}),Dn(this,"buttons",["doTask","undoTask","verifyTask"])}static test(){return"gleam.io"===window.location.host}async after(){try{if(window.location.search.includes("8b07d23f4bfa65f9")){const s=setInterval(()=>{0<$(".entry-content .entry-method i.fa-check").length&&(clearInterval(s),window.close())});for(const i of $(".entry-content .entry-method")){const a=$(i).find(".user-links"),n=$(i).find(".expandable");var t=n.find("a.btn,a:contains(Continue),button:contains(Continue)");if(0!0)}catch(t){return K(t,"Gleam.extraDoTask"),!1}}async verifyTask(){try{N({text:R("verifyingTask")+"..."});for(const t of $(".entry-content .entry-method")){const e=$(t);if(0!==e.find("i.fa-question").length){const s=e.find(".user-links");s[0].click(),await W(500),await jn(this,Nn,Bn).call(this);for(const i of e.find(".expandable").find("span:contains(Continue),button:contains(Continue)"))i.click(),await W(500),await jn(this,Nn,Bn).call(this)}}N({text:R("verifiedGleamTasks")})}catch(t){return K(t,"Gleam.verifyTask"),!1}}},class extends Hi{constructor(){super(...arguments),qn(this,eo),qn(this,to),qn(this,Qn),qn(this,Zn),Jn(this,"name","SweepWidget"),Jn(this,"options",{...Xn,...GM_getValue("SweepWidgetOptions")}),Jn(this,"buttons",["doTask"])}static test(){return/^https?:\/\/sweepwidget\.com\/view\/[\d]+/.test(window.location.href)}async after(){try{Hn(this,Zn,so).call(this)||N({}).warning(R("checkLoginFailed"))}catch(t){K(t,"SweepWidget.after")}}init(){try{const t=N({text:R("initing")});return Hn(this,Zn,so).call(this)?!!Hn(this,Qn,io).call(this)&&(this.initialized=!0,t.success(),!0):(t.warning(R("needLogin")),!1)}catch(t){return K(t,"SweepWidget.init"),!1}}classifyTask(){return!0}async doTask(){try{if(0===$("#unlock_rewards_main_wrapper").length&&(0<$('input[name="sw__login_name"]:visible').length&&$('input[name="sw__login_name"]').val(this.options.username),0<$('input[name="sw__login_email"]:visible').length&&$('input[name="sw__login_email"]').val(this.options.email),0<$("#sw_login_button:visible").length&&$("#sw_login_button")[0].click(),!await Hn(this,to,ao).call(this)))return!1;const i=N({text:R("SweepWidgetNotice")});var t,e;for(const a of $("#sw_inner_entry_methods_l2_wrapper>div.sw_entry")){const n=$(a);if(!(0${R("getTwitterUserId")}`),$("#getTwitterUserId").on("click",()=>{go(this,mo,ko).call(this,"twitterUser")}),$('input[name="other.youtubeVerifyChannel"]').after(``),$("#getYoutubeChannelId").on("click",()=>{go(this,mo,ko).call(this,"youtubeChannel")}),$('input[name^="position"]').on("input",function(){var t="rightleft",e="topbottpm";switch($(this).attr("name").replace("position.","")){case"buttonSideX":case"buttonSideY":case"buttonDistance":{const l=$('input[name="position.buttonDistance"]').val();var s=$('input[name="position.buttonSideX"]').val(),i=$('input[name="position.buttonSideY"]').val();if(!["right","left"].includes(s))break;if(!["top","bottom"].includes(i))break;if(!/^[\d]+?,[\d]+$/.test(l))break;var a=l.split(",");$("#auto-task-buttons").css(s,a[0]+"px").css(i,a[1]+"px").css(t.replace(s,""),"").css(e.replace(i,""),"");break}case"showButtonSideX":case"showButtonSideY":case"showButtonDistance":{const c=$('input[name="position.showButtonDistance"]').val();var n=$('input[name="position.showButtonSideX"]').val(),o=$('input[name="position.showButtonSideY"]').val();if(!["right","left"].includes(n))break;if(!["top","bottom"].includes(o))break;if(!/^[\d]+?,[\d]+$/.test(c))break;var r=c.split(",");$("div.show-button-div").css(n,r[0]+"px").css(o,r[1]+"px").css(t.replace(n,""),"").css(e.replace(o,""),"");break}case"logSideX":case"logSideY":case"logDistance":{const u=$('input[name="position.logDistance"]').val();r=$('input[name="position.logSideX"]').val(),n=$('input[name="position.logSideY"]').val();if(!["right","left"].includes(r))break;if(!["top","bottom"].includes(n))break;if(!/^[\d]+?,[\d]+$/.test(u))break;o=u.split(",");$("#auto-task-info").css(r,o[0]+"px").css(n,o[1]+"px").css(t.replace(r,""),"").css(e.replace(n,""),"");break}}}),$('input[name^="hotKey"]').attr("readonly","readonly").off("keydown").on("keydown",function(t){let e="";t.altKey?e+="alt + ":t.ctrlKey?e+="ctrl + ":t.shiftKey&&(e+="shift + "),$(this).val(e+(1===t.key.length?t.key.toLowerCase():""))})}catch(t){K(t,"Setting.after")}}saveGlobalOptions(){c()}},class extends s{constructor(){super(...arguments),bo(this,$o),To(this,"name","History"),To(this,"buttons",["doTask","undoTask","selectAll","selectNone","invertSelect","clearHistory"])}static test(){return"auto-task-v4.hclonely.com"===window.location.host&&"/history.html"===window.location.pathname}before(){try{$("body").html('
    ').addClass("auto-task-history");const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))!function(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}(this,$o,xo).call(this,e)}catch(t){K(t,"History.before")}}clearHistory(){try{const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))GM_deleteValue(e);p().fire({title:R("clearHistoryFinished"),icon:"success"})}catch(t){K(t,"History.after")}}}];const Lo=function(e,s){try{let t=`
    +
    `;$("body").append(`

    ${R("environment")}

    `+e)}catch(t){K(t,"Setting.environment")}}function bo(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 To(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var $o=new WeakSet;function xo(i){try{var a=GM_getValue(i);if(null==a||!a.tasks)return;let t="",e="",s="";var n,o,[r,l]=i.split("-");switch(r){case"fawTasks":e=`Freeanywhere[${l}]`,s="https://freeanywhere.net/#/giveaway/"+l;break;case"gasTasks":e=`Giveawaysu[${l}]`,s="https://giveaway.su/giveaway/view/"+l;break;case"gcTasks":e=`GiveeClub[${l}]`,s="https://givee.club/event/"+l;break;case"gkTasks":e=`Givekey[${l}]`,s="https://givekey.ru/giveaway/"+l;break;case"gleamTasks":e=`Gleam[${l}]`,s="https://gleam.io"+l;break;case"khTasks":e=`keyhub[${l}]`,s="https://key-hub.eu/giveaway/"+l;break;case"prysTasks":e=`Prys[${l}]`,s="https://prys.revadike.com/giveaway/?id="+l;break;default:return}for([n,o]of Object.entries(a.tasks))for(var[c,u]of Object.entries(o))for(const d of u)t+=`
  • ${n}.${R(c.replace("Link",""))}: ${55
  • `;$(".container").append(`
      ${t}
    ${R("lastChangeTime")}: ${gn(a.time).format("YYYY-MM-DD HH:mm:ss")}
    `),$("span.delete-task").on("click",function(){var t=$(this).attr("data-name");t?(GM_deleteValue(t),$(`div.card[data-name="${t}"]`).remove(),p().fire({title:R("clearTaskFinished"),text:t,icon:"success"})):p().fire({title:R("clearTaskFailed"),icon:"error"})})}catch(t){K(t,"History.addItem")}}const So=[na,pa,Ga,Va,Ha,rn,t,s,g,class extends Hi{constructor(){super(...arguments),En(this,Un),En(this,Mn),En(this,Fn),En(this,Vn),En(this,Nn),Dn(this,"name","Gleam"),Dn(this,"undoneTasks",JSON.parse(Pn)),Dn(this,"socialTasks",JSON.parse(Pn)),Dn(this,"options",{...Wn,...GM_getValue("GleamOptions")}),Dn(this,"buttons",["doTask","undoTask","verifyTask"])}static test(){return"gleam.io"===window.location.host}async after(){try{if(window.location.search.includes("8b07d23f4bfa65f9")){const s=setInterval(()=>{0<$(".entry-content .entry-method i.fa-check").length&&(clearInterval(s),window.close())});for(const i of $(".entry-content .entry-method")){const a=$(i).find(".user-links"),n=$(i).find(".expandable");var t=n.find("a.btn,a:contains(Continue),button:contains(Continue)");if(0!0)}catch(t){return K(t,"Gleam.extraDoTask"),!1}}async verifyTask(){try{N({text:R("verifyingTask")+"..."});for(const t of $(".entry-content .entry-method")){const e=$(t);if(0!==e.find("i.fa-question").length){const s=e.find(".user-links");s[0].click(),await W(500),await jn(this,Nn,Bn).call(this);for(const i of e.find(".expandable").find("span:contains(Continue),button:contains(Continue)"))i.click(),await W(500),await jn(this,Nn,Bn).call(this)}}N({text:R("verifiedGleamTasks")})}catch(t){return K(t,"Gleam.verifyTask"),!1}}},class extends Hi{constructor(){super(...arguments),qn(this,eo),qn(this,to),qn(this,Qn),qn(this,Zn),Jn(this,"name","SweepWidget"),Jn(this,"options",{...Xn,...GM_getValue("SweepWidgetOptions")}),Jn(this,"buttons",["doTask"])}static test(){return/^https?:\/\/sweepwidget\.com\/view\/[\d]+/.test(window.location.href)}async after(){try{Hn(this,Zn,so).call(this)||N({}).warning(R("checkLoginFailed"))}catch(t){K(t,"SweepWidget.after")}}init(){try{const t=N({text:R("initing")});return Hn(this,Zn,so).call(this)?!!Hn(this,Qn,io).call(this)&&(this.initialized=!0,t.success(),!0):(t.warning(R("needLogin")),!1)}catch(t){return K(t,"SweepWidget.init"),!1}}classifyTask(){return!0}async doTask(){try{if(0===$("#unlock_rewards_main_wrapper").length&&(0<$('input[name="sw__login_name"]:visible').length&&$('input[name="sw__login_name"]').val(this.options.username),0<$('input[name="sw__login_email"]:visible').length&&$('input[name="sw__login_email"]').val(this.options.email),0<$("#sw_login_button:visible").length&&$("#sw_login_button")[0].click(),!await Hn(this,to,ao).call(this)))return!1;const i=N({text:R("SweepWidgetNotice")});var t,e;for(const a of $("#sw_inner_entry_methods_l2_wrapper>div.sw_entry")){const n=$(a);if(!(0${R("getTwitterUserId")}`),$("#getTwitterUserId").on("click",()=>{go(this,mo,ko).call(this,"twitterUser")}),$('input[name="other.youtubeVerifyChannel"]').after(``),$("#getYoutubeChannelId").on("click",()=>{go(this,mo,ko).call(this,"youtubeChannel")}),$('input[name^="position"]').on("input",function(){var t="rightleft",e="topbottpm";switch($(this).attr("name").replace("position.","")){case"buttonSideX":case"buttonSideY":case"buttonDistance":{const l=$('input[name="position.buttonDistance"]').val();var s=$('input[name="position.buttonSideX"]').val(),i=$('input[name="position.buttonSideY"]').val();if(!["right","left"].includes(s))break;if(!["top","bottom"].includes(i))break;if(!/^[\d]+?,[\d]+$/.test(l))break;var a=l.split(",");$("#auto-task-buttons").css(s,a[0]+"px").css(i,a[1]+"px").css(t.replace(s,""),"").css(e.replace(i,""),"");break}case"showButtonSideX":case"showButtonSideY":case"showButtonDistance":{const c=$('input[name="position.showButtonDistance"]').val();var n=$('input[name="position.showButtonSideX"]').val(),o=$('input[name="position.showButtonSideY"]').val();if(!["right","left"].includes(n))break;if(!["top","bottom"].includes(o))break;if(!/^[\d]+?,[\d]+$/.test(c))break;var r=c.split(",");$("div.show-button-div").css(n,r[0]+"px").css(o,r[1]+"px").css(t.replace(n,""),"").css(e.replace(o,""),"");break}case"logSideX":case"logSideY":case"logDistance":{const u=$('input[name="position.logDistance"]').val();r=$('input[name="position.logSideX"]').val(),n=$('input[name="position.logSideY"]').val();if(!["right","left"].includes(r))break;if(!["top","bottom"].includes(n))break;if(!/^[\d]+?,[\d]+$/.test(u))break;o=u.split(",");$("#auto-task-info").css(r,o[0]+"px").css(n,o[1]+"px").css(t.replace(r,""),"").css(e.replace(n,""),"");break}}}),$('input[name^="hotKey"]').attr("readonly","readonly").off("keydown").on("keydown",function(t){let e="";t.altKey?e+="alt + ":t.ctrlKey?e+="ctrl + ":t.shiftKey&&(e+="shift + "),$(this).val(e+(1===t.key.length?t.key.toLowerCase():""))})}catch(t){K(t,"Setting.after")}}saveGlobalOptions(){c()}},class extends s{constructor(){super(...arguments),bo(this,$o),To(this,"name","History"),To(this,"buttons",["doTask","undoTask","selectAll","selectNone","invertSelect","clearHistory"])}static test(){return"auto-task-v4.hclonely.com"===window.location.host&&"/history.html"===window.location.pathname}before(){try{$("body").html('
    ').addClass("auto-task-history");const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))!function(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}(this,$o,xo).call(this,e)}catch(t){K(t,"History.before")}}clearHistory(){try{const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))GM_deleteValue(e);p().fire({title:R("clearHistoryFinished"),icon:"success"})}catch(t){K(t,"History.after")}}}];const Lo=function(e,s){try{let t=`
    `;for(var[i,a]of Object.entries(s))t+=``;t+="
    ${R("option")}${R("value")}
    ${i}
    ",p().fire({title:R("websiteOptions"),html:t,showConfirmButton:!0,confirmButtonText:R("save"),showCancelButton:!0,cancelButtonText:R("close")}).then(t=>{t=t.isConfirmed;t&&($("#websiteOptionsForm").serializeArray().map(t=>(s[t.name]=t.value,t)),GM_setValue(e+"Options",s),p().fire({title:R("changeWebsiteOptionsSuccess"),icon:"success"}))})}catch(t){K(t,"websiteOptions")}};var s=keyboardJS,Io=Eo.n(s);const Go=async(t,e)=>{try{var s,i=t+"package.json?time="+(new Date).getTime(),{result:a,statusText:n,status:o,data:r}=await L({url:i,responseType:"json",method:"GET",timeout:3e4});return"Success"===a?null!=r&&null!==(s=r.response)&&void 0!==s&&s.version?r.response:(e||N({}).error(`${R("checkUpdateFailed")}[${null==r?void 0:r.statusText}(${null==r?void 0:r.status})]`),!1):(e||N({}).error(R("checkUpdateFailed")+`[${a}:${n}(${o})]`),!1)}catch(t){return K(t,"checkUpdate"),!1}};const _o=async()=>{try{var i,a=GM_info.script.version,n=V.other.autoUpdateSource.toLowerCase(),o={github:"https://github.com/HCLonely/auto-task-new/raw/main/",jsdelivr:"https://cdn.jsdelivr.net/gh/HCLonely/auto-task-v4@main/",standby:"https://auto-task-v4.hclonely.com/"};let t,e="",s;["github","jsdelivr","standby"].includes(n)?(e=o[n],s=await Go(e,!1)):(e=o.github,s=await Go(e,!0),s||(e=o.jsdelivr,s=await Go(e,!0),s||(e=o.standby,s=await Go(e,!0)))),s?t=s.version||a:(t=a,N({}).error(R("checkUpdateFailed"))),s&&((t,e)=>{try{const[l]=t.split("-"),[c,u]=e.split("-");if(u&&!V.other.receivePreview)return!1;var[s,i,a]=l.split(".").map(t=>parseInt(t,10)),[n,o,r]=c.split(".").map(t=>parseInt(t,10));return s${R("newVersionNotice",t,`${e}dist/${GM_info.script.name}.user.js`)}`}),N({html:`
  • ${R("updateText",t)}
    1. ${null===(i=s.change)||void 0===i?void 0:i.map(t=>`
    2. ${t}
    3. `).join("")}
    4. ${R("updateHistory")}
    `}))}catch(t){K(t,"updateChecker")}};window.STYLE=GM_addStyle(e.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}`),window.DEBUG=!(null===(e=V.other)||void 0===e||!e.debug),window.TRACE=!(null===(e=V.other)||void 0===e||!e.debug)&&"function"==typeof console.trace;var Co,Ao,e=async()=>{var e,s;if("www.twitch.tv"!==window.location.hostname||"#auth"!==window.location.hash)if("twitter.com"!==window.location.hostname||"#auth"!==window.location.hash)if("www.youtube.com"!==window.location.hostname||"#auth"!==window.location.hash){if("www.reddit.com"===window.location.hostname&&("#auth"===window.location.hash||"#auth"===GM_getValue("redditAuth"))){const o=$("#redesign-beta-optin-btn");return 0
    `),$("div.show-button-div").on("click",()=>{$("#auto-task-buttons").show(),$("div.show-button-div").hide()});var i=()=>{const t=$("#toggle-log");"show"===t.attr("data-status")?($("#auto-task-info").hide(),t.attr("data-status","hide").text(R("showLog"))):($("#auto-task-info").show(),t.attr("data-status","show").text(R("hideLog")))};if(Io().bind(V.hotKey.doTaskKey,()=>{t.doTask&&t.doTask()}),Io().bind(V.hotKey.undoTaskKey,()=>{t.undoTask&&t.doTask()}),Io().bind(V.hotKey.toggleLogKey,i),null!==(e=t)&&void 0!==e&&e.after&&await(null===(s=t)||void 0===s?void 0:s.after()),null!==(s=t)&&void 0!==s&&s.buttons&&0===$("#auto-task-buttons").children().length){$("#auto-task-buttons").addClass(t.name+"-buttons");for(const u of t.buttons)if(t[u]){const d=$(`

    ${R(u)}

    `);d.find("a.auto-task-website-btn").on("click",()=>{t[u]()}),$("#auto-task-buttons").append(d)}}const l=$(`

    ${R("hideButton")}

    `);l.find("a.auto-task-website-btn").on("click",()=>{$("#auto-task-buttons").hide(),$("div.show-button-div").show()});const c=$(`

    ${V.other.defaultShowLog?R("hideLog"):R("showLog")}

    `);c.find("a.auto-task-website-btn").on("click",i),$("#auto-task-buttons").append(l).append(c),null!==(i=t)&&void 0!==i&&i.options&&GM_registerMenuCommand(R("changeWebsiteOptions"),()=>{Lo(t.name,t.options)}),"Setting"!==t.name&&(GM_registerMenuCommand(R("changeGlobalOptions"),()=>{h("swal")}),GM_registerMenuCommand(R("settingPage"),()=>{window.open("https://auto-task-v4.hclonely.com/setting.html","_blank")})),console.log("%c%s","color:#1bbe1a","Auto-Task[Load]: 脚本加载完成"),GM_getValue("notice")||(p().fire({title:R("swalNotice"),icon:"warning"}).then(()=>{window.open(R("noticeLink"),"_blank"),GM_setValue("notice",(new Date).getTime())}),null!==(a=N({html:`
  • ${R("echoNotice",R("noticeLink"))}
  • `}).font)&&void 0!==a&&a.find("a").on("click",()=>{GM_setValue("notice",(new Date).getTime())})),_o()}else console.log("%c%s","color:#ff0000","Auto-Task[Warning]: 脚本停止加载,当前网站不支持!")}else{var a=f.get("__Secure-3PAPISID");a?(GM_setValue("youtubeAuth",{PAPISID:a}),window.close(),p().fire("",R("closePageNotice"))):p().fire("",R("needLogin"))}else{var t=f.get("ct0");!!f.get("twid")&&t?(GM_setValue("twitterAuth",{ct0:t}),window.close(),p().fire("",R("closePageNotice"))):p().fire("",R("needLogin"))}else{var n,t=f.get("auth-token");!!f.get("login")?(GM_setValue("twitchAuth",{authToken:t,clientId:null===(t=commonOptions)||void 0===t||null===(n=t.headers)||void 0===n?void 0:n["Client-ID"]}),window.close(),p().fire("",R("closePageNotice"))):p().fire("",R("needLogin"))}};if("discord.com"===window.location.hostname){const Oo=window.localStorage;"#auth"===window.location.hash?(window.localStorage.removeItem=()=>!0,(Co=null===Oo||void 0===Oo||null===(Co=Oo.getItem("token"))||void 0===Co?void 0:Co.replace(/^"|"$/g,""))&&0${R("browser")}${t.browserZH}${t.browserVersion} ${R("scriptManager")}${GM_info.scriptHandler}${GM_info.version} ${R("script")}${GM_info.script.name}${GM_info.script.version} - `;$("body").append(`

    ${R("environment")}

    `+e)}catch(t){K(t,"Setting.environment")}}function bo(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 To(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var $o=new WeakSet;function xo(i){try{var a=GM_getValue(i);if(null==a||!a.tasks)return;let t="",e="",s="";var n,o,[r,l]=i.split("-");switch(r){case"fawTasks":e=`Freeanywhere[${l}]`,s="https://freeanywhere.net/#/giveaway/"+l;break;case"gasTasks":e=`Giveawaysu[${l}]`,s="https://giveaway.su/giveaway/view/"+l;break;case"gcTasks":e=`GiveeClub[${l}]`,s="https://givee.club/event/"+l;break;case"gkTasks":e=`Givekey[${l}]`,s="https://givekey.ru/giveaway/"+l;break;case"gleamTasks":e=`Gleam[${l}]`,s="https://gleam.io"+l;break;case"khTasks":e=`keyhub[${l}]`,s="https://key-hub.eu/giveaway/"+l;break;case"prysTasks":e=`Prys[${l}]`,s="https://prys.revadike.com/giveaway/?id="+l;break;default:return}for([n,o]of Object.entries(a.tasks))for(var[c,u]of Object.entries(o))for(const d of u)t+=`
  • ${n}.${R(c.replace("Link",""))}: ${55
  • `;$(".container").append(`
      ${t}
    ${R("lastChangeTime")}: ${gn(a.time).format("YYYY-MM-DD HH:mm:ss")}
    `),$("span.delete-task").on("click",function(){var t=$(this).attr("data-name");t?(GM_deleteValue(t),$(`div.card[data-name="${t}"]`).remove(),p().fire({title:R("clearTaskFinished"),text:t,icon:"success"})):p().fire({title:R("clearTaskFailed"),icon:"error"})})}catch(t){K(t,"History.addItem")}}const So=[na,pa,Ga,Va,Ha,rn,t,s,g,class extends Hi{constructor(){super(...arguments),En(this,Un),En(this,Mn),En(this,Fn),En(this,Vn),En(this,Nn),Dn(this,"name","Gleam"),Dn(this,"undoneTasks",JSON.parse(Pn)),Dn(this,"socialTasks",JSON.parse(Pn)),Dn(this,"options",{...Wn,...GM_getValue("GleamOptions")}),Dn(this,"buttons",["doTask","undoTask","verifyTask"])}static test(){return"gleam.io"===window.location.host}async after(){try{if(window.location.search.includes("8b07d23f4bfa65f9")){const s=setInterval(()=>{0<$(".entry-content .entry-method i.fa-check").length&&(clearInterval(s),window.close())});for(const i of $(".entry-content .entry-method")){const a=$(i).find(".user-links"),n=$(i).find(".expandable");var t=n.find("a.btn,a:contains(Continue),button:contains(Continue)");if(0!0)}catch(t){return K(t,"Gleam.extraDoTask"),!1}}async verifyTask(){try{N({text:R("verifyingTask")+"..."});for(const t of $(".entry-content .entry-method")){const e=$(t);if(0!==e.find("i.fa-question").length){const s=e.find(".user-links");s[0].click(),await W(500),await jn(this,Nn,Bn).call(this);for(const i of e.find(".expandable").find("span:contains(Continue),button:contains(Continue)"))i.click(),await W(500),await jn(this,Nn,Bn).call(this)}}N({text:R("verifiedGleamTasks")})}catch(t){return K(t,"Gleam.verifyTask"),!1}}},class extends Hi{constructor(){super(...arguments),qn(this,eo),qn(this,to),qn(this,Qn),qn(this,Zn),Jn(this,"name","SweepWidget"),Jn(this,"options",{...Xn,...GM_getValue("SweepWidgetOptions")}),Jn(this,"buttons",["doTask"])}static test(){return/^https?:\/\/sweepwidget\.com\/view\/[\d]+/.test(window.location.href)}async after(){try{Hn(this,Zn,so).call(this)||N({}).warning(R("checkLoginFailed"))}catch(t){K(t,"SweepWidget.after")}}init(){try{const t=N({text:R("initing")});return Hn(this,Zn,so).call(this)?!!Hn(this,Qn,io).call(this)&&(this.initialized=!0,t.success(),!0):(t.warning(R("needLogin")),!1)}catch(t){return K(t,"SweepWidget.init"),!1}}classifyTask(){return!0}async doTask(){try{if(0===$("#unlock_rewards_main_wrapper").length&&(0<$('input[name="sw__login_name"]:visible').length&&$('input[name="sw__login_name"]').val(this.options.username),0<$('input[name="sw__login_email"]:visible').length&&$('input[name="sw__login_email"]').val(this.options.email),0<$("#sw_login_button:visible").length&&$("#sw_login_button")[0].click(),!await Hn(this,to,ao).call(this)))return!1;const i=N({text:R("SweepWidgetNotice")});var t,e;for(const a of $("#sw_inner_entry_methods_l2_wrapper>div.sw_entry")){const n=$(a);if(!(0${R("getTwitterUserId")}`),$("#getTwitterUserId").on("click",()=>{go(this,mo,ko).call(this,"twitterUser")}),$('input[name="other.youtubeVerifyChannel"]').after(``),$("#getYoutubeChannelId").on("click",()=>{go(this,mo,ko).call(this,"youtubeChannel")}),$('input[name^="position"]').on("input",function(){var t="rightleft",e="topbottpm";switch($(this).attr("name").replace("position.","")){case"buttonSideX":case"buttonSideY":case"buttonDistance":{const l=$('input[name="position.buttonDistance"]').val();var s=$('input[name="position.buttonSideX"]').val(),i=$('input[name="position.buttonSideY"]').val();if(!["right","left"].includes(s))break;if(!["top","bottom"].includes(i))break;if(!/^[\d]+?,[\d]+$/.test(l))break;var a=l.split(",");$("#auto-task-buttons").css(s,a[0]+"px").css(i,a[1]+"px").css(t.replace(s,""),"").css(e.replace(i,""),"");break}case"showButtonSideX":case"showButtonSideY":case"showButtonDistance":{const c=$('input[name="position.showButtonDistance"]').val();var n=$('input[name="position.showButtonSideX"]').val(),o=$('input[name="position.showButtonSideY"]').val();if(!["right","left"].includes(n))break;if(!["top","bottom"].includes(o))break;if(!/^[\d]+?,[\d]+$/.test(c))break;var r=c.split(",");$("div.show-button-div").css(n,r[0]+"px").css(o,r[1]+"px").css(t.replace(n,""),"").css(e.replace(o,""),"");break}case"logSideX":case"logSideY":case"logDistance":{const u=$('input[name="position.logDistance"]').val();r=$('input[name="position.logSideX"]').val(),n=$('input[name="position.logSideY"]').val();if(!["right","left"].includes(r))break;if(!["top","bottom"].includes(n))break;if(!/^[\d]+?,[\d]+$/.test(u))break;o=u.split(",");$("#auto-task-info").css(r,o[0]+"px").css(n,o[1]+"px").css(t.replace(r,""),"").css(e.replace(n,""),"");break}}}),$('input[name^="hotKey"]').attr("readonly","readonly").off("keydown").on("keydown",function(t){let e="";t.altKey?e+="alt + ":t.ctrlKey?e+="ctrl + ":t.shiftKey&&(e+="shift + "),$(this).val(e+(1===t.key.length?t.key.toLowerCase():""))})}catch(t){K(t,"Setting.after")}}saveGlobalOptions(){c()}},class extends s{constructor(){super(...arguments),bo(this,$o),To(this,"name","History"),To(this,"buttons",["doTask","undoTask","selectAll","selectNone","invertSelect","clearHistory"])}static test(){return"auto-task-v4.hclonely.com"===window.location.host&&"/history.html"===window.location.pathname}before(){try{$("body").html('
    ').addClass("auto-task-history");const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))!function(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}(this,$o,xo).call(this,e)}catch(t){K(t,"History.before")}}clearHistory(){try{const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))GM_deleteValue(e);p().fire({title:R("clearHistoryFinished"),icon:"success"})}catch(t){K(t,"History.after")}}}];const Lo=function(e,s){try{let t=`
    +
    `;$("body").append(`

    ${R("environment")}

    `+e)}catch(t){K(t,"Setting.environment")}}function bo(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 To(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var $o=new WeakSet;function xo(i){try{var a=GM_getValue(i);if(null==a||!a.tasks)return;let t="",e="",s="";var n,o,[r,l]=i.split("-");switch(r){case"fawTasks":e=`Freeanywhere[${l}]`,s="https://freeanywhere.net/#/giveaway/"+l;break;case"gasTasks":e=`Giveawaysu[${l}]`,s="https://giveaway.su/giveaway/view/"+l;break;case"gcTasks":e=`GiveeClub[${l}]`,s="https://givee.club/event/"+l;break;case"gkTasks":e=`Givekey[${l}]`,s="https://givekey.ru/giveaway/"+l;break;case"gleamTasks":e=`Gleam[${l}]`,s="https://gleam.io"+l;break;case"khTasks":e=`keyhub[${l}]`,s="https://key-hub.eu/giveaway/"+l;break;case"prysTasks":e=`Prys[${l}]`,s="https://prys.revadike.com/giveaway/?id="+l;break;default:return}for([n,o]of Object.entries(a.tasks))for(var[c,u]of Object.entries(o))for(const d of u)t+=`
  • ${n}.${R(c.replace("Link",""))}: ${55
  • `;$(".container").append(`
      ${t}
    ${R("lastChangeTime")}: ${gn(a.time).format("YYYY-MM-DD HH:mm:ss")}
    `),$("span.delete-task").on("click",function(){var t=$(this).attr("data-name");t?(GM_deleteValue(t),$(`div.card[data-name="${t}"]`).remove(),p().fire({title:R("clearTaskFinished"),text:t,icon:"success"})):p().fire({title:R("clearTaskFailed"),icon:"error"})})}catch(t){K(t,"History.addItem")}}const So=[na,pa,Ga,Va,Ha,rn,t,s,g,class extends Hi{constructor(){super(...arguments),En(this,Un),En(this,Mn),En(this,Fn),En(this,Vn),En(this,Nn),Dn(this,"name","Gleam"),Dn(this,"undoneTasks",JSON.parse(Pn)),Dn(this,"socialTasks",JSON.parse(Pn)),Dn(this,"options",{...Wn,...GM_getValue("GleamOptions")}),Dn(this,"buttons",["doTask","undoTask","verifyTask"])}static test(){return"gleam.io"===window.location.host}async after(){try{if(window.location.search.includes("8b07d23f4bfa65f9")){const s=setInterval(()=>{0<$(".entry-content .entry-method i.fa-check").length&&(clearInterval(s),window.close())});for(const i of $(".entry-content .entry-method")){const a=$(i).find(".user-links"),n=$(i).find(".expandable");var t=n.find("a.btn,a:contains(Continue),button:contains(Continue)");if(0!0)}catch(t){return K(t,"Gleam.extraDoTask"),!1}}async verifyTask(){try{N({text:R("verifyingTask")+"..."});for(const t of $(".entry-content .entry-method")){const e=$(t);if(0!==e.find("i.fa-question").length){const s=e.find(".user-links");s[0].click(),await W(500),await jn(this,Nn,Bn).call(this);for(const i of e.find(".expandable").find("span:contains(Continue),button:contains(Continue)"))i.click(),await W(500),await jn(this,Nn,Bn).call(this)}}N({text:R("verifiedGleamTasks")})}catch(t){return K(t,"Gleam.verifyTask"),!1}}},class extends Hi{constructor(){super(...arguments),qn(this,eo),qn(this,to),qn(this,Qn),qn(this,Zn),Jn(this,"name","SweepWidget"),Jn(this,"options",{...Xn,...GM_getValue("SweepWidgetOptions")}),Jn(this,"buttons",["doTask"])}static test(){return/^https?:\/\/sweepwidget\.com\/view\/[\d]+/.test(window.location.href)}async after(){try{Hn(this,Zn,so).call(this)||N({}).warning(R("checkLoginFailed"))}catch(t){K(t,"SweepWidget.after")}}init(){try{const t=N({text:R("initing")});return Hn(this,Zn,so).call(this)?!!Hn(this,Qn,io).call(this)&&(this.initialized=!0,t.success(),!0):(t.warning(R("needLogin")),!1)}catch(t){return K(t,"SweepWidget.init"),!1}}classifyTask(){return!0}async doTask(){try{if(0===$("#unlock_rewards_main_wrapper").length&&(0<$('input[name="sw__login_name"]:visible').length&&$('input[name="sw__login_name"]').val(this.options.username),0<$('input[name="sw__login_email"]:visible').length&&$('input[name="sw__login_email"]').val(this.options.email),0<$("#sw_login_button:visible").length&&$("#sw_login_button")[0].click(),!await Hn(this,to,ao).call(this)))return!1;const i=N({text:R("SweepWidgetNotice")});var t,e;for(const a of $("#sw_inner_entry_methods_l2_wrapper>div.sw_entry")){const n=$(a);if(!(0${R("getTwitterUserId")}`),$("#getTwitterUserId").on("click",()=>{go(this,mo,ko).call(this,"twitterUser")}),$('input[name="other.youtubeVerifyChannel"]').after(``),$("#getYoutubeChannelId").on("click",()=>{go(this,mo,ko).call(this,"youtubeChannel")}),$('input[name^="position"]').on("input",function(){var t="rightleft",e="topbottpm";switch($(this).attr("name").replace("position.","")){case"buttonSideX":case"buttonSideY":case"buttonDistance":{const l=$('input[name="position.buttonDistance"]').val();var s=$('input[name="position.buttonSideX"]').val(),i=$('input[name="position.buttonSideY"]').val();if(!["right","left"].includes(s))break;if(!["top","bottom"].includes(i))break;if(!/^[\d]+?,[\d]+$/.test(l))break;var a=l.split(",");$("#auto-task-buttons").css(s,a[0]+"px").css(i,a[1]+"px").css(t.replace(s,""),"").css(e.replace(i,""),"");break}case"showButtonSideX":case"showButtonSideY":case"showButtonDistance":{const c=$('input[name="position.showButtonDistance"]').val();var n=$('input[name="position.showButtonSideX"]').val(),o=$('input[name="position.showButtonSideY"]').val();if(!["right","left"].includes(n))break;if(!["top","bottom"].includes(o))break;if(!/^[\d]+?,[\d]+$/.test(c))break;var r=c.split(",");$("div.show-button-div").css(n,r[0]+"px").css(o,r[1]+"px").css(t.replace(n,""),"").css(e.replace(o,""),"");break}case"logSideX":case"logSideY":case"logDistance":{const u=$('input[name="position.logDistance"]').val();r=$('input[name="position.logSideX"]').val(),n=$('input[name="position.logSideY"]').val();if(!["right","left"].includes(r))break;if(!["top","bottom"].includes(n))break;if(!/^[\d]+?,[\d]+$/.test(u))break;o=u.split(",");$("#auto-task-info").css(r,o[0]+"px").css(n,o[1]+"px").css(t.replace(r,""),"").css(e.replace(n,""),"");break}}}),$('input[name^="hotKey"]').attr("readonly","readonly").off("keydown").on("keydown",function(t){let e="";t.altKey?e+="alt + ":t.ctrlKey?e+="ctrl + ":t.shiftKey&&(e+="shift + "),$(this).val(e+(1===t.key.length?t.key.toLowerCase():""))})}catch(t){K(t,"Setting.after")}}saveGlobalOptions(){c()}},class extends s{constructor(){super(...arguments),bo(this,$o),To(this,"name","History"),To(this,"buttons",["doTask","undoTask","selectAll","selectNone","invertSelect","clearHistory"])}static test(){return"auto-task-v4.hclonely.com"===window.location.host&&"/history.html"===window.location.pathname}before(){try{$("body").html('
    ').addClass("auto-task-history");const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))!function(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}(this,$o,xo).call(this,e)}catch(t){K(t,"History.before")}}clearHistory(){try{const t=GM_listValues()||[];for(const e of t.map(t=>/^[\w]+?Tasks-/.test(t)?t:null).filter(t=>t))GM_deleteValue(e);p().fire({title:R("clearHistoryFinished"),icon:"success"})}catch(t){K(t,"History.after")}}}];const Lo=function(e,s){try{let t=`
    `;for(var[i,a]of Object.entries(s))t+=``;t+="
    ${R("option")}${R("value")}
    ${i}
    ",p().fire({title:R("websiteOptions"),html:t,showConfirmButton:!0,confirmButtonText:R("save"),showCancelButton:!0,cancelButtonText:R("close")}).then(t=>{t=t.isConfirmed;t&&($("#websiteOptionsForm").serializeArray().map(t=>(s[t.name]=t.value,t)),GM_setValue(e+"Options",s),p().fire({title:R("changeWebsiteOptionsSuccess"),icon:"success"}))})}catch(t){K(t,"websiteOptions")}};var s=keyboardJS,Io=Eo.n(s);const Go=async(t,e)=>{try{var s,i=t+"package.json?time="+(new Date).getTime(),{result:a,statusText:n,status:o,data:r}=await L({url:i,responseType:"json",method:"GET",timeout:3e4});return"Success"===a?null!=r&&null!==(s=r.response)&&void 0!==s&&s.version?r.response:(e||N({}).error(`${R("checkUpdateFailed")}[${null==r?void 0:r.statusText}(${null==r?void 0:r.status})]`),!1):(e||N({}).error(R("checkUpdateFailed")+`[${a}:${n}(${o})]`),!1)}catch(t){return K(t,"checkUpdate"),!1}};const _o=async()=>{try{var i,a=GM_info.script.version,n=V.other.autoUpdateSource.toLowerCase(),o={github:"https://github.com/HCLonely/auto-task-new/raw/main/",jsdelivr:"https://cdn.jsdelivr.net/gh/HCLonely/auto-task-v4@main/",standby:"https://auto-task-v4.hclonely.com/"};let t,e="",s;["github","jsdelivr","standby"].includes(n)?(e=o[n],s=await Go(e,!1)):(e=o.github,s=await Go(e,!0),s||(e=o.jsdelivr,s=await Go(e,!0),s||(e=o.standby,s=await Go(e,!0)))),s?t=s.version||a:(t=a,N({}).error(R("checkUpdateFailed"))),s&&((t,e)=>{try{const[l]=t.split("-"),[c,u]=e.split("-");if(u&&!V.other.receivePreview)return!1;var[s,i,a]=l.split(".").map(t=>parseInt(t,10)),[n,o,r]=c.split(".").map(t=>parseInt(t,10));return s${R("newVersionNotice",t,`${e}dist/${GM_info.script.name}.user.js`)}`}),N({html:`
  • ${R("updateText",t)}
    1. ${null===(i=s.change)||void 0===i?void 0:i.map(t=>`
    2. ${t}
    3. `).join("")}
    4. ${R("updateHistory")}
    `}))}catch(t){K(t,"updateChecker")}};window.STYLE=GM_addStyle(e.Z+GM_getResourceText("style")),window.DEBUG=!(null===(e=V.other)||void 0===e||!e.debug),window.TRACE=!(null===(e=V.other)||void 0===e||!e.debug)&&"function"==typeof console.trace;var Co,Ao,e=async()=>{var e,s;if("www.twitch.tv"!==window.location.hostname||"#auth"!==window.location.hash)if("twitter.com"!==window.location.hostname||"#auth"!==window.location.hash)if("www.youtube.com"!==window.location.hostname||"#auth"!==window.location.hash){if("www.reddit.com"===window.location.hostname&&("#auth"===window.location.hash||"#auth"===GM_getValue("redditAuth"))){const o=$("#redesign-beta-optin-btn");return 0
    `),$("div.show-button-div").on("click",()=>{$("#auto-task-buttons").show(),$("div.show-button-div").hide()});var i=()=>{const t=$("#toggle-log");"show"===t.attr("data-status")?($("#auto-task-info").hide(),t.attr("data-status","hide").text(R("showLog"))):($("#auto-task-info").show(),t.attr("data-status","show").text(R("hideLog")))};if(Io().bind(V.hotKey.doTaskKey,()=>{t.doTask&&t.doTask()}),Io().bind(V.hotKey.undoTaskKey,()=>{t.undoTask&&t.doTask()}),Io().bind(V.hotKey.toggleLogKey,i),null!==(e=t)&&void 0!==e&&e.after&&await(null===(s=t)||void 0===s?void 0:s.after()),null!==(s=t)&&void 0!==s&&s.buttons&&0===$("#auto-task-buttons").children().length){$("#auto-task-buttons").addClass(t.name+"-buttons");for(const u of t.buttons)if(t[u]){const d=$(`

    ${R(u)}

    `);d.find("a.auto-task-website-btn").on("click",()=>{t[u]()}),$("#auto-task-buttons").append(d)}}const l=$(`

    ${R("hideButton")}

    `);l.find("a.auto-task-website-btn").on("click",()=>{$("#auto-task-buttons").hide(),$("div.show-button-div").show()});const c=$(`

    ${V.other.defaultShowLog?R("hideLog"):R("showLog")}

    `);c.find("a.auto-task-website-btn").on("click",i),$("#auto-task-buttons").append(l).append(c),null!==(i=t)&&void 0!==i&&i.options&&GM_registerMenuCommand(R("changeWebsiteOptions"),()=>{Lo(t.name,t.options)}),"Setting"!==t.name&&(GM_registerMenuCommand(R("changeGlobalOptions"),()=>{h("swal")}),GM_registerMenuCommand(R("settingPage"),()=>{window.open("https://auto-task-v4.hclonely.com/setting.html","_blank")})),console.log("%c%s","color:#1bbe1a","Auto-Task[Load]: 脚本加载完成"),GM_getValue("notice")||(p().fire({title:R("swalNotice"),icon:"warning"}).then(()=>{window.open(R("noticeLink"),"_blank"),GM_setValue("notice",(new Date).getTime())}),null!==(a=N({html:`
  • ${R("echoNotice",R("noticeLink"))}
  • `}).font)&&void 0!==a&&a.find("a").on("click",()=>{GM_setValue("notice",(new Date).getTime())})),_o()}else console.log("%c%s","color:#ff0000","Auto-Task[Warning]: 脚本停止加载,当前网站不支持!")}else{var a=f.get("__Secure-3PAPISID");a?(GM_setValue("youtubeAuth",{PAPISID:a}),window.close(),p().fire("",R("closePageNotice"))):p().fire("",R("needLogin"))}else{var t=f.get("ct0");!!f.get("twid")&&t?(GM_setValue("twitterAuth",{ct0:t}),window.close(),p().fire("",R("closePageNotice"))):p().fire("",R("needLogin"))}else{var n,t=f.get("auth-token");!!f.get("login")?(GM_setValue("twitchAuth",{authToken:t,clientId:null===(t=commonOptions)||void 0===t||null===(n=t.headers)||void 0===n?void 0:n["Client-ID"]}),window.close(),p().fire("",R("closePageNotice"))):p().fire("",R("needLogin"))}};if("discord.com"===window.location.hostname){const Oo=window.localStorage;"#auth"===window.location.hash?(window.localStorage.removeItem=()=>!0,(Co=null===Oo||void 0===Oo||null===(Co=Oo.getItem("token"))||void 0===Co?void 0:Co.replace(/^"|"$/g,""))&&0