UNPKG

iot-sol

Version:

Intel(r) IoT Services Orchestration Layer - HTML5 IDE + Node.js middleware to create and host distributed IoT Apps in minutes

1 lines 23.1 kB
!function n(t,e,r){function i(c,u){if(!e[c]){if(!t[c]){var a="function"==typeof require&&require;if(!u&&a)return a(c,!0);if(o)return o(c,!0);var f=new Error("Cannot find module '"+c+"'");throw f.code="MODULE_NOT_FOUND",f}var s=e[c]={exports:{}};t[c][0].call(s.exports,function(n){var e=t[c][1][n];return i(e?e:n)},s,s.exports,n,t,e,r)}return e[c].exports}for(var o="function"==typeof require&&require,c=0;c<r.length;c++)i(r[c]);return i}({1:[function(n,t,e){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(n){if(p===setTimeout)return setTimeout(n,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(n,0);try{return p(n,0)}catch(t){try{return p.call(null,n,0)}catch(t){return p.call(this,n,0)}}}function c(n){if(l===clearTimeout)return clearTimeout(n);if((l===i||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(n);try{return l(n)}catch(t){try{return l.call(null,n)}catch(t){return l.call(this,n)}}}function u(){y&&h&&(y=!1,h.length?v=h.concat(v):m=-1,v.length&&a())}function a(){if(!y){var n=o(u);y=!0;for(var t=v.length;t;){for(h=v,v=[];++m<t;)h&&h[m].run();m=-1,t=v.length}h=null,y=!1,c(n)}}function f(n,t){this.fun=n,this.array=t}function s(){}var p,l,d=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:r}catch(n){p=r}try{l="function"==typeof clearTimeout?clearTimeout:i}catch(n){l=i}}();var h,v=[],y=!1,m=-1;d.nextTick=function(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];v.push(new f(n,t)),1!==v.length||y||o(a)},f.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=s,d.addListener=s,d.once=s,d.off=s,d.removeListener=s,d.removeAllListeners=s,d.emit=s,d.binding=function(n){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(n){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{}],2:[function(n,t,e){(function(n){!function(n){"use strict";if("function"==typeof bootstrap)bootstrap("promise",n);else if("object"==typeof e&&"object"==typeof t)t.exports=n();else if("function"==typeof define&&define.amd)define(n);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeQ=n}else{if("undefined"==typeof window&&"undefined"==typeof self)throw new Error("This environment was not anticipated by Q. Please file a bug.");var r="undefined"!=typeof window?window:self,i=r.Q;r.Q=n(),r.Q.noConflict=function(){return r.Q=i,this}}}(function(){"use strict";function t(n){return function(){return K.apply(n,arguments)}}function e(n){return n===Object(n)}function r(n){return"[object StopIteration]"===rn(n)||n instanceof H}function i(n,t){if(L&&t.stack&&"object"==typeof n&&null!==n&&n.stack&&n.stack.indexOf(on)===-1){for(var e=[],r=t;r;r=r.source)r.stack&&e.unshift(r.stack);e.unshift(n.stack);var i=e.join("\n"+on+"\n");n.stack=o(i)}}function o(n){for(var t=n.split("\n"),e=[],r=0;r<t.length;++r){var i=t[r];a(i)||c(i)||!i||e.push(i)}return e.join("\n")}function c(n){return n.indexOf("(module.js:")!==-1||n.indexOf("(node.js:")!==-1}function u(n){var t=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(n);if(t)return[t[1],Number(t[2])];var e=/at ([^ ]+):(\d+):(?:\d+)$/.exec(n);if(e)return[e[1],Number(e[2])];var r=/.*@(.+):(\d+)$/.exec(n);return r?[r[1],Number(r[2])]:void 0}function a(n){var t=u(n);if(!t)return!1;var e=t[0],r=t[1];return e===G&&r>=V&&r<=sn}function f(){if(L)try{throw new Error}catch(n){var t=n.stack.split("\n"),e=t[0].indexOf("@")>0?t[1]:t[2],r=u(e);if(!r)return;return G=r[0],r[1]}}function s(n,t,e){return function(){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(t+" is deprecated, use "+e+" instead.",new Error("").stack),n.apply(n,arguments)}}function p(n){return n instanceof v?n:w(n)?_(n):E(n)}function l(){function n(n){t=n,o.source=n,X(e,function(t,e){p.nextTick(function(){n.promiseDispatch.apply(n,e)})},void 0),e=void 0,r=void 0}var t,e=[],r=[],i=nn(l.prototype),o=nn(v.prototype);if(o.promiseDispatch=function(n,i,o){var c=W(arguments);e?(e.push(c),"when"===i&&o[1]&&r.push(o[1])):p.nextTick(function(){t.promiseDispatch.apply(t,c)})},o.valueOf=function(){if(e)return o;var n=m(t);return g(n)&&(t=n),n},o.inspect=function(){return t?t.inspect():{state:"pending"}},p.longStackSupport&&L)try{throw new Error}catch(c){o.stack=c.stack.substring(c.stack.indexOf("\n")+1)}return i.promise=o,i.resolve=function(e){t||n(p(e))},i.fulfill=function(e){t||n(E(e))},i.reject=function(e){t||n(R(e))},i.notify=function(n){t||X(r,function(t,e){p.nextTick(function(){e(n)})},void 0)},i}function d(n){if("function"!=typeof n)throw new TypeError("resolver must be a function.");var t=l();try{n(t.resolve,t.reject,t.notify)}catch(e){t.reject(e)}return t.promise}function h(n){return d(function(t,e){for(var r=0,i=n.length;r<i;r++)p(n[r]).then(t,e)})}function v(n,t,e){void 0===t&&(t=function(n){return R(new Error("Promise does not support operation: "+n))}),void 0===e&&(e=function(){return{state:"unknown"}});var r=nn(v.prototype);if(r.promiseDispatch=function(e,i,o){var c;try{c=n[i]?n[i].apply(r,o):t.call(r,i,o)}catch(u){c=R(u)}e&&e(c)},r.inspect=e,e){var i=e();"rejected"===i.state&&(r.exception=i.reason),r.valueOf=function(){var n=e();return"pending"===n.state||"rejected"===n.state?r:n.value}}return r}function y(n,t,e,r){return p(n).then(t,e,r)}function m(n){if(g(n)){var t=n.inspect();if("fulfilled"===t.state)return t.value}return n}function g(n){return n instanceof v}function w(n){return e(n)&&"function"==typeof n.then}function k(n){return g(n)&&"pending"===n.inspect().state}function b(n){return!g(n)||"fulfilled"===n.inspect().state}function j(n){return g(n)&&"rejected"===n.inspect().state}function T(){cn.length=0,un.length=0,fn||(fn=!0)}function x(t,e){fn&&("object"==typeof n&&"function"==typeof n.emit&&p.nextTick.runAfter(function(){Y(un,t)!==-1&&(n.emit("unhandledRejection",e,t),an.push(t))}),un.push(t),e&&"undefined"!=typeof e.stack?cn.push(e.stack):cn.push("(no stack) "+e))}function $(t){if(fn){var e=Y(un,t);e!==-1&&("object"==typeof n&&"function"==typeof n.emit&&p.nextTick.runAfter(function(){var r=Y(an,t);r!==-1&&(n.emit("rejectionHandled",cn[e],t),an.splice(r,1))}),un.splice(e,1),cn.splice(e,1))}}function R(n){var t=v({when:function(t){return t&&$(this),t?t(n):this}},function(){return this},function(){return{state:"rejected",reason:n}});return x(t,n),t}function E(n){return v({when:function(){return n},get:function(t){return n[t]},set:function(t,e){n[t]=e},"delete":function(t){delete n[t]},post:function(t,e){return null===t||void 0===t?n.apply(void 0,e):n[t].apply(n,e)},apply:function(t,e){return n.apply(t,e)},keys:function(){return en(n)}},void 0,function(){return{state:"fulfilled",value:n}})}function _(n){var t=l();return p.nextTick(function(){try{n.then(t.resolve,t.reject,t.notify)}catch(e){t.reject(e)}}),t.promise}function C(n){return v({isDef:function(){}},function(t,e){return P(n,t,e)},function(){return p(n).inspect()})}function O(n,t,e){return p(n).spread(t,e)}function A(n){return function(){function t(n,t){var c;if("undefined"==typeof StopIteration){try{c=e[n](t)}catch(u){return R(u)}return c.done?p(c.value):y(c.value,i,o)}try{c=e[n](t)}catch(u){return r(u)?p(u.value):R(u)}return y(c,i,o)}var e=n.apply(this,arguments),i=t.bind(t,"next"),o=t.bind(t,"throw");return i()}}function N(n){p.done(p.async(n)())}function S(n){throw new H(n)}function D(n){return function(){return O([this,Q(arguments)],function(t,e){return n.apply(t,e)})}}function P(n,t,e){return p(n).dispatch(t,e)}function Q(n){return y(n,function(n){var t=0,e=l();return X(n,function(r,i,o){var c;g(i)&&"fulfilled"===(c=i.inspect()).state?n[o]=c.value:(++t,y(i,function(r){n[o]=r,0===--t&&e.resolve(n)},e.reject,function(n){e.notify({index:o,value:n})}))},void 0),0===t&&e.resolve(n),e.promise})}function U(n){if(0===n.length)return p.resolve();var t=p.defer(),e=0;return X(n,function(r,i,o){function c(n){t.resolve(n)}function u(){e--,0===e&&t.reject(new Error("Can't get fulfillment value from any promise, all promises were rejected."))}function a(n){t.notify({index:o,value:n})}var f=n[o];e++,y(f,c,u,a)},void 0),t.promise}function I(n){return y(n,function(n){return n=Z(n,p),y(Q(Z(n,function(n){return y(n,z,z)})),function(){return n})})}function q(n){return p(n).allSettled()}function F(n,t){return p(n).then(void 0,void 0,t)}function M(n,t){return p(n).nodeify(t)}var L=!1;try{throw new Error}catch(B){L=!!B.stack}var G,H,V=f(),z=function(){},J=function(){function t(){for(var n,t;r.next;)r=r.next,n=r.task,r.task=void 0,t=r.domain,t&&(r.domain=void 0,t.enter()),e(n,t);for(;a.length;)n=a.pop(),e(n);o=!1}function e(n,e){try{n()}catch(r){if(u)throw e&&e.exit(),setTimeout(t,0),e&&e.enter(),r;setTimeout(function(){throw r},0)}e&&e.exit()}var r={task:void 0,next:null},i=r,o=!1,c=void 0,u=!1,a=[];if(J=function(t){i=i.next={task:t,domain:u&&n.domain,next:null},o||(o=!0,c())},"object"==typeof n&&"[object process]"===n.toString()&&n.nextTick)u=!0,c=function(){n.nextTick(t)};else if("function"==typeof setImmediate)c="undefined"!=typeof window?setImmediate.bind(window,t):function(){setImmediate(t)};else if("undefined"!=typeof MessageChannel){var f=new MessageChannel;f.port1.onmessage=function(){c=s,f.port1.onmessage=t,t()};var s=function(){f.port2.postMessage(0)};c=function(){setTimeout(t,0),s()}}else c=function(){setTimeout(t,0)};return J.runAfter=function(n){a.push(n),o||(o=!0,c())},J}(),K=Function.call,W=t(Array.prototype.slice),X=t(Array.prototype.reduce||function(n,t){var e=0,r=this.length;if(1===arguments.length)for(;;){if(e in this){t=this[e++];break}if(++e>=r)throw new TypeError}for(;e<r;e++)e in this&&(t=n(t,this[e],e));return t}),Y=t(Array.prototype.indexOf||function(n){for(var t=0;t<this.length;t++)if(this[t]===n)return t;return-1}),Z=t(Array.prototype.map||function(n,t){var e=this,r=[];return X(e,function(i,o,c){r.push(n.call(t,o,c,e))},void 0),r}),nn=Object.create||function(n){function t(){}return t.prototype=n,new t},tn=t(Object.prototype.hasOwnProperty),en=Object.keys||function(n){var t=[];for(var e in n)tn(n,e)&&t.push(e);return t},rn=t(Object.prototype.toString);H="undefined"!=typeof ReturnValue?ReturnValue:function(n){this.value=n};var on="From previous event:";p.resolve=p,p.nextTick=J,p.longStackSupport=!1,"object"==typeof n&&n&&n.env&&n.env.Q_DEBUG&&(p.longStackSupport=!0),p.defer=l,l.prototype.makeNodeResolver=function(){var n=this;return function(t,e){t?n.reject(t):arguments.length>2?n.resolve(W(arguments,1)):n.resolve(e)}},p.Promise=d,p.promise=d,d.race=h,d.all=Q,d.reject=R,d.resolve=p,p.passByCopy=function(n){return n},v.prototype.passByCopy=function(){return this},p.join=function(n,t){return p(n).join(t)},v.prototype.join=function(n){return p([this,n]).spread(function(n,t){if(n===t)return n;throw new Error("Can't join: not the same: "+n+" "+t)})},p.race=h,v.prototype.race=function(){return this.then(p.race)},p.makePromise=v,v.prototype.toString=function(){return"[object Promise]"},v.prototype.then=function(n,t,e){function r(t){try{return"function"==typeof n?n(t):t}catch(e){return R(e)}}function o(n){if("function"==typeof t){i(n,u);try{return t(n)}catch(e){return R(e)}}return R(n)}function c(n){return"function"==typeof e?e(n):n}var u=this,a=l(),f=!1;return p.nextTick(function(){u.promiseDispatch(function(n){f||(f=!0,a.resolve(r(n)))},"when",[function(n){f||(f=!0,a.resolve(o(n)))}])}),u.promiseDispatch(void 0,"when",[void 0,function(n){var t,e=!1;try{t=c(n)}catch(r){if(e=!0,!p.onerror)throw r;p.onerror(r)}e||a.notify(t)}]),a.promise},p.tap=function(n,t){return p(n).tap(t)},v.prototype.tap=function(n){return n=p(n),this.then(function(t){return n.fcall(t).thenResolve(t)})},p.when=y,v.prototype.thenResolve=function(n){return this.then(function(){return n})},p.thenResolve=function(n,t){return p(n).thenResolve(t)},v.prototype.thenReject=function(n){return this.then(function(){throw n})},p.thenReject=function(n,t){return p(n).thenReject(t)},p.nearer=m,p.isPromise=g,p.isPromiseAlike=w,p.isPending=k,v.prototype.isPending=function(){return"pending"===this.inspect().state},p.isFulfilled=b,v.prototype.isFulfilled=function(){return"fulfilled"===this.inspect().state},p.isRejected=j,v.prototype.isRejected=function(){return"rejected"===this.inspect().state};var cn=[],un=[],an=[],fn=!0;p.resetUnhandledRejections=T,p.getUnhandledReasons=function(){return cn.slice()},p.stopUnhandledRejectionTracking=function(){T(),fn=!1},T(),p.reject=R,p.fulfill=E,p.master=C,p.spread=O,v.prototype.spread=function(n,t){return this.all().then(function(t){return n.apply(void 0,t)},t)},p.async=A,p.spawn=N,p["return"]=S,p.promised=D,p.dispatch=P,v.prototype.dispatch=function(n,t){var e=this,r=l();return p.nextTick(function(){e.promiseDispatch(r.resolve,n,t)}),r.promise},p.get=function(n,t){return p(n).dispatch("get",[t])},v.prototype.get=function(n){return this.dispatch("get",[n])},p.set=function(n,t,e){return p(n).dispatch("set",[t,e])},v.prototype.set=function(n,t){return this.dispatch("set",[n,t])},p.del=p["delete"]=function(n,t){return p(n).dispatch("delete",[t])},v.prototype.del=v.prototype["delete"]=function(n){return this.dispatch("delete",[n])},p.mapply=p.post=function(n,t,e){return p(n).dispatch("post",[t,e])},v.prototype.mapply=v.prototype.post=function(n,t){return this.dispatch("post",[n,t])},p.send=p.mcall=p.invoke=function(n,t){return p(n).dispatch("post",[t,W(arguments,2)])},v.prototype.send=v.prototype.mcall=v.prototype.invoke=function(n){return this.dispatch("post",[n,W(arguments,1)])},p.fapply=function(n,t){return p(n).dispatch("apply",[void 0,t])},v.prototype.fapply=function(n){return this.dispatch("apply",[void 0,n])},p["try"]=p.fcall=function(n){return p(n).dispatch("apply",[void 0,W(arguments,1)])},v.prototype.fcall=function(){return this.dispatch("apply",[void 0,W(arguments)])},p.fbind=function(n){var t=p(n),e=W(arguments,1);return function(){return t.dispatch("apply",[this,e.concat(W(arguments))])}},v.prototype.fbind=function(){var n=this,t=W(arguments);return function(){return n.dispatch("apply",[this,t.concat(W(arguments))])}},p.keys=function(n){return p(n).dispatch("keys",[])},v.prototype.keys=function(){return this.dispatch("keys",[])},p.all=Q,v.prototype.all=function(){return Q(this)},p.any=U,v.prototype.any=function(){return U(this)},p.allResolved=s(I,"allResolved","allSettled"),v.prototype.allResolved=function(){return I(this)},p.allSettled=q,v.prototype.allSettled=function(){return this.then(function(n){return Q(Z(n,function(n){function t(){return n.inspect()}return n=p(n),n.then(t,t)}))})},p.fail=p["catch"]=function(n,t){return p(n).then(void 0,t)},v.prototype.fail=v.prototype["catch"]=function(n){return this.then(void 0,n)},p.progress=F,v.prototype.progress=function(n){return this.then(void 0,void 0,n)},p.fin=p["finally"]=function(n,t){return p(n)["finally"](t)},v.prototype.fin=v.prototype["finally"]=function(n){return n=p(n),this.then(function(t){return n.fcall().then(function(){return t})},function(t){return n.fcall().then(function(){throw t})})},p.done=function(n,t,e,r){return p(n).done(t,e,r)},v.prototype.done=function(t,e,r){var o=function(n){p.nextTick(function(){if(i(n,c),!p.onerror)throw n;p.onerror(n)})},c=t||e||r?this.then(t,e,r):this;"object"==typeof n&&n&&n.domain&&(o=n.domain.bind(o)),c.then(void 0,o)},p.timeout=function(n,t,e){return p(n).timeout(t,e)},v.prototype.timeout=function(n,t){var e=l(),r=setTimeout(function(){t&&"string"!=typeof t||(t=new Error(t||"Timed out after "+n+" ms"),t.code="ETIMEDOUT"),e.reject(t)},n);return this.then(function(n){clearTimeout(r),e.resolve(n)},function(n){clearTimeout(r),e.reject(n)},e.notify),e.promise},p.delay=function(n,t){return void 0===t&&(t=n,n=void 0),p(n).delay(t)},v.prototype.delay=function(n){return this.then(function(t){var e=l();return setTimeout(function(){e.resolve(t)},n),e.promise})},p.nfapply=function(n,t){return p(n).nfapply(t)},v.prototype.nfapply=function(n){var t=l(),e=W(n);return e.push(t.makeNodeResolver()),this.fapply(e).fail(t.reject),t.promise},p.nfcall=function(n){var t=W(arguments,1);return p(n).nfapply(t)},v.prototype.nfcall=function(){var n=W(arguments),t=l();return n.push(t.makeNodeResolver()),this.fapply(n).fail(t.reject),t.promise},p.nfbind=p.denodeify=function(n){var t=W(arguments,1);return function(){var e=t.concat(W(arguments)),r=l();return e.push(r.makeNodeResolver()),p(n).fapply(e).fail(r.reject),r.promise}},v.prototype.nfbind=v.prototype.denodeify=function(){var n=W(arguments);return n.unshift(this),p.denodeify.apply(void 0,n)},p.nbind=function(n,t){var e=W(arguments,2);return function(){function r(){return n.apply(t,arguments)}var i=e.concat(W(arguments)),o=l();return i.push(o.makeNodeResolver()),p(r).fapply(i).fail(o.reject),o.promise}},v.prototype.nbind=function(){var n=W(arguments,0);return n.unshift(this),p.nbind.apply(void 0,n)},p.nmapply=p.npost=function(n,t,e){return p(n).npost(t,e)},v.prototype.nmapply=v.prototype.npost=function(n,t){var e=W(t||[]),r=l();return e.push(r.makeNodeResolver()),this.dispatch("post",[n,e]).fail(r.reject),r.promise},p.nsend=p.nmcall=p.ninvoke=function(n,t){var e=W(arguments,2),r=l();return e.push(r.makeNodeResolver()),p(n).dispatch("post",[t,e]).fail(r.reject),r.promise},v.prototype.nsend=v.prototype.nmcall=v.prototype.ninvoke=function(n){var t=W(arguments,1),e=l();return t.push(e.makeNodeResolver()),this.dispatch("post",[n,t]).fail(e.reject),e.promise},p.nodeify=M,v.prototype.nodeify=function(n){return n?void this.then(function(t){p.nextTick(function(){n(null,t)})},function(t){p.nextTick(function(){n(t)})}):this},p.noConflict=function(){throw new Error("Q.noConflict only works when Q is used as a global")};var sn=f();return p})}).call(this,n("_process"))},{_process:1}],3:[function(n,t,e){(function(t){"use strict";function e(n){return n.replace(/\s+|\//g,"___")}function r(n,t){return _.isArray(n)?_.find(n,function(n){return n.id===t}):null}function i(){window.scrollTo(0,0)}function o(){k.html("404"),i(),y()}function c(n){f(n),k.empty(),y()}function u(n,t){var i=t?t.id:null;if(b.seg_1!=n||b.seg_4!=i){if(b.seg_1==n&&b.seg_4&&!i)return void(b.seg_4=null);b.seg_1=n,b.seg_4=i,m.children("li").removeClass("active"),m.children("#"+e(n)).addClass("active"),g.empty();var o=r(b.doc.children,n);o&&_.isArray(o.children)&&o.children.forEach(function(r){var i=n+"/"+r.id,o=$("<span id='"+e(i)+"' class='doc-menu doc-book'>"+r.name+"</span>"),c=r.doc?$("<a href='#"+i+"'></a>").append(o):o;g.append($("<div class='doc-margin'></div>").append(c)),_.isArray(r.children)&&r.children.forEach(function(n){function r(){var t=a.hasClass("glyphicon-plus");g.find(".glyphicon-minus").removeClass("glyphicon-minus").addClass("glyphicon-plus"),g.find(".section-list").empty(),t&&(n.children.forEach(function(n){var t=o+"/"+n.id,r=$("<a href='#"+t+"'><div id='"+e(t)+"' class='doc-menu doc-section"+(decodeURI(location.hash)==="#"+t?" active":"")+"'>"+n.name+"</div></a>");u.append(r)}),a.removeClass("glyphicon-plus").addClass("glyphicon-minus"))}var o=i+"/"+n.id,c=$("<div id='"+e(o)+"' class='doc-menu doc-chapter'>"+n.name+"</div>");if(g.append(n.doc?$("<a href='#"+o+"'></a>").append(c):c),_.isArray(n.children)&&!(n.children.length<=0)){var u=$("<div class='section-list'></div>");g.append(u);var a=$("<i class='glyphicon glyphicon-plus icon-right'></i>");a.click(function(n){n.stopPropagation(),n.preventDefault(),r()}),c.click(function(){r()}),c.append(a),(decodeURI(location.hash)==="#"+o||n.children.indexOf(t)>=0)&&r()}})})}}function a(){b.doc.children.forEach(function(n){var t=$("<li id='"+e(n.id)+"'><a href='#"+n.id+"'>"+n.name+"</a></li>");m.append(t)})}function f(n){var t=n.split("/"),e=b.doc,i="";w.append($("<li><a href='/'>Home</a></li>")),w.append($("<li><a href='#'>"+b.doc.name+"</a></li>")),t.forEach(function(n,o){e=r(e.children,n),i+=n;var c=e&&e.name||n,u=o===t.length-1||0!==o&&!e.doc?$("<li class='active'>"+c+"</li>"):$("<li><a href='#"+i+"'>"+c+"</a></li>");w.append(u),i+="/"})}function s(n,t){g.find("#"+e(n)).addClass("active"),f(n),k.load("./doc/"+encodeURI(n)+"/index.html",function(){t?t():i();var n=k.find("img");n.length>0?(_.forEach(n.filter(".viewer"),function(n){$(n).fancybox({type:"image",href:$(n).attr("src")})}),n.one("load",y)):y()})}function p(n){return n?(u(n.id),n.doc?void s(n.id):!_.isArray(n.children)||n.children.length<1||!n.children[0].doc?void c(n.id):void s(n.id+"/"+n.children[0].id)):void o()}function l(n,t){var e=r(b.doc.children,n),i=e&&r(e.children,t);return e&&u(e.id),e&&i?i.doc?void s(e.id+"/"+i.id):!_.isArray(i.children)||i.children.length<1||!i.children[0].doc?void c(e.id+"/"+i.id):void s(e.id+"/"+i.id+"/"+i.children[0].id):void o()}function d(n,t,e){var a=r(b.doc.children,n),f=a&&r(a.children,t),p=f&&r(f.children,e);if(a&&u(a.id),!a||!p)return void o();var l=a.id+"/"+f.id+"/"+p.id;return p.doc?void s(l,function(){var n=p.children;if(p.navigator&&_.isArray(n)&&n.length>0){var t=n[0],e=$("<div class='center'><a class='margin-top btn btn-lg' href='#"+l+"/"+t.id+"'><i class='margin-right glyphicon glyphicon-step-forward'></i>"+(p.entry_message||t.name)+"</a></div>");k.append(e)}i()}):void c(l)}function h(n,t,a,f){var p=r(b.doc.children,n),l=p&&r(p.children,t),d=l&&r(l.children,a),h=d&&r(d.children,f);if(p&&u(p.id,h),!p||!h)return void o();var v=p.id+"/"+l.id+"/"+d.id,y=v+"/"+h.id;return h.doc?void s(v+"/"+h.id,function(){var n=d.children;if(d.navigator&&_.isArray(n)&&n.length>0){var t=n.indexOf(h),e=0===t?v:v+"/"+n[t-1].id,r=$("<div class='right'><a class='btn' href='#"+e+"'><i class='margin-right glyphicon glyphicon-step-backward'></i>Previous</a></div>");t<n.length-1?r.append($("<a class='margin-left btn' href='#"+v+"/"+n[t+1].id+"'>Next<i class='margin-left glyphicon glyphicon-step-forward'></i></a>")):r.append($("<a class='disabled margin-left btn'>Next<i class='margin-left glyphicon glyphicon-step-forward'></i></a>")),k.prepend(r),k.append(r.clone().addClass("margin-top"))}i()}):d.doc&&h.href?void s(v,function(){g.find("#"+e(y)).addClass("active");var n=k.find("#"+h.href)[0];if(n){var t=n.parentElement;window.scrollTo(0,$(n).offset().top-$(t).offset().top)}}):void c(y)}function v(){var n=decodeURI(location.hash)||"#";if(w.empty(),g.find(".doc-menu.active").removeClass("active"),"#"===n)return b.doc.doc?void k.load("./doc/index.html",i):void p(b.doc.children[0]);var t=n.substr(1).split("/");if(t.length<=1){var e=r(b.doc.children,t[0]);return void p(e)}return 2===t.length?void l(t[0],t[1]):3===t.length?void d(t[0],t[1],t[2]):void h(t[0],t[1],t[2],t[3])}function y(){var n=$(document).height(),t=$(window).height();$("body").css("position",t<n?"relative":"absolute")}t.$Q=n("q");var m=$("#top-navbar"),g=$("#side-bar"),w=$("#doc-path"),k=$("#doc-content"),b={doc:[],seg_1:null,seg_4:null};$(function(){$Q($.ajax({type:"GET",url:"./doc/package.json"}).then(function(n){b.doc=n,a(),v()})).done()}),$(window).on("hashchange",v).on("resize",y)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{q:2}]},{},[3]);