window.GianismBot={},function(t){"use strict";t("#gianism-bot-schedule").on("click",".add-row",function(e){e.preventDefault();const n=t("#g-row-time").val()+":"+t("#g-row-minute").val(),i=t("<tr><th>"+n+"</th></tr>"),c=t("tbody","#gianism-bot-schedule");for(let t=1;t<=7;t++)i.append('<td><input type="checkbox" name="gianism_bot_schedule['+n+':00][]" value="'+t+'" checked /></td>');i.append('<td><a class="button row-delete" href="#">&times;</a></td>');let o=0;const a=parseInt(n.replace(":",""),10);let r=!0;if(c.find("tr").each(function(e,n){const i=parseInt(t(n).find("th").text().replace(":",""),10);i<a?o=e:i===a&&(r=!1)}),!r)return window.confirm(GianismBotLabel.duplicate),!1;o?c.find("tr").each(function(e,n){e===o&&t(n).after(i)}):c.append(i),i.effect("highlight",{},1500)}),t("#gianism-bot-schedule").on("click",".row-delete",function(e){e.preventDefault(),t(this).parents("tr").effect("highlight",{},500,function(){t(this).remove()})})}(jQuery);