diff --git a/files/assets/css/main.css b/files/assets/css/main.css index f2d974aec..5530591e7 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -4026,6 +4026,9 @@ ul.comment-section { .profile-actions .dropdown-item:hover .fa, .profile-actions .dropdown-item:hover .fas, .profile-actions .dropdown-item:active .far { color: var(--black); } +.profile-owned-all-hats { + color: gold; +} #page .footer h1, #page .footer h2, #page .footer h3, #page .footer h4, #page .footer h5, #page .footer h6, #article .footer h1, #article .footer h2, #article .footer h3, #article .footer h4, #article .footer h5, #article .footer h6 { font-weight: 600; } diff --git a/files/assets/images/emojis/marseyanalvore.webp b/files/assets/images/emojis/marseyanalvore.webp new file mode 100644 index 000000000..c13f17489 Binary files /dev/null and b/files/assets/images/emojis/marseyanalvore.webp differ diff --git a/files/assets/images/emojis/marseycoomer3.webp b/files/assets/images/emojis/marseycoomer3.webp new file mode 100644 index 000000000..53e4de213 Binary files /dev/null and b/files/assets/images/emojis/marseycoomer3.webp differ diff --git a/files/assets/images/emojis/marseydarkbrandon.webp b/files/assets/images/emojis/marseydarkbrandon.webp new file mode 100644 index 000000000..e758041a8 Binary files /dev/null and b/files/assets/images/emojis/marseydarkbrandon.webp differ diff --git a/files/assets/images/emojis/marseydarktrump.webp b/files/assets/images/emojis/marseydarktrump.webp new file mode 100644 index 000000000..66044a2c6 Binary files /dev/null and b/files/assets/images/emojis/marseydarktrump.webp differ diff --git a/files/assets/images/emojis/marseyidk.webp b/files/assets/images/emojis/marseyidk.webp new file mode 100644 index 000000000..3cf555b21 Binary files /dev/null and b/files/assets/images/emojis/marseyidk.webp differ diff --git a/files/assets/images/emojis/marseynodox.webp b/files/assets/images/emojis/marseynodox.webp new file mode 100644 index 000000000..442266284 Binary files /dev/null and b/files/assets/images/emojis/marseynodox.webp differ diff --git a/files/assets/images/emojis/marseypleading2.webp b/files/assets/images/emojis/marseypleading2.webp new file mode 100644 index 000000000..db0c481a4 Binary files /dev/null and b/files/assets/images/emojis/marseypleading2.webp differ diff --git a/files/assets/images/emojis/marseysmugsideeyes.webp b/files/assets/images/emojis/marseysmugsideeyes.webp new file mode 100644 index 000000000..2887388db Binary files /dev/null and b/files/assets/images/emojis/marseysmugsideeyes.webp differ diff --git a/files/assets/images/emojis/marseysoypointglow.webp b/files/assets/images/emojis/marseysoypointglow.webp new file mode 100644 index 000000000..a56b6fec7 Binary files /dev/null and b/files/assets/images/emojis/marseysoypointglow.webp differ diff --git a/files/assets/images/emojis/marseysoypointgold.webp b/files/assets/images/emojis/marseysoypointgold.webp new file mode 100644 index 000000000..205c814ae Binary files /dev/null and b/files/assets/images/emojis/marseysoypointgold.webp differ diff --git a/files/assets/images/emojis/marseywink2.webp b/files/assets/images/emojis/marseywink2.webp new file mode 100644 index 000000000..371ec897a Binary files /dev/null and b/files/assets/images/emojis/marseywink2.webp differ diff --git a/files/assets/images/hats/Aces Strawhat.webp b/files/assets/images/hats/Aces Strawhat.webp new file mode 100644 index 000000000..4e1aae34b Binary files /dev/null and b/files/assets/images/hats/Aces Strawhat.webp differ diff --git a/files/assets/images/hats/Aura (blue).webp b/files/assets/images/hats/Aura (blue).webp new file mode 100644 index 000000000..4fa3b546a Binary files /dev/null and b/files/assets/images/hats/Aura (blue).webp differ diff --git a/files/assets/images/hats/BUBBLES.webp b/files/assets/images/hats/BUBBLES.webp new file mode 100644 index 000000000..5fa5d4271 Binary files /dev/null and b/files/assets/images/hats/BUBBLES.webp differ diff --git a/files/assets/images/hats/Bats.webp b/files/assets/images/hats/Bats.webp new file mode 100644 index 000000000..80efb2411 Binary files /dev/null and b/files/assets/images/hats/Bats.webp differ diff --git a/files/assets/images/hats/Bowl Cut.webp b/files/assets/images/hats/Bowl Cut.webp new file mode 100644 index 000000000..1928dd46a Binary files /dev/null and b/files/assets/images/hats/Bowl Cut.webp differ diff --git a/files/assets/images/hats/Butterflies.webp b/files/assets/images/hats/Butterflies.webp new file mode 100644 index 000000000..e6e11f30c Binary files /dev/null and b/files/assets/images/hats/Butterflies.webp differ diff --git a/files/assets/images/hats/Carp.webp b/files/assets/images/hats/Carp.webp new file mode 100644 index 000000000..aeebb4378 Binary files /dev/null and b/files/assets/images/hats/Carp.webp differ diff --git a/files/assets/images/hats/Cloudy.webp b/files/assets/images/hats/Cloudy.webp new file mode 100644 index 000000000..a6052556c Binary files /dev/null and b/files/assets/images/hats/Cloudy.webp differ diff --git a/files/assets/images/hats/Confetti.webp b/files/assets/images/hats/Confetti.webp new file mode 100644 index 000000000..c9dfe6208 Binary files /dev/null and b/files/assets/images/hats/Confetti.webp differ diff --git a/files/assets/images/hats/Crab head.webp b/files/assets/images/hats/Crab head.webp new file mode 100644 index 000000000..8ea5e3812 Binary files /dev/null and b/files/assets/images/hats/Crab head.webp differ diff --git a/files/assets/images/hats/Crawling spider.webp b/files/assets/images/hats/Crawling spider.webp new file mode 100644 index 000000000..a5d47f833 Binary files /dev/null and b/files/assets/images/hats/Crawling spider.webp differ diff --git a/files/assets/images/hats/Cursor.webp b/files/assets/images/hats/Cursor.webp new file mode 100644 index 000000000..8af9ea6bb Binary files /dev/null and b/files/assets/images/hats/Cursor.webp differ diff --git a/files/assets/images/hats/Cute Spider.webp b/files/assets/images/hats/Cute Spider.webp new file mode 100644 index 000000000..39dfc0b16 Binary files /dev/null and b/files/assets/images/hats/Cute Spider.webp differ diff --git a/files/assets/images/hats/Cyborg.webp b/files/assets/images/hats/Cyborg.webp new file mode 100644 index 000000000..b35dd5b27 Binary files /dev/null and b/files/assets/images/hats/Cyborg.webp differ diff --git a/files/assets/images/hats/Dr Pepper.webp b/files/assets/images/hats/Dr Pepper.webp new file mode 100644 index 000000000..cf5621b06 Binary files /dev/null and b/files/assets/images/hats/Dr Pepper.webp differ diff --git a/files/assets/images/hats/Dragon.webp b/files/assets/images/hats/Dragon.webp new file mode 100644 index 000000000..3cb6f598c Binary files /dev/null and b/files/assets/images/hats/Dragon.webp differ diff --git a/files/assets/images/hats/Femboy hooters.webp b/files/assets/images/hats/Femboy hooters.webp new file mode 100644 index 000000000..dd8b28f87 Binary files /dev/null and b/files/assets/images/hats/Femboy hooters.webp differ diff --git a/files/assets/images/hats/Femboy.webp b/files/assets/images/hats/Femboy.webp new file mode 100644 index 000000000..61326a118 Binary files /dev/null and b/files/assets/images/hats/Femboy.webp differ diff --git a/files/assets/images/hats/Flaming Sword.webp b/files/assets/images/hats/Flaming Sword.webp new file mode 100644 index 000000000..ce1b0c3a9 Binary files /dev/null and b/files/assets/images/hats/Flaming Sword.webp differ diff --git a/files/assets/images/hats/Flowing Petals.webp b/files/assets/images/hats/Flowing Petals.webp new file mode 100644 index 000000000..3b8ab5c7e Binary files /dev/null and b/files/assets/images/hats/Flowing Petals.webp differ diff --git a/files/assets/images/hats/Fluffy Marsey.webp b/files/assets/images/hats/Fluffy Marsey.webp new file mode 100644 index 000000000..596745724 Binary files /dev/null and b/files/assets/images/hats/Fluffy Marsey.webp differ diff --git a/files/assets/images/hats/Freddy Krueger.webp b/files/assets/images/hats/Freddy Krueger.webp new file mode 100644 index 000000000..05438e297 Binary files /dev/null and b/files/assets/images/hats/Freddy Krueger.webp differ diff --git a/files/assets/images/hats/Hokage.webp b/files/assets/images/hats/Hokage.webp new file mode 100644 index 000000000..54617ba70 Binary files /dev/null and b/files/assets/images/hats/Hokage.webp differ diff --git a/files/assets/images/hats/Impaled.webp b/files/assets/images/hats/Impaled.webp new file mode 100644 index 000000000..63140f4b2 Binary files /dev/null and b/files/assets/images/hats/Impaled.webp differ diff --git a/files/assets/images/hats/Jarhead.webp b/files/assets/images/hats/Jarhead.webp new file mode 100644 index 000000000..b04c381bb Binary files /dev/null and b/files/assets/images/hats/Jarhead.webp differ diff --git a/files/assets/images/hats/Jaws.webp b/files/assets/images/hats/Jaws.webp new file mode 100644 index 000000000..203179873 Binary files /dev/null and b/files/assets/images/hats/Jaws.webp differ diff --git a/files/assets/images/hats/Kirby Beanie.webp b/files/assets/images/hats/Kirby Beanie.webp new file mode 100644 index 000000000..a386300fd Binary files /dev/null and b/files/assets/images/hats/Kirby Beanie.webp differ diff --git a/files/assets/images/hats/Loading.webp b/files/assets/images/hats/Loading.webp new file mode 100644 index 000000000..fcc2a12bf Binary files /dev/null and b/files/assets/images/hats/Loading.webp differ diff --git a/files/assets/images/hats/Music Notes.webp b/files/assets/images/hats/Music Notes.webp new file mode 100644 index 000000000..3996d1e72 Binary files /dev/null and b/files/assets/images/hats/Music Notes.webp differ diff --git a/files/assets/images/hats/Neon cat.webp b/files/assets/images/hats/Neon cat.webp new file mode 100644 index 000000000..bcf51c5f4 Binary files /dev/null and b/files/assets/images/hats/Neon cat.webp differ diff --git a/files/assets/images/hats/On fire.webp b/files/assets/images/hats/On fire.webp new file mode 100644 index 000000000..55baf110c Binary files /dev/null and b/files/assets/images/hats/On fire.webp differ diff --git a/files/assets/images/hats/Oni mask 1.webp b/files/assets/images/hats/Oni mask 1.webp new file mode 100644 index 000000000..d7e8eb25b Binary files /dev/null and b/files/assets/images/hats/Oni mask 1.webp differ diff --git a/files/assets/images/hats/Oni mask 2.webp b/files/assets/images/hats/Oni mask 2.webp new file mode 100644 index 000000000..266ec5dad Binary files /dev/null and b/files/assets/images/hats/Oni mask 2.webp differ diff --git a/files/assets/images/hats/Pet Snek.webp b/files/assets/images/hats/Pet Snek.webp new file mode 100644 index 000000000..be92efcae Binary files /dev/null and b/files/assets/images/hats/Pet Snek.webp differ diff --git a/files/assets/images/hats/Pikmin leaf.webp b/files/assets/images/hats/Pikmin leaf.webp new file mode 100644 index 000000000..a7f5ccdc2 Binary files /dev/null and b/files/assets/images/hats/Pikmin leaf.webp differ diff --git a/files/assets/images/hats/Pinwheels.webp b/files/assets/images/hats/Pinwheels.webp new file mode 100644 index 000000000..08a039b80 Binary files /dev/null and b/files/assets/images/hats/Pinwheels.webp differ diff --git a/files/assets/images/hats/Predator II.webp b/files/assets/images/hats/Predator II.webp new file mode 100644 index 000000000..1dc63886c Binary files /dev/null and b/files/assets/images/hats/Predator II.webp differ diff --git a/files/assets/images/hats/Predator.webp b/files/assets/images/hats/Predator.webp new file mode 100644 index 000000000..5fe2c36ba Binary files /dev/null and b/files/assets/images/hats/Predator.webp differ diff --git a/files/assets/images/hats/Rain.webp b/files/assets/images/hats/Rain.webp new file mode 100644 index 000000000..0c804a265 Binary files /dev/null and b/files/assets/images/hats/Rain.webp differ diff --git a/files/assets/images/hats/Reaper Hood I.webp b/files/assets/images/hats/Reaper Hood I.webp new file mode 100644 index 000000000..534ae61c6 Binary files /dev/null and b/files/assets/images/hats/Reaper Hood I.webp differ diff --git a/files/assets/images/hats/Reaper Hood II.webp b/files/assets/images/hats/Reaper Hood II.webp new file mode 100644 index 000000000..b8781a062 Binary files /dev/null and b/files/assets/images/hats/Reaper Hood II.webp differ diff --git a/files/assets/images/hats/Snek Peek.webp b/files/assets/images/hats/Snek Peek.webp new file mode 100644 index 000000000..617e349d3 Binary files /dev/null and b/files/assets/images/hats/Snek Peek.webp differ diff --git a/files/assets/images/hats/Spyglass.webp b/files/assets/images/hats/Spyglass.webp new file mode 100644 index 000000000..9fb3b7387 Binary files /dev/null and b/files/assets/images/hats/Spyglass.webp differ diff --git a/files/assets/images/hats/Squash.webp b/files/assets/images/hats/Squash.webp new file mode 100644 index 000000000..9c426fc24 Binary files /dev/null and b/files/assets/images/hats/Squash.webp differ diff --git a/files/assets/images/hats/TREX.webp b/files/assets/images/hats/TREX.webp new file mode 100644 index 000000000..4556c8025 Binary files /dev/null and b/files/assets/images/hats/TREX.webp differ diff --git a/files/assets/images/hats/Third Eyes.webp b/files/assets/images/hats/Third Eyes.webp new file mode 100644 index 000000000..89a1ace7d Binary files /dev/null and b/files/assets/images/hats/Third Eyes.webp differ diff --git a/files/assets/images/hats/Top Hat (WPD).webp b/files/assets/images/hats/Top Hat (WPD).webp new file mode 100644 index 000000000..991a7fd01 Binary files /dev/null and b/files/assets/images/hats/Top Hat (WPD).webp differ diff --git a/files/assets/images/hats/Turkey Turkey.webp b/files/assets/images/hats/Turkey Turkey.webp new file mode 100644 index 000000000..f3436446a Binary files /dev/null and b/files/assets/images/hats/Turkey Turkey.webp differ diff --git a/files/assets/images/hats/Twinkle.webp b/files/assets/images/hats/Twinkle.webp new file mode 100644 index 000000000..b90fecbc7 Binary files /dev/null and b/files/assets/images/hats/Twinkle.webp differ diff --git a/files/assets/images/hats/Venom Mask.webp b/files/assets/images/hats/Venom Mask.webp new file mode 100644 index 000000000..8cdf3799f Binary files /dev/null and b/files/assets/images/hats/Venom Mask.webp differ diff --git a/files/assets/images/hats/Windmill.webp b/files/assets/images/hats/Windmill.webp new file mode 100644 index 000000000..64de0aa2a Binary files /dev/null and b/files/assets/images/hats/Windmill.webp differ diff --git a/files/assets/images/hats/monopoly thimbler.webp b/files/assets/images/hats/monopoly thimbler.webp new file mode 100644 index 000000000..6d8f32795 Binary files /dev/null and b/files/assets/images/hats/monopoly thimbler.webp differ diff --git a/files/assets/js/followers.js b/files/assets/js/followers.js index 6f7c650bd..1cd91efe6 100644 --- a/files/assets/js/followers.js +++ b/files/assets/js/followers.js @@ -1,5 +1,5 @@ -function removeFollower(event, username) { - post_toast(event.target,'/remove_follow/' + username); +function removeFollower(t, username) { + post_toast(t,'/remove_follow/' + username); let table = document.getElementById("followers-table"); - table.removeChild(event.target.parentElement.parentElement); -} \ No newline at end of file + table.removeChild(t.parentElement.parentElement); +} diff --git a/files/assets/js/following.js b/files/assets/js/following.js index 535359c18..2ecd50891 100644 --- a/files/assets/js/following.js +++ b/files/assets/js/following.js @@ -1,5 +1,5 @@ -function removeFollowing(event, username) { - post_toast(event.target,'/unfollow/' + username); +function removeFollowing(t, username) { + post_toast(t,'/unfollow/' + username); let table = document.getElementById("followers-table"); - table.removeChild(event.target.parentElement.parentElement); -} \ No newline at end of file + table.removeChild(t.parentElement.parentElement); +} diff --git a/files/assets/js/hcaptcha.js b/files/assets/js/hcaptcha.js index 7c9460e58..8bc551980 100644 --- a/files/assets/js/hcaptcha.js +++ b/files/assets/js/hcaptcha.js @@ -1 +1 @@ -var hcaptcha=function(){"use strict";function e(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}function t(e){return new this((function(t,n){if(!e||"undefined"==typeof e.length)return n(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);var r=i.length;function o(e,n){if(n&&("object"==typeof n||"function"==typeof n)){var a=n.then;if("function"==typeof a)return void a.call(n,(function(t){o(e,t)}),(function(n){i[e]={status:"rejected",reason:n},0==--r&&t(i)}))}i[e]={status:"fulfilled",value:n},0==--r&&t(i)}for(var a=0;a>>0,o=Math.min(0|n,r);if(o<0)o=Math.max(0,r+o);else if(o>=r)return-1;if(void 0===t){for(;o!==r;++o)if(void 0===i[o]&&o in i)return o}else if(t!=t){for(;o!==r;++o)if(i[o]!=i[o])return o}else for(;o!==r;++o)if(i[o]===t)return o;return-1}}(Object)),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),document.getElementsByClassName||(window.Element.prototype.getElementsByClassName=document.constructor.prototype.getElementsByClassName=function(e){if(document.querySelectorAll)return document.querySelectorAll("."+e);for(var t=document.getElementsByTagName("*"),n=new RegExp("(^|\\s)"+e+"(\\s|$)"),i=[],r=0;rthis.length)&&(t=this.length),this.substring(t-e.length,t)===e});try{if(Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(Element.prototype,"textContent").get){var m=Object.getOwnPropertyDescriptor(Element.prototype,"innerText");Object.defineProperty(Element.prototype,"textContent",{get:function(){return m.get.call(this)},set:function(e){m.set.call(this,e)}})}}catch(ln){}Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind: Item Can Not Be Bound.");var t=Array.prototype.slice.call(arguments,1),n=this,i=function(){},r=function(){return n.apply(this instanceof i?this:e,t.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(i.prototype=this.prototype),r.prototype=new i,r}),"function"!=typeof Object.create&&(Object.create=function(e,t){function n(){}if(n.prototype=e,"object"==typeof t)for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return new n}),Date.now||(Date.now=function(){return(new Date).getTime()}),window.console||(window.console={});for(var g,y,v,w,b,_,x=["error","info","log","show","table","trace","warn"],C=function(e){},k=x.length;--k>-1;)p=x[k],window.console[p]||(window.console[p]=C);if(window.atob)try{window.atob(" ")}catch(dn){window.atob=(g=window.atob,(y=function(e){return g(String(e).replace(/[\t\n\f\r ]+/g,""))}).original=g,y)}else{var E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",O=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;window.atob=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!O.test(e))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t,n,i;e+="==".slice(2-(3&e.length));for(var r="",o=0;o>16&255):64===i?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return r}}if(Event.prototype.preventDefault||(Event.prototype.preventDefault=function(){this.returnValue=!1}),Event.prototype.stopPropagation||(Event.prototype.stopPropagation=function(){this.cancelBubble=!0}),window.Prototype&&Array.prototype.toJSON){console.error("[hCaptcha] Custom JSON polyfill detected, please remove to ensure hCaptcha works properly");var S=Array.prototype.toJSON,I=JSON.stringify;JSON.stringify=function(e){try{return delete Array.prototype.toJSON,I(e)}finally{Array.prototype.toJSON=S}}}Object.keys||(Object.keys=(v=Object.prototype.hasOwnProperty,w=!Object.prototype.propertyIsEnumerable.call({toString:null},"toString"),_=(b=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(e){if("function"!=typeof e&&("object"!=typeof e||null===e))throw new TypeError("Object.keys called on non-object");var t,n,i=[];for(t in e)v.call(e,t)&&i.push(t);if(w)for(n=0;n<_;n++)v.call(e,b[n])&&i.push(b[n]);return i}));var P="challenge-passed",B="challenge-escaped",T="challenge-closed",M="challenge-expired",A="invalid-data",j="bundle-error",$="network-error",L="rate-limited",R="challenge-error",D="incomplete-answer",N="missing-captcha",z="missing-sitekey",W="invalid-captcha-id";function F(e,t){this.cause=e,this.message=t}function U(e){F.call(this,W,"Invalid hCaptcha id: "+e)}function J(){F.call(this,N,"No hCaptcha exists.")}function H(){F.call(this,z,"Missing sitekey - https://hcaptcha.com/docs/configuration#jsapi")}F.prototype=Error.prototype;var q=[],X=[],Y={add:function(e){q.push(e)},remove:function(e){for(var t=!1,n=q.length;--n>-1&&!1===t;)q[n].id===e.id&&(t=q[n],q.splice(n,1));return t},each:function(e){for(var t=-1;++t10&&X.splice(0,X.length-10)},getSession:function(){return X}};function G(){var e=this;this._bottom=0,this._top=0,this.storage={},this.add=function(t){return e.storage[e._top]=t,e._top++,t},this.remove=function(){if(!e.empty()){var t=e._bottom,n=e.storage[t];return e.storage[t]=null,e._bottom++,n}},this.empty=function(){return e._top===e._bottom},this.size=function(){return e._top-e._bottom}}var V={queue:G,depth:function un(e,t,n){if("object"==typeof e&&e[t]&&e[t].length>0)for(var i=e[t].length;--i>-1;)un(e[t][i],t,n);e!==undefined&&n(e)},breathe:function(e,t,n){var i=new G,r=null;for(i.add(e),r=i.remove();r;){for(var o=0;o0||navigator.msMaxTouchPoints>0),t=!1,n&&(t=["iOS","Windows Phone","Windows Mobile","Android","BlackBerry OS"].indexOf(n.name)>=0),e&&t),this.dpr=function(){return window.devicePixelRatio||1},this.mobile&&n&&"Windows"===n.family&&i.indexOf("touch")<0&&(this.mobile=!1),this.os="iOS"===n.family?"ios":"Android"===n.family?"android":"Mac OS X"===n.family?"mac":"Windows"===n.family?"windows":"Linux"===n.family?"linux":n.family.toLowerCase(),this.version=function(){if(!n)return"unknown";var e=n.major;return n.minor&&(e+="."+n.minor),n.patch&&(e+="."+n.patch),e}()}},se={host:null,file:null,sitekey:null,a11y_tfe:null,pingdom:"safari"===ae.Browser.type&&"windows"!==ae.System.os&&"mac"!==ae.System.os&&"ios"!==ae.System.os&&"android"!==ae.System.os,assetDomain:"https://newassets.hcaptcha.com",assetUrl:"https://newassets.hcaptcha.com/captcha/v1/e09e16a/static",width:null,height:null,mobile:null},he={se:null,custom:!1,tplinks:"on",language:null,reportapi:"https://accounts.hcaptcha.com",endpoint:"https://hcaptcha.com",endpointOverride:null,size:"normal",theme:"light",assethost:null,imghost:null,recaptchacompat:"true"};function ce(e,t){e.style.width="304px",e.style.height="78px",e.style.backgroundColor="#f9e5e5",e.style.position="relative",e.innerHTML="";var n=document.createElement("div");n.style.width="284px",n.style.position="absolute",n.style.top="12px",n.style.left="10px",n.style.color="#7c0a06",n.style.fontSize="14px",n.style.fontWeight="normal",n.style.lineHeight="18px",n.innerHTML=t||"Please upgrade your browser to complete this captcha.",e.appendChild(n)}var le=!0;function de(e){var t={message:e.name+": "+e.message};e.stack&&(t.stack_trace={trace:e.stack}),pe("report error","internal","debug",t),ue("internal error","error",se.file)}function ue(e,t,n,i){if(t=t||"error",le){var r="warn"===t?"warning":t;window.Raven&&Raven.captureMessage(e,{level:r,logger:n,extra:i})}}function pe(e,t,n,i){le&&window.Raven&&Raven.captureBreadcrumb({message:e,category:t,level:n,data:i})}function fe(e){var t=[].slice.call(arguments,1);"string"==typeof e?window[e]?"function"==typeof window[e]?window[e].apply(null,t):console.log("[hCaptcha] Callback '"+e+"' is not a function."):console.log("[hCaptcha] Callback '"+e+"' is not defined."):"function"==typeof e?e.apply(null,t):console.log("[hcaptcha] Invalid callback '"+e+"'.")}function me(){try{fe.apply(null,arguments)}catch(ln){console.error("[hCaptcha] There was an error in your callback."),console.error(ln)}}var ge={UUID:function(e){return/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i.test(e)||!1},UUIDv4:function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)||!1},URL:function(e){var t=new RegExp("^(http|https)://"),n=new RegExp("^((?!(data|javascript):).)*$");return t.test(e)&&n.test(e)}};function ye(e,t){var n,i="attempts"in(t=t||{})?t.attempts:1,r=t.delay||0,o=t.onFail;return n=function(t,n,a){e().then(t,(function(e){var t=i-- >0;o&&(t=!1!==o(e)&&t),t?setTimeout(a,r):n(e)}))},new Promise((function(e,t){n(e,t,(function i(){n(e,t,i)}))}))}var ve={eventName:function(e){var t=e;return"down"===e||"up"===e||"move"===e||"over"===e||"out"===e?t=!ae.System.mobile||"down"!==e&&"up"!==e&&"move"!==e?"mouse"+e:"down"===e?"touchstart":"up"===e?"touchend":"touchmove":"enter"===e&&(t="keydown"),t},actionName:function(e){var t=e;return"touchstart"===t||"mousedown"===t?t="down":"touchmove"===t||"mousemove"===t?t="move":"touchend"===t||"mouseup"===t?t="up":"mouseover"===t?t="over":"mouseout"===t&&(t="out"),t},eventCallback:function(e,t,n){var i=ve.actionName(e);return function(r){if(r=r||window.event,"down"===i||"move"===i||"up"===i||"over"===i||"out"===i||"click"===i){var o=ve.eventCoords(r);if(!o)return;var a=n.getBoundingClientRect();r.windowX=o.x,r.windowY=o.y,r.elementX=r.windowX-(a.x||a.left),r.elementY=r.windowY-(a.y||a.top)}r.keyNum=r.which||r.keyCode||0,"enter"===e&&13!==r.keyNum&&32!==r.keyNum||(r.action=i,r.targetElement=n,t(r))}},eventCoords:function(e){if(!e)return null;var t=e;if(e.touches||e.changedTouches){var n=e.touches&&e.touches.length>=1?e.touches:e.changedTouches;n&&n[0]&&(t=n[0])}return"number"==typeof t.pageX&&"number"==typeof t.pageY?{x:t.pageX,y:t.pageY}:"number"==typeof t.clientX&&"number"==typeof t.clientY?{x:t.clientX,y:t.clientY}:null}};function we(e){this.r=255,this.g=255,this.b=255,this.a=1,this.h=1,this.s=1,this.l=1,this.parseString(e)}function be(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}we.hasAlpha=function(e){return"string"==typeof e&&(-1!==e.indexOf("rgba")||9===e.length&&"#"===e[0])},we.prototype.parseString=function(e){e&&(0===e.indexOf("#")?this.fromHex(e):0===e.indexOf("rgb")&&this.fromRGBA(e))},we.prototype.fromHex=function(e){var t=1;9===e.length&&(t=parseInt(e.substr(7,2),16)/255);var n=(e=e.substr(1,6)).replace(/^([a-f\d])([a-f\d])([a-f\d])?$/i,(function(e,t,n,i){return t+t+n+n+i+i})),i=parseInt(n,16),r=i>>16,o=i>>8&255,a=255&i;this.setRGBA(r,o,a,t)},we.prototype.fromRGBA=function(e){var t=e.indexOf("rgba"),n=e.substr(t).replace(/rgba?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),i=Math.floor(parseInt(n[0])),r=Math.floor(parseInt(n[1])),o=Math.floor(parseInt(n[2])),a=parseFloat(n[3]);this.setRGBA(i,r,o,a)},we.prototype.setRGB=function(e,t,n){this.setRGBA(e,t,n,1)},we.prototype.setRGBA=function(e,t,n,i){this.r=e,this.g=t,this.b=n,this.a=isNaN(i)?this.a:i,this.updateHSL()},we.prototype.hsl2rgb=function(e,t,n){if(0===t){var i=Math.round(255*n);return this.setRGB(i,i,i),this}var r=n<=.5?n*(1+t):n+t-n*t,o=2*n-r;return this.r=Math.round(255*be(o,r,e+1/3)),this.g=Math.round(255*be(o,r,e)),this.b=Math.round(255*be(o,r,e-1/3)),this.h=e,this.s=t,this.l=n,this},we.prototype.updateHSL=function(){var e,t=this.r/255,n=this.g/255,i=this.b/255,r=Math.max(t,n,i),o=Math.min(t,n,i),a=null,s=(r+o)/2;if(r===o)a=e=0;else{var h=r-o;switch(e=s>.5?h/(2-r-o):h/(r+o),r){case t:a=(n-i)/h+(n1&&(e/=100),this.hsl2rgb(this.h,this.s,e),this},we.prototype.saturation=function(e){return e>1&&(e/=100),this.hsl2rgb(this.h,e,this.l),this},we.prototype.hue=function(e){return this.hsl2rgb(e/360,this.s,this.l),this};var _e=["Webkit","Moz","ms"],xe=document.createElement("div").style,Ce={};function ke(e){var t=Ce[e];return t||(e in xe?e:Ce[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=_e.length;n--;)if((e=_e[n]+t)in xe)return e}(e)||e)}function Ee(e,t,n){if(this.dom=null,this._clss=[],this._nodes=[],this._listeners=[],this._frag=null,e&&"object"==typeof e){this.dom=e;var i=[],r=[];"string"==typeof e.className&&(r=e.className.split(" "));for(var o=0;o=0||e.indexOf(".")>=0))&&(e&&(t=e),e="div"),this.dom=document.createElement(e),t&&(t.indexOf("#")>=0?this.dom.id=t.split("#")[1]:(t.indexOf(".")>=0&&(t=t.split(".")[1]),this.addClass.call(this,t)));!0===n&&(this._frag=document.createDocumentFragment(),this._frag.appendChild(this.dom))}Ee.prototype.createElement=function(e,t){var n=new Ee(e,t,!1);return this.appendElement.call(this,n),this._nodes.push(n),n},Ee.prototype.appendElement=function(e){if(e===undefined)return de({name:"DomElement Add Child",message:"Child Element is undefined"});var t;t=e._frag!==undefined&&null!==e._frag?e._frag:e.dom!==undefined?e.dom:e;try{e instanceof Ee&&(e._parent=this),this.dom.appendChild(t)}catch(dn){de({name:"DomElement Add Child",message:"Failed to append child."})}return this},Ee.prototype.removeElement=function(e){try{var t;if(e._nodes)for(t=e._nodes.length;t--;)e.removeElement(e._nodes[t]);for(t=this._nodes.length;--t>-1;)this._nodes[t]===e&&this._nodes.splice(t,1);this.dom.removeChild(e.dom||e),e.__destroy&&e.__destroy()}catch(dn){de({name:"DomElement Remove Child",message:"Failed to remove child."})}},Ee.prototype.addClass=function(e){return!1===this.hasClass.call(this,e)&&(this._clss.push(e),this.dom.className=this._clss.join(" ")),this},Ee.prototype.hasClass=function(e){for(var t=-1!==this.dom.className.split(" ").indexOf(e),n=this._clss.length;n--&&!t;)t=this._clss[n]===e;return t},Ee.prototype.removeClass=function(e){for(var t=this._clss.length;--t>-1;)this._clss[t]===e&&this._clss.splice(t,1);return this.dom.className=this._clss.join(" "),this},Ee.prototype.text=function(e){if(this&&this.dom){if(!e)return this.dom.textContent;for(var t,n,i,r,o=/&(.*?);/g,a=/<[a-z][\s\S]*>/i;null!==(t=o.exec(e));){!1===a.test(t[0])?(i=t[0],r=void 0,(r=document.createElement("div")).innerHTML=i,n=r.textContent,e=e.replace(new RegExp(t[0],"g"),n)):e=e.replace(t[0],"")}return this.dom.textContent=e,this}},Ee.prototype.content=Ee.prototype.text,Ee.prototype.css=function(e){var t,n="ie"===ae.Browser.type&&8===ae.Browser.version;for(var i in e){t=e[i];try{"opacity"!==i&&"zIndex"!==i&&"fontWeight"!==i&&isFinite(t)&&parseFloat(t)===t&&(t+="px");var r=ke(i);n&&"opacity"===i?this.dom.style.filter="alpha(opacity="+100*t+")":n&&we.hasAlpha(t)?this.dom.style[r]=new we(t).getHex():this.dom.style[r]=t}catch(ln){}}return this},Ee.prototype.backgroundImage=function(e,t,n,i){var r=t!==undefined&&n!==undefined,o={"-ms-high-contrast-adjust":"none"};if("object"==typeof t&&(i=t),i===undefined&&(i={}),r){var a=e.width/e.height,s=t,h=s/a;i.cover&&hn&&(s=(h=n)*a),o.width=s,o.height=h,i.center&&(o.marginLeft=-s/2,o.marginTop=-h/2,o.position="absolute",o.left="50%",o.top="50%"),(i.left||i.right)&&(o.left=i.left||0,o.top=i.top||0)}"ie"===ae.Browser.type&&8===ae.Browser.version?o.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e.src+"',sizingMethod='scale')":(o.background="url("+e.src+")",o.backgroundPosition="50% 50%",o.backgroundRepeat="no-repeat",o.backgroundSize=r?s+"px "+h+"px":i.cover?"cover":i.contain?"contain":"100%"),this.css.call(this,o)},Ee.prototype.setAttribute=function(e,t){var n;if("object"==typeof e)for(var i in e)n=e[i],this.dom.setAttribute(i,n);else this.dom.setAttribute(e,t)},Ee.prototype.removeAttribute=function(e,t){var n;if("object"==typeof e)for(var i in e)n=e[i],this.dom.removeAttribute(i,n);else this.dom.removeAttribute(e,t)},Ee.prototype.addEventListener=function(e,t,n){var i={event:ve.eventName(e),handler:ve.eventCallback(e,t,this.dom),callback:t};this._listeners.push(i),this.dom.addEventListener?this.dom.addEventListener(i.event,i.handler,n):this.dom.attachEvent("on"+i.event,i.handler)},Ee.prototype.removeEventListener=function(e,t,n){for(var i,r=this._listeners.length;--r>-1;)(i=this._listeners[r]).event===e&&i.callback===t&&(this._listeners.splice(r,1),this.dom.removeEventListener?this.dom.removeEventListener(i.event,i.handler,n):this.dom.detachEvent("on"+i.event,i.handler))},Ee.prototype.focus=function(){this.dom.focus()},Ee.prototype.blur=function(){this.dom.blur()},Ee.prototype.html=function(e){return e&&(this.dom.innerHTML=e),this.dom.innerHTML},Ee.prototype.__destroy=function(){for(var e,t=this._listeners.length;--t>-1;)e=this._listeners[t],this._listeners.splice(t,1),this.dom.removeEventListener?this.dom.removeEventListener(e.event,e.handler):this.dom.detachEvent("on"+e.event,e.handler);return this.dom=null,this._clss=[],this._nodes=[],this._listeners=[],this._frag=null,e=null,null};var Oe=function(e,t){var n={},i=Array.prototype.slice.call(arguments,2);for(var r in t.apply(e,i),e)n[r]=e[r]},Se=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e};function Ie(e,t){Oe(this,Ee,t||"div",e),this.children=[],this._events=[]}Se(Ie,Ee),Ie.prototype.initComponent=function(e,t,n){var i=new e(t);return i._parent=this,this.children.push(i),i.dom&&(n!==undefined?n.appendElement&&n.appendElement(i):this.appendElement(i)),i},Ie.prototype.destroy=function(){var e=this;try{V.depth(this,"children",(function(t){if(e!==t)for(var n=e.children.length;--n>-1;)e.children[n]===t&&e.children.splice(n,1);t._destroy&&t._destroy(),t=null}))}catch(dn){throw new Error("Trouble destroying nodes: "+dn)}return null},Ie.prototype._destroy=function(){try{this.onDestroy&&this.onDestroy(),this._parent.removeElement&&this._parent.removeElement(this);for(var e=this._events.length;--e>-1;)this._events.splice(e,1);this.children=null,this._destroy=null,this._events=null,this.destroy=null,this.emit=null,this.on=null,this.off=null,this.initComponent=null}catch(dn){de({name:"DomComponent",message:"Failed to destroy."})}},Ie.prototype.on=function(e,t){for(var n=this._events.length,i=!1;--n>-1&&!1===i;)this._events[n].event===e&&(i=this._events[n]);!1===i&&(i={event:e,listeners:[]},this._events.push(i)),i.listeners.push(t)},Ie.prototype.off=function(e,t){for(var n=this._events.length;--n>-1;)if(this._events[n].event===e){for(var i=this._events[n].listeners.length;--i>-1;)this._events[n].listeners[i]===t&&this._events[n].listeners.splice(i,1);0===this._events[n].listeners.length&&this._events.splice(n,1)}},Ie.prototype.emit=function(e){for(var t=Array.prototype.slice.call(arguments,1),n=this._events.length;--n>-1&&this._events;)if(this._events[n].event===e)for(var i=this._events[n].listeners.length;--i>-1;)this._events[n].listeners[i].apply(this,t)};var Pe={af:"Afrikaans",sq:"Albanian",am:"Amharic",ar:"Arabic",hy:"Armenian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bg:"Bulgarian",bs:"Bosnian",my:"Burmese",ca:"Catalan",ceb:"Cebuano",zh:"Chinese","zh-CN":"Chinese Simplified","zh-TW":"Chinese Traditional",co:"Corsican",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",eo:"Esperanto",et:"Estonian",fa:"Persian",fi:"Finnish",fr:"French",fy:"Frisian",gd:"Gaelic",gl:"Galacian",ka:"Georgian",de:"German",el:"Greek",gu:"Gujurati",ht:"Haitian",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",is:"Icelandic",ig:"Igbo",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",jw:"Javanese",kn:"Kannada",kk:"Kazakh",km:"Khmer",rw:"Kinyarwanda",ky:"Kirghiz",ko:"Korean",ku:"Kurdish",lo:"Lao",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"Macedonian",mg:"Malagasy",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mn:"Mongolian",ne:"Nepali",no:"Norwegian",ny:"Nyanja",or:"Oriya",pl:"Polish","pt-BR":"Portuguese (Brazil)",pt:"Portuguese (Portugal)",ps:"Pashto",pa:"Punjabi",ro:"Romanian",ru:"Russian",sm:"Samoan",sn:"Shona",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",st:"Southern Sotho",es:"Spanish",su:"Sundanese",sw:"Swahili",sv:"Swedish",tl:"Tagalog",tg:"Tajik",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tr:"Turkish",tk:"Turkmen",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",cy:"Welsh",xh:"Xhosa",yi:"Yiddish",yo:"Yoruba",zu:"Zulu"},Be={zh:{"I am human":"我是人"},ar:{"I am human":"أنا الإنسان"},af:{"I am human":"Ek is menslike"},am:{"I am human":"እኔ ሰው ነኝ"},hy:{"I am human":"ÔµÕ½ Õ´Õ¡Ö€Õ¤ Õ¥Õ´"},az:{"I am human":"MÉ™n insanam"},eu:{"I am human":"Gizakia naiz"},bn:{"I am human":"আমি মানব নই"},bg:{"I am human":"Аз съм човек"},ca:{"I am human":"Sóc humà "},hr:{"I am human":"Ja sam čovjek"},cs:{"I am human":"Jsem človÄ›k"},da:{"I am human":"Jeg er et menneske"},nl:{"I am human":"Ik ben een mens"},et:{"I am human":"Ma olen inimeste"},fi:{"I am human":"Olen ihminen"},fr:{"I am human":"Je suis humain"},gl:{"I am human":"Eu son humano"},ka:{"I am human":"მე ვარადამიანი"},de:{"I am human":"Ich bin ein Mensch"},el:{"I am human":"Είμαι άνθρωπος"},gu:{"I am human":"હું માનવ છું"},iw:{"I am human":". ×× ×™ ×× ×•×©×™"},hi:{"I am human":"मैं मानव हूं"},hu:{"I am human":"Nem vagyok robot"},is:{"I am human":"Ég er manneskja"},id:{"I am human":"Aku manusia"},it:{"I am human":"Sono un essere umano"},ja:{"I am human":"私は人間です"},kn:{"I am human":"ನಾನು ಮಾನವನು"},ko:{"I am human":"사람입니다"},lo:{"I am human":"ຂ້ອຍເປັນມະນຸດ"},lv:{"I am human":"Es esmu cilvÄ“ks"},lt:{"I am human":"AÅ¡ esu žmogaus"},ms:{"I am human":"Saya manusia"},ml:{"I am human":"ഞാൻ മനുഷ്യനാണ്"},mr:{"I am human":"मी मानवी आहे"},mn:{"I am human":"Би бол хүн"},no:{"I am human":"Jeg er menneskelig"},fa:{"I am human":"من انسانی هستم"},pl:{"I am human":"Jestem czÅ‚owiekiem"},pt:{"I am human":"Sou humano"},ro:{"I am human":"Eu sunt om"},ru:{"I am human":"Я человек"},sr:{"I am human":"Ja sam ljudski"},si:{"I am human":"මම මිනිස්සු"},sk:{"I am human":"Ja som človek"},sl:{"I am human":"Jaz sem človeÅ¡ki"},es:{"I am human":"Soy humano"},sw:{"I am human":"Mimi ni binadamu"},sv:{"I am human":"Jag är människa"},ta:{"I am human":"நான் மனித"},te:{"I am human":"నేను మనిషిని"},th:{"I am human":"ผมมนุษย์"},tr:{"I am human":"Ben bir insanım"},uk:{"I am human":"Я людини"},ur:{"I am human":"میں انسان ہوں"},vi:{"I am human":"Tôi là con người"},zu:{"I am human":"Ngingumuntu"}},Te=null,Me={translate:function(e,t){var n=Me.getBestTrans(Be),i=n&&n[e];if(i=i||e,t)for(var r=Object.keys(t),o=r.length;o--;)i=i.replace(new RegExp("{{"+r[o]+"}}","g"),t[r[o]]);return i},getBestTrans:function(e){var t=Me.getLocale();return t in e?e[t]:Me.getShortLocale(t)in e?e[Me.getShortLocale(t)]:"en"in e?e.en:null},getLocale:function(){var e=Te||window.navigator.userLanguage||window.navigator.language,t=Me.getShortLocale(e);return"in"===t&&(e="id"),"iw"===t&&(e="he"),"nb"===t&&(e="no"),"ji"===t&&(e="yi"),"zh-CN"===e&&(e="zh"),"jv"===t&&(e="jw"),Pe[e]?e:Pe[t]?t:"en"},setLocale:function(e){Te=e},getShortLocale:function(e){return e.indexOf("-")>=0?e.substring(0,e.indexOf("-")):e},isShortLocale:function(e){return 2===e.length||3===e.length},addTable:function(e,t){if(t||(t=Object.create(null)),Be[e]){var n=Be[e];for(var i in t)n[i]=t[i]}else Be[e]=t;return Be[e]},getTable:function(e){return Be[e]},addTables:function(e){for(var t in e)Me.addTable(t,e[t]);return Be},getTables:function(){return Be}};function Ae(e,t){this._period=e,this._interval=t,this._date=[],this._data=[],this._prevTimestamp=0,this._meanPeriod=0,this._meanCounter=0}Ae.prototype.getMeanPeriod=function(){return this._meanPeriod},Ae.prototype.getData=function(){return this._cleanStaleData(),this._data},Ae.prototype.getSize=function(){return this._cleanStaleData(),this._data.length},Ae.prototype.getCapacity=function(){return 0===this._period?this._interval:Math.ceil(this._interval/this._period)},Ae.prototype.push=function(e,t){this._cleanStaleData();var n=0===this._date.length;if(e-(this._date[this._date.length-1]||0)>=this._period&&(this._date.push(e),this._data.push(t)),!n){var i=e-this._prevTimestamp;this._meanPeriod=(this._meanPeriod*this._meanCounter+i)/(this._meanCounter+1),this._meanCounter++}this._prevTimestamp=e},Ae.prototype._cleanStaleData=function(){for(var e=Date.now(),t=this._date.length-1;t>=0;t--){if(e-this._date[t]>=this._interval){this._date.splice(0,t+1),this._data.splice(0,t+1);break}}};var je={touchstart:"ts",touchend:"te",touchmove:"tm",touchcancel:"tc"},$e={mousedown:"md",mouseup:"mu",mousemove:"mm"},Le={keydown:"kd",keyup:"ku"},Re={devicemotion:"dm"},De=function(e,t){var n=$e[e],i=null;return function(e){i=function(e){return[e.windowX,e.windowY,Date.now()]}(e),t(n,i)}},Ne=function(e,t){var n=je[e],i=null;return function(e){i=function(e){var t=[];try{var n,i;if(e.touches&&e.touches.length>=1?n=e.touches:e.changedTouches&&e.changedTouches.length>=1&&(n=e.changedTouches),n){for(var r=0;r-1&&!o;)(o=i[r][1]===n.id)&&(t=i[r][0])}catch(a){t=""}return t}function Ze(e,t){var n=e instanceof HTMLIFrameElement;try{n?e.parentNode&&e.contentWindow.postMessage(JSON.stringify(t),"*"):e.postMessage(JSON.stringify(t),"*")}catch(ln){ue(ln.message,"error","messaging")}}function et(e,t){this.target=e,this.id=t,this.messages=[],this.incoming=[],this.waiting=[]}function tt(e,t){var n=this,i={},r=new Promise((function(e,t){i.resolve=e,i.reject=t})),o={source:"hcaptcha",label:e,id:n.id,promise:null,lookup:t};return r.then((function(e){o.promise="resolve",null!==e&&(o.contents=e),Ze(n.target,o)}))["catch"]((function(e){o.promise="reject",null!==e&&(o.error=e),Ze(n.target,o)})),i}et.prototype.setID=function(e){this.id=e},et.prototype.contact=function(e,t){if(!this.id)throw new Error("Chat requires unique id to communicate between windows");var n=this,i=Date.now().toString(36),r={source:"hcaptcha",label:e,id:this.id,promise:"create",lookup:i};if(t){if("object"!=typeof t)throw new Error("Message must be an object.");r.contents=t}return new Promise((function(t,o){n.waiting.push({label:e,reject:o,resolve:t,lookup:i}),Ze(n.target,r)}))},et.prototype.listen=function(e,t){if(!this.id)throw new Error("Chat requires unique id to communicate between windows");for(var n=this.messages.length,i=!1;--n>-1&&!1===i;)this.messages[n].label===e&&(i=this.messages[n]);!1===i&&(i={label:e,listeners:[]},this.messages.push(i)),i.listeners.push(t)},et.prototype.answer=function(e,t){if(!this.id)throw new Error("Chat requires unique id to communicate between windows");for(var n=this.incoming.length,i=!1;--n>-1&&!1===i;)this.incoming[n].label===e&&(i=this.incoming[n]);!1===i&&(i={label:e,listeners:[]},this.incoming.push(i)),i.listeners.push(t)},et.prototype.send=function(e,t){if(!this.id)throw new Error("Chat requires unique id to communicate between windows");var n={source:"hcaptcha",label:e,id:this.id};if(t){if("object"!=typeof t)throw new Error("Message must be an object.");n.contents=t}Ze(this.target,n)},et.prototype.check=function(e,t){for(var n=[].concat.apply([],[this.messages,this.incoming,this.waiting]),i=[],r=-1;++r-1&&!1===h;)this.waiting[s].label===t.label&&this.waiting[s].lookup===t.lookup&&(h=!0,this.waiting.splice(s,1));continue}for(r=0;r-1&&!1===t;)e.id===nt.chats[n].id&&e.target===nt.chats[n].target&&(t=nt.chats[n],nt.chats.splice(n,1));return t},handle:function(e){var t=e.data;if("string"==typeof t)try{if(!(t.indexOf("hcaptcha")>=0))return;t=JSON.parse(t);for(var n,i=nt.chats,r=-1;++r=0&&(n=t[i]);return n}catch(dn){return""}},hasCookie:function(e){return!!it.getCookie(e)},supportsAPI:function(){try{return"hasStorageAccess"in document&&"requestStorageAccess"in document}catch(dn){return!1}},hasAccess:function(){return new Promise((function(e){document.hasStorageAccess().then((function(){e(!0)}))["catch"]((function(){e(!1)}))}))},requestAccess:function(){try{return document.requestStorageAccess()}catch(dn){return Promise.resolve()}}};function rt(){try{return Object.keys(window).sort().join(",")}catch(dn){return null}}function ot(e,t){for(var n in t){var i=t[n];switch(typeof i){case"string":e[n]=i;break;case"object":e[n]=e[n]||{},ot(e[n],i);break;default:throw new Error("Source theme contains invalid data types. Only string and object types are supported.")}}}function at(e,t){try{return e in t}catch(n){return!1}}function st(e){return!!e&&"object"==typeof e}function ht(e){return st(e)?ct({},e):e}function ct(e,t){var n,i={},r=Object.keys(e);for(n=0;n=0&&wt.use(n.theme),this._state={escaped:!1,passed:!1,expiredChallenge:!1,expiredResponse:!1},this._origData=null,this._promise=null,this._responseTimer=null,this.challenge=new _t(t,n),this.checkbox=new xt(e,t,n),this.initChallenge=this.initChallenge.bind(this),this.closeChallenge=this.closeChallenge.bind(this),this.displayChallenge=this.displayChallenge.bind(this),this.getGetCaptchaManifest=this.getGetCaptchaManifest.bind(this)}function kt(){Oe(this,Ee,"canvas");var e=this;this.element=this.dom,this.ctx=this.element.getContext("2d"),this.scale=1,this.dpr=window.devicePixelRatio||1,this.clearColor="#fff",this.ctx.roundedRect=function(t,n,i,r,o){var a=i>0?o:-o,s=r>0?o:-o;e.ctx.beginPath(),e.ctx.moveTo(t+a,n),e.ctx.lineTo(t+i-a,n),e.ctx.quadraticCurveTo(t+i,n,t+i,n+s),e.ctx.lineTo(t+i,n+r-s),e.ctx.quadraticCurveTo(t+i,n+r,t+i-a,n+r),e.ctx.lineTo(t+a,n+r),e.ctx.quadraticCurveTo(t,n+r,t,n+r-s),e.ctx.lineTo(t,n+s),e.ctx.quadraticCurveTo(t,n,t+a,n),e.ctx.closePath()}}function Et(e){e=e||{},this.x=e.x||0,this.y=e.y||0,this.rotate=this.rotate.bind(this),this.getDistance=this.getDistance.bind(this),this.radius=0,this.tolerance=0,this.fill=!1,this.stroke=!1,this.fillColor="#fff",this.strokeColor="#fff",this.strokeWidth=1}function Ot(e,t,n){Oe(this,Et,e),this.handleIn=new Et(t),this.handleOut=new Et(n),this.prev=null,this.next=null,this.index=0}function St(e){if(null===e)return"";var t=[];return It(e,t),t.join("&")}function It(e,t){var n,i;if("object"==typeof e)for(i in e)!0===Pt(n=e[i])?It(n,t):t[t.length]=Bt(i,n);else if(!0===Array.isArray(e))for(var r=0;rn.clientHeight,c=a?(r-this.width)/2:e.bounding.left+e.tick.right+10;(c+this.width+t>r||c<0)&&(c=(r-this.width)/2,a=!0);var l=(n.scrollHeight=i+o&&(d=i+o-(this.height+t)),d=Math.max(Math.min(d,l),10);var u=e.bounding.top+e.tick.y+i-d-10,p=this.height-10-30;return u=Math.max(Math.min(u,p),t),this.$container.css({left:c,top:d}),this.$arrow.fg.css({display:a?"none":"block"}),this.$arrow.bg.css({display:a?"none":"block"}),this.$arrow.css({top:u}),this.top=d,this.$container.dom.getBoundingClientRect(),h}},_t.prototype.destroy=function(){this._visible&&this.close.call(this),this._hasCustomContainer?this._parent.removeChild(this.$iframe.dom):(this._parent.removeChild(this.$container.dom),this.$container=this.$container.__destroy()),this.$iframe=this.$iframe.__destroy(),nt.removeChat(this.chat),this.chat=this.chat.destroy()},_t.prototype.setReady=function(e){if(this.ready=e,this.ready)for(var t,n=this.listeners.length;--n>-1;)t=this.listeners[n],this.listeners.splice(n,1),t()},_t.prototype.onReady=function(e){var t=Array.prototype.slice.call(arguments,1),n=function(){e.apply(null,t)};this.ready?n():this.listeners.push(n)},_t.prototype.onOverlayClick=function(e){this._hasCustomContainer||this.$overlay.addEventListener("click",e)},_t.prototype.setConfig=function(e){return this.chat?this.chat.contact("challenge-update",e):Promise.resolve()},_t.prototype.setData=function(e){this.chat&&this.chat.send("challenge-data",e)},xt.prototype.setResponse=function(e){this.response=e,this.$iframe.dom.setAttribute("data-hcaptcha-response",e),"off"!==he.recaptchacompat&&(this.$textArea0.dom.value=e),this.$textArea1.dom.value=e},xt.prototype.style=function(){switch(this.config.size){case"compact":this.$iframe.css({width:164,height:144});break;case"invisible":this.$iframe.css({display:"none"});break;default:this.$iframe.css({width:303,height:78,overflow:"hidden"})}},xt.prototype.reset=function(){this._ticked=!1,this.chat&&this.chat.send("checkbox-reset")},xt.prototype.clearLoading=function(){this.chat&&this.chat.send("checkbox-clear")},xt.prototype.sendTranslation=function(e){var t={locale:e,table:Me.getTable(e)||{}};this.chat&&this.chat.send("checkbox-translate",t)},xt.prototype.status=function(e,t){this.chat&&this.chat.send("checkbox-status",{text:e||null,a11yOnly:t||!1})},xt.prototype.tick=function(){this._ticked=!0,this.chat&&this.chat.send("checkbox-tick")},xt.prototype.getTickLocation=function(){return this.chat.contact("checkbox-location")},xt.prototype.getOffset=function(){var e=this.$iframe.dom;e.offsetParent||(e=e.parentElement);for(var t=0,n=0;e;)t+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{top:n,left:t}},xt.prototype.getBounding=function(){return this.$iframe.dom.getBoundingClientRect()},xt.prototype.destroy=function(){this._ticked&&this.reset(),this.$container.removeElement(this.$iframe),this.$container.removeElement(this.$textArea1),"off"!==he.recaptchacompat&&(this.$container.removeElement(this.$textArea0),this.$textArea0=this.$textArea0.__destroy()),this.$textArea1=this.$textArea1.__destroy(),this.$container=this.$container.__destroy(),this.$iframe=this.$iframe.__destroy(),nt.removeChat(this.chat),this.chat=this.chat.destroy()},Ct.prototype._resetTimer=function(){null!==this._responseTimer&&(clearTimeout(this._responseTimer),this._responseTimer=null)},Ct.prototype.initChallenge=function(e){e||(e={}),this._origData=e;var t=this.getGetCaptchaManifest(),n=e.charity||null,i=e.a11yChallenge||!1,r=e.link||null,o=e.action||"",a=e.rqdata||null,s=ae.Browser.width(),h=ae.Browser.height();this._active=!0,this._resetTimer(),this._resetState(),this.checkbox.setResponse(""),this.challenge.setup({a11yChallenge:i,manifest:t,width:s,height:h,charity:n,link:r,action:o,rqdata:a,wdata:rt()})},Ct.prototype.getGetCaptchaManifest=function(){var e=(this._origData||{}).manifest||null;return e||((e=Object.create(null)).st=Date.now()),e.v=1,e.topLevel=Ue.getData(),e.session=Y.getSession(),e.widgetList=Y.getCaptchaIdList(),e.widgetId=this.id,e.href=window.location.href,e.prev=JSON.parse(JSON.stringify(this._state)),e},Ct.prototype.displayChallenge=function(e){if(this._active){var t=this;this.visible=!0;var n=this.checkbox,i=this.challenge,r=ae.Browser.height();if(!("ie"===ae.Browser.type&&8===ae.Browser.version)){var o=window.getComputedStyle(document.body).getPropertyValue("overflow-y");this.overflow.override="hidden"===o,this.overflow.override&&(this.overflow.cssUsed=""===document.body.style.overflow&&""===document.body.style.overflowY,this.overflow.cssUsed||(this.overflow.value=""===o?"auto":o),this.overflow.scroll=ae.Browser.scrollY(),document.body.style.overflowY="auto")}return new Promise((function(o){n.status(),n.getTickLocation().then((function(a){if(t._active){if(i.size(e.width,e.height,e.mobile),i.show(),n.clearLoading(),n.location.bounding=n.getBounding(),n.location.tick=a,n.location.offset=n.getOffset(),i.position(n.location))(window.document.scrollingElement||document.getElementsByTagName("html")[0]).scrollTop=Math.abs(i.height-r)+i.top;o()}}))})).then((function(){t.onOpen&&me(t.onOpen)}))}},Ct.prototype.resize=function(e,t,n){var i=this,r=this.checkbox,o=this.challenge;o.getDimensions(e,t).then((function(e){e&&o.size(e.width,e.height,e.mobile),r.location.bounding=r.getBounding(),r.location.offset=r.getOffset(),ae.System.mobile&&!n||o.position(r.location)}))["catch"]((function(e){i.closeChallenge.call(i,{event:R,message:"Captcha resize caused error.",error:e})}))},Ct.prototype.position=function(){var e=this.checkbox,t=this.challenge;ae.System.mobile||(e.location.bounding=e.getBounding(),t.position(e.location))},Ct.prototype.reset=function(){this.checkbox.reset(),this.checkbox.setResponse(""),this._resetTimer(),this._resetState()},Ct.prototype._resetState=function(){for(var e in this._state)this._state[e]=!1},Ct.prototype.closeChallenge=function(e){this.visible=!1,this._active=!1;var t=this,n=this.checkbox,i=this.challenge;this.overflow.override&&((window.document.scrollingElement||document.getElementsByTagName("html")[0]).scrollTop=this.overflow.scroll,this.overflow.override=!1,this.overflow.scroll=0,document.body.style.overflowY=this.overflow.cssUsed?null:this.overflow.value);var r=e.response||"";switch(n.setResponse(r),i.close(e.event),n.$iframe.dom.focus(),e.event){case B:this._state.escaped=!0,n.reset(),t.onClose&&me(t.onClose),t._promise&&t._promise.reject(T);break;case M:this._state.expiredChallenge=!0,n.reset(),n.status("hCaptcha window closed due to timeout.",!0),t.onChalExpire&&me(t.onChalExpire),t._promise&&t._promise.reject(M);break;case R:case j:case $:var o=e.event;n.reset(),e.event===$?(n.status(e.message),429===e.status?o=L:"invalid-data"===e.message&&(o=A)):e.event===j?o=R:e.event===R&&"Answers are incomplete"===e.message&&(o=D),this.onError&&me(this.onError,o),t._promise&&t._promise.reject(o);break;case P:this._state.passed=!0,n.tick(),this.onPass&&me(this.onPass,r),t._promise&&t._promise.resolve({response:r,key:Ke(this.id)}),"number"==typeof e.expiration&&(t._resetTimer(),t._responseTimer=setTimeout((function(){try{n.reset(),n.setResponse(""),n.status("hCaptcha security token has expired. Please complete the challenge again.",!0)}catch(dn){ue("Checkbox not present or could not destroy on expiration: "+dn.message,"error","global")}t.onExpire&&me(t.onExpire),t._responseTimer=null,t._state.expiredResponse=!0}),1e3*e.expiration))}t._promise=null},Ct.prototype.updateTranslation=function(e){this.checkbox.sendTranslation(e),this.challenge.sendTranslation(e)},Ct.prototype.isReady=function(){return this._ready},Ct.prototype.setReady=function(e){if(this._ready=e,this._ready)for(var t,n=this._listeners.length;--n>-1;)t=this._listeners[n],this._listeners.splice(n,1),t()},Ct.prototype.setPromise=function(e){this._promise=e},Ct.prototype.onReady=function(e){var t=Array.prototype.slice.call(arguments,1),n=function(){e.apply(null,t)};this._ready?n():this._listeners.push(n)},Ct.prototype.destroy=function(){(this._resetTimer(),this.overflow.override)&&((window.document.scrollingElement||document.getElementsByTagName("html")[0]).scrollTop=this.overflow.scroll,this.overflow.override=!1,this.overflow.scroll=0,document.body.style.overflowY=this.overflow.cssUsed?null:this.overflow.value);this.challenge.destroy(),this.checkbox.destroy(),this.challenge=null,this.checkbox=null},Ct.prototype.setSiteConfig=function(e){var t=e&&e.features&&e.features.custom_theme;if(this.config.themeConfig&&t){var n="custom-"+this.id;wt.add(n,wt.extend(wt.active(),this.config.themeConfig)),wt.use(n),this.challenge.style()}return this.challenge.setConfig({siteConfig:e,wdata:rt()})},Se(kt,Ee),kt.prototype.dimensions=function(e,t){this.css({width:e,height:t}),this.element.width=Math.round(e/this.scale)*this.dpr,this.element.height=Math.round(t/this.scale)*this.dpr,this.ctx.scale(this.dpr,this.dpr),this.width=Math.round(e/this.scale),this.height=Math.round(t/this.scale)},kt.prototype.clear=function(){this.ctx&&this.ctx.clearRect(0,0,this.element.width,this.element.height)},kt.prototype.draw=function(){this.ctx&&(this.ctx.fillStyle=this.clearColor,this.ctx.fillRect(0,0,this.element.width,this.element.height))},kt.prototype._destroy=function(){this.__destroy(),this.element=null,this.ctx=null,this.width=null,this.height=null},Et.prototype.rotate=function(e,t){var n=function(e){return e*(Math.PI/180)}(t),i=Math.sin(n),r=Math.cos(n),o=this.x-e.x,a=this.y-e.y;this.x=o*r-a*i+e.x,this.y=o*i+a*r+e.y},Et.prototype.getDistance=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},Et.prototype.getAngle=function(e){var t=e.x-this.x,n=e.y-this.y,i=180*Math.atan2(n,t)/Math.PI;return i<0&&(i+=360),i},Et.prototype.hitTest=function(e){return this.radius+this.tolerance>=this.getDistance(e)},Et.prototype.restrict=function(e,t,n,i){if("x"!==e&&"y"!==e)throw new Error("Point.restrict requires a value: x or y");return t+this[e]i&&(t=i-this[e]),this[e]+t},Et.prototype.draw=function(e){e.ctx.beginPath(),e.ctx.arc(this.x,this.y,this.radius/e.scale,0,2*Math.PI,!1),this.fill&&(e.ctx.fillStyle=this.fillColor,e.ctx.fill()),this.stroke&&(e.ctx.strokeStyle=this.strokeColor,e.ctx.lineWidth=this.strokeWidth/e.scale,e.ctx.stroke())},Se(Ot,Et),Ot.prototype.set=function(e,t,n){this.x=e.x||this.x,this.y=e.y||this.y,t===undefined?(this.handleIn.x=this.x,this.handleIn.y=this.y):(this.handleIn.x=t.x,this.handleIn.y=t.y),n===undefined?(this.handleOut.x=this.x,this.handleOut.y=this.y):(this.handleOut.x=n.x,this.handleOut.y=n.y)},Ot.prototype.clone=function(){var e={x:this.x,y:this.y},t={x:this.handleIn.x,y:this.handleIn.y},n={x:this.handleOut.x,y:this.handleOut.y},i=new Ot;return t.x===n.x&&t.y===n.y?i.set(e):i.set(e,t,n),i.index=this.index,i.prev=this.prev,i.next=this.next,i.radius=this.radius,i.tolerance=this.tolerance,i.fill=this.fill,i.stroke=this.stroke,i.fillColor=this.fillColor,i.strokeColor=this.strokeColor,i.strokeWidth=this.strokeWidth,i},Ot.prototype.move=function(e,t){this.x+=e,this.y+=t,this.handleIn.x+=e,this.handleIn.y+=t,this.handleOut.x+=e,this.handleOut.y+=t},Ot.prototype.render=function(e){this.handleIn.x!==this.x&&this.handleIn.y!==this.y&&this.handleIn.draw(e),this.handleOut.x!==this.x&&this.handleOut.y!==this.y&&this.handleOut.draw(e),this.draw(e)};var Tt={400:"Rate limited or network error. Please retry.",429:"Your computer or network has sent too many requests.",500:"Cannot contact hCaptcha. Check your connection and try again."},Mt=function(e){try{return Me.translate(Tt[e])}catch(dn){return!1}},At="undefined"!=typeof XDomainRequest&&!("withCredentials"in XMLHttpRequest.prototype);function jt(e,t,n){n=n||{};var i={url:t,method:e.toUpperCase(),responseType:n.responseType||"string",dataType:n.dataType||null,withCredentials:n.withCredentials||!1,headers:n.headers||null,data:n.data||null,timeout:n.timeout||null};return i.legacy=i.withCredentials&&At,i.data&&("json"===i.dataType&&"object"==typeof i.data&&(i.data=JSON.stringify(i.data)),"query"===i.dataType&&(i.data=St(i.data))),n.retry?ye((function(){return $t(i)}),n.retry):$t(i)}function $t(e){var t=e.legacy?new XDomainRequest:new XMLHttpRequest,n="function"==typeof e.url?e.url():e.url;return new Promise((function(i,r){var o,a=function(o){return function(){var a=t.response||t.responseText,s=t.statusText||"",h=t.status,c=t.readyState;if(4===c||e.legacy){if("json"===e.responseType&&a)try{a=JSON.parse(a)}catch(l){}if("error"===o||h>=400&&h<=511)return void r({event:$,endpoint:n,response:a,state:c,status:h,message:Mt(h||400)||s});i({state:c,status:h,body:a,message:s})}}};if((t.onload=a("complete"),t.onerror=t.ontimeout=a("error"),t.open(e.method,n),e.timeout&&(t.timeout=e.timeout),!e.legacy)&&(t.withCredentials=e.withCredentials,e.headers))for(var s in e.headers)o=e.headers[s],t.setRequestHeader(s,o);setTimeout((function(){t.send(e.data)}),0)}))}var Lt=function(e,t){if("object"==typeof e&&t===undefined&&(e=(t=e).url),null===e)throw new Error("Url missing");return jt("GET",e,t)},Rt=function(e){return e.toLowerCase().match(/\.(?:jpg|gif|png|jpeg|svg)$/g)?"image":e.toLowerCase().match(/\.(?:js)$/g)?"script":"file"},Dt=function(e){if(he.assethost&&e.indexOf(se.assetDomain)>=0)return he.assethost+e.replace(se.assetDomain,"");if(he.imghost&&e.indexOf("imgs")>=0){var t=e.indexOf(".ai")>=0?e.indexOf(".ai")+3:e.indexOf(".com")+4;return he.imghost+e.substr(t,e.length)}return e},Nt=["svg","gif","png"];function zt(e,t){t=t||{};var n,i=e;if(0===i.indexOf("data:image"))for(var r=!1,o=Nt.length,a=-1;a++=0)&&(n=Nt[a]);else n=i.substr(i.lastIndexOf(".")+1,i.length);!!(!document.createElementNS||!document.createElementNS("https://www.w3.org/2000/svg","svg").createSVGRect)&&t.fallback&&(t.fallback.indexOf(".")>=0?n=(i=t.fallback).substr(i.lastIndexOf(".")+1,i.length):(i=e.substr(0,e.indexOf(n))+t.fallback,n=t.fallback)),t.prefix&&(i=t.prefix+"/"+i),this.attribs={crossOrigin:t.crossOrigin||null},this.id=i,this.src=Dt(i),this.ext=n,this.width=0,this.height=0,this.aspect=0,this.loaded=!1,this.error=!1,this.element=null,this.cb={load:[],error:[]}}function Wt(e,t,n){for(var i=e[t],r=i.length,o=null;--r>-1;)o=i[r],i.splice(r,1),o(n);"error"===t?e.load=[]:e.error=[]}function Ft(e,t){var n=e;t||(t={}),t.prefix&&(n=t.prefix+"/"+e),this.attribs={defer:t.defer||null,async:t.async||null,crossOrigin:t.crossOrigin||null},this.id=n,this.src=Dt(n),this.loaded=!1,this.error=!1,this.element=null,this.cb={load:[],error:[]}}function Ut(e,t,n){for(var i=e[t],r=i.length,o=null;--r>-1;)o=i[r],i.splice(r,1),o(n);"error"===t?e.load=[]:e.error=[]}function Jt(e,t){var n=e;t||(t={}),t.prefix&&(n=t.prefix+"/"+e),this.id=n,this.src=Dt(n),this.loaded=!1,this.error=!1,this.cb={load:[],error:[]},this.data=null}function Ht(e,t,n){for(var i=e[t],r=i.length,o=null;--r>-1;)o=i[r],i.splice(r,1),o(n);"error"===t?e.load=[]:e.error=[]}zt.prototype.load=function(){return("svg"===this.ext?this._loadSvg():this._loadImg())["catch"]((function(e){throw ue("Asset failed","error","assets",{error:e}),e}))},zt.prototype._loadSvg=function(){var e,t=this,n=this.src,i=this.id;if(0===n.indexOf("data:image/svg+xml")){var r=n.slice("data:image/svg+xml,".length);e=Promise.resolve(decodeURIComponent(r))}else e=Lt(n).then((function(e){return e.body}));return e.then((function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement,i=parseInt(n.getAttribute("width")),r=parseInt(n.getAttribute("height"));return t._imgLoaded(n,i,r),t}))["catch"]((function(e){t.error=!0;var n=(e&&e.message?e.message:"Loading Error")+": "+i;throw Wt(t.cb,"error",n),n}))},zt.prototype._loadImg=function(){var e=this,t=this.attribs,n=this.src,i=this.id;return new Promise((function(r,o){var a=new Image;t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onerror=function(t){e.error=!0,a.onload=a.onerror=null;var n=(t&&t.message?t.message:"Loading Error")+": "+i;Wt(e.cb,"error",n),o(n)},a.onload=function(){e.loaded||(e._imgLoaded(a,a.width,a.height),a.onload=a.onerror=null,r(e))},a.src=n,a.complete&&a.onload()}))},zt.prototype._imgLoaded=function(e,t,n){this.element=new Ee(e),this.width=t,this.height=n,this.aspect=t/n,this.loaded=!0,Wt(this.cb,"load",this)},zt.prototype.onload=function(e){this.error||(this.loaded?e(this):this.cb.load.push(e))},zt.prototype.onerror=function(e){this.loaded&&!this.error||(this.error?e(this):this.cb.error.push(e))},Ft.prototype.load=function(){var e=this,t=this.attribs,n=this.src,i=this.id;return new Promise((function(r,o){var a=document.createElement("script");e.element=a,a.onerror=function(t){e.error=!0,a.onload=a.onreadystatechange=a.onerror=null;var n=(t.message||"Loading Error")+": "+i;Ut(e.cb,"error",n),o(n)},a.onload=a.onreadystatechange=function(){this.loaded||a.readyState&&"loaded"!==a.readyState&&"complete"!==a.readyState||(e.loaded=!0,a.onload=a.onreadystatechange=a.onerror=null,document.body.removeChild(a),Ut(e.cb,"load",e),r(e))},a.type="text/javascript",a.src=n,t.crossOrigin&&(a.crossorigin=t.crossOrigin),t.async&&(a.async=!0),t.defer&&(a.defer=!0),document.body.appendChild(a),a.complete&&a.onload()}))},Ft.prototype.onload=function(e){this.error||(this.loaded?e(this):this.cb.load.push(e))},Ft.prototype.onerror=function(e){this.loaded&&!this.error||(this.error?e(this):this.cb.error.push(e))},Jt.prototype.load=function(){var e=this,t=this.src,n=this.id;return new Promise((function(i,r){var o={};t.indexOf("json")>=0&&(o.responseType="json"),Lt(t,o).then((function(t){e.loaded=!0,e.data=t.body,Ht(e.cb,"load",e),i(e)}))["catch"]((function(t){e.error=!0;var i=(t&&t.message?t.message:"Loading Error")+": "+n;Ht(e.cb,"error",i),r(i)}))}))},Jt.prototype.onload=function(e){this.error||(this.loaded?e(this):this.cb.load.push(e))},Jt.prototype.onerror=function(e){this.loaded&&!this.error||(this.error?e(this):this.cb.error.push(e))};var qt=[],Xt={add:function(e,t){var n=Rt(e);return Xt[n]?Xt[n](e,t):Promise.resolve(null)},batch:function(e,t){for(var n=[],i=-1;++i-1&&!r;)r=(o=qt[i]).id===e||-1!==o.id.indexOf("/"===e[0]?"":"/"+e);if(!r)return t(null);o.onload(t),o.onerror(n)}))}};function Yt(e){if("en"===e)return Promise.resolve();var t=e+".json";return new Promise((function(n,i){Xt.retrieve(t).then((function(n){return n||Xt.file(t,{prefix:"https://newassets.hcaptcha.com/captcha/v1/e09e16a/static/i18n"}).then((function(t){return Me.addTable(e,t.data),t}))})).then((function(e){n(e.data)}))["catch"]((function(e){i(e)}))}))}var Gt=0,Vt=["hl","custom","tplinks","sitekey","theme","size","tabindex","challenge-container"];var Qt={render:function(e,t){if("string"==typeof e&&(e=document.getElementById(e)),e&&1===e.nodeType)if(function(e){if(!e||!("challenge-container"in e))return!0;var t=e["challenge-container"];return"string"==typeof t&&(t=document.getElementById(t)),!!t&&1===t.nodeType}(t)){if(!1!==nt.isSupported()){for(var n,i,r=e.getElementsByTagName("iframe"),o=-1;++oupgrade your browser or enable it for hCaptcha.com")}else console.log("[hCaptcha] render: invalid challenge container '"+t["challenge-container"]+"'.");else console.log("[hCaptcha] render: invalid container '"+e+"'.");function v(e,t){var n=e.locale;function i(e){if(e)try{e.updateTranslation(n)}catch(ln){ue("Failed to update text translation: "+JSON.stringify(ln),"error","translation")}}n&&Yt(n).then((function(){t?i(g):Y.each(i)}))["catch"]((function(e){ue("Language failed to load: "+n,"error","api")}))}},reset:function(e){var t;if(e){if(!(t=Y.getById(e)))throw new U(e);t.reset()}else{if(!(t=Y.getByIndex(0)))throw new J;t.reset()}},remove:function(e){var t=e?Y.getById(e):Y.getByIndex(0);if(!t)throw e?new U(e):new J;Y.remove(t),t.destroy(),t=null},execute:Qe,getResponse:function(e){var t,n;if((n=e?Y.getById(e):Y.getByIndex(0))&&(t=n.checkbox.response||""),void 0!==t)return t;throw e?new U(e):new J},getRespKey:Ke,close:function(e){var t=!1;if(!(t=e?Y.getById(e):Y.getByIndex(0)))throw e?new U(e):new J;t.closeChallenge({event:B})},setData:function(e,t){if("object"!=typeof e||t||(t=e,e=null),!t||"object"!=typeof t)throw Error("[hCaptcha] invalid data supplied");var n=!1;if(!(n=e?Y.getById(e):Y.getByIndex(0)))throw e?new U(e):new J;var i=n.challenge.setData.bind(n.challenge);n.onReady(i,t)},nodes:Y};se.file="hcaptcha";var Kt=document.currentScript,Zt=!1,en=!1,tn="on",nn=ae.Browser.width()/ae.Browser.height(),rn=window.hcaptcha||!1;function on(){var e=ae.Browser.width(),t=ae.Browser.height(),n=ae.System.mobile&&nn!==e/t;nn=e/t,hn(),Qt.nodes.each((function(i){i.visible&&i.resize(e,t,n)}))}function an(e){e.preventDefault&&e.preventDefault(),sn(),Qt.nodes.each((function(e){e.visible&&e.position()}))}function sn(){Ue.circBuffPush("xy",[ae.Browser.scrollX(),ae.Browser.scrollY(),document.documentElement.clientWidth/ae.Browser.width(),Date.now()])}function hn(){Ue.circBuffPush("wn",[ae.Browser.width(),ae.Browser.height(),ae.System.dpr(),Date.now()])}!function(e){var t=Array.prototype.slice.call(arguments,1);!0!==qe&&"interactive"!==document.readyState&&"loaded"!==document.readyState&&"complete"!==document.readyState?(Je.push({fn:e,args:t}),!1===He&&Xe()):setTimeout((function(){e(t)}),1)}((function(){rn||(!function(){var e;e=Kt?[Kt]:document.getElementsByTagName("script");var t=-1,n=!1,i=null,r=null;for(;++t=0?e.split("&"):[e]:[],a=0;a=0){if(t=o[a].split("="),n=decodeURIComponent(t[0]),"false"!==(i=decodeURIComponent(t[1]))&&"true"!==i||(i="true"===i),"theme"===n||"themeConfig"===n)try{i=JSON.parse(i)}catch(dn){}r[n]=i}return r}(i[1]);Zt=o.onload||!1,en=o.render||!1,"off"===o.tplinks&&(tn="off");he.tplinks=tn,he.language=o.hl||null,o.endpoint&&(he.endpointOverride=o.endpoint);he.reportapi=o.reportapi||he.reportapi,he.imghost=o.imghost||null,he.custom=o.custom||he.custom,he.se=o.se||null,he.assethost=o.assethost||null,he.assethost&&!ge.URL(he.assethost)&&(he.assethost=null,console.error("Invalid assethost uri."));he.recaptchacompat=o.recaptchacompat||he.recaptchacompat,se.host=o.host||window.location.hostname,he.language=he.language||window.navigator.userLanguage||window.navigator.language,Me.setLocale(he.language),a=o.sentry===undefined||o.sentry,void(le=a),"off"===he.recaptchacompat?console.log("recaptchacompat disabled"):window.grecaptcha=cn;var a}(),function(){var e=Me.getLocale();if(e.indexOf("en")>=0)return;Yt(e).then((function(){Qt.nodes.each((function(t){if(t)try{t.updateTranslation(e)}catch(ln){ue("Failed to update text translation: "+JSON.stringify(ln),"error","translation")}}))}))["catch"]((function(){ue("Language failed to load: "+e,"error","api")}))}(),!1===en||"onload"===en?function(e){for(var t=document.getElementsByClassName("h-captcha"),n=[],i=0;i>>0,o=Math.min(0|n,r);if(o<0)o=Math.max(0,r+o);else if(o>=r)return-1;if(void 0===t){for(;o!==r;++o)if(void 0===i[o]&&o in i)return o}else if(t!=t){for(;o!==r;++o)if(i[o]!=i[o])return o}else for(;o!==r;++o)if(i[o]===t)return o;return-1}}(Object)),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),document.getElementsByClassName||(window.Element.prototype.getElementsByClassName=document.constructor.prototype.getElementsByClassName=function(e){if(document.querySelectorAll)return document.querySelectorAll("."+e);for(var t=document.getElementsByTagName("*"),n=new RegExp("(^|\\s)"+e+"(\\s|$)"),i=[],r=0;rthis.length)&&(t=this.length),this.substring(t-e.length,t)===e});try{if(Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(Element.prototype,"textContent").get){var m=Object.getOwnPropertyDescriptor(Element.prototype,"innerText");Object.defineProperty(Element.prototype,"textContent",{get:function(){return m.get.call(this)},set:function(e){m.set.call(this,e)}})}}catch(ln){}Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind: Item Can Not Be Bound.");var t=Array.prototype.slice.call(arguments,1),n=this,i=function(){},r=function(){return n.apply(this instanceof i?this:e,t.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(i.prototype=this.prototype),r.prototype=new i,r}),"function"!=typeof Object.create&&(Object.create=function(e,t){function n(){}if(n.prototype=e,"object"==typeof t)for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return new n}),Date.now||(Date.now=function(){return(new Date).getTime()}),window.console||(window.console={});for(var g,y,v,w,b,_,x=["error","info","log","show","table","trace","warn"],C=function(e){},k=x.length;--k>-1;)p=x[k],window.console[p]||(window.console[p]=C);if(window.atob)try{window.atob(" ")}catch(dn){window.atob=(g=window.atob,(y=function(e){return g(String(e).replace(/[\t\n\f\r ]+/g,""))}).original=g,y)}else{var E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",O=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;window.atob=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!O.test(e))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t,n,i;e+="==".slice(2-(3&e.length));for(var r="",o=0;o>16&255):64===i?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return r}}if(Event.prototype.preventDefault||(Event.prototype.preventDefault=function(){this.returnValue=!1}),Event.prototype.stopPropagation||(Event.prototype.stopPropagation=function(){this.cancelBubble=!0}),window.Prototype&&Array.prototype.toJSON){console.error("[hCaptcha] Custom JSON polyfill detected, please remove to ensure hCaptcha works properly");var S=Array.prototype.toJSON,I=JSON.stringify;JSON.stringify=function(e){try{return delete Array.prototype.toJSON,I(e)}finally{Array.prototype.toJSON=S}}}Object.keys||(Object.keys=(v=Object.prototype.hasOwnProperty,w=!Object.prototype.propertyIsEnumerable.call({toString:null},"toString"),_=(b=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(e){if("function"!=typeof e&&("object"!=typeof e||null===e))throw new TypeError("Object.keys called on non-object");var t,n,i=[];for(t in e)v.call(e,t)&&i.push(t);if(w)for(n=0;n<_;n++)v.call(e,b[n])&&i.push(b[n]);return i}));var P="challenge-passed",B="challenge-escaped",T="challenge-closed",M="challenge-expired",A="invalid-data",j="bundle-error",$="network-error",L="rate-limited",R="challenge-error",D="incomplete-answer",N="missing-captcha",z="missing-sitekey",W="invalid-captcha-id";function F(e,t){this.cause=e,this.message=t}function U(e){F.call(this,W,"Invalid hCaptcha id: "+e)}function J(){F.call(this,N,"No hCaptcha exists.")}function H(){F.call(this,z,"Missing sitekey - https://hcaptcha.com/docs/configuration#jsapi")}F.prototype=Error.prototype;var q=[],X=[],Y={add:function(e){q.push(e)},remove:function(e){for(var t=!1,n=q.length;--n>-1&&!1===t;)q[n].id===e.id&&(t=q[n],q.splice(n,1));return t},each:function(e){for(var t=-1;++t10&&X.splice(0,X.length-10)},getSession:function(){return X}};function G(){var e=this;this._bottom=0,this._top=0,this.storage={},this.add=function(t){return e.storage[e._top]=t,e._top++,t},this.remove=function(){if(!e.empty()){var t=e._bottom,n=e.storage[t];return e.storage[t]=null,e._bottom++,n}},this.empty=function(){return e._top===e._bottom},this.size=function(){return e._top-e._bottom}}var V={queue:G,depth:function un(e,t,n){if("object"==typeof e&&e[t]&&e[t].length>0)for(var i=e[t].length;--i>-1;)un(e[t][i],t,n);e!==undefined&&n(e)},breathe:function(e,t,n){var i=new G,r=null;for(i.add(e),r=i.remove();r;){for(var o=0;o0||navigator.msMaxTouchPoints>0),t=!1,n&&(t=["iOS","Windows Phone","Windows Mobile","Android","BlackBerry OS"].indexOf(n.name)>=0),e&&t),this.dpr=function(){return window.devicePixelRatio||1},this.mobile&&n&&"Windows"===n.family&&i.indexOf("touch")<0&&(this.mobile=!1),this.os="iOS"===n.family?"ios":"Android"===n.family?"android":"Mac OS X"===n.family?"mac":"Windows"===n.family?"windows":"Linux"===n.family?"linux":n.family.toLowerCase(),this.version=function(){if(!n)return"unknown";var e=n.major;return n.minor&&(e+="."+n.minor),n.patch&&(e+="."+n.patch),e}()}},se={host:null,file:null,sitekey:null,a11y_tfe:null,pingdom:"safari"===ae.Browser.type&&"windows"!==ae.System.os&&"mac"!==ae.System.os&&"ios"!==ae.System.os&&"android"!==ae.System.os,assetDomain:"https://newassets.hcaptcha.com",assetUrl:"https://newassets.hcaptcha.com/captcha/v1/e09e16a/static",width:null,height:null,mobile:null},he={se:null,custom:!1,tplinks:"on",language:null,reportapi:"https://accounts.hcaptcha.com",endpoint:"https://hcaptcha.com",endpointOverride:null,size:"normal",theme:"light",assethost:null,imghost:null,recaptchacompat:"true"};function ce(e,t){e.style.width="304px",e.style.height="78px",e.style.backgroundColor="#f9e5e5",e.style.position="relative",e.innerHTML="";var n=document.createElement("div");n.style.width="284px",n.style.position="absolute",n.style.top="12px",n.style.left="10px",n.style.color="#7c0a06",n.style.fontSize="14px",n.style.fontWeight="normal",n.style.lineHeight="18px",n.innerHTML=t||"Please upgrade your browser to complete this captcha.",e.appendChild(n)}var le=!0;function de(e){var t={message:e.name+": "+e.message};e.stack&&(t.stack_trace={trace:e.stack}),pe("report error","internal","debug",t),ue("internal error","error",se.file)}function ue(e,t,n,i){if(t=t||"error",le){var r="warn"===t?"warning":t;window.Raven&&Raven.captureMessage(e,{level:r,logger:n,extra:i})}}function pe(e,t,n,i){le&&window.Raven&&Raven.captureBreadcrumb({message:e,category:t,level:n,data:i})}function fe(e){var t=[].slice.call(arguments,1);"string"==typeof e?window[e]?"function"==typeof window[e]?window[e].apply(null,t):console.log("[hCaptcha] Callback '"+e+"' is not a function."):console.log("[hCaptcha] Callback '"+e+"' is not defined."):"function"==typeof e?e.apply(null,t):console.log("[hcaptcha] Invalid callback '"+e+"'.")}function me(){try{fe.apply(null,arguments)}catch(ln){console.error("[hCaptcha] There was an error in your callback."),console.error(ln)}}var ge={UUID:function(e){return/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i.test(e)||!1},UUIDv4:function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)||!1},URL:function(e){var t=new RegExp("^(http|https)://"),n=new RegExp("^((?!(data|javascript):).)*$");return t.test(e)&&n.test(e)}};function ye(e,t){var n,i="attempts"in(t=t||{})?t.attempts:1,r=t.delay||0,o=t.onFail;return n=function(t,n,a){e().then(t,(function(e){var t=i-- >0;o&&(t=!1!==o(e)&&t),t?setTimeout(a,r):n(e)}))},new Promise((function(e,t){n(e,t,(function i(){n(e,t,i)}))}))}var ve={eventName:function(e){var t=e;return"down"===e||"up"===e||"move"===e||"over"===e||"out"===e?t=!ae.System.mobile||"down"!==e&&"up"!==e&&"move"!==e?"mouse"+e:"down"===e?"touchstart":"up"===e?"touchend":"touchmove":"enter"===e&&(t="keydown"),t},actionName:function(e){var t=e;return"touchstart"===t||"mousedown"===t?t="down":"touchmove"===t||"mousemove"===t?t="move":"touchend"===t||"mouseup"===t?t="up":"mouseover"===t?t="over":"mouseout"===t&&(t="out"),t},eventCallback:function(e,t,n){var i=ve.actionName(e);return function(r){if(r=r||window.event,"down"===i||"move"===i||"up"===i||"over"===i||"out"===i||"click"===i){var o=ve.eventCoords(r);if(!o)return;var a=n.getBoundingClientRect();r.windowX=o.x,r.windowY=o.y,r.elementX=r.windowX-(a.x||a.left),r.elementY=r.windowY-(a.y||a.top)}r.keyNum=r.which||r.keyCode||0,"enter"===e&&13!==r.keyNum&&32!==r.keyNum||(r.action=i,r.targetElement=n,t(r))}},eventCoords:function(e){if(!e)return null;var t=e;if(e.touches||e.changedTouches){var n=e.touches&&e.touches.length>=1?e.touches:e.changedTouches;n&&n[0]&&(t=n[0])}return"number"==typeof t.pageX&&"number"==typeof t.pageY?{x:t.pageX,y:t.pageY}:"number"==typeof t.clientX&&"number"==typeof t.clientY?{x:t.clientX,y:t.clientY}:null}};function we(e){this.r=255,this.g=255,this.b=255,this.a=1,this.h=1,this.s=1,this.l=1,this.parseString(e)}function be(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}we.hasAlpha=function(e){return"string"==typeof e&&(-1!==e.indexOf("rgba")||9===e.length&&"#"===e[0])},we.prototype.parseString=function(e){e&&(0===e.indexOf("#")?this.fromHex(e):0===e.indexOf("rgb")&&this.fromRGBA(e))},we.prototype.fromHex=function(e){var t=1;9===e.length&&(t=parseInt(e.substr(7,2),16)/255);var n=(e=e.substr(1,6)).replace(/^([a-f\d])([a-f\d])([a-f\d])?$/i,(function(e,t,n,i){return t+t+n+n+i+i})),i=parseInt(n,16),r=i>>16,o=i>>8&255,a=255&i;this.setRGBA(r,o,a,t)},we.prototype.fromRGBA=function(e){var t=e.indexOf("rgba"),n=e.substr(t).replace(/rgba?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),i=Math.floor(parseInt(n[0])),r=Math.floor(parseInt(n[1])),o=Math.floor(parseInt(n[2])),a=parseFloat(n[3]);this.setRGBA(i,r,o,a)},we.prototype.setRGB=function(e,t,n){this.setRGBA(e,t,n,1)},we.prototype.setRGBA=function(e,t,n,i){this.r=e,this.g=t,this.b=n,this.a=isNaN(i)?this.a:i,this.updateHSL()},we.prototype.hsl2rgb=function(e,t,n){if(0===t){var i=Math.round(255*n);return this.setRGB(i,i,i),this}var r=n<=.5?n*(1+t):n+t-n*t,o=2*n-r;return this.r=Math.round(255*be(o,r,e+1/3)),this.g=Math.round(255*be(o,r,e)),this.b=Math.round(255*be(o,r,e-1/3)),this.h=e,this.s=t,this.l=n,this},we.prototype.updateHSL=function(){var e,t=this.r/255,n=this.g/255,i=this.b/255,r=Math.max(t,n,i),o=Math.min(t,n,i),a=null,s=(r+o)/2;if(r===o)a=e=0;else{var h=r-o;switch(e=s>.5?h/(2-r-o):h/(r+o),r){case t:a=(n-i)/h+(n1&&(e/=100),this.hsl2rgb(this.h,this.s,e),this},we.prototype.saturation=function(e){return e>1&&(e/=100),this.hsl2rgb(this.h,e,this.l),this},we.prototype.hue=function(e){return this.hsl2rgb(e/360,this.s,this.l),this};var _e=["Webkit","Moz","ms"],xe=document.createElement("div").style,Ce={};function ke(e){var t=Ce[e];return t||(e in xe?e:Ce[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=_e.length;n--;)if((e=_e[n]+t)in xe)return e}(e)||e)}function Ee(e,t,n){if(this.dom=null,this._clss=[],this._nodes=[],this._listeners=[],this._frag=null,e&&"object"==typeof e){this.dom=e;var i=[],r=[];"string"==typeof e.className&&(r=e.className.split(" "));for(var o=0;o=0||e.indexOf(".")>=0))&&(e&&(t=e),e="div"),this.dom=document.createElement(e),t&&(t.indexOf("#")>=0?this.dom.id=t.split("#")[1]:(t.indexOf(".")>=0&&(t=t.split(".")[1]),this.addClass.call(this,t)));!0===n&&(this._frag=document.createDocumentFragment(),this._frag.appendChild(this.dom))}Ee.prototype.createElement=function(e,t){var n=new Ee(e,t,!1);return this.appendElement.call(this,n),this._nodes.push(n),n},Ee.prototype.appendElement=function(e){if(e===undefined)return de({name:"DomElement Add Child",message:"Child Element is undefined"});var t;t=e._frag!==undefined&&null!==e._frag?e._frag:e.dom!==undefined?e.dom:e;try{e instanceof Ee&&(e._parent=this),this.dom.appendChild(t)}catch(dn){de({name:"DomElement Add Child",message:"Failed to append child."})}return this},Ee.prototype.removeElement=function(e){try{var t;if(e._nodes)for(t=e._nodes.length;t--;)e.removeElement(e._nodes[t]);for(t=this._nodes.length;--t>-1;)this._nodes[t]===e&&this._nodes.splice(t,1);this.dom.removeChild(e.dom||e),e.__destroy&&e.__destroy()}catch(dn){de({name:"DomElement Remove Child",message:"Failed to remove child."})}},Ee.prototype.addClass=function(e){return!1===this.hasClass.call(this,e)&&(this._clss.push(e),this.dom.className=this._clss.join(" ")),this},Ee.prototype.hasClass=function(e){for(var t=-1!==this.dom.className.split(" ").indexOf(e),n=this._clss.length;n--&&!t;)t=this._clss[n]===e;return t},Ee.prototype.removeClass=function(e){for(var t=this._clss.length;--t>-1;)this._clss[t]===e&&this._clss.splice(t,1);return this.dom.className=this._clss.join(" "),this},Ee.prototype.text=function(e){if(this&&this.dom){if(!e)return this.dom.textContent;for(var t,n,i,r,o=/&(.*?);/g,a=/<[a-z][\s\S]*>/i;null!==(t=o.exec(e));){!1===a.test(t[0])?(i=t[0],r=void 0,(r=document.createElement("div")).innerHTML=i,n=r.textContent,e=e.replace(new RegExp(t[0],"g"),n)):e=e.replace(t[0],"")}return this.dom.textContent=e,this}},Ee.prototype.content=Ee.prototype.text,Ee.prototype.css=function(e){var t,n="ie"===ae.Browser.type&&8===ae.Browser.version;for(var i in e){t=e[i];try{"opacity"!==i&&"zIndex"!==i&&"fontWeight"!==i&&isFinite(t)&&parseFloat(t)===t&&(t+="px");var r=ke(i);n&&"opacity"===i?this.dom.style.filter="alpha(opacity="+100*t+")":n&&we.hasAlpha(t)?this.dom.style[r]=new we(t).getHex():this.dom.style[r]=t}catch(ln){}}return this},Ee.prototype.backgroundImage=function(e,t,n,i){var r=t!==undefined&&n!==undefined,o={"-ms-high-contrast-adjust":"none"};if("object"==typeof t&&(i=t),i===undefined&&(i={}),r){var a=e.width/e.height,s=t,h=s/a;i.cover&&hn&&(s=(h=n)*a),o.width=s,o.height=h,i.center&&(o.marginLeft=-s/2,o.marginTop=-h/2,o.position="absolute",o.left="50%",o.top="50%"),(i.left||i.right)&&(o.left=i.left||0,o.top=i.top||0)}"ie"===ae.Browser.type&&8===ae.Browser.version?o.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e.src+"',sizingMethod='scale')":(o.background="url("+e.src+")",o.backgroundPosition="50% 50%",o.backgroundRepeat="no-repeat",o.backgroundSize=r?s+"px "+h+"px":i.cover?"cover":i.contain?"contain":"100%"),this.css.call(this,o)},Ee.prototype.setAttribute=function(e,t){var n;if("object"==typeof e)for(var i in e)n=e[i],this.dom.setAttribute(i,n);else this.dom.setAttribute(e,t)},Ee.prototype.removeAttribute=function(e,t){var n;if("object"==typeof e)for(var i in e)n=e[i],this.dom.removeAttribute(i,n);else this.dom.removeAttribute(e,t)},Ee.prototype.addEventListener=function(e,t,n){var i={event:ve.eventName(e),handler:ve.eventCallback(e,t,this.dom),callback:t};this._listeners.push(i),this.dom.addEventListener?this.dom.addEventListener(i.event,i.handler,n):this.dom.attachEvent("on"+i.event,i.handler)},Ee.prototype.removeEventListener=function(e,t,n){for(var i,r=this._listeners.length;--r>-1;)(i=this._listeners[r]).event===e&&i.callback===t&&(this._listeners.splice(r,1),this.dom.removeEventListener?this.dom.removeEventListener(i.event,i.handler,n):this.dom.detachEvent("on"+i.event,i.handler))},Ee.prototype.focus=function(){this.dom.focus()},Ee.prototype.blur=function(){this.dom.blur()},Ee.prototype.html=function(e){return e&&(this.dom.innerHTML=e),this.dom.innerHTML},Ee.prototype.__destroy=function(){for(var e,t=this._listeners.length;--t>-1;)e=this._listeners[t],this._listeners.splice(t,1),this.dom.removeEventListener?this.dom.removeEventListener(e.event,e.handler):this.dom.detachEvent("on"+e.event,e.handler);return this.dom=null,this._clss=[],this._nodes=[],this._listeners=[],this._frag=null,e=null,null};var Oe=function(e,t){var n={},i=Array.prototype.slice.call(arguments,2);for(var r in t.apply(e,i),e)n[r]=e[r]},Se=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e};function Ie(e,t){Oe(this,Ee,t||"div",e),this.children=[],this._events=[]}Se(Ie,Ee),Ie.prototype.initComponent=function(e,t,n){var i=new e(t);return i._parent=this,this.children.push(i),i.dom&&(n!==undefined?n.appendElement&&n.appendElement(i):this.appendElement(i)),i},Ie.prototype.destroy=function(){var e=this;try{V.depth(this,"children",(function(t){if(e!==t)for(var n=e.children.length;--n>-1;)e.children[n]===t&&e.children.splice(n,1);t._destroy&&t._destroy(),t=null}))}catch(dn){throw new Error("Trouble destroying nodes: "+dn)}return null},Ie.prototype._destroy=function(){try{this.onDestroy&&this.onDestroy(),this._parent.removeElement&&this._parent.removeElement(this);for(var e=this._events.length;--e>-1;)this._events.splice(e,1);this.children=null,this._destroy=null,this._events=null,this.destroy=null,this.emit=null,this.on=null,this.off=null,this.initComponent=null}catch(dn){de({name:"DomComponent",message:"Failed to destroy."})}},Ie.prototype.on=function(e,t){for(var n=this._events.length,i=!1;--n>-1&&!1===i;)this._events[n].event===e&&(i=this._events[n]);!1===i&&(i={event:e,listeners:[]},this._events.push(i)),i.listeners.push(t)},Ie.prototype.off=function(e,t){for(var n=this._events.length;--n>-1;)if(this._events[n].event===e){for(var i=this._events[n].listeners.length;--i>-1;)this._events[n].listeners[i]===t&&this._events[n].listeners.splice(i,1);0===this._events[n].listeners.length&&this._events.splice(n,1)}},Ie.prototype.emit=function(e){for(var t=Array.prototype.slice.call(arguments,1),n=this._events.length;--n>-1&&this._events;)if(this._events[n].event===e)for(var i=this._events[n].listeners.length;--i>-1;)this._events[n].listeners[i].apply(this,t)};var Pe={af:"Afrikaans",sq:"Albanian",am:"Amharic",ar:"Arabic",hy:"Armenian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bg:"Bulgarian",bs:"Bosnian",my:"Burmese",ca:"Catalan",ceb:"Cebuano",zh:"Chinese","zh-CN":"Chinese Simplified","zh-TW":"Chinese Traditional",co:"Corsican",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",eo:"Esperanto",et:"Estonian",fa:"Persian",fi:"Finnish",fr:"French",fy:"Frisian",gd:"Gaelic",gl:"Galacian",ka:"Georgian",de:"German",el:"Greek",gu:"Gujurati",ht:"Haitian",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",is:"Icelandic",ig:"Igbo",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",jw:"Javanese",kn:"Kannada",kk:"Kazakh",km:"Khmer",rw:"Kinyarwanda",ky:"Kirghiz",ko:"Korean",ku:"Kurdish",lo:"Lao",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"Macedonian",mg:"Malagasy",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mn:"Mongolian",ne:"Nepali",no:"Norwegian",ny:"Nyanja",or:"Oriya",pl:"Polish","pt-BR":"Portuguese (Brazil)",pt:"Portuguese (Portugal)",ps:"Pashto",pa:"Punjabi",ro:"Romanian",ru:"Russian",sm:"Samoan",sn:"Shona",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",st:"Southern Sotho",es:"Spanish",su:"Sundanese",sw:"Swahili",sv:"Swedish",tl:"Tagalog",tg:"Tajik",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tr:"Turkish",tk:"Turkmen",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",cy:"Welsh",xh:"Xhosa",yi:"Yiddish",yo:"Yoruba",zu:"Zulu"},Be={zh:{"I am human":"我是人"},ar:{"I am human":"أنا الإنسان"},af:{"I am human":"Ek is menslike"},am:{"I am human":"እኔ ሰው ነኝ"},hy:{"I am human":"ÔµÕ½ Õ´Õ¡Ö€Õ¤ Õ¥Õ´"},az:{"I am human":"MÉ™n insanam"},eu:{"I am human":"Gizakia naiz"},bn:{"I am human":"আমি মানব নই"},bg:{"I am human":"Аз съм човек"},ca:{"I am human":"Sóc humà "},hr:{"I am human":"Ja sam čovjek"},cs:{"I am human":"Jsem človÄ›k"},da:{"I am human":"Jeg er et menneske"},nl:{"I am human":"Ik ben een mens"},et:{"I am human":"Ma olen inimeste"},fi:{"I am human":"Olen ihminen"},fr:{"I am human":"Je suis humain"},gl:{"I am human":"Eu son humano"},ka:{"I am human":"მე ვარადამიანი"},de:{"I am human":"Ich bin ein Mensch"},el:{"I am human":"Είμαι άνθρωπος"},gu:{"I am human":"હું માનવ છું"},iw:{"I am human":". ×× ×™ ×× ×•×©×™"},hi:{"I am human":"मैं मानव हूं"},hu:{"I am human":"Nem vagyok robot"},is:{"I am human":"Ég er manneskja"},id:{"I am human":"Aku manusia"},it:{"I am human":"Sono un essere umano"},ja:{"I am human":"私は人間です"},kn:{"I am human":"ನಾನು ಮಾನವನು"},ko:{"I am human":"사람입니다"},lo:{"I am human":"ຂ້ອຍເປັນມະນຸດ"},lv:{"I am human":"Es esmu cilvÄ“ks"},lt:{"I am human":"AÅ¡ esu žmogaus"},ms:{"I am human":"Saya manusia"},ml:{"I am human":"ഞാൻ മനുഷ്യനാണ്"},mr:{"I am human":"मी मानवी आहे"},mn:{"I am human":"Би бол хүн"},no:{"I am human":"Jeg er menneskelig"},fa:{"I am human":"من انسانی هستم"},pl:{"I am human":"Jestem czÅ‚owiekiem"},pt:{"I am human":"Sou humano"},ro:{"I am human":"Eu sunt om"},ru:{"I am human":"Я человек"},sr:{"I am human":"Ja sam ljudski"},si:{"I am human":"මම මිනිස්සු"},sk:{"I am human":"Ja som človek"},sl:{"I am human":"Jaz sem človeÅ¡ki"},es:{"I am human":"Soy humano"},sw:{"I am human":"Mimi ni binadamu"},sv:{"I am human":"Jag är människa"},ta:{"I am human":"நான் மனித"},te:{"I am human":"నేను మనిషిని"},th:{"I am human":"ผมมนุษย์"},tr:{"I am human":"Ben bir insanım"},uk:{"I am human":"Я людини"},ur:{"I am human":"میں انسان ہوں"},vi:{"I am human":"Tôi là con người"},zu:{"I am human":"Ngingumuntu"}},Te=null,Me={translate:function(e,t){var n=Me.getBestTrans(Be),i=n&&n[e];if(i=i||e,t)for(var r=Object.keys(t),o=r.length;o--;)i=i.replace(new RegExp("{{"+r[o]+"}}","g"),t[r[o]]);return i},getBestTrans:function(e){var t=Me.getLocale();return t in e?e[t]:Me.getShortLocale(t)in e?e[Me.getShortLocale(t)]:"en"in e?e.en:null},getLocale:function(){var e=Te||window.navigator.userLanguage||window.navigator.language,t=Me.getShortLocale(e);return"in"===t&&(e="id"),"iw"===t&&(e="he"),"nb"===t&&(e="no"),"ji"===t&&(e="yi"),"zh-CN"===e&&(e="zh"),"jv"===t&&(e="jw"),Pe[e]?e:Pe[t]?t:"en"},setLocale:function(e){Te=e},getShortLocale:function(e){return e.indexOf("-")>=0?e.substring(0,e.indexOf("-")):e},isShortLocale:function(e){return 2===e.length||3===e.length},addTable:function(e,t){if(t||(t=Object.create(null)),Be[e]){var n=Be[e];for(var i in t)n[i]=t[i]}else Be[e]=t;return Be[e]},getTable:function(e){return Be[e]},addTables:function(e){for(var t in e)Me.addTable(t,e[t]);return Be},getTables:function(){return Be}};function Ae(e,t){this._period=e,this._interval=t,this._date=[],this._data=[],this._prevTimestamp=0,this._meanPeriod=0,this._meanCounter=0}Ae.prototype.getMeanPeriod=function(){return this._meanPeriod},Ae.prototype.getData=function(){return this._cleanStaleData(),this._data},Ae.prototype.getSize=function(){return this._cleanStaleData(),this._data.length},Ae.prototype.getCapacity=function(){return 0===this._period?this._interval:Math.ceil(this._interval/this._period)},Ae.prototype.push=function(e,t){this._cleanStaleData();var n=0===this._date.length;if(e-(this._date[this._date.length-1]||0)>=this._period&&(this._date.push(e),this._data.push(t)),!n){var i=e-this._prevTimestamp;this._meanPeriod=(this._meanPeriod*this._meanCounter+i)/(this._meanCounter+1),this._meanCounter++}this._prevTimestamp=e},Ae.prototype._cleanStaleData=function(){for(var e=Date.now(),t=this._date.length-1;t>=0;t--){if(e-this._date[t]>=this._interval){this._date.splice(0,t+1),this._data.splice(0,t+1);break}}};var je={touchstart:"ts",touchend:"te",touchmove:"tm",touchcancel:"tc"},$e={mousedown:"md",mouseup:"mu",mousemove:"mm"},Le={keydown:"kd",keyup:"ku"},Re={devicemotion:"dm"},De=function(e,t){var n=$e[e],i=null;return function(e){i=function(e){return[e.windowX,e.windowY,Date.now()]}(e),t(n,i)}},Ne=function(e,t){var n=je[e],i=null;return function(e){i=function(e){var t=[];try{var n,i;if(e.touches&&e.touches.length>=1?n=e.touches:e.changedTouches&&e.changedTouches.length>=1&&(n=e.changedTouches),n){for(var r=0;r-1&&!o;)(o=i[r][1]===n.id)&&(t=i[r][0])}catch(a){t=""}return t}function Ze(e,t){var n=e instanceof HTMLIFrameElement;try{n?e.parentNode&&e.contentWindow.postMessage(JSON.stringify(t),"*"):e.postMessage(JSON.stringify(t),"*")}catch(ln){ue(ln.message,"error","messaging")}}function et(e,t){this.target=e,this.id=t,this.messages=[],this.incoming=[],this.waiting=[]}function tt(e,t){var n=this,i={},r=new Promise((function(e,t){i.resolve=e,i.reject=t})),o={source:"hcaptcha",label:e,id:n.id,promise:null,lookup:t};return r.then((function(e){o.promise="resolve",null!==e&&(o.contents=e),Ze(n.target,o)}))["catch"]((function(e){o.promise="reject",null!==e&&(o.error=e),Ze(n.target,o)})),i}et.prototype.setID=function(e){this.id=e},et.prototype.contact=function(e,t){if(!this.id)throw new Error("Chat requires unique id to communicate between windows");var n=this,i=Date.now().toString(36),r={source:"hcaptcha",label:e,id:this.id,promise:"create",lookup:i};if(t){if("object"!=typeof t)throw new Error("Message must be an object.");r.contents=t}return new Promise((function(t,o){n.waiting.push({label:e,reject:o,resolve:t,lookup:i}),Ze(n.target,r)}))},et.prototype.listen=function(e,t){if(!this.id)throw new Error("Chat requires unique id to communicate between windows");for(var n=this.messages.length,i=!1;--n>-1&&!1===i;)this.messages[n].label===e&&(i=this.messages[n]);!1===i&&(i={label:e,listeners:[]},this.messages.push(i)),i.listeners.push(t)},et.prototype.answer=function(e,t){if(!this.id)throw new Error("Chat requires unique id to communicate between windows");for(var n=this.incoming.length,i=!1;--n>-1&&!1===i;)this.incoming[n].label===e&&(i=this.incoming[n]);!1===i&&(i={label:e,listeners:[]},this.incoming.push(i)),i.listeners.push(t)},et.prototype.send=function(e,t){if(!this.id)throw new Error("Chat requires unique id to communicate between windows");var n={source:"hcaptcha",label:e,id:this.id};if(t){if("object"!=typeof t)throw new Error("Message must be an object.");n.contents=t}Ze(this.target,n)},et.prototype.check=function(e,t){for(var n=[].concat.apply([],[this.messages,this.incoming,this.waiting]),i=[],r=-1;++r-1&&!1===h;)this.waiting[s].label===t.label&&this.waiting[s].lookup===t.lookup&&(h=!0,this.waiting.splice(s,1));continue}for(r=0;r-1&&!1===t;)e.id===nt.chats[n].id&&e.target===nt.chats[n].target&&(t=nt.chats[n],nt.chats.splice(n,1));return t},handle:function(e){var t=e.data;if("string"==typeof t)try{if(!(t.indexOf("hcaptcha")>=0))return;t=JSON.parse(t);for(var n,i=nt.chats,r=-1;++r=0&&(n=t[i]);return n}catch(dn){return""}},hasCookie:function(e){return!!it.getCookie(e)},supportsAPI:function(){try{return"hasStorageAccess"in document&&"requestStorageAccess"in document}catch(dn){return!1}},hasAccess:function(){return new Promise((function(e){document.hasStorageAccess().then((function(){e(!0)}))["catch"]((function(){e(!1)}))}))},requestAccess:function(){try{return document.requestStorageAccess()}catch(dn){return Promise.resolve()}}};function rt(){try{return Object.keys(window).sort().join(",")}catch(dn){return null}}function ot(e,t){for(var n in t){var i=t[n];switch(typeof i){case"string":e[n]=i;break;case"object":e[n]=e[n]||{},ot(e[n],i);break;default:throw new Error("Source theme contains invalid data types. Only string and object types are supported.")}}}function at(e,t){try{return e in t}catch(n){return!1}}function st(e){return!!e&&"object"==typeof e}function ht(e){return st(e)?ct({},e):e}function ct(e,t){var n,i={},r=Object.keys(e);for(n=0;n=0&&wt.use(n.theme),this._state={escaped:!1,passed:!1,expiredChallenge:!1,expiredResponse:!1},this._origData=null,this._promise=null,this._responseTimer=null,this.challenge=new _t(t,n),this.checkbox=new xt(e,t,n),this.initChallenge=this.initChallenge.bind(this),this.closeChallenge=this.closeChallenge.bind(this),this.displayChallenge=this.displayChallenge.bind(this),this.getGetCaptchaManifest=this.getGetCaptchaManifest.bind(this)}function kt(){Oe(this,Ee,"canvas");var e=this;this.element=this.dom,this.ctx=this.element.getContext("2d"),this.scale=1,this.dpr=window.devicePixelRatio||1,this.clearColor="#fff",this.ctx.roundedRect=function(t,n,i,r,o){var a=i>0?o:-o,s=r>0?o:-o;e.ctx.beginPath(),e.ctx.moveTo(t+a,n),e.ctx.lineTo(t+i-a,n),e.ctx.quadraticCurveTo(t+i,n,t+i,n+s),e.ctx.lineTo(t+i,n+r-s),e.ctx.quadraticCurveTo(t+i,n+r,t+i-a,n+r),e.ctx.lineTo(t+a,n+r),e.ctx.quadraticCurveTo(t,n+r,t,n+r-s),e.ctx.lineTo(t,n+s),e.ctx.quadraticCurveTo(t,n,t+a,n),e.ctx.closePath()}}function Et(e){e=e||{},this.x=e.x||0,this.y=e.y||0,this.rotate=this.rotate.bind(this),this.getDistance=this.getDistance.bind(this),this.radius=0,this.tolerance=0,this.fill=!1,this.stroke=!1,this.fillColor="#fff",this.strokeColor="#fff",this.strokeWidth=1}function Ot(e,t,n){Oe(this,Et,e),this.handleIn=new Et(t),this.handleOut=new Et(n),this.prev=null,this.next=null,this.index=0}function St(e){if(null===e)return"";var t=[];return It(e,t),t.join("&")}function It(e,t){var n,i;if("object"==typeof e)for(i in e)!0===Pt(n=e[i])?It(n,t):t[t.length]=Bt(i,n);else if(!0===Array.isArray(e))for(var r=0;rn.clientHeight,c=a?(r-this.width)/2:e.bounding.left+e.tick.right+10;(c+this.width+t>r||c<0)&&(c=(r-this.width)/2,a=!0);var l=(n.scrollHeight=i+o&&(d=i+o-(this.height+t)),d=Math.max(Math.min(d,l),10);var u=e.bounding.top+e.tick.y+i-d-10,p=this.height-10-30;return u=Math.max(Math.min(u,p),t),this.$container.css({left:c,top:d}),this.$arrow.fg.css({display:a?"none":"block"}),this.$arrow.bg.css({display:a?"none":"block"}),this.$arrow.css({top:u}),this.top=d,this.$container.dom.getBoundingClientRect(),h}},_t.prototype.destroy=function(){this._visible&&this.close.call(this),this._hasCustomContainer?this._parent.removeChild(this.$iframe.dom):(this._parent.removeChild(this.$container.dom),this.$container=this.$container.__destroy()),this.$iframe=this.$iframe.__destroy(),nt.removeChat(this.chat),this.chat=this.chat.destroy()},_t.prototype.setReady=function(e){if(this.ready=e,this.ready)for(var t,n=this.listeners.length;--n>-1;)t=this.listeners[n],this.listeners.splice(n,1),t()},_t.prototype.onReady=function(e){var t=Array.prototype.slice.call(arguments,1),n=function(){e.apply(null,t)};this.ready?n():this.listeners.push(n)},_t.prototype.onOverlayClick=function(e){this._hasCustomContainer||this.$overlay.addEventListener("click",e)},_t.prototype.setConfig=function(e){return this.chat?this.chat.contact("challenge-update",e):Promise.resolve()},_t.prototype.setData=function(e){this.chat&&this.chat.send("challenge-data",e)},xt.prototype.setResponse=function(e){this.response=e,this.$iframe.dom.setAttribute("data-hcaptcha-response",e),"off"!==he.recaptchacompat&&(this.$textArea0.dom.value=e),this.$textArea1.dom.value=e},xt.prototype.style=function(){switch(this.config.size){case"compact":this.$iframe.css({width:164,height:144});break;case"invisible":this.$iframe.css({display:"none"});break;default:this.$iframe.css({width:303,height:78,overflow:"hidden"})}},xt.prototype.reset=function(){this._ticked=!1,this.chat&&this.chat.send("checkbox-reset")},xt.prototype.clearLoading=function(){this.chat&&this.chat.send("checkbox-clear")},xt.prototype.sendTranslation=function(e){var t={locale:e,table:Me.getTable(e)||{}};this.chat&&this.chat.send("checkbox-translate",t)},xt.prototype.status=function(e,t){this.chat&&this.chat.send("checkbox-status",{text:e||null,a11yOnly:t||!1})},xt.prototype.tick=function(){this._ticked=!0,this.chat&&this.chat.send("checkbox-tick")},xt.prototype.getTickLocation=function(){return this.chat.contact("checkbox-location")},xt.prototype.getOffset=function(){var e=this.$iframe.dom;e.offsetParent||(e=e.parentElement);for(var t=0,n=0;e;)t+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{top:n,left:t}},xt.prototype.getBounding=function(){return this.$iframe.dom.getBoundingClientRect()},xt.prototype.destroy=function(){this._ticked&&this.reset(),this.$container.removeElement(this.$iframe),this.$container.removeElement(this.$textArea1),"off"!==he.recaptchacompat&&(this.$container.removeElement(this.$textArea0),this.$textArea0=this.$textArea0.__destroy()),this.$textArea1=this.$textArea1.__destroy(),this.$container=this.$container.__destroy(),this.$iframe=this.$iframe.__destroy(),nt.removeChat(this.chat),this.chat=this.chat.destroy()},Ct.prototype._resetTimer=function(){null!==this._responseTimer&&(clearTimeout(this._responseTimer),this._responseTimer=null)},Ct.prototype.initChallenge=function(e){e||(e={}),this._origData=e;var t=this.getGetCaptchaManifest(),n=e.charity||null,i=e.a11yChallenge||!1,r=e.link||null,o=e.action||"",a=e.rqdata||null,s=ae.Browser.width(),h=ae.Browser.height();this._active=!0,this._resetTimer(),this._resetState(),this.checkbox.setResponse(""),this.challenge.setup({a11yChallenge:i,manifest:t,width:s,height:h,charity:n,link:r,action:o,rqdata:a,wdata:rt()})},Ct.prototype.getGetCaptchaManifest=function(){var e=(this._origData||{}).manifest||null;return e||((e=Object.create(null)).st=Date.now()),e.v=1,e.topLevel=Ue.getData(),e.session=Y.getSession(),e.widgetList=Y.getCaptchaIdList(),e.widgetId=this.id,e.href=window.location.href,e.prev=JSON.parse(JSON.stringify(this._state)),e},Ct.prototype.displayChallenge=function(e){if(this._active){var t=this;this.visible=!0;var n=this.checkbox,i=this.challenge,r=ae.Browser.height();if(!("ie"===ae.Browser.type&&8===ae.Browser.version)){var o=window.getComputedStyle(document.body).getPropertyValue("overflow-y");this.overflow.override="hidden"===o,this.overflow.override&&(this.overflow.cssUsed=""===document.body.style.overflow&&""===document.body.style.overflowY,this.overflow.cssUsed||(this.overflow.value=""===o?"auto":o),this.overflow.scroll=ae.Browser.scrollY(),document.body.style.overflowY="auto")}return new Promise((function(o){n.status(),n.getTickLocation().then((function(a){if(t._active){if(i.size(e.width,e.height,e.mobile),i.show(),n.clearLoading(),n.location.bounding=n.getBounding(),n.location.tick=a,n.location.offset=n.getOffset(),i.position(n.location))(window.document.scrollingElement||document.getElementsByTagName("html")[0]).scrollTop=Math.abs(i.height-r)+i.top;o()}}))})).then((function(){t.onOpen&&me(t.onOpen)}))}},Ct.prototype.resize=function(e,t,n){var i=this,r=this.checkbox,o=this.challenge;o.getDimensions(e,t).then((function(e){e&&o.size(e.width,e.height,e.mobile),r.location.bounding=r.getBounding(),r.location.offset=r.getOffset(),ae.System.mobile&&!n||o.position(r.location)}))["catch"]((function(e){i.closeChallenge.call(i,{event:R,message:"Captcha resize caused error.",error:e})}))},Ct.prototype.position=function(){var e=this.checkbox,t=this.challenge;ae.System.mobile||(e.location.bounding=e.getBounding(),t.position(e.location))},Ct.prototype.reset=function(){this.checkbox.reset(),this.checkbox.setResponse(""),this._resetTimer(),this._resetState()},Ct.prototype._resetState=function(){for(var e in this._state)this._state[e]=!1},Ct.prototype.closeChallenge=function(e){this.visible=!1,this._active=!1;var t=this,n=this.checkbox,i=this.challenge;this.overflow.override&&((window.document.scrollingElement||document.getElementsByTagName("html")[0]).scrollTop=this.overflow.scroll,this.overflow.override=!1,this.overflow.scroll=0,document.body.style.overflowY=this.overflow.cssUsed?null:this.overflow.value);var r=e.response||"";switch(n.setResponse(r),i.close(e.event),n.$iframe.dom.focus(),e.event){case B:this._state.escaped=!0,n.reset(),t.onClose&&me(t.onClose),t._promise&&t._promise.reject(T);break;case M:this._state.expiredChallenge=!0,n.reset(),n.status("hCaptcha window closed due to timeout.",!0),t.onChalExpire&&me(t.onChalExpire),t._promise&&t._promise.reject(M);break;case R:case j:case $:var o=e.event;n.reset(),e.event===$?(n.status(e.message),429===e.status?o=L:"invalid-data"===e.message&&(o=A)):e.event===j?o=R:e.event===R&&"Answers are incomplete"===e.message&&(o=D),this.onError&&me(this.onError,o),t._promise&&t._promise.reject(o);break;case P:this._state.passed=!0,n.tick(),this.onPass&&me(this.onPass,r),t._promise&&t._promise.resolve({response:r,key:Ke(this.id)}),"number"==typeof e.expiration&&(t._resetTimer(),t._responseTimer=setTimeout((function(){try{n.reset(),n.setResponse(""),n.status("hCaptcha security token has expired. Please complete the challenge again.",!0)}catch(dn){ue("Checkbox not present or could not destroy on expiration: "+dn.message,"error","global")}t.onExpire&&me(t.onExpire),t._responseTimer=null,t._state.expiredResponse=!0}),1e3*e.expiration))}t._promise=null},Ct.prototype.updateTranslation=function(e){this.checkbox.sendTranslation(e),this.challenge.sendTranslation(e)},Ct.prototype.isReady=function(){return this._ready},Ct.prototype.setReady=function(e){if(this._ready=e,this._ready)for(var t,n=this._listeners.length;--n>-1;)t=this._listeners[n],this._listeners.splice(n,1),t()},Ct.prototype.setPromise=function(e){this._promise=e},Ct.prototype.onReady=function(e){var t=Array.prototype.slice.call(arguments,1),n=function(){e.apply(null,t)};this._ready?n():this._listeners.push(n)},Ct.prototype.destroy=function(){(this._resetTimer(),this.overflow.override)&&((window.document.scrollingElement||document.getElementsByTagName("html")[0]).scrollTop=this.overflow.scroll,this.overflow.override=!1,this.overflow.scroll=0,document.body.style.overflowY=this.overflow.cssUsed?null:this.overflow.value);this.challenge.destroy(),this.checkbox.destroy(),this.challenge=null,this.checkbox=null},Ct.prototype.setSiteConfig=function(e){var t=e&&e.features&&e.features.custom_theme;if(this.config.themeConfig&&t){var n="custom-"+this.id;wt.add(n,wt.extend(wt.active(),this.config.themeConfig)),wt.use(n),this.challenge.style()}return this.challenge.setConfig({siteConfig:e,wdata:rt()})},Se(kt,Ee),kt.prototype.dimensions=function(e,t){this.css({width:e,height:t}),this.element.width=Math.round(e/this.scale)*this.dpr,this.element.height=Math.round(t/this.scale)*this.dpr,this.ctx.scale(this.dpr,this.dpr),this.width=Math.round(e/this.scale),this.height=Math.round(t/this.scale)},kt.prototype.clear=function(){this.ctx&&this.ctx.clearRect(0,0,this.element.width,this.element.height)},kt.prototype.draw=function(){this.ctx&&(this.ctx.fillStyle=this.clearColor,this.ctx.fillRect(0,0,this.element.width,this.element.height))},kt.prototype._destroy=function(){this.__destroy(),this.element=null,this.ctx=null,this.width=null,this.height=null},Et.prototype.rotate=function(e,t){var n=function(e){return e*(Math.PI/180)}(t),i=Math.sin(n),r=Math.cos(n),o=this.x-e.x,a=this.y-e.y;this.x=o*r-a*i+e.x,this.y=o*i+a*r+e.y},Et.prototype.getDistance=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},Et.prototype.getAngle=function(e){var t=e.x-this.x,n=e.y-this.y,i=180*Math.atan2(n,t)/Math.PI;return i<0&&(i+=360),i},Et.prototype.hitTest=function(e){return this.radius+this.tolerance>=this.getDistance(e)},Et.prototype.restrict=function(e,t,n,i){if("x"!==e&&"y"!==e)throw new Error("Point.restrict requires a value: x or y");return t+this[e]i&&(t=i-this[e]),this[e]+t},Et.prototype.draw=function(e){e.ctx.beginPath(),e.ctx.arc(this.x,this.y,this.radius/e.scale,0,2*Math.PI,!1),this.fill&&(e.ctx.fillStyle=this.fillColor,e.ctx.fill()),this.stroke&&(e.ctx.strokeStyle=this.strokeColor,e.ctx.lineWidth=this.strokeWidth/e.scale,e.ctx.stroke())},Se(Ot,Et),Ot.prototype.set=function(e,t,n){this.x=e.x||this.x,this.y=e.y||this.y,t===undefined?(this.handleIn.x=this.x,this.handleIn.y=this.y):(this.handleIn.x=t.x,this.handleIn.y=t.y),n===undefined?(this.handleOut.x=this.x,this.handleOut.y=this.y):(this.handleOut.x=n.x,this.handleOut.y=n.y)},Ot.prototype.clone=function(){var e={x:this.x,y:this.y},t={x:this.handleIn.x,y:this.handleIn.y},n={x:this.handleOut.x,y:this.handleOut.y},i=new Ot;return t.x===n.x&&t.y===n.y?i.set(e):i.set(e,t,n),i.index=this.index,i.prev=this.prev,i.next=this.next,i.radius=this.radius,i.tolerance=this.tolerance,i.fill=this.fill,i.stroke=this.stroke,i.fillColor=this.fillColor,i.strokeColor=this.strokeColor,i.strokeWidth=this.strokeWidth,i},Ot.prototype.move=function(e,t){this.x+=e,this.y+=t,this.handleIn.x+=e,this.handleIn.y+=t,this.handleOut.x+=e,this.handleOut.y+=t},Ot.prototype.render=function(e){this.handleIn.x!==this.x&&this.handleIn.y!==this.y&&this.handleIn.draw(e),this.handleOut.x!==this.x&&this.handleOut.y!==this.y&&this.handleOut.draw(e),this.draw(e)};var Tt={400:"Rate limited or network error. Please retry.",429:"Your computer or network has sent too many requests.",500:"Cannot contact hCaptcha. Check your connection and try again."},Mt=function(e){try{return Me.translate(Tt[e])}catch(dn){return!1}},At="undefined"!=typeof XDomainRequest&&!("withCredentials"in XMLHttpRequest.prototype);function jt(e,t,n){n=n||{};var i={url:t,method:e.toUpperCase(),responseType:n.responseType||"string",dataType:n.dataType||null,withCredentials:n.withCredentials||!1,headers:n.headers||null,data:n.data||null,timeout:n.timeout||null};return i.legacy=i.withCredentials&&At,i.data&&("json"===i.dataType&&"object"==typeof i.data&&(i.data=JSON.stringify(i.data)),"query"===i.dataType&&(i.data=St(i.data))),n.retry?ye((function(){return $t(i)}),n.retry):$t(i)}function $t(e){var t=e.legacy?new XDomainRequest:new XMLHttpRequest,n="function"==typeof e.url?e.url():e.url;return new Promise((function(i,r){var o,a=function(o){return function(){var a=t.response||t.responseText,s=t.statusText||"",h=t.status,c=t.readyState;if(4===c||e.legacy){if("json"===e.responseType&&a)try{a=JSON.parse(a)}catch(l){}if("error"===o||h>=400&&h<=511)return void r({event:$,endpoint:n,response:a,state:c,status:h,message:Mt(h||400)||s});i({state:c,status:h,body:a,message:s})}}};if((t.onload=a("complete"),t.onerror=t.ontimeout=a("error"),t.open(e.method,n),e.timeout&&(t.timeout=e.timeout),!e.legacy)&&(t.withCredentials=e.withCredentials,e.headers))for(var s in e.headers)o=e.headers[s],t.setRequestHeader(s,o);setTimeout((function(){t.send(e.data)}),0)}))}var Lt=function(e,t){if("object"==typeof e&&t===undefined&&(e=(t=e).url),null===e)throw new Error("Url missing");return jt("GET",e,t)},Rt=function(e){return e.toLowerCase().match(/\.(?:jpg|gif|png|jpeg|svg)$/g)?"image":e.toLowerCase().match(/\.(?:js)$/g)?"script":"file"},Dt=function(e){if(he.assethost&&e.indexOf(se.assetDomain)>=0)return he.assethost+e.replace(se.assetDomain,"");if(he.imghost&&e.indexOf("imgs")>=0){var t=e.indexOf(".ai")>=0?e.indexOf(".ai")+3:e.indexOf(".com")+4;return he.imghost+e.substr(t,e.length)}return e},Nt=["svg","gif","png"];function zt(e,t){t=t||{};var n,i=e;if(0===i.indexOf("data:image"))for(var r=!1,o=Nt.length,a=-1;a++=0)&&(n=Nt[a]);else n=i.substr(i.lastIndexOf(".")+1,i.length);!!(!document.createElementNS||!document.createElementNS("https://www.w3.org/2000/svg","svg").createSVGRect)&&t.fallback&&(t.fallback.indexOf(".")>=0?n=(i=t.fallback).substr(i.lastIndexOf(".")+1,i.length):(i=e.substr(0,e.indexOf(n))+t.fallback,n=t.fallback)),t.prefix&&(i=t.prefix+"/"+i),this.attribs={crossOrigin:t.crossOrigin||null},this.id=i,this.src=Dt(i),this.ext=n,this.width=0,this.height=0,this.aspect=0,this.loaded=!1,this.error=!1,this.element=null,this.cb={load:[],error:[]}}function Wt(e,t,n){for(var i=e[t],r=i.length,o=null;--r>-1;)o=i[r],i.splice(r,1),o(n);"error"===t?e.load=[]:e.error=[]}function Ft(e,t){var n=e;t||(t={}),t.prefix&&(n=t.prefix+"/"+e),this.attribs={defer:t.defer||null,async:t.async||null,crossOrigin:t.crossOrigin||null},this.id=n,this.src=Dt(n),this.loaded=!1,this.error=!1,this.element=null,this.cb={load:[],error:[]}}function Ut(e,t,n){for(var i=e[t],r=i.length,o=null;--r>-1;)o=i[r],i.splice(r,1),o(n);"error"===t?e.load=[]:e.error=[]}function Jt(e,t){var n=e;t||(t={}),t.prefix&&(n=t.prefix+"/"+e),this.id=n,this.src=Dt(n),this.loaded=!1,this.error=!1,this.cb={load:[],error:[]},this.data=null}function Ht(e,t,n){for(var i=e[t],r=i.length,o=null;--r>-1;)o=i[r],i.splice(r,1),o(n);"error"===t?e.load=[]:e.error=[]}zt.prototype.load=function(){return("svg"===this.ext?this._loadSvg():this._loadImg())["catch"]((function(e){throw ue("Asset failed","error","assets",{error:e}),e}))},zt.prototype._loadSvg=function(){var e,t=this,n=this.src,i=this.id;if(0===n.indexOf("data:image/svg+xml")){var r=n.slice("data:image/svg+xml,".length);e=Promise.resolve(decodeURIComponent(r))}else e=Lt(n).then((function(e){return e.body}));return e.then((function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement,i=parseInt(n.getAttribute("width")),r=parseInt(n.getAttribute("height"));return t._imgLoaded(n,i,r),t}))["catch"]((function(e){t.error=!0;var n=(e&&e.message?e.message:"Loading Error")+": "+i;throw Wt(t.cb,"error",n),n}))},zt.prototype._loadImg=function(){var e=this,t=this.attribs,n=this.src,i=this.id;return new Promise((function(r,o){var a=new Image;t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onerror=function(t){e.error=!0,a.onload=a.onerror=null;var n=(t&&t.message?t.message:"Loading Error")+": "+i;Wt(e.cb,"error",n),o(n)},a.onload=function(){e.loaded||(e._imgLoaded(a,a.width,a.height),a.onload=a.onerror=null,r(e))},a.src=n,a.complete&&a.onload()}))},zt.prototype._imgLoaded=function(e,t,n){this.element=new Ee(e),this.width=t,this.height=n,this.aspect=t/n,this.loaded=!0,Wt(this.cb,"load",this)},zt.prototype.onload=function(e){this.error||(this.loaded?e(this):this.cb.load.push(e))},zt.prototype.onerror=function(e){this.loaded&&!this.error||(this.error?e(this):this.cb.error.push(e))},Ft.prototype.load=function(){var e=this,t=this.attribs,n=this.src,i=this.id;return new Promise((function(r,o){var a=document.createElement("script");e.element=a,a.onerror=function(t){e.error=!0,a.onload=a.onreadystatechange=a.onerror=null;var n=(t.message||"Loading Error")+": "+i;Ut(e.cb,"error",n),o(n)},a.onload=a.onreadystatechange=function(){this.loaded||a.readyState&&"loaded"!==a.readyState&&"complete"!==a.readyState||(e.loaded=!0,a.onload=a.onreadystatechange=a.onerror=null,document.body.removeChild(a),Ut(e.cb,"load",e),r(e))},a.type="text/javascript",a.src=n,t.crossOrigin&&(a.crossorigin=t.crossOrigin),t.async&&(a.async=!0),t.defer&&(a.defer=!0),document.body.appendChild(a),a.complete&&a.onload()}))},Ft.prototype.onload=function(e){this.error||(this.loaded?e(this):this.cb.load.push(e))},Ft.prototype.onerror=function(e){this.loaded&&!this.error||(this.error?e(this):this.cb.error.push(e))},Jt.prototype.load=function(){var e=this,t=this.src,n=this.id;return new Promise((function(i,r){var o={};t.indexOf("json")>=0&&(o.responseType="json"),Lt(t,o).then((function(t){e.loaded=!0,e.data=t.body,Ht(e.cb,"load",e),i(e)}))["catch"]((function(t){e.error=!0;var i=(t&&t.message?t.message:"Loading Error")+": "+n;Ht(e.cb,"error",i),r(i)}))}))},Jt.prototype.onload=function(e){this.error||(this.loaded?e(this):this.cb.load.push(e))},Jt.prototype.onerror=function(e){this.loaded&&!this.error||(this.error?e(this):this.cb.error.push(e))};var qt=[],Xt={add:function(e,t){var n=Rt(e);return Xt[n]?Xt[n](e,t):Promise.resolve(null)},batch:function(e,t){for(var n=[],i=-1;++i-1&&!r;)r=(o=qt[i]).id===e||-1!==o.id.indexOf("/"===e[0]?"":"/"+e);if(!r)return t(null);o.onload(t),o.onerror(n)}))}};function Yt(e){if("en"===e)return Promise.resolve();var t=e+".json";return new Promise((function(n,i){Xt.retrieve(t).then((function(n){return n||Xt.file(t,{prefix:"https://newassets.hcaptcha.com/captcha/v1/e09e16a/static/i18n"}).then((function(t){return Me.addTable(e,t.data),t}))})).then((function(e){n(e.data)}))["catch"]((function(e){i(e)}))}))}var Gt=0,Vt=["hl","custom","tplinks","sitekey","theme","size","tabindex","challenge-container"];var Qt={render:function(e,t){if("string"==typeof e&&(e=document.getElementById(e)),e&&1===e.nodeType)if(function(e){if(!e||!("challenge-container"in e))return!0;var t=e["challenge-container"];return"string"==typeof t&&(t=document.getElementById(t)),!!t&&1===t.nodeType}(t)){if(!1!==nt.isSupported()){for(var n,i,r=e.getElementsByTagName("iframe"),o=-1;++oupgrade your browser or enable it for hCaptcha.com")}else console.log("[hCaptcha] render: invalid challenge container '"+t["challenge-container"]+"'.");else console.log("[hCaptcha] render: invalid container '"+e+"'.");function v(e,t){var n=e.locale;function i(e){if(e)try{e.updateTranslation(n)}catch(ln){ue("Failed to update text translation: "+JSON.stringify(ln),"error","translation")}}n&&Yt(n).then((function(){t?i(g):Y.each(i)}))["catch"]((function(e){ue("Language failed to load: "+n,"error","api")}))}},reset:function(e){var t;if(e){if(!(t=Y.getById(e)))throw new U(e);t.reset()}else{if(!(t=Y.getByIndex(0)))throw new J;t.reset()}},remove:function(e){var t=e?Y.getById(e):Y.getByIndex(0);if(!t)throw e?new U(e):new J;Y.remove(t),t.destroy(),t=null},execute:Qe,getResponse:function(e){var t,n;if((n=e?Y.getById(e):Y.getByIndex(0))&&(t=n.checkbox.response||""),void 0!==t)return t;throw e?new U(e):new J},getRespKey:Ke,close:function(e){var t=!1;if(!(t=e?Y.getById(e):Y.getByIndex(0)))throw e?new U(e):new J;t.closeChallenge({event:B})},setData:function(e,t){if("object"!=typeof e||t||(t=e,e=null),!t||"object"!=typeof t)throw Error("[hCaptcha] invalid data supplied");var n=!1;if(!(n=e?Y.getById(e):Y.getByIndex(0)))throw e?new U(e):new J;var i=n.challenge.setData.bind(n.challenge);n.onReady(i,t)},nodes:Y};se.file="hcaptcha";var Kt=document.currentScript,Zt=!1,en=!1,tn="on",nn=ae.Browser.width()/ae.Browser.height(),rn=window.hcaptcha||!1;function on(){var e=ae.Browser.width(),t=ae.Browser.height(),n=ae.System.mobile&&nn!==e/t;nn=e/t,hn(),Qt.nodes.each((function(i){i.visible&&i.resize(e,t,n)}))}function an(e){e.preventDefault&&e.preventDefault(),sn(),Qt.nodes.each((function(e){e.visible&&e.position()}))}function sn(){Ue.circBuffPush("xy",[ae.Browser.scrollX(),ae.Browser.scrollY(),document.documentElement.clientWidth/ae.Browser.width(),Date.now()])}function hn(){Ue.circBuffPush("wn",[ae.Browser.width(),ae.Browser.height(),ae.System.dpr(),Date.now()])}!function(e){var t=Array.prototype.slice.call(arguments,1);!0!==qe&&"interactive"!==document.readyState&&"loaded"!==document.readyState&&"complete"!==document.readyState?(Je.push({fn:e,args:t}),!1===He&&Xe()):setTimeout((function(){e(t)}),1)}((function(){rn||(!function(){var e;e=Kt?[Kt]:document.getElementsByTagName("script");var t=-1,n=!1,i=null,r=null;for(;++t=0?e.split("&"):[e]:[],a=0;a=0){if(t=o[a].split("="),n=decodeURIComponent(t[0]),"false"!==(i=decodeURIComponent(t[1]))&&"true"!==i||(i="true"===i),"theme"===n||"themeConfig"===n)try{i=JSON.parse(i)}catch(dn){}r[n]=i}return r}(i[1]);Zt=o.onload||!1,en=o.render||!1,"off"===o.tplinks&&(tn="off");he.tplinks=tn,he.language=o.hl||null,o.endpoint&&(he.endpointOverride=o.endpoint);he.reportapi=o.reportapi||he.reportapi,he.imghost=o.imghost||null,he.custom=o.custom||he.custom,he.se=o.se||null,he.assethost=o.assethost||null,he.assethost&&!ge.URL(he.assethost)&&(he.assethost=null,console.error("Invalid assethost uri."));he.recaptchacompat=o.recaptchacompat||he.recaptchacompat,se.host=o.host||window.location.hostname,he.language=he.language||window.navigator.userLanguage||window.navigator.language,Me.setLocale(he.language),a=o.sentry===undefined||o.sentry,void(le=a),"off"===he.recaptchacompat?console.log("recaptchacompat disabled"):window.grecaptcha=cn;var a}(),function(){var e=Me.getLocale();if(e.indexOf("en")>=0)return;Yt(e).then((function(){Qt.nodes.each((function(t){if(t)try{t.updateTranslation(e)}catch(ln){ue("Failed to update text translation: "+JSON.stringify(ln),"error","translation")}}))}))["catch"]((function(){ue("Language failed to load: "+e,"error","api")}))}(),!1===en||"onload"===en?function(e){for(var t=document.getElementsByClassName("h-captcha"),n=[],i=0;i= 0.001: return + c2 = Comment(author_id=ZOZBOT_ID, + parent_submission=parent_submission, + parent_comment_id=c.id, + level=level+1, + is_bot=True, + body="zoz", + body_html="

zoz

", + top_comment_id=c.top_comment_id, + ghost=c.ghost, + distinguish_level=6 + ) + + g.db.add(c2) + g.db.flush() + n = Notification(comment_id=c2.id, user_id=v.id) + g.db.add(n) + + c3 = Comment(author_id=ZOZBOT_ID, + parent_submission=parent_submission, + parent_comment_id=c2.id, + level=level+2, + is_bot=True, + body="zle", + body_html="

zle

", + top_comment_id=c.top_comment_id, + ghost=c.ghost, + distinguish_level=6 + ) + + g.db.add(c3) + g.db.flush() + + + c4 = Comment(author_id=ZOZBOT_ID, + parent_submission=parent_submission, + parent_comment_id=c3.id, + level=level+3, + is_bot=True, + body="zozzle", + body_html="

zozzle

", + top_comment_id=c.top_comment_id, + ghost=c.ghost, + distinguish_level=6 + ) + + g.db.add(c4) + + zozbot = get_account(ZOZBOT_ID) + zozbot.comment_count += 3 + zozbot.coins += 3 + g.db.add(zozbot) + +def execute_longpostbot(c, level, body, body_html, parent_submission, v): + if not len(c.body.split()) >= 200: return + if "" in body_html: return + body = random.choice(LONGPOST_REPLIES) + if body.startswith('▼'): + body = body[1:] + vote = CommentVote(user_id=LONGPOSTBOT_ID, + vote_type=-1, + comment_id=c.id, + real = True + ) + g.db.add(vote) + c.downvotes = 1 + + c2 = Comment(author_id=LONGPOSTBOT_ID, + parent_submission=parent_submission, + parent_comment_id=c.id, + level=level+1, + is_bot=True, + body=body, + body_html=f"

{body}

", + top_comment_id=c.top_comment_id, + ghost=c.ghost + ) + + g.db.add(c2) + + longpostbot = get_account(LONGPOSTBOT_ID) + longpostbot.comment_count += 1 + longpostbot.coins += 1 + g.db.add(longpostbot) + g.db.flush() + n = Notification(comment_id=c2.id, user_id=v.id) + g.db.add(n) + +def execute_basedbot(c, level, body, parent_submission, parent_post, v): + pill = based_regex.match(body) + if level == 1: basedguy = get_account(parent_post.author_id) + else: basedguy = get_account(c.parent_comment.author_id) + basedguy.basedcount += 1 + if pill: + if basedguy.pills: basedguy.pills += f", {pill.group(1)}" + else: basedguy.pills += f"{pill.group(1)}" + g.db.add(basedguy) + + body2 = f"@{basedguy.username}'s Based Count has increased by 1. Their Based Count is now {basedguy.basedcount}." + if basedguy.pills: body2 += f"\n\nPills: {basedguy.pills}" + + body_based_html = sanitize(body2) + c_based = Comment(author_id=BASEDBOT_ID, + parent_submission=parent_submission, + distinguish_level=6, + parent_comment_id=c.id, + level=level+1, + is_bot=True, + body_html=body_based_html, + top_comment_id=c.top_comment_id, + ghost=c.ghost + ) + + g.db.add(c_based) + g.db.flush() + + n = Notification(comment_id=c_based.id, user_id=v.id) + g.db.add(n) diff --git a/files/helpers/const.py b/files/helpers/const.py index 24735dc68..a6f999e07 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -265,6 +265,10 @@ POST_TITLE_LENGTH_LIMIT = 500 # do not make larger than 500 without altering the POST_TITLE_HTML_LENGTH_LIMIT = 1500 # do not make larger than 1500 without altering the table POST_BODY_LENGTH_LIMIT = 20000 # do not make larger than 20000 without altering the table POST_BODY_HTML_LENGTH_LIMIT = 40000 # do not make larger than 40000 without altering the table +COMMENT_BODY_LENGTH_LIMIT = 10000 # do not make larger than 10000 characters without altering the table +COMMENT_BODY_HTML_LENGTH_LIMIT = 20000 # do not make larger than 20000 characters without altering the table +COMMENT_MAX_DEPTH = 200 +TRANSFER_MESSAGE_LENGTH_LIMIT = 200 # do not make larger than 10000 characters (comment limit) without altering the table LOGGEDIN_ACTIVE_TIME = 15 * 60 PFP_DEFAULT_MARSEY = True diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 5d2867b6d..4ba05b248 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -195,11 +195,11 @@ def sanitize_raw_title(sanitized): sanitized = sanitized.strip() return sanitized[:POST_TITLE_LENGTH_LIMIT] -def sanitize_raw_body(sanitized): +def sanitize_raw_body(sanitized, is_post): if not sanitized: return "" sanitized = sanitized.replace('\u200e','').replace('\u200b','').replace("\ufeff", "").replace("\r\n", "\n") sanitized = sanitized.strip() - return sanitized[:POST_BODY_LENGTH_LIMIT] + return sanitized[:POST_BODY_LENGTH_LIMIT if is_post else COMMENT_BODY_LENGTH_LIMIT] @with_sigalrm_timeout(5) diff --git a/files/routes/admin.py b/files/routes/admin.py index f5b9f93ee..977ba1450 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -853,7 +853,9 @@ def agendaposter(user_id, v): user.agendaposter = expiry g.db.add(user) - if days: note = f"for {days} days" + if days: + days_txt = str(days).rstrip('.0') + note = f"for {days_txt} days" else: note = "permanently" ma = ModAction( @@ -1015,8 +1017,9 @@ def ban_user(user_id, v): x.ban(admin=v, reason=reason, days=days) if days: - if reason: text = f"@{v.username} has banned you for **{days}** days for the following reason:\n\n> {reason}" - else: text = f"@{v.username} has banned you for **{days}** days." + days_txt = str(days).rstrip('.0') + if reason: text = f"@{v.username} has banned you for **{days_txt}** days for the following reason:\n\n> {reason}" + else: text = f"@{v.username} has banned you for **{days_txt}** days." else: if reason: text = f"@{v.username} has banned you permanently for the following reason:\n\n> {reason}" else: text = f"@{v.username} has banned you permanently." @@ -1025,7 +1028,7 @@ def ban_user(user_id, v): if days == 0: duration = "permanently" elif days == 1: duration = "for 1 day" - else: duration = f"for {days} days" + else: duration = f"for {days_txt} days" note = f'reason: "{reason}", duration: {duration}' ma=ModAction( diff --git a/files/routes/awards.py b/files/routes/awards.py index b5630ebb1..5d5a154e4 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -209,19 +209,6 @@ def award_thing(v, thing_type, id): elif author.unban_utc: author.unban_utc += 86400 send_repeatable_notification(author.id, f"Your account has been banned for **yet another day** for {link}. Seriously man?") - - if v.admin_level >= PERMS['USER_BAN']: - log_link = f'/{thing_type}/{thing.id}' - reason = f'{log_link}' - - note = f'reason: "{reason}", duration: for 1 day' - ma=ModAction( - kind="ban_user", - user_id=v.id, - target_user_id=author.id, - _note=note - ) - g.db.add(ma) elif kind == "unban": if not author.is_suspended or not author.unban_utc or time.time() > author.unban_utc: abort(403) @@ -233,32 +220,11 @@ def award_thing(v, thing_type, id): author.is_banned = 0 author.ban_reason = None send_repeatable_notification(author.id, "You have been unbanned!") - - if v.admin_level >= PERMS['USER_BAN']: - ma=ModAction( - kind="unban_user", - user_id=v.id, - target_user_id=author.id, - ) - g.db.add(ma) elif kind == "grass": author.is_banned = AUTOJANNY_ID author.ban_reason = f"grass award used by @{v.username} on /{thing_type}/{thing.id}" author.unban_utc = int(time.time()) + 30 * 86400 send_repeatable_notification(author.id, f"Your account has been banned permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass/snow/sand/ass to get unbanned!") - - if v.admin_level >= PERMS['USER_BAN']: - log_link = f'/{thing_type}/{thing.id}' - reason = f'{log_link}' - - note = f'reason: "{reason}", duration: for 30 days' - ma=ModAction( - kind="ban_user", - user_id=v.id, - target_user_id=author.id, - _note=note - ) - g.db.add(ma) elif kind == "pin": if not FEATURES['PINS']: abort(403) @@ -294,15 +260,6 @@ def award_thing(v, thing_type, id): else: author.agendaposter = int(time.time()) + 86400 badge_grant(user=author, badge_id=28) - - if v.admin_level >= PERMS['USER_AGENDAPOSTER']: - ma = ModAction( - kind="agendaposter", - user_id=v.id, - target_user_id=author.id, - _note=f"for 1 day" - ) - g.db.add(ma) elif kind == "flairlock": if thing.ghost: abort(403) new_name = note[:100].replace("𒐪","") diff --git a/files/routes/comments.py b/files/routes/comments.py index 4c9928afa..547a34af8 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -33,12 +33,7 @@ WORDLE_COLOR_MAPPINGS = {-1: "🟥", 0: "🟨", 1: "🟩"} @app.get("/logged_out/h//post///") @auth_desired_with_logingate def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None): - - try: cid = int(cid) - except: abort(404) - comment = get_comment(cid, v=v) - if not comment.can_see(v): abort(403) if comment.author.shadowbanned and not (v and v.shadowbanned) and not (v and v.admin_level >= PERMS['USER_SHADOWBAN']): @@ -60,9 +55,6 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None): elif SITE == 'pcmemes.net': pid = 2487 else: pid = 1 - try: pid = int(pid) - except: abort(404) - post = get_post(pid, v=v) if post.over_18 and not (v and v.over_18) and not session.get('over_18', 0) >= int(time.time()): @@ -163,13 +155,14 @@ def comment(v): level = parent.level + 1 if parent.author_id == v.id: rts = True else: abort(400) - + if not parent.can_see(v): abort(404) if parent.deleted_utc != 0: abort(404) - body = request.values.get("body", "").strip().replace('‎','') + if level > COMMENT_MAX_DEPTH: + return {"error": f"Max comment level is {COMMENT_MAX_DEPTH}"}, 400 - body = body.replace('\r\n', '\n')[:10000] + body = sanitize_raw_body(request.values.get("body", ""), False) if parent_post.id not in ADMIGGERS: if v.longpost and (len(body) < 280 or ' [](' in body or body.startswith('[](')): @@ -239,7 +232,7 @@ def comment(v): else: abort(415) - body = body.strip() + body = body.strip()[:COMMENT_BODY_LENGTH_LIMIT] if v.admin_level >= PERMS['SITE_SETTINGS_SNAPPY_QUOTES'] and parent_post.id == SNAPPY_THREAD and level == 1: with open(f"snappy_{SITE_NAME}.txt", "a", encoding="utf-8") as f: @@ -266,9 +259,9 @@ def comment(v): if existing: return {"error": f"You already made that comment: /comment/{existing.id}"}, 409 if parent.author.any_block_exists(v) and v.admin_level < PERMS['POST_COMMENT_MODERATION']: - return {"error": "You can't reply to users who have blocked you, or users you have blocked."}, 403 + return {"error": "You can't reply to users who have blocked you or users that you have blocked."}, 403 - is_bot = v.id != 12125 and (bool(request.headers.get("Authorization")) or (SITE == 'pcmemes.net' and v.id == SNAPPY_ID)) + is_bot = v.id != BBBB_ID and (bool(request.headers.get("Authorization")) or (SITE == 'pcmemes.net' and v.id == SNAPPY_ID)) if len(body) > 50: now = int(time.time()) @@ -308,10 +301,7 @@ def comment(v): g.db.commit() return {"error": "Too much spam!"}, 403 - if len(body_html) > 20000: abort(400) - - if level > 200: - return {"error": "Max comment level is 200"}, 400 + if len(body_html) > COMMENT_BODY_HTML_LENGTH_LIMIT: abort(400) c = Comment(author_id=v.id, parent_submission=parent_submission, @@ -321,7 +311,7 @@ def comment(v): is_bot=is_bot, app_id=v.client.application.id if v.client else None, body_html=body_html, - body=body[:10000], + body=body, ghost=parent_post.ghost ) @@ -355,37 +345,7 @@ def comment(v): g.db.add(choice) if SITE == 'pcmemes.net' and c.body.lower().startswith("based"): - pill = based_regex.match(body) - - if level == 1: basedguy = get_account(parent_post.author_id) - else: basedguy = get_account(c.parent_comment.author_id) - basedguy.basedcount += 1 - if pill: - if basedguy.pills: basedguy.pills += f", {pill.group(1)}" - else: basedguy.pills += f"{pill.group(1)}" - g.db.add(basedguy) - - body2 = f"@{basedguy.username}'s Based Count has increased by 1. Their Based Count is now {basedguy.basedcount}." - if basedguy.pills: body2 += f"\n\nPills: {basedguy.pills}" - - body_based_html = sanitize(body2) - - c_based = Comment(author_id=BASEDBOT_ID, - parent_submission=parent_submission, - distinguish_level=6, - parent_comment_id=c.id, - level=level+1, - is_bot=True, - body_html=body_based_html, - top_comment_id=c.top_comment_id, - ghost=c.ghost - ) - - g.db.add(c_based) - g.db.flush() - - n = Notification(comment_id=c_based.id, user_id=v.id) - g.db.add(n) + execute_basedbot(c, level, body, parent_submission, parent_post, v) if v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in c.body.lower() and parent_post.sub != 'chudrama': @@ -419,101 +379,9 @@ def comment(v): n = Notification(comment_id=c_jannied.id, user_id=v.id) g.db.add(n) - - if SITE_NAME == 'rDrama' and len(c.body.split()) >= 200 and "<" not in body and "" not in body_html: - - body = random.choice(LONGPOST_REPLIES) - - - if body.startswith('▼'): - body = body[1:] - vote = CommentVote(user_id=LONGPOSTBOT_ID, - vote_type=-1, - comment_id=c.id, - real = True - ) - g.db.add(vote) - c.downvotes = 1 - - - c2 = Comment(author_id=LONGPOSTBOT_ID, - parent_submission=parent_submission, - parent_comment_id=c.id, - level=level+1, - is_bot=True, - body=body, - body_html=f"

{body}

", - top_comment_id=c.top_comment_id, - ghost=c.ghost - ) - - g.db.add(c2) - - longpostbot = get_account(LONGPOSTBOT_ID) - longpostbot.comment_count += 1 - longpostbot.coins += 1 - g.db.add(longpostbot) - - g.db.flush() - - n = Notification(comment_id=c2.id, user_id=v.id) - g.db.add(n) - - - if SITE_NAME == 'rDrama' and random.random() < 0.001: - c2 = Comment(author_id=ZOZBOT_ID, - parent_submission=parent_submission, - parent_comment_id=c.id, - level=level+1, - is_bot=True, - body="zoz", - body_html="

zoz

", - top_comment_id=c.top_comment_id, - ghost=c.ghost, - distinguish_level=6 - ) - - g.db.add(c2) - g.db.flush() - n = Notification(comment_id=c2.id, user_id=v.id) - g.db.add(n) - - - - c3 = Comment(author_id=ZOZBOT_ID, - parent_submission=parent_submission, - parent_comment_id=c2.id, - level=level+2, - is_bot=True, - body="zle", - body_html="

zle

", - top_comment_id=c.top_comment_id, - ghost=c.ghost, - distinguish_level=6 - ) - - g.db.add(c3) - g.db.flush() - - - c4 = Comment(author_id=ZOZBOT_ID, - parent_submission=parent_submission, - parent_comment_id=c3.id, - level=level+3, - is_bot=True, - body="zozzle", - body_html="

zozzle

", - top_comment_id=c.top_comment_id, - ghost=c.ghost, - distinguish_level=6 - ) - - g.db.add(c4) - - zozbot = get_account(ZOZBOT_ID) - zozbot.comment_count += 3 - zozbot.coins += 3 - g.db.add(zozbot) + if SITE_NAME == 'rDrama': + execute_longpostbot(c, level, body, body_html, parent_submission, v) + execute_zozbot(c, level, parent_submission, v) if not v.shadowbanned: notify_users = NOTIFY_USERS(body, v) @@ -600,17 +468,15 @@ def comment(v): @limiter.limit("1/second;10/minute;100/hour;200/day", key_func=lambda:f'{SITE}-{session.get("lo_user")}') @auth_required def edit_comment(cid, v): - c = get_comment(cid, v=v) if time.time() - c.created_utc > 7*24*60*60 and not (c.post and c.post.private): return {"error":"You can't edit comments older than 1 week!"}, 403 if c.author_id != v.id: abort(403) + if not c.post: abort(403) - body = request.values.get("body", "").strip().replace('‎','') - - body = body.replace('\r\n', '\n')[:10000] + body = sanitize_raw_body(request.values.get("body", ""), False) if len(body) < 1 and not (request.files.get("file") and request.headers.get("cf-ipcountry") != "T1"): return {"error":"You have to actually type something!"}, 400 @@ -674,8 +540,7 @@ def edit_comment(cid, v): return {"error": "Too much spam!"}, 403 body += process_files() - - body = body.strip() + body = body.strip()[:COMMENT_BODY_LENGTH_LIMIT] # process_files potentially adds characters to the post body_for_sanitize = body if v.owoify: @@ -687,12 +552,12 @@ def edit_comment(cid, v): body_html = sanitize(body_for_sanitize, golden=False, limit_pings=5, torture=torture) - if len(body_html) > 20000: abort(400) + if len(body_html) > COMMENT_BODY_HTML_LENGTH_LIMIT: abort(400) if v.marseyawarded and marseyaward_body_regex.search(body_html): return {"error":"You can only type marseys!"}, 403 - c.body = body[:10000] + c.body = body c.body_html = body_html if blackjack and any(i in c.body.lower() for i in blackjack.split()): diff --git a/files/routes/discord.py b/files/routes/discord.py index befe4c569..2d2f31cc7 100644 --- a/files/routes/discord.py +++ b/files/routes/discord.py @@ -21,18 +21,20 @@ def join_discord(v): @app.get("/discord_redirect") -@auth_required +@is_not_permabanned def discord_redirect(v): + if v.shadowbanned: abort(400) + now = int(time.time()) + state = request.values.get('state') + if not state or not '.' in state: abort(400) + state = state.split('.') + timestamp= state[0] + state= state[1] - - now=int(time.time()) - state=request.values.get('state','').split('.') - - timestamp=state[0] - - state=state[1] - - if int(timestamp) < now-600: + try: + if int(timestamp) < now-600: + abort(400) + except: abort(400) if not validate_hash(f"{timestamp}+{v.id}+discord", state): diff --git a/files/routes/front.py b/files/routes/front.py index ee9de5134..fa1263b17 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -189,7 +189,7 @@ def random_post(v): @app.get("/random_user") @auth_required def random_user(v): - u = g.db.query(User.username).filter(User.song != None).order_by(func.random()).first() + u = g.db.query(User.username).filter(User.song != None, User.shadowbanned == None).order_by(func.random()).first() if u: u = u[0] else: return "No users have set a profile anthem so far!" diff --git a/files/routes/posts.py b/files/routes/posts.py index ff120fd86..1a21a7191 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -353,7 +353,7 @@ def viewmore(v, pid, sort, offset): @auth_desired_with_logingate def morecomments(v, cid): try: cid = int(cid) - except: abort(400) + except: abort(404) tcid = g.db.query(Comment.top_comment_id).filter_by(id=cid).one_or_none()[0] @@ -412,8 +412,7 @@ def edit_post(pid, v): abort(403) title = sanitize_raw_title(request.values.get("title", "")) - - body = sanitize_raw_body(request.values.get("body", "")) + body = sanitize_raw_body(request.values.get("body", ""), True) if v.id == p.author_id: if v.longpost and (len(body) < 280 or ' [](' in body or body.startswith('[](')): @@ -695,8 +694,7 @@ def submit_post(v, sub=None): if '\\' in url: abort(400) title = sanitize_raw_title(request.values.get("title", "")) - - body = sanitize_raw_body(request.values.get("body", "")) + body = sanitize_raw_body(request.values.get("body", ""), True) def error(error): if request.headers.get("Authorization") or request.headers.get("xhr"): return {"error": error}, 400 @@ -909,7 +907,7 @@ def submit_post(v, sub=None): if embed and len(embed) > 1500: embed = None - is_bot = v.id != 12125 and bool(request.headers.get("Authorization")) or (SITE == 'pcmemes.net' and v.id == SNAPPY_ID) + is_bot = v.id != BBBB_ID and bool(request.headers.get("Authorization")) or (SITE == 'pcmemes.net' and v.id == SNAPPY_ID) if request.values.get("ghost") and v.coins >= 100: v.coins -= 100 diff --git a/files/routes/subs.py b/files/routes/subs.py index da830ea87..1f9b80bb2 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -12,9 +12,6 @@ import tldextract @is_not_permabanned def exile_post(v, pid): if v.shadowbanned: return {"error": "Internal Server Error"}, 500 - try: pid = int(pid) - except: abort(400) - p = get_post(pid) sub = p.sub if not sub: abort(400) @@ -354,9 +351,6 @@ def create_sub2(v): @app.post("/kick/") @is_not_permabanned def kick(v, pid): - try: pid = int(pid) - except: abort(400) - post = get_post(pid) if not post.sub: abort(403) diff --git a/files/routes/users.py b/files/routes/users.py index 1bdaf148c..a8cd94fb5 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -21,10 +21,7 @@ import os import json from .login import check_for_alts - -@app.get("/@/upvoters//posts") -@auth_required -def upvoters_posts(v, username, uid): +def upvoters_downvoters(v, username, uid, cls, vote_cls, vote_dir, template, standalone): u = get_user(username, v=v, include_shadowbanned=False) if u.is_private and (not v or (v.id != u.id and v.admin_level < PERMS['VIEW_PRIVATE_PROFILES'] and not v.eye)): abort(403) if not (v.id == u.id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): abort(403) @@ -33,7 +30,7 @@ def upvoters_posts(v, username, uid): page = max(1, int(request.values.get("page", 1))) - listing = g.db.query(Submission).join(Vote).filter(Submission.ghost == False, Submission.is_banned == False, Submission.deleted_utc == 0, Vote.vote_type==1, Submission.author_id==id, Vote.user_id==uid).order_by(Submission.created_utc.desc()).offset(25 * (page - 1)).limit(26).all() + listing = g.db.query(cls).join(vote_cls).filter(cls.ghost == False, cls.is_banned == False, cls.deleted_utc == 0, vote_cls.vote_type==vote_dir, cls.author_id==id, vote_cls.user_id==uid).order_by(cls.created_utc.desc()).offset(25 * (page - 1)).limit(26).all() listing = [p.id for p in listing] next_exists = len(listing) > 25 @@ -41,56 +38,32 @@ def upvoters_posts(v, username, uid): listing = get_posts(listing, v=v) - return render_template("voted_posts.html", next_exists=next_exists, listing=listing, page=page, v=v) + return render_template(template, next_exists=next_exists, listing=listing, page=page, v=v, standalone=standalone) + +@app.get("/@/upvoters//posts") +@auth_required +def upvoters_posts(v, username, uid): + return upvoters_downvoters(v, username, uid, Submission, Vote, 1, "voted_posts.html", None) @app.get("/@/upvoters//comments") @auth_required def upvoters_comments(v, username, uid): - u = get_user(username, v=v, include_shadowbanned=False) - if u.is_private and (not v or (v.id != u.id and v.admin_level < PERMS['VIEW_PRIVATE_PROFILES'] and not v.eye)): abort(403) - if not (v.id == u.id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): abort(403) - id = u.id - uid = int(uid) - - page = max(1, int(request.values.get("page", 1))) - - listing = g.db.query(Comment).join(CommentVote).filter(Comment.ghost == False, Comment.is_banned == False, Comment.deleted_utc == 0, CommentVote.vote_type==1, Comment.author_id==id, CommentVote.user_id==uid).order_by(Comment.id.desc()).offset(25 * (page - 1)).limit(26).all() - - listing = [c.id for c in listing] - next_exists = len(listing) > 25 - listing = listing[:25] - - listing = get_comments(listing, v=v) - - return render_template("voted_comments.html", next_exists=next_exists, listing=listing, page=page, v=v, standalone=True) + return upvoters_downvoters(v, username, uid, Comment, CommentVote, 1, "voted_comments.html", True) @app.get("/@/downvoters//posts") @auth_required def downvoters_posts(v, username, uid): - u = get_user(username, v=v, include_shadowbanned=False) - if u.is_private and (not v or (v.id != u.id and v.admin_level < PERMS['VIEW_PRIVATE_PROFILES'] and not v.eye)): abort(403) - if not (v.id == u.id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): abort(403) - id = u.id - uid = int(uid) - - page = max(1, int(request.values.get("page", 1))) - - listing = g.db.query(Submission).join(Vote).filter(Submission.ghost == False, Submission.is_banned == False, Submission.deleted_utc == 0, Vote.vote_type==-1, Submission.author_id==id, Vote.user_id==uid).order_by(Submission.created_utc.desc()).offset(25 * (page - 1)).limit(26).all() - - listing = [p.id for p in listing] - next_exists = len(listing) > 25 - listing = listing[:25] - - listing = get_posts(listing, v=v) - - return render_template("voted_posts.html", next_exists=next_exists, listing=listing, page=page, v=v) + return upvoters_downvoters(v, username, uid, Submission, Vote, -1, "voted_posts.html", None) @app.get("/@/downvoters//comments") @auth_required def downvoters_comments(v, username, uid): + return upvoters_downvoters(v, username, uid, Comment, CommentVote, -1, "voted_comments.html", True) + +def upvoting_downvoting(v, username, uid, cls, vote_cls, vote_dir, template, standalone): u = get_user(username, v=v, include_shadowbanned=False) if u.is_private and (not v or (v.id != u.id and v.admin_level < PERMS['VIEW_PRIVATE_PROFILES'] and not v.eye)): abort(403) if not (v.id == u.id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): abort(403) @@ -99,32 +72,7 @@ def downvoters_comments(v, username, uid): page = max(1, int(request.values.get("page", 1))) - listing = g.db.query(Comment).join(CommentVote).filter(Comment.ghost == False, Comment.is_banned == False, Comment.deleted_utc == 0, CommentVote.vote_type==-1, Comment.author_id==id, CommentVote.user_id==uid).order_by(Comment.id.desc()).offset(25 * (page - 1)).limit(26).all() - - listing = [c.id for c in listing] - next_exists = len(listing) > 25 - listing = listing[:25] - - listing = get_comments(listing, v=v) - - return render_template("voted_comments.html", next_exists=next_exists, listing=listing, page=page, v=v, standalone=True) - - - - - -@app.get("/@/upvoting//posts") -@auth_required -def upvoting_posts(v, username, uid): - u = get_user(username, v=v, include_shadowbanned=False) - if u.is_private and (not v or (v.id != u.id and v.admin_level < PERMS['VIEW_PRIVATE_PROFILES'] and not v.eye)): abort(403) - if not (v.id == u.id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): abort(403) - id = u.id - uid = int(uid) - - page = max(1, int(request.values.get("page", 1))) - - listing = g.db.query(Submission).join(Vote).filter(Submission.ghost == False, Submission.is_banned == False, Submission.deleted_utc == 0, Vote.vote_type==1, Vote.user_id==id, Submission.author_id==uid).order_by(Submission.created_utc.desc()).offset(25 * (page - 1)).limit(26).all() + listing = g.db.query(cls).join(vote_cls).filter(cls.ghost == False, cls.is_banned == False, cls.deleted_utc == 0, vote_cls.vote_type==vote_dir, vote_cls.user_id==id, cls.author_id==uid).order_by(cls.created_utc.desc()).offset(25 * (page - 1)).limit(26).all() listing = [p.id for p in listing] next_exists = len(listing) > 25 @@ -132,125 +80,64 @@ def upvoting_posts(v, username, uid): listing = get_posts(listing, v=v) - return render_template("voted_posts.html", next_exists=next_exists, listing=listing, page=page, v=v) + return render_template(template, next_exists=next_exists, listing=listing, page=page, v=v, standalone=standalone) + +@app.get("/@/upvoting//posts") +@auth_required +def upvoting_posts(v, username, uid): + return upvoting_downvoting(v, username, uid, Submission, Vote, 1, "voted_posts.html", None) @app.get("/@/upvoting//comments") @auth_required def upvoting_comments(v, username, uid): - u = get_user(username, v=v, include_shadowbanned=False) - if u.is_private and (not v or (v.id != u.id and v.admin_level < PERMS['VIEW_PRIVATE_PROFILES'] and not v.eye)): abort(403) - if not (v.id == u.id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): abort(403) - id = u.id - uid = int(uid) - - page = max(1, int(request.values.get("page", 1))) - - listing = g.db.query(Comment).join(CommentVote).filter(Comment.ghost == False, Comment.is_banned == False, Comment.deleted_utc == 0, CommentVote.vote_type==1, CommentVote.user_id==id, Comment.author_id==uid).order_by(Comment.id.desc()).offset(25 * (page - 1)).limit(26).all() - - listing = [c.id for c in listing] - next_exists = len(listing) > 25 - listing = listing[:25] - - listing = get_comments(listing, v=v) - - return render_template("voted_comments.html", next_exists=next_exists, listing=listing, page=page, v=v, standalone=True) + return upvoting_downvoting(v, username, uid, Comment, CommentVote, 1, "voted_comments.html", True) @app.get("/@/downvoting//posts") @auth_required def downvoting_posts(v, username, uid): - u = get_user(username, v=v, include_shadowbanned=False) - if u.is_private and (not v or (v.id != u.id and v.admin_level < PERMS['VIEW_PRIVATE_PROFILES'] and not v.eye)): abort(403) - if not (v.id == u.id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): abort(403) - id = u.id - uid = int(uid) - - page = max(1, int(request.values.get("page", 1))) - - listing = g.db.query(Submission).join(Vote).filter(Submission.ghost == False, Submission.is_banned == False, Submission.deleted_utc == 0, Vote.vote_type==-1, Vote.user_id==id, Submission.author_id==uid).order_by(Submission.created_utc.desc()).offset(25 * (page - 1)).limit(26).all() - - listing = [p.id for p in listing] - next_exists = len(listing) > 25 - listing = listing[:25] - - listing = get_posts(listing, v=v) - - return render_template("voted_posts.html", next_exists=next_exists, listing=listing, page=page, v=v) + return upvoting_downvoting(v, username, uid, Submission, Vote, -1, "voted_posts.html", None) @app.get("/@/downvoting//comments") @auth_required def downvoting_comments(v, username, uid): - u = get_user(username, v=v, include_shadowbanned=False) - if u.is_private and (not v or (v.id != u.id and v.admin_level < PERMS['VIEW_PRIVATE_PROFILES'] and not v.eye)): abort(403) - if not (v.id == u.id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): abort(403) - id = u.id - uid = int(uid) + return upvoting_downvoting(v, username, uid, Comment, CommentVote, -1, "voted_comments.html", True) - page = max(1, int(request.values.get("page", 1))) - - listing = g.db.query(Comment).join(CommentVote).filter(Comment.ghost == False, Comment.is_banned == False, Comment.deleted_utc == 0, CommentVote.vote_type==-1, CommentVote.user_id==id, Comment.author_id==uid).order_by(Comment.id.desc()).offset(25 * (page - 1)).limit(26).all() - - listing = [c.id for c in listing] - next_exists = len(listing) > 25 - listing = listing[:25] - - listing = get_comments(listing, v=v) - - return render_template("voted_comments.html", next_exists=next_exists, listing=listing, page=page, v=v, standalone=True) - - -@app.get("/@/upvoted/posts") -@auth_required -def user_upvoted_posts(v, username): +def user_voted(v, username, cls, vote_cls, vote_dir, template, standalone): u = get_user(username, v=v, include_shadowbanned=False) if u.is_private and (not v or (v.id != u.id and v.admin_level < PERMS['VIEW_PRIVATE_PROFILES'] and not v.eye)): abort(403) if not (v.id == u.id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): abort(403) page = max(1, int(request.values.get("page", 1))) - listing = g.db.query(Submission).join(Vote).filter( - Submission.ghost == False, - Submission.is_banned == False, - Submission.deleted_utc == 0, - Submission.author_id != u.id, - Vote.user_id == u.id, - Vote.vote_type == 1 - ).order_by(Submission.created_utc.desc()).offset(25 * (page - 1)).limit(26).all() + listing = g.db.query(cls).join(vote_cls).filter( + cls.ghost == False, + cls.is_banned == False, + cls.deleted_utc == 0, + cls.author_id != u.id, + vote_cls.user_id == u.id, + vote_cls.vote_type == vote_dir + ).order_by(cls.created_utc.desc()).offset(25 * (page - 1)).limit(26).all() listing = [p.id for p in listing] next_exists = len(listing) > 25 listing = listing[:25] listing = get_posts(listing, v=v) - return render_template("voted_posts.html", next_exists=next_exists, listing=listing, page=page, v=v) + return render_template(template, next_exists=next_exists, listing=listing, page=page, v=v, standalone=standalone) + +@app.get("/@/upvoted/posts") +@auth_required +def user_upvoted_posts(v, username): + return user_voted(v, username, Submission, Vote, 1, "voted_posts.html", None) @app.get("/@/upvoted/comments") @auth_required def user_upvoted_comments(v, username): - u = get_user(username, v=v, include_shadowbanned=False) - if u.is_private and (not v or (v.id != u.id and v.admin_level < PERMS['VIEW_PRIVATE_PROFILES'] and not v.eye)): abort(403) - if not (v.id == u.id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): abort(403) - - page = max(1, int(request.values.get("page", 1))) - - listing = g.db.query(Comment).join(CommentVote).filter( - Comment.ghost == False, - Comment.is_banned == False, - Comment.deleted_utc == 0, - Comment.author_id != u.id, - CommentVote.user_id == u.id, - CommentVote.vote_type == 1 - ).order_by(Comment.created_utc.desc()).offset(25 * (page - 1)).limit(26).all() - - listing = [c.id for c in listing] - next_exists = len(listing) > 25 - listing = listing[:25] - listing = get_comments(listing, v=v) - - return render_template("voted_comments.html", next_exists=next_exists, listing=listing, page=page, v=v, standalone=True) + return user_voted(v, username, Comment, CommentVote, -1, "voted_comments.html", True) @app.get("/poorcels") @@ -274,134 +161,70 @@ def agendaposters(v): users = g.db.query(User).filter(User.agendaposter > 0).order_by(User.username).all() return render_template("agendaposters.html", v=v, users=users) +def all_upvoters_downvoters(v, username, vote_dir, is_who_simps_hates): + vote_str = 'votes' + simps_haters = 'voters' + vote_name = 'Neutral' + if vote_dir == 1: + vote_str = 'upvotes' + simps_haters = 'simps for' if is_who_simps_hates else 'simps' + vote_name = 'Up' + elif vote_dir == -1: + vote_str = 'downvotes' + simps_haters = 'hates' if is_who_simps_hates else 'haters' + vote_name = 'Down' + + id = get_user(username, v=v, include_shadowbanned=False).id + if not (v.id == id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): + abort(403) + votes = [] + votes2 = [] + if is_who_simps_hates: + votes = g.db.query(Submission.author_id, func.count(Submission.author_id)).join(Vote).filter(Submission.ghost == False, Submission.is_banned == False, Submission.deleted_utc == 0, Vote.vote_type==vote_dir, Vote.user_id==id).group_by(Submission.author_id).order_by(func.count(Submission.author_id).desc()).all() + votes2 = g.db.query(Comment.author_id, func.count(Comment.author_id)).join(CommentVote).filter(Comment.ghost == False, Comment.is_banned == False, Comment.deleted_utc == 0, CommentVote.vote_type==vote_dir, CommentVote.user_id==id).group_by(Comment.author_id).order_by(func.count(Comment.author_id).desc()).all() + else: + votes = g.db.query(Vote.user_id, func.count(Vote.user_id)).join(Submission).filter(Submission.ghost == False, Submission.is_banned == False, Submission.deleted_utc == 0, Vote.vote_type==vote_dir, Submission.author_id==id).group_by(Vote.user_id).order_by(func.count(Vote.user_id).desc()).all() + votes2 = g.db.query(CommentVote.user_id, func.count(CommentVote.user_id)).join(Comment).filter(Comment.ghost == False, Comment.is_banned == False, Comment.deleted_utc == 0, CommentVote.vote_type==vote_dir, Comment.author_id==id).group_by(CommentVote.user_id).order_by(func.count(CommentVote.user_id).desc()).all() + votes = Counter(dict(votes)) + Counter(dict(votes2)) + total = sum(votes.values()) + users = g.db.query(User).filter(User.id.in_(votes.keys())).all() + users2 = [] + for user in users: + users2.append((user, votes[user.id])) + users = sorted(users2, key=lambda x: x[1], reverse=True) + + try: + pos = [x[0].id for x in users].index(v.id) + pos = (pos+1, users[pos][1]) + except: pos = (len(users)+1, 0) + + received_given = 'given' if is_who_simps_hates else 'received' + if total == 1: vote_str = vote_str[:-1] # we want to unpluralize if only 1 vote + total = f'{total} {vote_str} {received_given}' + + name2 = f'Who @{username} {simps_haters}' if is_who_simps_hates else f'@{username} biggest {simps_haters}' + + return render_template("voters.html", v=v, users=users[:25], pos=pos, name=vote_name, name2=name2, total=total) @app.get("/@/upvoters") @auth_required def upvoters(v, username): - id = get_user(username, v=v, include_shadowbanned=False).id - if not (v.id == id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): - abort(403) - - votes = g.db.query(Vote.user_id, func.count(Vote.user_id)).join(Submission).filter(Submission.ghost == False, Submission.is_banned == False, Submission.deleted_utc == 0, Vote.vote_type==1, Submission.author_id==id).group_by(Vote.user_id).order_by(func.count(Vote.user_id).desc()).all() - - votes2 = g.db.query(CommentVote.user_id, func.count(CommentVote.user_id)).join(Comment).filter(Comment.ghost == False, Comment.is_banned == False, Comment.deleted_utc == 0, CommentVote.vote_type==1, Comment.author_id==id).group_by(CommentVote.user_id).order_by(func.count(CommentVote.user_id).desc()).all() - - votes = Counter(dict(votes)) + Counter(dict(votes2)) - - total = sum(votes.values()) - - users = g.db.query(User).filter(User.id.in_(votes.keys())).all() - users2 = [] - for user in users: users2.append((user, votes[user.id])) - - users = sorted(users2, key=lambda x: x[1], reverse=True) - - try: - pos = [x[0].id for x in users].index(v.id) - pos = (pos+1, users[pos][1]) - except: pos = (len(users)+1, 0) - - if total == 1: total=f'{total} upvote received' - else: total=f'{total} upvotes received' - - return render_template("voters.html", v=v, users=users[:25], pos=pos, name='Up', name2=f'@{username} biggest simps', total=total) - - + return all_upvoters_downvoters(v, username, 1, False) @app.get("/@/downvoters") @auth_required def downvoters(v, username): - id = get_user(username, v=v, include_shadowbanned=False).id - if not (v.id == id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): - abort(403) - - votes = g.db.query(Vote.user_id, func.count(Vote.user_id)).join(Submission).filter(Submission.ghost == False, Submission.is_banned == False, Submission.deleted_utc == 0, Vote.vote_type==-1, Submission.author_id==id).group_by(Vote.user_id).order_by(func.count(Vote.user_id).desc()).all() - - votes2 = g.db.query(CommentVote.user_id, func.count(CommentVote.user_id)).join(Comment).filter(Comment.ghost == False, Comment.is_banned == False, Comment.deleted_utc == 0, CommentVote.vote_type==-1, Comment.author_id==id).group_by(CommentVote.user_id).order_by(func.count(CommentVote.user_id).desc()).all() - - votes = Counter(dict(votes)) + Counter(dict(votes2)) - - total = sum(votes.values()) - - users = g.db.query(User).filter(User.id.in_(votes.keys())).all() - users2 = [] - for user in users: users2.append((user, votes[user.id])) - - users = sorted(users2, key=lambda x: x[1], reverse=True) - - try: - pos = [x[0].id for x in users].index(v.id) - pos = (pos+1, users[pos][1]) - except: pos = (len(users)+1, 0) - - if total == 1: total=f'{total} downvote received' - else: total=f'{total} downvotes received' - - return render_template("voters.html", v=v, users=users[:25], pos=pos, name='Down', name2=f'@{username} biggest haters', total=total) + return all_upvoters_downvoters(v, username, -1, False) @app.get("/@/upvoting") @auth_required def upvoting(v, username): - id = get_user(username, v=v, include_shadowbanned=False).id - if not (v.id == id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): - abort(403) - - votes = g.db.query(Submission.author_id, func.count(Submission.author_id)).join(Vote).filter(Submission.ghost == False, Submission.is_banned == False, Submission.deleted_utc == 0, Vote.vote_type==1, Vote.user_id==id).group_by(Submission.author_id).order_by(func.count(Submission.author_id).desc()).all() - - votes2 = g.db.query(Comment.author_id, func.count(Comment.author_id)).join(CommentVote).filter(Comment.ghost == False, Comment.is_banned == False, Comment.deleted_utc == 0, CommentVote.vote_type==1, CommentVote.user_id==id).group_by(Comment.author_id).order_by(func.count(Comment.author_id).desc()).all() - - votes = Counter(dict(votes)) + Counter(dict(votes2)) - - total = sum(votes.values()) - - users = g.db.query(User).filter(User.id.in_(votes.keys())).all() - users2 = [] - for user in users: users2.append((user, votes[user.id])) - - users = sorted(users2, key=lambda x: x[1], reverse=True) - - try: - pos = [x[0].id for x in users].index(v.id) - pos = (pos+1, users[pos][1]) - except: pos = (len(users)+1, 0) - - if total == 1: total=f'{total} upvote given' - else: total=f'{total} upvotes given' - - return render_template("voters.html", v=v, users=users[:25], pos=pos, name='Up', name2=f'Who @{username} simps for', total=total) + return all_upvoters_downvoters(v, username, 1, True) @app.get("/@/downvoting") @auth_required def downvoting(v, username): - id = get_user(username, v=v, include_shadowbanned=False).id - if not (v.id == id or v.admin_level >= PERMS['USER_VOTERS_VISIBLE']): - abort(403) - - votes = g.db.query(Submission.author_id, func.count(Submission.author_id)).join(Vote).filter(Submission.ghost == False, Submission.is_banned == False, Submission.deleted_utc == 0, Vote.vote_type==-1, Vote.user_id==id).group_by(Submission.author_id).order_by(func.count(Submission.author_id).desc()).all() - - votes2 = g.db.query(Comment.author_id, func.count(Comment.author_id)).join(CommentVote).filter(Comment.ghost == False, Comment.is_banned == False, Comment.deleted_utc == 0, CommentVote.vote_type==-1, CommentVote.user_id==id).group_by(Comment.author_id).order_by(func.count(Comment.author_id).desc()).all() - - votes = Counter(dict(votes)) + Counter(dict(votes2)) - - total = sum(votes.values()) - - users = g.db.query(User).filter(User.id.in_(votes.keys())).all() - users2 = [] - for user in users: users2.append((user, votes[user.id])) - - users = sorted(users2, key=lambda x: x[1], reverse=True) - - try: - pos = [x[0].id for x in users].index(v.id) - pos = (pos+1, users[pos][1]) - except: pos = (len(users)+1, 0) - - if total == 1: total=f'{total} downvote given' - else: total=f'{total} downvotes given' - - return render_template("voters.html", v=v, users=users[:25], pos=pos, name='Down', name2=f'Who @{username} hates', total=total) - - + return all_upvoters_downvoters(v, username, -1, True) @app.post("/@/suicide") @limiter.limit("1/second;5/day") @@ -452,7 +275,7 @@ def transfer_coins(v, username): notif_text = f":marseycapitalistmanlet: @{v.username} has gifted you {amount-tax} coins!" if reason: - if len(reason) > 200: return {"error": "Reason is too long, max 200 characters"},400 + if len(reason) > TRANSFER_MESSAGE_LENGTH_LIMIT: return {"error": f"Reason is too long, max {TRANSFER_MESSAGE_LENGTH_LIMIT} characters"},400 notif_text += f"\n\n> {reason}" log_message += f"\n\n> {reason}" @@ -743,7 +566,7 @@ def message2(v, username): @auth_required def messagereply(v): body = request.values.get("body", "").strip().replace('‎','') - body = body.replace('\r\n', '\n')[:10000] + body = body.replace('\r\n', '\n')[:COMMENT_BODY_LENGTH_LIMIT] if not body and not request.files.get("file"): return {"error": "Message is empty!"}, 400 @@ -1009,8 +832,6 @@ def u_username(username, v=None): next_exists=next_exists, is_following=is_following) - - if request.headers.get("Authorization") or request.path.endswith(".json"): return {"data": [x.json for x in listing]} diff --git a/files/templates/admin/admin_home.html b/files/templates/admin/admin_home.html index 2bc0050e3..59175d1de 100644 --- a/files/templates/admin/admin_home.html +++ b/files/templates/admin/admin_home.html @@ -100,7 +100,7 @@

Configuration

    {% if v.admin_level >= PERMS['HOLE_CREATE'] %} -
  • Create {{ HOLE_NAME | capitalize }}
  • +
  • Create {{HOLE_NAME | capitalize}}
  • {% endif %} {% if v.admin_level >= PERMS['APPS_MODERATION'] %}
  • Apps
  • @@ -150,7 +150,7 @@

    Server Status

    - Live Revision: {{ gitref }}
    + Live Revision: {{gitref}}
    {% endblock %} diff --git a/files/templates/badges.html b/files/templates/badges.html index b426a0232..49ef5fc52 100644 --- a/files/templates/badges.html +++ b/files/templates/badges.html @@ -32,8 +32,8 @@ {{badge.description}} {%- set ct = counts[badge.id] if badge.id in counts else (0, 0) %} - {{ ct[0] }} - {{ "{:0.3f}".format(ct[1]) }}% + {{ct[0]}} + {{"{:0.3f}".format(ct[1])}}% {% endfor %} @@ -41,4 +41,4 @@ -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/files/templates/comments.html b/files/templates/comments.html index 6b6ae7803..020529251 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -138,7 +138,7 @@ {% if c.bannedfor %} {% endif %} - {% if c.active_flags(v) %}{{c.active_flags(v)}} Report{{ help.plural(c.active_flags(v)) }}{% endif %} + {% if c.active_flags(v) %}{{c.active_flags(v)}} Report{{help.plural(c.active_flags(v))}}{% endif %} {% if c.over_18 %}+18{% endif %} {% if v and v.admin_level >= PERMS['USER_SHADOWBAN'] and c.author.shadowbanned %}{% endif %} {% if c.stickied %} diff --git a/files/templates/default.html b/files/templates/default.html index 3243ac0a6..db95b6e08 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -258,7 +258,7 @@ /h/{{sub}} banner {% elif SITE_NAME == 'rDrama' %} - + {% if v and (v.is_banned or v.agendaposter) %} site banner {% else %} diff --git a/files/templates/donate_PCM.html b/files/templates/donate_PCM.html index 02b1863f8..ab8562360 100644 --- a/files/templates/donate_PCM.html +++ b/files/templates/donate_PCM.html @@ -11,11 +11,11 @@ Gumroad (subscription) - {{GUMROAD_LINK}} + {{GUMROAD_LINK}} Gumroad (one-time) - https://kippy.gumroad.com/l/onetime + https://kippy.gumroad.com/l/onetime Ethereum/Brave Attention Token @@ -28,4 +28,4 @@ -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/files/templates/donate_WPD.html b/files/templates/donate_WPD.html index 9f4939d00..5b68cd7a8 100644 --- a/files/templates/donate_WPD.html +++ b/files/templates/donate_WPD.html @@ -11,7 +11,7 @@ Kofi - {{KOFI_LINK}} + {{KOFI_LINK}} Ethereum/Brave Attention Token @@ -28,4 +28,4 @@ -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/files/templates/donate_rDrama.html b/files/templates/donate_rDrama.html index 04ef24130..ae1492294 100644 --- a/files/templates/donate_rDrama.html +++ b/files/templates/donate_rDrama.html @@ -11,7 +11,7 @@ Gumroad - {{GUMROAD_LINK}} + {{GUMROAD_LINK}} Ethereum/Brave Attention Token @@ -27,13 +27,13 @@ NFTs - https://opensea.io/collection/marsey + https://opensea.io/collection/marsey Merch - https://redbubble.com/people/rdramanet/explore?sortOrder=top%20selling + https://redbubble.com/people/rdramanet/explore?sortOrder=top%20selling -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/files/templates/errors/502.html b/files/templates/errors/502.html index b98d5664d..86c93a861 100644 --- a/files/templates/errors/502.html +++ b/files/templates/errors/502.html @@ -1,7 +1,7 @@ - + @@ -38,9 +38,9 @@ - + - + 502 Bad Gateway @@ -49,58 +49,58 @@ - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - site banner + + site banner