( function() {  var mapping = [{"appname":"", "appid":"wireless_apps_winc1500_introduction", "path":"GUID-D41DC58E-4197-40C3-B2E5-298EE2491305.html"},{"appname":"", "appid":"wireless_apps_winc1500_wifi_tcp_server_in_softap", "path":"GUID-46A687C1-607D-45CA-8E2C-E10E16EF22A7.html"},{"appname":"", "appid":"wireless_apps_winc1500_wifi_prov_via_softap", "path":"GUID-C95FB72C-D74D-49D7-B5C4-BD8464838039.html"},{"appname":"", "appid":"wireless_apps_winc1500_tcp_client", "path":"GUID-79933B21-92EE-4851-BCFD-566505CF43DF.html"},{"appname":"", "appid":"wireless_apps_winc1500_ap_scan", "path":"GUID-915C13AA-4559-43AF-865E-210A114E9733.html"},{"appname":"", "appid":"wireless_apps_winc1500_wifi_socket_demos", "path":"GUID-52D24502-1FE3-473D-9DA1-624A4E26166B.html"},{"appname":"", "appid":"wireless_apps_winc1500_socket_sntp_app", "path":"GUID-EC458E8F-7C6B-4F4A-929B-3DB23A6508CF.html"},{"appname":"", "appid":"wireless_apps_winc1500_socket_certificate_download_ota_app", "path":"GUID-BD742FD9-613D-4BCD-9E9F-7A5E7A3BDCA2.html"},{"appname":"", "appid":"wireless_apps_winc1500_wifi_bypass_demos", "path":"GUID-40C3ABB9-0449-4A53-94DF-0DFB4CE5540E.html"},{"appname":"", "appid":"wireless_apps_winc1500_bypass_sta_ap_mode_app", "path":"GUID-456F0E35-F354-495B-990A-4260F78B7E1B.html"},{"appname":"", "appid":"wireless_apps_winc1500_bypass_ssl_app", "path":"GUID-45DFB9CF-9D14-4229-8684-879C5FE9ED4E.html"},{"appname":"", "appid":"wireless_apps_winc1500_bypass_iperf_app", "path":"GUID-9E01D5E1-824A-4A25-AA2C-D6AC57E7FB37.html"},{"appname":"", "appid":"wireless_apps_winc1500_supported_modes", "path":"GUID-74562C24-BC96-4BBA-8346-836D98E39F8C.html"},{"appname":"", "appid":"wireless_apps_winc1500_power_save_mode", "path":"GUID-E9C1573C-3116-41FF-B88B-424E4E4AEBF8.html"},{"appname":"", "appid":"wireless_apps_winc1500_wifi_prov_via_wps", "path":"GUID-103308B4-FF34-41B2-A825-F2C6837EC078.html"},{"appname":"", "appid":"wireless_apps_winc1500_wifi_winc_sta_bypass", "path":"GUID-00146421-1EA8-48A6-9637-4AE38CC69A31.html"},{"appname":"", "appid":"wireless_apps_winc1500_create_winc_project_scratch", "path":"GUID-8C38797E-1BBB-4ACF-A496-EEC03A6075AC.html"},{"appname":"", "appid":"wireless_apps_winc1500_fw_upgrade", "path":"GUID-AE48AE71-0F91-444B-8AC3-C5C1939A37FB.html"},{"appname":"", "appid":"wireless_apps_winc1500_same54_bypassmode_scratch", "path":"GUID-34243CDA-B156-4D2B-B9C1-7ED5BE2586A6.html"},{"appname":"", "appid":"wireless_apps_winc1500_bypass_mqtt_app", "path":"GUID-F541358A-9210-4065-B206-8CA48009BF68.html"},{"appname":"", "appid":"wireless_apps_winc1500_bypass_ping_app", "path":"GUID-705D1F84-1489-4A43-9406-404760FD0167.html"},{"appname":"", "appid":"wireless_apps_winc1500_bypass_sntp_app", "path":"GUID-5947E22A-1032-43CF-A6AB-AC31EBAAE0F1.html"},{"appname":"", "appid":"wireless_apps_winc1500_bypass_wifi_provision_app", "path":"GUID-C129E413-3D92-4428-8646-BC9190FC7308.html"},{"appname":"", "appid":"wireless_apps_winc1500_same54_socketmode_scratch", "path":"GUID-BB3E45B9-E26C-4E97-8325-FBF9B81BBF81.html"},{"appname":"", "appid":"wireless_apps_winc1500_samd21_socketmode_scratch", "path":"GUID-7C51815B-F559-46A3-A8B7-3F48A517B4A4.html"},{"appname":"", "appid":"wireless_apps_winc1500_socket_iperf_app", "path":"GUID-0FD5A351-8B22-466E-90C3-3DCA88C651D3.html"},{"appname":"", "appid":"wireless_apps_winc1500_socket_mqtt_app", "path":"GUID-AE60932A-703A-481E-817A-53DCFD93BA11.html"},{"appname":"", "appid":"wireless_apps_winc1500_socket_ota_app", "path":"GUID-6D2D8401-87A9-4600-8700-F113BA941E5D.html"},{"appname":"", "appid":"wireless_apps_winc1500_socket_ping_app", "path":"GUID-BADEF0EB-B3EA-4EF9-8B9B-8DAC044C7957.html"},{"appname":"", "appid":"wireless_apps_winc1500_socket_ssl_app", "path":"GUID-D776A67C-BE2A-4EC3-A149-32AC22EB4C5A.html"},{"appname":"", "appid":"wireless_apps_winc1500_socket_sta_ap_mode_app", "path":"GUID-F459DB00-6C0A-4DC0-99F6-C67C5C4A7C52.html"},{"appname":"", "appid":"wireless_apps_winc1500_socket_wifi_provision_app", "path":"GUID-DB7F0202-30DD-4848-AE43-CF154294E842.html"}];
            var mchp = (function (mchp) {
                var mchp = mchp || {};
                var mapping = [];
        
                mchp.utils = {};
        
                mchp.utils.getQueryParam = function (name, url = window.location.href) {
                  name = name.replace(/[\[\]]/g, "\\$&");
                  var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
                    results = regex.exec(url);
                  if (!results) return null;
                  if (!results[2]) return "";
                  return decodeURIComponent(results[2].replace(/\+/g, " "));
                };

                mchp.utils.isFirefox = typeof InstallTrigger !== 'undefined';
        
                mchp.init = function (options) {
                  mchp.mapping = options.mapping || [];
                  mchp.bindEvents();
                };
        
                mchp.bindEvents = function () {
                    if (mchp.utils.isFirefox) {
                      window.onload = mchp.checkRedirect;
                    } else {
                      document.onreadystatechange = mchp.checkRedirect;
                    }
                };

                mchp.checkRedirect = function() {
                  var contextId = mchp.utils.getQueryParam("contextId") || "";
                  if (contextId && contextId != undefined) {
                    var record = mchp.mapping.find(function(x){
                      return x.appid && x.appid.toLowerCase() == contextId.toLowerCase();
                    });
                    if (record && record.path) {
                      window.stop();
                      window.location = record.path;
                    }
                  }
                };
        
                return {
                  init: mchp.init,
                };
              })();
        
              mchp.init({
                mapping: mapping
              });

        })();