(function() {
  var fn = function() {
    
    (function(root) {
      function now() {
        return new Date();
      }
    
      var force = false;
    
      if (typeof (root._bokeh_onload_callbacks) === "undefined" || force === true) {
        root._bokeh_onload_callbacks = [];
        root._bokeh_is_loading = undefined;
      }
    
      
      
    
      
      
    
      function run_callbacks() {
        try {
          root._bokeh_onload_callbacks.forEach(function(callback) { callback() });
        }
        finally {
          delete root._bokeh_onload_callbacks
        }
        console.info("Bokeh: all callbacks have finished");
      }
    
      function load_libs(js_urls, callback) {
        root._bokeh_onload_callbacks.push(callback);
        if (root._bokeh_is_loading > 0) {
          console.log("Bokeh: BokehJS is being loaded, scheduling callback at", now());
          return null;
        }
        if (js_urls == null || js_urls.length === 0) {
          run_callbacks();
          return null;
        }
        console.log("Bokeh: BokehJS not loaded, scheduling load and callback at", now());
        root._bokeh_is_loading = js_urls.length;
        for (var i = 0; i < js_urls.length; i++) {
          var url = js_urls[i];
          var s = document.createElement('script');
          s.src = url;
          s.async = false;
          s.onreadystatechange = s.onload = function() {
            root._bokeh_is_loading--;
            if (root._bokeh_is_loading === 0) {
              console.log("Bokeh: all BokehJS libraries loaded");
              run_callbacks()
            }
          };
          s.onerror = function() {
            console.warn("failed to load library " + url);
          };
          console.log("Bokeh: injecting script tag for BokehJS library: ", url);
          document.getElementsByTagName("head")[0].appendChild(s);
        }
      };var element = document.getElementById("ae50145c-4667-4e93-b462-cc7a65938279");
      if (element == null) {
        console.log("Bokeh: ERROR: autoload.js configured with elementid 'ae50145c-4667-4e93-b462-cc7a65938279' but no matching script tag was found. ")
        return false;
      }
    
      var js_urls = ["https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.js", "https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.js", "https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.js", "https://cdn.pydata.org/bokeh/release/bokeh-gl-0.12.9.min.js"];
    
      var inline_js = [
        function(Bokeh) {
          Bokeh.set_log_level("info");
        },
        
        function(Bokeh) {
          
        },
        
        function(Bokeh) {
          (function() {
            var fn = function() {
              Bokeh.safely(function() {
                (function(root) {
                  function embed_document(root) {
                    var docs_json = {"c070e2b6-4f66-4c19-99f2-1927103d16fb":{"roots":{"references":[{"attributes":{"plot":{"id":"1f0c6165-c3e5-4d9c-8290-854762ec56ab","subtype":"Figure","type":"Plot"},"ticker":{"id":"270a90ba-0003-4dfb-9b48-2d563c907475","type":"BasicTicker"}},"id":"74e5aa25-4a5e-4956-9aa5-68c97111ea09","type":"Grid"},{"attributes":{"children":[{"id":"1f0c6165-c3e5-4d9c-8290-854762ec56ab","subtype":"Figure","type":"Plot"}]},"id":"ad4f2233-9891-4d13-bb4c-b04379f7b1eb","type":"Row"},{"attributes":{"children":[{"id":"ad4f2233-9891-4d13-bb4c-b04379f7b1eb","type":"Row"},{"id":"dd0006df-59ad-4923-b9ec-d569a457381d","type":"Row"}]},"id":"164e8aaa-3a97-431f-93c2-d9672927500d","type":"Column"},{"attributes":{"callback":null},"id":"b1a971ec-5a29-4dc6-ad0b-31f10d90d067","type":"DataRange1d"},{"attributes":{"button_type":"success","callback":{"id":"0e0e1dac-3d5e-463f-811b-91e32a26ace3","type":"CustomJS"},"icon":null,"label":"Pink Line"},"id":"58b222d8-1787-4bce-9910-a75afeca39cc","type":"Toggle"},{"attributes":{"source":{"id":"b927af28-63db-423a-8e7c-499a14dde365","type":"ColumnDataSource"}},"id":"b827d3c0-ad0d-4ba7-be65-98f45006617c","type":"CDSView"},{"attributes":{"formatter":{"id":"d8cb7894-0415-4bd7-a110-68a4b9e9084b","type":"BasicTickFormatter"},"plot":{"id":"1f0c6165-c3e5-4d9c-8290-854762ec56ab","subtype":"Figure","type":"Plot"},"ticker":{"id":"270a90ba-0003-4dfb-9b48-2d563c907475","type":"BasicTicker"}},"id":"97ba1ec0-d2a1-467a-9d02-e8000e9b0650","type":"LinearAxis"},{"attributes":{"button_type":"success","callback":{"id":"fdc2a3f1-bdc6-4728-bc05-4510f84dc5ef","type":"CustomJS"},"icon":null,"label":"Green Box"},"id":"6b1f0878-b565-4080-8274-1553821e8903","type":"Toggle"},{"attributes":{"formatter":{"id":"bb2d0500-9f85-4379-8163-af558837060f","type":"BasicTickFormatter"},"plot":{"id":"1f0c6165-c3e5-4d9c-8290-854762ec56ab","subtype":"Figure","type":"Plot"},"ticker":{"id":"3a789631-6b2e-4f0a-a76a-0e4e1d3a3002","type":"BasicTicker"}},"id":"62e1d5f1-2271-44a5-9b81-e2d1b15891cc","type":"LinearAxis"},{"attributes":{"children":[{"id":"6b1f0878-b565-4080-8274-1553821e8903","type":"Toggle"}]},"id":"23418ab9-99a5-46e8-aa2e-32969ddf6f3b","type":"WidgetBox"},{"attributes":{},"id":"270a90ba-0003-4dfb-9b48-2d563c907475","type":"BasicTicker"},{"attributes":{"args":{"object":{"id":"99bb3aac-0797-4da9-9780-350c8d297dd8","type":"GlyphRenderer"},"toggle":{"id":"58b222d8-1787-4bce-9910-a75afeca39cc","type":"Toggle"}},"code":"object.visible = toggle.active;\n"},"id":"0e0e1dac-3d5e-463f-811b-91e32a26ace3","type":"CustomJS"},{"attributes":{"children":[{"id":"58b222d8-1787-4bce-9910-a75afeca39cc","type":"Toggle"}]},"id":"9bbedca7-f994-4dda-85c2-3cbb994ea133","type":"WidgetBox"},{"attributes":{"line_color":{"value":"pink"},"x":{"field":"x"},"y":{"field":"y"}},"id":"899b72da-3971-4a35-a5ee-96bc3fafe6b6","type":"Line"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"green"},"left":1.5,"plot":{"id":"1f0c6165-c3e5-4d9c-8290-854762ec56ab","subtype":"Figure","type":"Plot"},"right":2.5},"id":"f29b8caf-b8e9-433a-86e5-1a12d7178b9d","type":"BoxAnnotation"},{"attributes":{"args":{"object":{"id":"f29b8caf-b8e9-433a-86e5-1a12d7178b9d","type":"BoxAnnotation"},"toggle":{"id":"6b1f0878-b565-4080-8274-1553821e8903","type":"Toggle"}},"code":"object.visible = toggle.active;\n"},"id":"fdc2a3f1-bdc6-4728-bc05-4510f84dc5ef","type":"CustomJS"},{"attributes":{"line_color":{"value":"blue"},"x":{"field":"x"},"y":{"field":"y"}},"id":"8d07fd0f-2549-4128-bee4-830ff6990fe8","type":"Line"},{"attributes":{},"id":"1bc5781f-6915-4c55-a1cf-d085631469de","type":"LinearScale"},{"attributes":{"dimension":1,"plot":{"id":"1f0c6165-c3e5-4d9c-8290-854762ec56ab","subtype":"Figure","type":"Plot"},"ticker":{"id":"3a789631-6b2e-4f0a-a76a-0e4e1d3a3002","type":"BasicTicker"}},"id":"c44ad4db-04d5-41e6-90ae-da63ada524d2","type":"Grid"},{"attributes":{"callback":null,"column_names":["x","y"],"data":{"x":[1,2,3],"y":[1,2,1]}},"id":"b927af28-63db-423a-8e7c-499a14dde365","type":"ColumnDataSource"},{"attributes":{"children":[{"id":"23418ab9-99a5-46e8-aa2e-32969ddf6f3b","type":"WidgetBox"},{"id":"9bbedca7-f994-4dda-85c2-3cbb994ea133","type":"WidgetBox"}]},"id":"dd0006df-59ad-4923-b9ec-d569a457381d","type":"Row"},{"attributes":{"data_source":{"id":"b927af28-63db-423a-8e7c-499a14dde365","type":"ColumnDataSource"},"glyph":{"id":"8d07fd0f-2549-4128-bee4-830ff6990fe8","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"6d7e3c99-a63a-4967-917b-f8c563f00997","type":"Line"},"selection_glyph":null,"view":{"id":"b827d3c0-ad0d-4ba7-be65-98f45006617c","type":"CDSView"}},"id":"587c6399-7fe6-45ac-abde-2a4a5132c39e","type":"GlyphRenderer"},{"attributes":{},"id":"a22ce727-b248-4e14-8a9b-9126f0a358be","type":"LinearScale"},{"attributes":{},"id":"3a789631-6b2e-4f0a-a76a-0e4e1d3a3002","type":"BasicTicker"},{"attributes":{"below":[{"id":"97ba1ec0-d2a1-467a-9d02-e8000e9b0650","type":"LinearAxis"}],"left":[{"id":"62e1d5f1-2271-44a5-9b81-e2d1b15891cc","type":"LinearAxis"}],"plot_height":200,"renderers":[{"id":"97ba1ec0-d2a1-467a-9d02-e8000e9b0650","type":"LinearAxis"},{"id":"74e5aa25-4a5e-4956-9aa5-68c97111ea09","type":"Grid"},{"id":"62e1d5f1-2271-44a5-9b81-e2d1b15891cc","type":"LinearAxis"},{"id":"c44ad4db-04d5-41e6-90ae-da63ada524d2","type":"Grid"},{"id":"587c6399-7fe6-45ac-abde-2a4a5132c39e","type":"GlyphRenderer"},{"id":"99bb3aac-0797-4da9-9780-350c8d297dd8","type":"GlyphRenderer"},{"id":"f29b8caf-b8e9-433a-86e5-1a12d7178b9d","type":"BoxAnnotation"}],"title":{"id":"8efe1de4-5d5a-4e78-a991-5a719a9514fe","type":"Title"},"toolbar":{"id":"b8f8e523-3b47-473f-bb68-48ab1e386405","type":"Toolbar"},"x_range":{"id":"4a66bc45-ee58-4006-b105-bf9917d7bf98","type":"DataRange1d"},"x_scale":{"id":"1bc5781f-6915-4c55-a1cf-d085631469de","type":"LinearScale"},"y_range":{"id":"b1a971ec-5a29-4dc6-ad0b-31f10d90d067","type":"DataRange1d"},"y_scale":{"id":"a22ce727-b248-4e14-8a9b-9126f0a358be","type":"LinearScale"}},"id":"1f0c6165-c3e5-4d9c-8290-854762ec56ab","subtype":"Figure","type":"Plot"},{"attributes":{"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"b14573fa-d418-4436-a32f-7d891bcebcd4","type":"Line"},{"attributes":{"callback":null},"id":"4a66bc45-ee58-4006-b105-bf9917d7bf98","type":"DataRange1d"},{"attributes":{"plot":null,"text":""},"id":"8efe1de4-5d5a-4e78-a991-5a719a9514fe","type":"Title"},{"attributes":{"source":{"id":"e3405b52-5ebf-4be2-8c1b-502ef50ea0e8","type":"ColumnDataSource"}},"id":"3f76b8fb-be8e-4ca7-a33a-fc646570d3eb","type":"CDSView"},{"attributes":{},"id":"d8cb7894-0415-4bd7-a110-68a4b9e9084b","type":"BasicTickFormatter"},{"attributes":{"callback":null,"column_names":["x","y"],"data":{"x":[1,2,3],"y":[2,1,2]}},"id":"e3405b52-5ebf-4be2-8c1b-502ef50ea0e8","type":"ColumnDataSource"},{"attributes":{"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"6d7e3c99-a63a-4967-917b-f8c563f00997","type":"Line"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_scroll":"auto","active_tap":"auto"},"id":"b8f8e523-3b47-473f-bb68-48ab1e386405","type":"Toolbar"},{"attributes":{"data_source":{"id":"e3405b52-5ebf-4be2-8c1b-502ef50ea0e8","type":"ColumnDataSource"},"glyph":{"id":"899b72da-3971-4a35-a5ee-96bc3fafe6b6","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"b14573fa-d418-4436-a32f-7d891bcebcd4","type":"Line"},"selection_glyph":null,"view":{"id":"3f76b8fb-be8e-4ca7-a33a-fc646570d3eb","type":"CDSView"}},"id":"99bb3aac-0797-4da9-9780-350c8d297dd8","type":"GlyphRenderer"},{"attributes":{},"id":"bb2d0500-9f85-4379-8163-af558837060f","type":"BasicTickFormatter"}],"root_ids":["164e8aaa-3a97-431f-93c2-d9672927500d"]},"title":"Bokeh Application","version":"0.12.9"}};
                    var render_items = [{"docid":"c070e2b6-4f66-4c19-99f2-1927103d16fb","elementid":"ae50145c-4667-4e93-b462-cc7a65938279","modelid":"164e8aaa-3a97-431f-93c2-d9672927500d"}];
                
                    root.Bokeh.embed.embed_items(docs_json, render_items);
                  }
                
                  if (root.Bokeh !== undefined) {
                    embed_document(root);
                  } else {
                    var attempts = 0;
                    var timer = setInterval(function(root) {
                      if (root.Bokeh !== undefined) {
                        embed_document(root);
                        clearInterval(timer);
                      }
                      attempts++;
                      if (attempts > 100) {
                        console.log("Bokeh: ERROR: Unable to embed document because BokehJS library is missing")
                        clearInterval(timer);
                      }
                    }, 10, root)
                  }
                })(window);
              });
            };
            if (document.readyState != "loading") fn();
            else document.addEventListener("DOMContentLoaded", fn);
          })();
        },
        function(Bokeh) {
          console.log("Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.css");
          Bokeh.embed.inject_css("https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.css");
          console.log("Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.css");
          Bokeh.embed.inject_css("https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.css");
          console.log("Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.css");
          Bokeh.embed.inject_css("https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.css");
        }
      ];
    
      function run_inline_js() {
        
        for (var i = 0; i < inline_js.length; i++) {
          inline_js[i].call(root, root.Bokeh);
        }
        
      }
    
      if (root._bokeh_is_loading === 0) {
        console.log("Bokeh: BokehJS loaded, going straight to plotting");
        run_inline_js();
      } else {
        load_libs(js_urls, function() {
          console.log("Bokeh: BokehJS plotting callback run at", now());
          run_inline_js();
        });
      }
    }(window));
  };
  if (document.readyState != "loading") fn();
  else document.addEventListener("DOMContentLoaded", fn);
})();
