2024-02-21 12:22:28 -08:00
|
|
|
(()=>{var t,e={571:(t,e,n)=>{window._=n(543),n(139),jQuery.fn.uitooltip=jQuery.fn.tooltip,n(43)},671:(t,e,n)=>{n(571),lineOptions={legend:{position:"bottom"},scales:{yAxes:[{ticks:{fontColor:"rgba(0,0,0,0.5)",fontStyle:"bold",beginAtZero:!0,maxTicksLimit:5,padding:20},gridLines:{drawTicks:!1,display:!1}}],xAxes:[{gridLines:{zeroLineColor:"transparent"},ticks:{padding:20,fontColor:"rgba(0,0,0,0.5)",fontStyle:"bold"}}]}},pieOptions={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:1,percentageInnerCutout:50,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,responsive:!0,maintainAspectRatio:!1,legendTemplate:"<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><i class='fas fa-circle-o' style='color: <%=segments[i].fillColor%>'></i><%if(segments[i].label){%><%=segments[i].label%><%}%> foo</li><%}%></ul>",tooltipTemplate:"<%=value %> <%=label%> "};var r=$('meta[name="baseUrl"]').attr("content");!function(t,e){var n={modals:{}};n.modals.confirmRestore=function(){var e=t("table"),n=function(e){var n=t(this),r=t("#restoreConfirmModal"),i=n.attr("href"),o=n.attr("data-content"),a=n.attr("data-title");return t("#restoreConfirmModalLabel").text(a),r.find(".modal-body").text(o),t("#restoreForm").attr("action",i),r.modal({show:!0}),!1};return{render:function(){e.on("click",".restore-asset",n)}}},n.modals.confirmDelete=function(){var e=t("table"),n=function(e){var n=t(this),r=t("#dataConfirmModal"),i=n.attr("href"),o=n.attr("data-content"),a=n.attr("data-title");return t("#myModalLabel").text(a),r.find(".modal-body").text(o),t("#deleteForm").attr("action",i),r.modal({show:!0}),!1};return{render:function(){e.on("click",".delete-asset",n)}}},t((function(){(new n.modals.confirmRestore).render(),(new n.modals.confirmDelete).render()}))}(jQuery,window.snipeit.settings),$(document).ready((function(){function t(t){t instanceof jQuery||(t=$(t));var e=t.data("select2");return searchElement=e.dropdown.$search||e.$container.find(".select2-search__field"),searchElement.val()}function e(t){if(t.loading)return $('<i class="fas fa-spinner fa-spin" aria-hidden="true"></i> Loading...');var e=$("<div class='clearfix'>"),n=$("<div class='pull-left' style='padding-right: 10px;'>");if(t.image){var r=$("<div style='width: 30px;'>"),i=$("<img src='' style='max-height: 20px; max-width: 30px;' alt=''>");i.attr("src",t.image),r.append(i)}else r=$("<div style='height: 20px; width: 30px;'></div>");n.append(r),e.append(n);var o=$("<div>");o.text(t.text),e.append(o);e.get(0).outerHTML,function(t){if(t.loading)return'<i class="fas fa-spinner fa-spin" aria-hidden="true"></i> Loading...';var e='<div class="clearfix">';e+='<div class="pull-left" style="padding-right: 10px;">',t.image?e+="<div style='width: 30px;'><img src='"+t.image+"' style='max-height: 20px; max-width: 30px;' alt='"+t.text+"'></div>":e+='<div style="height: 20px; width: 30px;"></div>',e+="</div><div>"+t.text+"</div>"}(t);return e}$(".slideout-menu-toggle").on("click",(function(t){t.preventDefault();var e=$(".slideout-menu"),n=$(".slideout-menu").width();e.toggleClass("open"),e.hasClass("open")?(e.show(),e.animate({right:"0px"})):(e.animate({right:-n},"-350px"),e.fadeOut())})),$('select.select2:not(".select2-hidden-accessible")').each((function(t,e){$(e).select2()})),$(".js-data-ajax").each((function(t,n){var i=$(n),o=i.data("endpoint");i.data("select");i.select2({placeholder:"",allowClear:!0,ajax:{url:r+"api/v1/"+o+"/selectlist",dataType:"json",delay:250,headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content")},data:function(t){var e={search:t.term,page:t.page||1,assetStatusType:i.data("asset-status-type")};return e},cache:!0},templateResult:e})})),$(".select2-hidden-accessible").on("select2:selecting",(function(e){var n=e.params.args.data,r=!1,i=$(this),o=t(i);e.params.args.originalEvent&&(r="mouseup"==e.params.args.originalEvent.type),r||(o.toLowerCase()&&n.text.toLowerCase().indexOf(o)<0?(e.preventDefault(),i.select2("close")):o.toLowerCase()&&n.text.toLower
|