diff --git a/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml b/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml index 7e4652d6a..1dfef1cdb 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml +++ b/src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml @@ -12,8 +12,6 @@ - - @@ -101,7 +99,7 @@ - + @@ -126,8 +124,8 @@ - - + + diff --git a/src/opnsense/mvc/app/models/OPNsense/Core/ACL.php b/src/opnsense/mvc/app/models/OPNsense/Core/ACL.php index acb04dee3..ad08a6642 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Core/ACL.php +++ b/src/opnsense/mvc/app/models/OPNsense/Core/ACL.php @@ -82,6 +82,14 @@ class ACL $this->legacyUsers[$node->name->__toString()] = array() ; $this->legacyUsers[$node->name->__toString()]["uid"] = $node->uid->__toString(); $this->legacyUsers[$node->name->__toString()]["groups"] = array(); + $this->legacyUsers[$node->name->__toString()]["priv"] = array(); + foreach ($node->priv as $priv) { + if (substr($priv, 0, 5) == "page-") { + if (array_key_exists($priv->__toString(), $legacyPageMap)) { + $this->legacyUsers[$node->name->__toString()]["priv"][] = $legacyPageMap[$priv->__toString()] ; + } + } + } } elseif ($key == "group") { $groupmap[$node->name->__toString()] = $node ; } @@ -115,6 +123,16 @@ class ACL public function isPageAccessible($username, $url) { if (array_key_exists($username, $this->legacyUsers)) { + // search user privs + foreach ($this->legacyUsers[$username]["priv"] as $privset) { + foreach ($privset as $urlmask) { + $match = str_replace(array(".", "*","?"), array("\.", ".*","\?"), $urlmask); + $result = preg_match("@^/{$match}$@", "{$url}"); + if ($result) { + return true; + } + } + } // search groups foreach ($this->legacyUsers[$username]["groups"] as $itemkey => $group) { if (array_key_exists($group, $this->legacyGroupPrivs)) { diff --git a/src/www/diag_dns.php b/src/www/diag_dns.php index ffd8ba169..762dac9b0 100644 --- a/src/www/diag_dns.php +++ b/src/www/diag_dns.php @@ -32,7 +32,7 @@ require_once("guiconfig.inc"); $host = trim($_REQUEST['host'], " \t\n\r\0\x0B[];\"'"); $host_esc = escapeshellarg($host); -if (is_array($config['aliases']['alias'])) { +if (isset($config['aliases']['alias']) && is_array($config['aliases']['alias'])) { $a_aliases = &$config['aliases']['alias']; } else { $a_aliases = array(); @@ -271,3 +271,4 @@ include("head.inc"); ?> + diff --git a/src/www/fbegin.inc b/src/www/fbegin.inc index 2f18fa1e4..398e9278d 100755 --- a/src/www/fbegin.inc +++ b/src/www/fbegin.inc @@ -31,6 +31,7 @@ require_once("globals.inc"); require_once("functions.inc"); require_once("shortcuts.inc"); require_once("service-utils.inc"); +require_once("script/load_phalcon.php"); /* Determine automated help URL. Should output the page name and parameters separately */ @@ -64,213 +65,19 @@ if (($pagename == "pkg.php") || ($pagename == "pkg_edit.php") || ($pagename == " /* Build the full help URL. */ $helpurl .= "/help.php?page={$pagename}"; +// link menu system +$menu = new OPNsense\Base\Menu\MenuSystem(); -function output_menu($arrayitem, $target = null) { - foreach ($arrayitem as $item) { - if (isAllowedPage($item[1]) || $item[1]=="/index.php?logout") { - - - $attr = sprintf("href=\"%s\"", htmlentities($item[1])); - if ($target) { - $attr .= sprintf(" target=\"%s\"", htmlentities($target)); - } - $class = "list-group-item"; - - - $check = substr($item[1],1,-3); - if (stripos($_SERVER['PHP_SELF'], $check) !== false) { - $class .= " active"; - } - - if ($item['class']) { - $class .= " {$item['class']}"; - } - $attr .= sprintf(" class=\"%s\"", htmlentities($class)); - if ($item['style']) { - $attr .= sprintf(" style=\"%s\"", htmlentities($item['style'])); - } - //echo "
  • \n"; - printf("%s\n", $attr, $item[0]); - //echo "
  • \n"; - } - } +// add interfaces to "Interfaces" menu tab... kind of a hack, may need some improvement. +$cnf = OPNsense\Core\Config::getInstance(); +$ordid = 0; +foreach ($cnf->object()->interfaces->children() as $key => $node) { + $menu->appendItem("Interfaces", $key, array("url"=>"/interfaces.php?if=".$key,"order"=>($ordid++), + "visiblename"=>$node->descr?$node->descr:strtoupper($key))); } +$menuSystem = $menu->getItems($_SERVER['PHP_SELF']); - -function active_menu($arrayitem, $pagename) { - $pagename = "/".ltrim($pagename,"/"); - - foreach ($arrayitem as $item) { - $check = substr($item[1],1,-3); - - if (stripos($pagename, $check) !== false) { - return true; - } - } - - return false; -} - -function active_main_menu() { - $options = func_get_args(); - - foreach ($options as $uri) { - if (substr($_SERVER['PHP_SELF'], 0, strlen($uri)) == $uri) { - return true; - } - } - - return false; -} - - -// System -$system_menu = array(); -$system_menu[] = array(gettext("Certificates"), "/system_certmanager.php"); -$system_menu[] = array(gettext("Firmware"), "/system_firmware_check.php"); -$system_menu[] = array(gettext("High Availability"), "/system_hasync.php"); -$system_menu[] = array(gettext("Routing"), "/system_gateways.php"); -$system_menu[] = array(gettext("Settings"), "/system_general.php"); -$system_menu[] = array(gettext("Setup Wizard"), "/wizard.php?xml=setup_wizard.xml"); -if (!isAllowedPage("system_usermanager.php*")) { - $system_menu[] = array(gettext("User Manager"), "/system_usermanager_passwordmg.php"); -} else { - $system_menu[] = array(gettext("User Manager"), "/system_usermanager.php"); -} - -// Interfaces -$interfaces_menu = array(); -if (!isset($config['system']['webgui']['noassigninterfaces'])) - $interfaces_menu[] = array(gettext("(assign)"), "/interfaces_assign.php"); -$opts = get_configured_interface_with_descr(false, true); -foreach ($opts as $oif => $odescr) - if (!isset($config['interfaces'][$oif]['ovpn'])) - $interfaces_menu[] = array(htmlspecialchars($odescr), "/interfaces.php?if={$oif}"); -$interfaces_menu = msort($interfaces_menu,0); - -// Firewall -$firewall_menu = array(); -$firewall_menu[] = array(gettext("Aliases"), "/firewall_aliases.php"); -$firewall_menu[] = array(gettext("NAT"), "/firewall_nat.php"); -$firewall_menu[] = array(gettext("Rules"), "/firewall_rules.php"); -$firewall_menu[] = array(gettext("Schedules"), "/firewall_schedule.php"); -$firewall_menu[] = array(gettext("Traffic Shaper"), "/firewall_shaper.php"); -$firewall_menu[] = array(gettext("Virtual IPs"), "/firewall_virtual_ip.php"); -$firewall_menu = msort($firewall_menu,0); - -// Services -$services_menu = array(); -$services_menu[] = array(gettext("Captive Portal"), "/services_captiveportal.php"); -$services_menu[] = array(gettext("DNS Filter"), "/services_opendns.php"); -$services_menu[] = array(gettext("DNS Forwarder"), "/services_dnsmasq.php"); -$services_menu[] = array(gettext("DNS Resolver"), "/services_unbound.php"); -$services_menu[] = array(gettext("DHCP Relay"), "/services_dhcp_relay.php"); -$services_menu[] = array(gettext("DHCPv6 Relay"), "/services_dhcpv6_relay.php"); -$services_menu[] = array(gettext("DHCP Server"), "/services_dhcp.php"); -$services_menu[] = array(gettext("DHCPv6 Server/RA"), "/services_dhcpv6.php"); -$services_menu[] = array(gettext("Dynamic DNS"), "/services_dyndns.php"); -$services_menu[] = array(gettext("IGMP proxy"), "/services_igmpproxy.php"); -$services_menu[] = array(gettext("Load Balancer"), "/load_balancer_pool.php"); -$services_menu[] = array(gettext("NTP"), "/services_ntpd.php"); -$services_menu[] = array(gettext("PPPoE Server"), "/services_vpn_pppoe.php"); -$services_menu[] = array(gettext("SNMP"), "/services_snmp.php"); -if(count($config['interfaces']) > 1) { - /* no use for UPnP in single-interface deployments - remove to reduce user confusion - */ - $services_menu[] = array(gettext("UPnP & NAT-PMP"), "/pkg_edit.php?xml=miniupnpd.xml"); -} -$services_menu[] = array(gettext("Wake on LAN"), "/services_wol.php"); -$services_menu = msort($services_menu, 0); - -// VPN -$vpn_menu = array(); -$vpn_menu[] = array(gettext("IPsec"), "/vpn_ipsec.php"); -$vpn_menu[] = array(gettext("OpenVPN"), "/vpn_openvpn_server.php"); -$vpn_menu[] = array(gettext("PPTP"), "/vpn_pptp.php"); -$vpn_menu[] = array(gettext("L2TP"), "/vpn_l2tp.php"); -$vpn_menu = msort($vpn_menu, 0); - -// Status -$status_menu = array(); -//if (count($config['captiveportal']) > 0) - $status_menu[] = array(gettext("Captive Portal"), "/status_captiveportal.php"); -$status_menu[] = array(gettext("CARP (failover)"), "/carp_status.php"); -$status_menu[] = array(gettext("Gateways"), "/status_gateways.php"); -$status_menu[] = array(gettext("DHCP Leases"), "/status_dhcp_leases.php"); -$status_menu[] = array(gettext("DHCPv6 Leases"), "/status_dhcpv6_leases.php"); -$status_menu[] = array(gettext("Filter Reload"), "/status_filter_reload.php"); -$status_menu[] = array(gettext("Interfaces"), "/status_interfaces.php"); -$status_menu[] = array(gettext("IPsec"), "/diag_ipsec.php"); -$status_menu[] = array(gettext("Load Balancer"), "/status_lb_pool.php"); -$status_menu[] = array(gettext("NTP"), "/status_ntpd.php"); -$status_menu[] = array(gettext("OpenVPN"), "/status_openvpn.php"); -$status_menu[] = array(gettext("Queues"), "/status_queues.php"); -$status_menu[] = array(gettext("RRD Graphs"), "/status_rrd_graph.php"); -$status_menu[] = array(gettext("Services"), "/status_services.php"); -$status_menu[] = array(gettext("System Logs"), "/diag_logs.php"); -$status_menu[] = array(gettext("Traffic Graph"), "/status_graph.php?if=wan"); -if(count($config['interfaces']) > 1) - $status_menu[] = array(gettext("UPnP & NAT-PMP"), "/status_upnp.php"); -$ifentries = get_configured_interface_with_descr(); -foreach ($ifentries as $ent => $entdesc) { - if (is_array($config['interfaces'][$ent]['wireless']) && - match_wireless_interface($config['interfaces'][$ent]['if'])) { - $wifdescrs[$ent] = $entdesc; - } -} -if (count($wifdescrs) > 0) - $status_menu[] = array(gettext("Wireless"), "/status_wireless.php"); -$status_menu = msort($status_menu, 0); - -// Diagnostics -$diagnostics_menu = array(); -$diagnostics_menu[] = array(gettext("ARP Table"), "/diag_arp.php"); -$diagnostics_menu[] = array(gettext("Authentication"), "/diag_authentication.php"); -$diagnostics_menu[] = array(gettext("Backup/Restore"), "/diag_backup.php"); -$diagnostics_menu[] = array(gettext("Crash Reporter"), "/crash_reporter.php"); -$diagnostics_menu[] = array(gettext("DNS Lookup"), "/diag_dns.php"); -$diagnostics_menu[] = array(gettext("NDP Table"), "/diag_ndp.php" ); -$diagnostics_menu[] = array(gettext("Factory Defaults"), "/diag_defaults.php"); -$diagnostics_menu[] = array(gettext("Halt System"), "/diag_halt.php" ); -$diagnostics_menu[] = array(gettext("Limiter Info"), "/diag_limiter_info.php" ); -$diagnostics_menu[] = array(gettext("pfInfo"), "/diag_pf_info.php"); -$diagnostics_menu[] = array(gettext("pfTop"), "/diag_system_pftop.php"); -$diagnostics_menu[] = array(gettext("Ping"), "/diag_ping.php"); -$diagnostics_menu[] = array(gettext("Reboot"), "/diag_reboot.php"); -$diagnostics_menu[] = array(gettext("Packet Capture"), "/diag_packet_capture.php"); -$diagnostics_menu[] = array(gettext("Traceroute"), "/diag_traceroute.php"); -$diagnostics_menu[] = array(gettext("SMART Status"), "/diag_smart.php"); -$diagnostics_menu[] = array(gettext("System Activity"), "/diag_system_activity.php"); -$diagnostics_menu[] = array(gettext("Test Port"), "/diag_testport.php"); -$diagnostics_menu[] = array(gettext("Routes"), "/diag_routes.php"); -$diagnostics_menu[] = array(gettext("Sockets"), "/diag_sockets.php" );; -$diagnostics_menu[] = array(gettext("States"), "/diag_dump_states.php"); -$diagnostics_menu[] = array(gettext("States Summary"), "/diag_states_summary.php"); -$diagnostics_menu[] = array(gettext("Tables"), "/diag_tables.php"); - -if (file_exists("/var/run/gmirror_active")) { - $diagnostics_menu[] = array(gettext("GEOM Mirrors"), "/diag_gmirror.php" ); -} - -$diagnostics_menu = msort($diagnostics_menu, 0); - -$help_menu = array(); -$help_menu[] = array(gettext("About this Page"), $helpurl); -$help_menu[] = array(gettext("Bug Database"), "https://github.com/opnsense/core/issues"); -$help_menu[] = array(gettext("User Forum"), "https://forum.opnsense.org/"); -$help_menu[] = array(gettext("Documentation"), "https://wiki.opnsense.org/"); -$help_menu[] = array(gettext("Developers Wiki"), "https://wiki.opnsense.org/index.php/Develop:Info"); -$help_menu[] = array(gettext("Paid Support"), "https://opnsense.org/support-overview/commercial-support/"); -$help_menu[] = array(gettext("FreeBSD Handbook"), "https://www.freebsd.org/doc/handbook/"); -$help_menu = msort($help_menu, 0); - -function add_to_menu($url, $name) -{ - if (isAllowedPage($url)) { - echo "{$name}\n"; - } -} +$aclObj = new \OPNsense\Core\ACL(); /* display a top alert bar if need be */ $need_alert_display = false; @@ -289,7 +96,6 @@ if($need_alert_display == true) { $pgtitle_output = true; ?> -
    -
    +
    - +
    diff --git a/src/www/foot.inc b/src/www/foot.inc index 27dadcca1..38d1e4b65 100644 --- a/src/www/foot.inc +++ b/src/www/foot.inc @@ -61,5 +61,9 @@
    + + + + diff --git a/src/www/head.inc b/src/www/head.inc index 41b1c1d6d..6da37fe56 100644 --- a/src/www/head.inc +++ b/src/www/head.inc @@ -43,13 +43,15 @@ $pagetitle = gentitle( $pgtitle ); + - - - + + + - + + + - + - diff --git a/src/www/themes/opnsense/build/js/bootstrap-select.min.js b/src/www/javascript/bootstrap-select.min.js similarity index 100% rename from src/www/themes/opnsense/build/js/bootstrap-select.min.js rename to src/www/javascript/bootstrap-select.min.js diff --git a/src/www/javascript/bootstrap.min.js b/src/www/javascript/bootstrap.min.js new file mode 100644 index 000000000..c6d36920b --- /dev/null +++ b/src/www/javascript/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.2 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.2",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.2",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.2",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a(this.options.trigger).filter('[href="#'+b.id+'"], [data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.2",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":a.extend({},e.data(),{trigger:this});c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.2",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('