{"version":3,"sources":["app/experiencesearch.js"],"names":["define","$","$dropdowns","searchServiceGuids","Array","pageCount","parseInt","text","currentPage","totalExperiencesFound","experienceResults","manualStateChange","updateFacadeText","facadeEl","$selectedItem","currentText","$this","this","find","length","$facadeEl","siblings","GetSearchCriteria","show","hide","each","selectedOption","hasClass","obj","Object","Guid","attr","push","UpdateHistory","url","location","protocol","host","pathname","join","queryString","History","pushState","guids","LoadContent","guid","window","search","params","substring","split","i","undefined","guidArray","parent","addClass","prop","append","GetAvailableFilters","BindRemoveCriteriaClick","ResetSearch","html","remove","removeAttr","removeClass","call","fadeOut","promise","done","ShowSearchResults","ajax","type","data","JSON","stringify","contentType","dataType","success","response","d","statement","positionStatement","name","error","xhr","ajaxOptions","thrownError","skip","take","Experiences","TotalExperiencesFound","serviceGuids","ajaxUrl","slice","p","fadeIn","ServiceGuids","inArray","children","not","unbind","click","val","dataGuid","selector","closest","getState","Adapter","bind","off","on","change"],"mappings":"AAAAA,QAAQ,SAAU,kBAAmB,SAAUC,GAC7C,IAiDMC,EAjDFC,EAAqB,IAAIC,MACzBC,EAAYC,SAASL,EAAE,oBAAoBM,QAC3CC,EAAc,EACdC,EAAwB,EACxBC,EAAoB,IAAIN,MACxBO,GAAoB,EAmBxB,SAASC,EAAiBC,GACxB,IACEC,EAEAC,EAHEC,EAAQf,EAAEgB,OAKdH,EAAgBE,EAAME,KAAK,cAERC,SAInBC,UAAYJ,EAAMK,SAASR,GAG3BE,EAAcD,EAAcP,OAGxBa,UAAUD,QAAUJ,EAAYI,QAClCC,UAAUb,KAAKQ,IAkDnB,SAASO,IACPrB,EAAE,kBAAkBsB,OACpBtB,EAAE,kBAAkBuB,OAEpBrB,EAAqB,IAAIC,MAEzBH,EAAE,mBAAmBwB,KAAK,WACxB,IAAIC,EAAiBzB,EAAEgB,MAAMC,KAAK,mBAClC,GAAKjB,EAAEyB,GAAgBC,SAAS,YAAhC,CAEA,IAAIC,EAAM,IAAIC,OACdD,EAAIE,KAAO7B,E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C,EAAE,wBAAwBoG,MAAM,WAC9BlG,EAAqB,IAAIC,MAEzBwD,IACAF,MAGFzD,EAAE,yBAAyBoG,MAAM,WAC/BhC","file":"experiencesearch.js","sourcesContent":["define(['jquery', 'jquery.history'], function ($) {\r\n  var searchServiceGuids = new Array();\r\n  var pageCount = parseInt($(\"#hiddenPageCount\").text());\r\n  var currentPage = 0;\r\n  var totalExperiencesFound = 0;\r\n  var experienceResults = new Array();\r\n  var manualStateChange = true;\r\n\r\n  LoadContent();\r\n\r\n  (function (window, undefined) {\r\n    // Define variables\r\n    var History = window.History,\r\n      State = History.getState();\r\n\r\n    // Bind statechange event\r\n    History.Adapter.bind(window, 'statechange', function () {\r\n      var State = History.getState();\r\n      if (manualStateChange == true) {\r\n        LoadContent()\r\n      }\r\n      manualStateChange = true;\r\n    });\r\n  })(window)\r\n\r\n  function updateFacadeText(facadeEl) {\r\n    var $this = $(this),\r\n      $selectedItem,\r\n      $siblingEl,\r\n      currentText;\r\n\r\n    $selectedItem = $this.find(':selected');\r\n\r\n    if (!$selectedItem.length) { return; }\r\n\r\n    // get the facade element used to display\r\n    // the text of the selected option\r\n    $facadeEl = $this.siblings(facadeEl);\r\n\r\n    // get 'value' attribute value for selected option\r\n    currentText = $selectedItem.text();\r\n\r\n    // update select text label with current selected option value\r\n    if ($facadeEl.length && currentText.length) {\r\n      $facadeEl.text(currentText);\r\n    }\r\n  }\r\n\r\n  // execute this once the DOMContentLoaded has fired (dom ready)\r\n  $(function (context, targetEl, facadeEl) {\r\n    var $dropdowns = $(context).find(targetEl);\r\n    var eventNamespace = context;\r\n\r\n    if ($dropdowns.length) {\r\n      $dropdowns\r\n        .off(eventNamespace)\r\n        .on('change' + eventNamespace, function () {\r\n\r\n          updateFacadeText.call(this, facadeEl);\r\n        })\r\n    }\r\n\r\n    GetAvailableFilters();\r\n  }('.selector-ele', 'select', 'span'));\r\n\r\n  $(\".select-service\").change(function () {\r\n    $(\".selected-matters\").hide();\r\n    $(\".matters-search\").show();\r\n\r\n    var selectedOption = $(this).find(\"option:selected\");\r\n    $(this)\r\n      .attr(\"disabled\", \"true\")\r\n      .parent().addClass('is-disabled');\r\n    $(\".form-results__criteria\").append('<a role=\"button\" data-parent-id=' + $(this).attr(\"id\") + ' data-guid=\"' + $(selectedOption).attr(\"data-guid\") + '\" class=\"btn btn-grey  form-results__keyword\" href=\"javascript:void(0)\">' + $(selectedOption).text() + '</a>');\r\n\r\n    currentPage = 0;\r\n\r\n    GetSearchCriteria();\r\n    GetAvailableFilters();\r\n    BindRemoveCriteriaClick();\r\n    UpdateHistory()\r\n  });\r\n\r\n  $(\".form-results__clear\").click(function () {\r\n    searchServiceGuids = new Array();\r\n\r\n    ResetSearch();\r\n    GetAvailableFilters();\r\n  });\r\n\r\n  $(\".btn-accordion.search\").click(function () {\r\n    ShowSearchResults();\r\n  })\r\n\r\n  function GetSearchCriteria() {\r\n    $(\".loading-image\").show();\r\n    $(\".landing-lists\").hide();\r\n\r\n    searchServiceGuids = new Array();\r\n\r\n    $(\".select-service\").each(function () {\r\n      var selectedOption = $(this).find(\"option:selected\");\r\n      if (!$(selectedOption).hasClass(\"selector\"))\r\n        return;\r\n      var obj = new Object();\r\n      obj.Guid = $(selectedOption).attr(\"data-guid\");\r\n      searchServiceGuids.push(obj);\r\n    })\r\n  }\r\n\r\n  function UpdateHistory() {\r\n    var url = [location.protocol, '//', location.host, location.pathname].join('');\r\n    var queryString = \"\";\r\n\r\n    $(\".form-results__criteria .form-results__keyword\").each(function () {\r\n      //get guid\r\n      if (queryString == \"\")\r\n        queryString = \"?guids=\" + $(this).attr(\"data-guid\");\r\n      else\r\n        queryString += \",\" + $(this).attr(\"data-guid\")\r\n    })\r\n\r\n    manualStateChange = false;\r\n\r\n    if (queryString == \"\")\r\n      History.pushState({ guids: searchServiceGuids }, $(\"title\").text(), url);\r\n    else\r\n      History.pushState({ guids: searchServiceGuids }, $(\"title\").text(), url + queryString);\r\n  }\r\n\r\n  function LoadContent() {\r\n    var queryString = window.location.search;\r\n    queryString = queryString.substring(1);\r\n    var params = queryString.split(\"&\");\r\n    var guid;\r\n\r\n    for (i = 0; i < params.length; i++) {\r\n      var temp = params[i].split(\"=\");\r\n      guid = temp[1];\r\n    }\r\n\r\n    if (guid !== undefined) {\r\n      $(\".selected-matters\").hide();\r\n      $(\".matters-search\").show();\r\n\r\n      var guidArray = guid.split(\",\");\r\n\r\n      for (i = 0; i < guidArray.length; i++) {\r\n        var selectedOption = $(\".select-service\").find(\"[data-guid='\" + guidArray[i] + \"']\");\r\n\r\n        $(\".select-service\")\r\n          .attr(\"disabled\", \"true\")\r\n          .parent().addClass('is-disabled');\r\n\r\n        $(selectedOption).prop(\"selected\", true);\r\n        $(\".form-results__criteria\").append('<a role=\"button\" data-guid=\"' + $(selectedOption).attr(\"data-guid\") + '\" class=\"btn btn-grey  form-results__keyword\" href=\"javascript:void(0)\">' + $(selectedOption).text() + '</a>');\r\n      }\r\n\r\n      GetSearchCriteria();\r\n      GetAvailableFilters();\r\n      BindRemoveCriteriaClick();\r\n    }\r\n  }\r\n\r\n  function ResetSearch() {\r\n    $(\".learn-more\").hide();\r\n    $(\".form-results\").hide();\r\n    $(\".articles-list\").html(\"\");\r\n    $(\".filtering.filtering--result-stat\").hide();\r\n    $(\".form-results__keyword\").remove();\r\n    $(\".select-service\").each(function () {\r\n\r\n      $(this).find(\"option[value='-1']\").prop(\"selected\", true);\r\n      $(this)\r\n        .removeAttr(\"disabled\")\r\n        .parent().removeClass('is-disabled');\r\n\r\n      updateFacadeText.call(this, 'span');\r\n    });\r\n\r\n    $(\".matters-search .mod-feature\").fadeOut(\"slow\", function () {\r\n      $(\".matters-search .mod-feature\").html(\"\");\r\n    })\r\n\r\n    $(\".selector\").show();\r\n    $(\".selected-matters\").show();\r\n    $(\".matters-search\").hide();\r\n\r\n    currentPage = 0;\r\n  }\r\n\r\n  function GetAvailableFilters() {\r\n    $(\".matters-search .mod-feature\").fadeOut(\"slow\", function () {\r\n      $(\".matters-search .mod-feature\").html(\"\");\r\n    }).promise().done(function () {\r\n      if ($(\".form-results__keyword\").length == 0) {\r\n        ResetSearch();\r\n        $(\".btn-accordion.search\").hide();\r\n      }\r\n\r\n      ShowSearchResults();\r\n\r\n      $.ajax({\r\n        type: \"POST\",\r\n        url: \"/Layouts/WebUserControls/Main/Experience/ExperienceSearchService.asmx/GetPositionStatement\",\r\n        data: JSON.stringify({ searchServiceGuids: searchServiceGuids }), //add 1 so we can tell if there are more to load\r\n        contentType: \"application/json; charset=utf-8\",\r\n        dataType: \"json\",\r\n        success: function (response) {\r\n          if (response.d.length == 1) {\r\n            var statement = response.d[0].positionStatement;\r\n            if (statement != \"\") {\r\n              $(\".matters-search .intro.mod-intro\").html(statement);\r\n              $(\".matters-search .intro.mod-intro\").show();\r\n            }\r\n            else\r\n              $(\".matters-search .intro.mod-intro\").hide();\r\n          }\r\n          else {\r\n            $(\".matters-search .intro.mod-intro\").hide();\r\n          }\r\n\r\n          $(\".learn-more-link\").html(\"\");\r\n\r\n          for (i = 0; i < response.d.length; i++) {\r\n            $(\".learn-more-link\").append(\"<a class='read-more' href='\" + response.d[i].url + \"'>\" + response.d[i].name + \"</a><br />\")\r\n          }\r\n        },\r\n        error: function (xhr, ajaxOptions, thrownError) {\r\n\r\n        }\r\n      });\r\n    });\r\n  }\r\n\r\n  function FilterFilters(serviceGuids) {\r\n    $(\".recent-listings\").hide();\r\n\r\n    //disable all selectors\r\n    $(\".selector\").addClass(\"is-disabled\");\r\n    $(\".select-service .selector\").hide();\r\n\r\n    //then reanable\r\n    $(\".selector\").each(function () {\r\n      if ($.inArray($(this).attr(\"data-guid\"), serviceGuids) >= 0) {\r\n        $(this).show();\r\n        $(this).removeClass(\"is-disabled\");\r\n      }\r\n    });\r\n\r\n    $(\".select-service\").each(function () {\r\n      if ($(this).children().not(\".is-disabled\").length == 1) {\r\n        $(this)\r\n          .attr(\"disabled\", \"true\")\r\n          .parent().addClass('is-disabled');\r\n      }\r\n    })\r\n  }\r\n\r\n  function ShowSearchResults() {\r\n    $(\".btn-accordion.search\").hide();\r\n\r\n    $.ajax({\r\n      type: \"POST\",\r\n      url: \"/Layouts/WebUserControls/Main/Experience/ExperienceSearchService.asmx/FilterMenu\",\r\n      data: JSON.stringify({ searchServiceGuids: searchServiceGuids, skip: (currentPage * pageCount), take: pageCount }),\r\n      contentType: \"application/json; charset=utf-8\",\r\n      dataType: \"json\",\r\n      success: function (response) {\r\n        experienceResults = response.d.Experiences;\r\n        currentPage = currentPage;\r\n        pageCount = parseInt($(\"#hiddenPageCount\").text());\r\n        totalExperiencesFound = response.d.TotalExperiencesFound;\r\n\r\n        if ((currentPage + 1) * pageCount < totalExperiencesFound) {\r\n          $(\".btn-accordion.search\").show();\r\n        }\r\n\r\n        var guidArray = experienceResults.slice(0, pageCount);\r\n\r\n        var ajaxUrl = \"/Layouts/WebUserControls/Main/Experience/AjaxLoadListItems.aspx?guidArray=\" + guidArray.join(\",\");\r\n        $.ajax({ url: ajaxUrl })\r\n          .done(function (p) {\r\n            $(\".matters-search .mod-feature\").append(p);\r\n            $(\".matters-search .mod-feature\").fadeIn();\r\n            $(\".form-results\").show();\r\n            $(\".loading-image\").hide();\r\n          });\r\n\r\n        currentPage++;\r\n        $(\".form-results\").show();\r\n        $(\".filtering.filtering--result-stat\").show();\r\n        $(\".learn-more\").show();\r\n        $(\".loading-image\").hide();\r\n\r\n        FilterFilters(response.d.ServiceGuids);\r\n        $(\".filtering__results\").text(\"Result(s): \" + response.d.TotalExperiencesFound);\r\n\r\n        UpdateHistory();\r\n      },\r\n      error: function (xhr, ajaxOptions, thrownError) {\r\n\r\n      }\r\n    });\r\n  }\r\n\r\n  function BindRemoveCriteriaClick() {\r\n    //remove search\r\n    $(\".form-results__keyword\").unbind();\r\n    $(\".form-results__keyword\").click(function () {\r\n      if ($(this).hasClass(\"keyword-field\")) {\r\n        $(\".search-form__input\").val(\"\");\r\n      }\r\n      else {\r\n\r\n        var dataGuid = $(this).attr(\"data-guid\");\r\n        $('[data-guid=\"' + dataGuid + '\"]').removeClass(\"is-selected\");\r\n        var selector = $(\"#\" + $(this).attr(\"data-parent-id\")).find('[data-guid=\"' + dataGuid + '\"]')\r\n        $(selector).parent().removeAttr(\"disabled\");\r\n        $(selector).removeClass(\"is-selected\");\r\n        $(selector).parent().find(\"option[value='-1']\").attr('selected', 'selected');\r\n        $(selector).parent().find(\"option[value='-1']\").prop('selected', 'true');\r\n\r\n        updateFacadeText.call($(selector).parent(), 'span');\r\n        $(selector).closest('.selector-ele').removeClass(\"is-disabled\");\r\n      }\r\n\r\n      $(this).remove();\r\n      currentPage = 0;\r\n      GetSearchCriteria();\r\n      GetAvailableFilters()\r\n    })\r\n  }\r\n});"]}