/*
 =======================================================================*\
|| ###################################################################### ||
|| # vBulletin 6.2.3
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2026 MH Sub I, LLC dba vBulletin. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
(function(d){function e(c,b){let f=d(':input[name="output"]'),a=d(".js-robot-helper");console.log(c,b);f.val(b);a.text(c)}d(function(){d(".js-api-form-submit").on("click",function(){var c=d(".js-api-form"),b=vBulletin.getFormData(c,0);for(let a of["api[class]","api[method]","parameters"])b[a]=b[a]||d(c[0].elements[a]).attr("placeholder");try{var f=JSON.parse(b.parameters)}catch(a){e("Parse Error",a.toString());return}b.bogus_securitytoken&&(f.securitytoken="hammertime");c=c.attr("action")+b["api[class]"]+
"/"+b["api[method]"];b="Attempting to make ajax call with...  url: "+c+"  data: "+JSON.stringify(f,null,4);e("Waiting",b);vBulletin.AJAX({url:c,data:f,success:function(a){e("Done",JSON.stringify(a,null,4))},api_error:function(a){e("Error",JSON.stringify(a,null,4))},error:function(a,g,h){console.dir(a);a=a.responseText+"\n\njqXHR: "+JSON.stringify(a)+"\nText Status: "+JSON.stringify(g)+"\nError: "+JSON.stringify(h);e("Error",a)}})})})})(jQuery);
