/*! For license information please see main.js.LICENSE.txt */ (()=>{var t={741:(t,e,n)=>{var i,o;!function(a,s){"use strict";void 0===(o="function"==typeof(i=s)?i.call(e,n,e,t):i)||(t.exports=o)}(window,(function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],n=0;n{var i,o;!function(a,s){i=[n(741)],o=function(t){return function(t,e){"use strict";var n={extend:function(t,e){for(var n in e)t[n]=e[n];return t},modulo:function(t,e){return(t%e+e)%e}},i=Array.prototype.slice;n.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?i.call(t):[t]},n.removeFrom=function(t,e){var n=t.indexOf(e);-1!=n&&t.splice(n,1)},n.getParent=function(t,n){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,n))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,i){t=n.makeArray(t);var o=[];return t.forEach((function(t){if(t instanceof HTMLElement)if(i){e(t,i)&&o.push(t);for(var n=t.querySelectorAll(i),a=0;a{var i,o;window,void 0===(o="function"==typeof(i=function(){"use strict";function t(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}var e="undefined"==typeof console?function(){}:function(t){console.error(t)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],i=n.length;function o(t){var n=getComputedStyle(t);return n||e("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),n}var a,s=!1;function r(e){if(function(){if(!s){s=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(e);var i=o(e);a=200==Math.round(t(i.width)),r.isBoxSizeOuter=a,n.removeChild(e)}}(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var l=o(e);if("none"==l.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e{var i,o,a;window,o=[n(794),n(131)],void 0===(a="function"==typeof(i=function(t,e){"use strict";var n=t.create("masonry");n.compatOptions.fitWidth="isFitWidth";var i=n.prototype;return i._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t1&&n+t>this.cols?0:n;var i=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=i?n+t:this.horizontalColIndex,{col:n,y:this._getColGroupY(n,t)}},i._manageStamp=function(t){var n=e(t),i=this._getElementOffset(t),o=this._getOption("originLeft")?i.left:i.right,a=o+n.outerWidth,s=Math.floor(o/this.columnWidth);s=Math.max(0,s);var r=Math.floor(a/this.columnWidth);r-=a%this.columnWidth?0:1,r=Math.min(this.cols-1,r);for(var l=(this._getOption("originTop")?i.top:i.bottom)+n.outerHeight,c=s;c<=r;c++)this.colYs[c]=Math.max(l,this.colYs[c])},i._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},i._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},i.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},n})?i.apply(e,o):i)||(t.exports=a)},652:(t,e,n)=>{var i,o,a;window,o=[n(158),n(131)],void 0===(a="function"==typeof(i=function(t,e){"use strict";var n=document.documentElement.style,i="string"==typeof n.transition?"transition":"WebkitTransition",o="string"==typeof n.transform?"transform":"WebkitTransform",a={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[i],s={transform:o,transition:i,transitionDuration:i+"Duration",transitionProperty:i+"Property",transitionDelay:i+"Delay"};function r(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var l=r.prototype=Object.create(t.prototype);l.constructor=r,l._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},l.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},l.getSize=function(){this.size=e(this.element)},l.css=function(t){var e=this.element.style;for(var n in t)e[s[n]||n]=t[n]},l.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),i=t[e?"left":"right"],o=t[n?"top":"bottom"],a=parseFloat(i),s=parseFloat(o),r=this.layout.size;-1!=i.indexOf("%")&&(a=a/100*r.width),-1!=o.indexOf("%")&&(s=s/100*r.height),a=isNaN(a)?0:a,s=isNaN(s)?0:s,a-=e?r.paddingLeft:r.paddingRight,s-=n?r.paddingTop:r.paddingBottom,this.position.x=a,this.position.y=s},l.layoutPosition=function(){var t=this.layout.size,e={},n=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),o=n?"paddingLeft":"paddingRight",a=n?"left":"right",s=n?"right":"left",r=this.position.x+t[o];e[a]=this.getXValue(r),e[s]="";var l=i?"paddingTop":"paddingBottom",c=i?"top":"bottom",d=i?"bottom":"top",u=this.position.y+t[l];e[c]=this.getYValue(u),e[d]="",this.css(e),this.emitEvent("layout",[this])},l.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},l.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},l._transitionTo=function(t,e){this.getPosition();var n=this.position.x,i=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),!o||this.isTransitioning){var a=t-n,s=e-i,r={};r.transform=this.getTranslate(a,s),this.transition({to:r,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},l.getTranslate=function(t,e){return"translate3d("+(t=this.layout._getOption("originLeft")?t:-t)+"px, "+(e=this.layout._getOption("originTop")?e:-e)+"px, 0)"},l.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},l.moveTo=l._transitionTo,l.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},l._nonTransition=function(t){for(var e in this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd)t.onTransitionEnd[e].call(this)},l.transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e=this._transn;for(var n in t.onTransitionEnd)e.onEnd[n]=t.onTransitionEnd[n];for(n in t.to)e.ingProperties[n]=!0,t.isCleaning&&(e.clean[n]=!0);t.from&&(this.css(t.from),this.element.offsetHeight),this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var c="opacity,"+o.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}));l.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:c,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(a,this,!1)}},l.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},l.onotransitionend=function(t){this.ontransitionend(t)};var d={"-webkit-transform":"transform"};l.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=d[t.propertyName]||t.propertyName;delete e.ingProperties[n],function(t){for(var e in t)return!1;return!0}(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd&&(e.onEnd[n].call(this),delete e.onEnd[n]),this.emitEvent("transitionEnd",[this])}},l.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(a,this,!1),this.isTransitioning=!1},l._removeStyles=function(t){var e={};for(var n in t)e[n]="";this.css(e)};var u={transitionProperty:"",transitionDuration:"",transitionDelay:""};return l.removeTransitionStyles=function(){this.css(u)},l.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},l.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},l.remove=function(){i&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",(function(){this.removeElem()})),this.hide()):this.removeElem()},l.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},l.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},l.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var n in e)return n},l.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},l.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},l.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},r})?i.apply(e,o):i)||(t.exports=a)},794:(t,e,n)=>{var i,o;!function(a,s){"use strict";i=[n(158),n(131),n(47),n(652)],o=function(t,e,n,i){return function(t,e,n,i,o){var a=t.console,s=t.jQuery,r=function(){},l=0,c={};function d(t,e){var n=i.getQueryElement(t);if(n){this.element=n,s&&(this.$element=s(this.element)),this.options=i.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,c[o]=this,this._create(),this._getOption("initLayout")&&this.layout()}else a&&a.error("Bad element for "+this.constructor.namespace+": "+(n||t))}d.namespace="outlayer",d.Item=o,d.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var u=d.prototype;function h(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}i.extend(u,e.prototype),u.option=function(t){i.extend(this.options,t)},u._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},d.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},u._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),i.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},u.reloadItems=function(){this.items=this._itemize(this.element.children)},u._itemize=function(t){for(var e=this._filterFindItemElements(t),n=this.constructor.Item,i=[],o=0;o{t.exports=n(712)},712:function(t,e,n){var i,o,a;o="undefined"==typeof window?this:window,a=function(t,e){var n=t.document,i=Array.prototype.slice,o=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(t){return setTimeout(t,1e3/60)};var a=function(){var t=50,e=50,a={dialRadius:40,dialStartAngle:135,dialEndAngle:45,value:0,max:100,min:0,valueDialClass:"value",valueClass:"value-text",dialClass:"dial",gaugeClass:"gauge",showValue:!0,gaugeColor:null,label:function(t){return Math.round(t)}};function s(t,e,i){var o=n.createElementNS("http://www.w3.org/2000/svg",t);for(var a in e)o.setAttribute(a,e[a]);return i&&i.forEach((function(t){o.appendChild(t)})),o}function r(t,e){return t*e/100}function l(t,e,n){var i=Number(t);return i>n?n:i{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=n(292);function e(){!function(t,e){t.safeAjax=function(t){var n=e.Deferred();return shell.getTokenDeferred().done((function(i){t.headers?t.headers.__RequestVerificationToken=i:e.extend(t,{headers:{__RequestVerificationToken:i}}),e.ajax(t).done((function(t,e,i){validateLoginSession(t,e,i,n.resolve)})).fail(n.reject)})).fail((function(){n.rejectWith(this,arguments)})),n.promise()}}(window.webapi=window.webapi||{},jQuery);var t,e={},n={},i="";n.filter="";var o="",a={"content/tp_position_name":"Position","content/tp_positioncategory_name":"Position Category","content/tp_weight":"Weight","content/crfe9_throws_label":"Throws","content/tp_heightmetric":"Height","content/crfe9_committed_label":"Committed","content/crfe9_bats_label":"Bats","content/gendercode_label":"Gender","content/tp_state_name":"Players State","content/tp_age":"Age","content/tp_year":"Graduation Year","content/tp_institution_name":"College","content/institution/tp_nickname":"Team","content/institution/tp_organizationid_name":"Organization","content/institution/tp_conferenceid_name":"Conference","content/institution/tp_divisionnumeric":"Division","content/statistics/tp_isverifiedcode_label":"Verified","content/statistics/tp_valueinteger":"Value (Integer)","content/statistics/tp_valuedecimal":"Value (Decimal)","content/statistics/tp_type_name":"Stat Type","content/statistics/tp_tovalueinteger":"To Value (Integer)","content/statistics/tp_tovaluedecimal":"To Value (Decimal)","content/statistics/tp_type_name":"Stat Type","content/statistics/tp_positioncategory_name":"Stats: Position","content/statistics/tp_dateachieved":"Date Achieved","content/institution/tp_stateprovinceid_name":"College State"},s={"content/tp_position_name":"Dropdown","content/tp_positioncategory_name":"Dropdown","content/tp_weight":"Range Slider","content/crfe9_throws_label":"Checkboxes","content/tp_heightmetric":"Range Slider","content/crfe9_committed_label":"Checkboxes","content/crfe9_bats_label":"Checkboxes","content/gendercode_label":"Radio","content/tp_state_name":"Dropdown","content/tp_age":"Range Slider","content/tp_year":"Checkboxes","content/tp_institution_name":"Dropdown","content/institution/tp_nickname":"Dropdown","content/institution/tp_organizationid_name":"Dropdown","content/institution/tp_conferenceid_name":"Dropdown","content/institution/tp_divisionnumeric":"Checkboxes","content/statistics/tp_isverifiedcode_label":"Radio","content/statistics/tp_valueinteger":"Range Slider","content/statistics/tp_valuedecimal":"Range Slider","content/statistics/tp_type_name":"Dropdown","content/statistics/tp_tovalueinteger":"Range Slider","content/statistics/tp_tovaluedecimal":"Range Slider","content/statistics/tp_positioncategory_name":"Dropdown","content/statistics/tp_dateachieved":"Range Slider","content/institution/tp_stateprovinceid_name":"Dropdown"},r={"content/tp_position_name":1,"content/tp_positioncategory_name":"Checkboxes","content/tp_weight":7,"content/crfe9_throws_label":9,"content/tp_heightmetric":8,"content/crfe9_committed_label":11,"content/crfe9_bats_label":10,"content/gendercode_label":15,"content/tp_state_name":-1,"content/tp_age":12,"content/tp_year":13,"content/tp_institution_name":3,"content/institution/tp_nickname":2,"content/institution/tp_organizationid_name":5,"content/institution/tp_conferenceid_name":6,"content/institution/tp_divisionnumeric":"Checkboxes","content/statistics/tp_isverifiedcode_label":"Radio","content/statistics/tp_valueinteger":"Range Slider","content/statistics/tp_valuedecimal":"Range Slider","content/statistics/tp_type_name":"Dropdown","content/statistics/tp_tovalueinteger":"Range Slider","content/statistics/tp_tovaluedecimal":"Range Slider","content/statistics/tp_positioncategory_name":"Dropdown","content/statistics/tp_dateachieved":"Range Slider","content/institution/tp_stateprovinceid_name":4};function l(t){var e=.3937*t/12,n=Math.floor(e);return n+"′"+Math.round(12*(e-n))+"″"}function c(t,i,o,d){n={search:t,filter:d,count:!0,skip:10*(i-1),top:50,searchMode:"any",queryType:"simple",facets:["content/tp_positioncategory_name,count:25,sort:count","content/tp_position_name,count:25,sort:count","content/tp_state_name,count:55,sort:count","content/tp_year,values:2023|2035","content/crfe9_bats_label,count:5,sort:count","content/crfe9_throws_label,count:5,sort:count","content/tp_heightmetric,count:15,sort:count","content/tp_weight,count:15,sort:count","content/crfe9_committed_label,count:5,sort:count","content/gendercode_label,count:5,sort:count","content/tp_age,values:0|1000000","content/tp_institution_name,count:15,sort:count","content/institution/tp_nickname,count:15,sort:count","content/institution/tp_stateprovinceid_name,count:55,sort:count","content/institution/tp_organizationid_name,count:15,sort:count","content/institution/tp_conferenceid_name,count:55,sort:count","content/institution/tp_divisionnumeric,count:5,sort:count"]},o&&(n.orderby=o),$.ajax({cache:!1,url:"https://playerattributesearch.search.windows.net/indexes/azureblob-index-facet-by-label-v2/docs/search?api-version=2023-07-01-Preview",method:"POST",contentType:"application/json",headers:{"api-key":"ae9KSgTsck4Z6jpkwLCJE8C63FdOQVjQ1Vm3gQ9s8MAzSeC8RdOV",ContentType:"application/json"},data:JSON.stringify(n),success:function(n){if(0===n.value.length)return $("#results").html('
No records found for your search.
'),$("#resultCount").text(""),$(".pagination").empty(),void $("#filters").empty();$("#results").empty();var d=n["@odata.count"],u=Math.ceil(d/12);$.each(n.value,(function(t,e){if(!(t>11)){var n=e.content.tp_profilepicurl||"",i=e.content.firstname||"",o=e.content.lastname||"",a=e.content.tp_position_name||"",s=e.content.institution.tp_nickname||"",r=e.content.tp_state_name||"",l=n.replace("https://teamportalsbaseball.blob.core.windows.net/players/","https://ik.imagekit.io/c2nnhwsss/"),c='\n
\n
\n
\n
\n '+(n?`${i} ${o}`:'')+`\n
\n ${i}${o}\n
\n
\n
\n
\n
    `;a&&(c+=`
  • ${a}
  • `),s&&(c+=`
  • ${s}
  • `),r&&(c+=`
  • ${r}
  • `),c+=`
  • View
  • \n
\n
\n
\n
`,$("#results").append(c)}})),$(".pagination").empty();var h=Math.max(1,i-2),p=Math.min(u,i+2);i<=3&&(p=Math.min(5,u)),i>=u-2&&(h=Math.max(1,u-4)),i>1?$(".pagination").append(`
  • `):$(".pagination").append('
  • ');for(let t=h;t<=p;t++)t===i?$(".pagination").append(`
  • ${t}
  • `):$(".pagination").append(`
  • ${t}
  • `);i`):$(".pagination").append('
  • '),$(".pagination .page-link").on("click",(function(e){e.preventDefault();var n=$(this).data("page");c(t,n,o)})),d<10?$(".pagination").hide():$(".pagination").show();var f=12*(i-1)+1,m=Math.min(f+12-1,d);$("#resultCount").text(`Showing ${f}-${m} of ${d} results`),$("#filters").empty(),$("#filter-dropdowns").empty(),n["@search.facets"],$.each(n["@search.facets"],(function(t,n){if("content/institution/tp_divisionnumeric"==t)return!0;if("content/tp_age"==t)return!0;if("content/gendercode_label"==t&&n.length<2)return!0;if("content/tp_heightmetric"==t&&n.length<2)return!0;if("content/tp_weight"==t&&n.length<2)return!0;if(""==n||null==n)return!0;var i=r[t],o="";i>8&&(o="half-width float");var c=$(`
    `),d=a[t]||t,u=s[t];if(!t.includes("statistics")){if("Checkboxes"==u){var h=$(`\n
    \n

    \n ${d}\n

    \n
    \n
    `);if("content/tp_year"==t)for(let n=0;n<3;n++){let i=2023+n;var p=e[t]&&e[t]===facet.value?"checked":"",f=$(`\n
    \n \n \n
    `);h.find(".list").append(f)}else{var m=[];$.each(n,(function(t,e){var n=e.value;m.push(n)})),m.sort((function(t,e){return t-e})),$.each(m,(function(n,i){var o=e[t]&&e[t]===i.value?"checked":"",a=(i.value,$(`\n
    \n \n \n
    \n `));h.find(".list").append(a)}))}}if("Range Slider"==u&&"content/tp_age"!=t){h=$(`

    ${d}

    `);var g,v,y,_,b,x=[],w=[];$.each(n,(function(n,i){e[t]&&(e[t],i.value);var o=i.value;x.push(o)})),x.sort((function(t,e){return t-e})),g=x[0],v=x[x.length-1],w.push(g),w.push(v),"content/tp_heightmetric"==t&&(l(g),l(v),y="Min Height",_="Max Height",b="height"),"content/tp_weight"==t&&(y="Min Weight",_="Max Weight",b="weight");var S=$(`
    `);h.find(".range-list").append(S)}"Radio"==u&&(h=$(`

    ${d}

    `),$.each(n,(function(n,i){var o=e[t]&&e[t]===i.value?"checked":"",a=i.value,s=$(`\n
    \n \n \n
    \n `);h.find(".list").append(s)}))),"Dropdown"==u&&(h=$(`\n
    \n \n \n
    `),m=[],$.each(n,(function(t,e){var n=e.value;m.push(n)})),m.sort(),$.each(m,(function(n,i){var o=e[t]&&e[t]===i.value?"checked":"",a=$(`\n
    \n \n \n
    \n `);h.find(".dropdown-menu").append(a)}))),"Select"==u&&(h=$(`\n
    \n \n \n
    `),m=[],$.each(n,(function(t,e){var n=e.value;m.push(n)})),m.sort(),$.each(m,(function(n,i){var o=e[t]&&e[t]===i.value?"checked":"",a=$(`\n \n `);h.find(".form-select").append(a)}))),c.append(h),$("#filter-dropdowns").append(c)}})),$(".filter-dropdown-holder").show(),$("#filterSection").show(),function(){function t(t,n,i){var o=t.querySelector(".min"),a=t.querySelector(".max"),s=t.querySelector(".lower"),r=t.querySelector(".upper"),l=t.querySelector(".legend"),c=parseInt(t.getAttribute("data-thumbsize")),d=parseInt(t.getAttribute("data-rangewidth")),u=parseInt(t.getAttribute("data-rangemin")),h=parseInt(t.getAttribute("data-rangemax"));o.setAttribute("max",n),a.setAttribute("min",n),o.style.width=parseInt(c+(n-u)/(h-u)*(d-2*c))+"px",a.style.width=parseInt(c+(h-n)/(h-u)*(d-2*c))+"px",o.style.left="0px",a.style.left=parseInt(o.style.width)+"px",o.style.top=s.offsetHeight+"px",a.style.top=s.offsetHeight+"px",l.style.marginTop=o.offsetHeight+"px",t.style.height=s.offsetHeight+o.offsetHeight+l.offsetHeight+"px",a.value>h-1&&a.setAttribute("data-value",h),a.value=a.getAttribute("data-value"),o.value=o.getAttribute("data-value"),s.innerHTML=o.getAttribute("data-value"),r.innerHTML=a.getAttribute("data-value"),"content/tp_heightmetric"==i&&(s.innerHTML=e(o.getAttribute("data-value")),r.innerHTML=e(a.getAttribute("data-value"))),"content/tp_weight"==i&&(s.innerHTML=o.getAttribute("data-value")+"lbs",r.innerHTML=a.getAttribute("data-value")+"lbs")}function e(t){var e=.3937*t/12,n=Math.floor(e);return n+"′"+Math.round(12*(e-n))+"″"}function n(e,n){var i=e.parentElement,o=i.querySelector("#min"),a=i.querySelector("#max"),s=Math.floor(o.value),r=Math.floor(a.value);o.setAttribute("data-value",s),a.setAttribute("data-value",r),t(i,(s+r)/2,n)}document.querySelectorAll(".min-max-slider").forEach((function(e){!function(e){var i=e.querySelector(".min"),o=e.querySelector(".max"),a=parseInt(i.getAttribute("min")),s=parseInt(o.getAttribute("max")),r=(a+s)/2,l=e.getAttribute("data-legendnum"),c=e.getAttribute("data-type");console.log(c),i.setAttribute("data-value",a),o.setAttribute("data-value",s),e.setAttribute("data-rangemin",a),e.setAttribute("data-rangemax",s),e.setAttribute("data-thumbsize",12),e.setAttribute("data-rangewidth",e.offsetWidth);var d=document.createElement("span"),u=document.createElement("span");d.classList.add("lower","value"),u.classList.add("upper","value"),d.appendChild(document.createTextNode(a)),u.appendChild(document.createTextNode(s)),e.insertBefore(d,i.previousElementSibling),e.insertBefore(u,i.previousElementSibling);var h=document.createElement("div");h.classList.add("legend");for(var p=[],f=0;f0){var a=0;do{void 0===e[i]?e[i]=s+" eq '"+t[a]+"' ":a<=t.length-1&&(n=" or ",e[i]=e[i]+n+s+" eq '"+t[a]+"' "),a++}while(a",{value:o,text:"Filter "+o,"ajax-data":JSON.stringify(n)}))},error:function(t,e,n){console.log(t)}})})),$(".searchContainer").on("click",".savedSearchLink",(function(){var t=$(this).attr("ajax-data");JSON.parse(t)&&c()}))}))}var i=n(751),o=n.n(i);window.onload=()=>{(function(){const t=document.querySelector(".search-from-anywhere .form"),e=document.querySelectorAll(".search-from-anywhere .form-group .dropdown");function n(){null!==this.offsetParent?this.style.display="none":(this.style.display="block",this.querySelector("input").focus())}function i(t,e,n){const i=this.dataset.value,o=this.textContent;t.textContent=o,e.value=i,e.setSelected,n.style.display="none",n.querySelector("input").value="",n.querySelectorAll("div").forEach((t=>{t.classList.contains("is-select")&&t.classList.remove("is-select"),null===t.offsetParent&&(t.style.display="block")})),this.classList.add("is-select"),t.classList.add("is-select")}function o(t,e){const n=e.querySelectorAll(".dropdown-menu-inner div"),i=this.value.toLowerCase(),o=t.filter((t=>t.text.toLowerCase().includes(i))),a=(t.filter((t=>t.value.toLowerCase().startsWith(i))),o.map((e=>t.indexOf(e))));t.forEach((e=>{a.includes(t.indexOf(e))?null===n[t.indexOf(e)].offsetParent&&(n[t.indexOf(e)].style.display="block"):n[t.indexOf(e)].style.display="none"}))}function a(t,e){null===e.target.closest(".dropdown")&&e.target!==this&&null!==t.offsetParent&&(t.style.display="none")}e.length>0&&e.forEach((t=>{!function(t){const e=t.querySelectorAll("option"),s=Array.prototype.slice.call(e),r=document.createElement("div");r.classList.add("dropdown"),t.insertAdjacentElement("afterend",r);const l=document.createElement("div");l.classList.add("dropdown-select"),l.textContent=s[0].textContent,r.appendChild(l);const c=document.createElement("div");c.classList.add("dropdown-menu"),r.appendChild(c),l.addEventListener("click",n.bind(c));const d=document.createElement("input");d.placeholder="Search...",d.type="text",d.classList.add("dropdown-menu-search"),c.appendChild(d);const u=document.createElement("div");u.classList.add("dropdown-menu-inner"),c.appendChild(u),s.forEach((e=>{const n=document.createElement("div");n.classList.add("dropdown-menu-item"),n.dataset.value=e.value,n.textContent=e.textContent,u.appendChild(n),n.addEventListener("click",i.bind(n,l,t,c))})),u.querySelector("div").classList.add("selected"),d.addEventListener("input",o.bind(d,s,c)),document.addEventListener("click",a.bind(r,c)),t.style.display="none"}(t)})),null!==t&&t.addEventListener("submit",(t=>{t.preventDefault()}))})(),e(),document.querySelectorAll(".gauge-container").forEach((e=>{let n=e.dataset.value,i=e.dataset.max,o=e.dataset.targetvalue,a=e.dataset.units,s=n/o*100;t(e,{max:i,value:n,valuetarget:o,label:function(t){return Math.round(t)},color:function(){return n",u="
    Target: "+o+a+"
    ";let h;h=n==o?"complete":"";const p="
    ";e.insertAdjacentHTML("beforeend",d),e.insertAdjacentHTML("beforeend",u),e.insertAdjacentHTML("beforebegin",p)})),function(){let t=!1,e=document.querySelector(".search-from-anywhere #searchModalBtn"),n=document.querySelector(".search-from-anywhere .search-input-group.filters"),i="";if(n){var o={};n.addEventListener("click",(e=>{let a=n.querySelectorAll("select");a.length,i="";let s=0;a.forEach((function(t,n){if($(e.target).hasClass("dropdown-select")&&e.target,t.options[t.selectedIndex].value){var i=t.options[t.selectedIndex].value,a=t.dataset.filterType;"content/tp_state_name"==a?i&&(i=t.options[t.selectedIndex].text,o[a]=i,s++):(o[a]=i,s++)}})),s>0&&(t=!0);for(const t in o)o[t]&&(i+=`${o[t]} `,00&&(t=!0)}))}e.addEventListener("click",(e=>{let n=$("#searchModalInput").val();""==n&&(n="*");let o="~/player-search/?search="+n;t?(o=o+" "+i,window.location.href=o):window.location.href=o}))}(),document.querySelector(".addMasonry")&&new(o())(".addMasonry")},(()=>{const t=document.querySelectorAll(".needs-validation");Array.from(t).forEach((t=>{t.addEventListener("submit",(e=>{t.checkValidity()||(e.preventDefault(),e.stopPropagation()),t.classList.add("was-validated")}),!1)}))})()})()})();