/*
 # -----------------------------------------------------------------------------
 #  ~/assets/themes/j1/modules/nbInteract/js/nbinteract/nbinteract-core.js
 #  Modified nbInteract JS API for J1 Template
 #
 #  Product/Info:
 #  https://jekyll.one
 #
 #  Copyright (C) 2022 Juergen Adams
 #
 #  J1 Template is licensed under MIT License.
 #  See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
 # -----------------------------------------------------------------------------
*/
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=560)}([function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return xn})),n.d(t,"VERSION",(function(){return i.e})),n.d(t,"restArguments",(function(){return o})),n.d(t,"isObject",(function(){return s})),n.d(t,"isNull",(function(){return a})),n.d(t,"isUndefined",(function(){return l})),n.d(t,"isBoolean",(function(){return c})),n.d(t,"isElement",(function(){return u})),n.d(t,"isString",(function(){return d})),n.d(t,"isNumber",(function(){return p})),n.d(t,"isDate",(function(){return f})),n.d(t,"isRegExp",(function(){return g})),n.d(t,"isError",(function(){return m})),n.d(t,"isSymbol",(function(){return _})),n.d(t,"isArrayBuffer",(function(){return v})),n.d(t,"isDataView",(function(){return M})),n.d(t,"isArray",(function(){return C})),n.d(t,"isFunction",(function(){return w})),n.d(t,"isArguments",(function(){return T})),n.d(t,"isFinite",(function(){return P})),n.d(t,"isNaN",(function(){return O})),n.d(t,"isTypedArray",(function(){return N})),n.d(t,"isEmpty",(function(){return H})),n.d(t,"isMatch",(function(){return W})),n.d(t,"isEqual",(function(){return G})),n.d(t,"isMap",(function(){return re})),n.d(t,"isWeakMap",(function(){return ie})),n.d(t,"isSet",(function(){return oe})),n.d(t,"isWeakSet",(function(){return se})),n.d(t,"keys",(function(){return q})),n.d(t,"allKeys",(function(){return Y})),n.d(t,"values",(function(){return ae})),n.d(t,"pairs",(function(){return le})),n.d(t,"invert",(function(){return ce})),n.d(t,"functions",(function(){return ue})),n.d(t,"methods",(function(){return ue})),n.d(t,"extend",(function(){return de})),n.d(t,"extendOwn",(function(){return pe})),n.d(t,"assign",(function(){return pe})),n.d(t,"defaults",(function(){return fe})),n.d(t,"create",(function(){return me})),n.d(t,"clone",(function(){return _e})),n.d(t,"tap",(function(){return ve})),n.d(t,"get",(function(){return xe})),n.d(t,"has",(function(){return ke})),n.d(t,"mapObject",(function(){return Pe})),n.d(t,"identity",(function(){return Ee})),n.d(t,"constant",(function(){return L})),n.d(t,"noop",(function(){return Oe})),n.d(t,"toPath",(function(){return ye})),n.d(t,"property",(function(){return Me})),n.d(t,"propertyOf",(function(){return Le})),n.d(t,"matcher",(function(){return Se})),n.d(t,"matches",(function(){return Se})),n.d(t,"times",(function(){return Ie})),n.d(t,"random",(function(){return De})),n.d(t,"now",(function(){return Re})),n.d(t,"escape",(function(){return Ne})),n.d(t,"unescape",(function(){return Fe})),n.d(t,"templateSettings",(function(){return Ue})),n.d(t,"template",(function(){return Ke})),n.d(t,"result",(function(){return Ge})),n.d(t,"uniqueId",(function(){return Je})),n.d(t,"chain",(function(){return Xe})),n.d(t,"iteratee",(function(){return Ae})),n.d(t,"partial",(function(){return et})),n.d(t,"bind",(function(){return tt})),n.d(t,"bindAll",(function(){return it})),n.d(t,"memoize",(function(){return ot})),n.d(t,"delay",(function(){return st})),n.d(t,"defer",(function(){return at})),n.d(t,"throttle",(function(){return lt})),n.d(t,"debounce",(function(){return ct})),n.d(t,"wrap",(function(){return ut})),n.d(t,"negate",(function(){return ht})),n.d(t,"compose",(function(){return dt})),n.d(t,"after",(function(){return pt})),n.d(t,"before",(function(){return ft})),n.d(t,"once",(function(){return gt})),n.d(t,"findKey",(function(){return mt})),n.d(t,"findIndex",(function(){return vt})),n.d(t,"findLastIndex",(function(){return yt})),n.d(t,"sortedIndex",(function(){return bt})),n.d(t,"indexOf",(function(){return xt})),n.d(t,"lastIndexOf",(function(){return kt})),n.d(t,"find",(function(){return Et})),n.d(t,"detect",(function(){return Et})),n.d(t,"findWhere",(function(){return St})),n.d(t,"each",(function(){return Mt})),n.d(t,"forEach",(function(){return Mt})),n.d(t,"map",(function(){return Ct})),n.d(t,"collect",(function(){return Ct})),n.d(t,"reduce",(function(){return At})),n.d(t,"foldl",(function(){return At})),n.d(t,"inject",(function(){return At})),n.d(t,"reduceRight",(function(){return Tt})),n.d(t,"foldr",(function(){return Tt})),n.d(t,"filter",(function(){return Pt})),n.d(t,"select",(function(){return Pt})),n.d(t,"reject",(function(){return Ot})),n.d(t,"every",(function(){return Lt})),n.d(t,"all",(function(){return Lt})),n.d(t,"some",(function(){return It})),n.d(t,"any",(function(){return It})),n.d(t,"contains",(function(){return Dt})),n.d(t,"includes",(function(){return Dt})),n.d(t,"include",(function(){return Dt})),n.d(t,"invoke",(function(){return Rt})),n.d(t,"pluck",(function(){return Bt})),n.d(t,"where",(function(){return zt})),n.d(t,"max",(function(){return Nt})),n.d(t,"min",(function(){return Ft})),n.d(t,"shuffle",(function(){return Wt})),n.d(t,"sample",(function(){return Ht})),n.d(t,"sortBy",(function(){return Vt})),n.d(t,"groupBy",(function(){return Kt})),n.d(t,"indexBy",(function(){return Gt})),n.d(t,"countBy",(function(){return Yt})),n.d(t,"partition",(function(){return Jt})),n.d(t,"toArray",(function(){return qt})),n.d(t,"size",(function(){return Xt})),n.d(t,"pick",(function(){return Zt})),n.d(t,"omit",(function(){return en})),n.d(t,"first",(function(){return nn})),n.d(t,"head",(function(){return nn})),n.d(t,"take",(function(){return nn})),n.d(t,"initial",(function(){return tn})),n.d(t,"last",(function(){return on})),n.d(t,"rest",(function(){return rn})),n.d(t,"tail",(function(){return rn})),n.d(t,"drop",(function(){return rn})),n.d(t,"compact",(function(){return sn})),n.d(t,"flatten",(function(){return an})),n.d(t,"without",(function(){return cn})),n.d(t,"uniq",(function(){return un})),n.d(t,"unique",(function(){return un})),n.d(t,"union",(function(){return hn})),n.d(t,"intersection",(function(){return dn})),n.d(t,"difference",(function(){return ln})),n.d(t,"unzip",(function(){return pn})),n.d(t,"transpose",(function(){return pn})),n.d(t,"zip",(function(){return fn})),n.d(t,"object",(function(){return gn})),n.d(t,"range",(function(){return mn})),n.d(t,"chunk",(function(){return _n})),n.d(t,"mixin",(function(){return yn}));var r={};n.r(r),n.d(r,"VERSION",(function(){return i.e})),n.d(r,"restArguments",(function(){return o})),n.d(r,"isObject",(function(){return s})),n.d(r,"isNull",(function(){return a})),n.d(r,"isUndefined",(function(){return l})),n.d(r,"isBoolean",(function(){return c})),n.d(r,"isElement",(function(){return u})),n.d(r,"isString",(function(){return d})),n.d(r,"isNumber",(function(){return p})),n.d(r,"isDate",(function(){return f})),n.d(r,"isRegExp",(function(){return g})),n.d(r,"isError",(function(){return m})),n.d(r,"isSymbol",(function(){return _})),n.d(r,"isArrayBuffer",(function(){return v})),n.d(r,"isDataView",(function(){return M})),n.d(r,"isArray",(function(){return C})),n.d(r,"isFunction",(function(){return w})),n.d(r,"isArguments",(function(){return T})),n.d(r,"isFinite",(function(){return P})),n.d(r,"isNaN",(function(){return O})),n.d(r,"isTypedArray",(function(){return N})),n.d(r,"isEmpty",(function(){return H})),n.d(r,"isMatch",(function(){return W})),n.d(r,"isEqual",(function(){return G})),n.d(r,"isMap",(function(){return re})),n.d(r,"isWeakMap",(function(){return ie})),n.d(r,"isSet",(function(){return oe})),n.d(r,"isWeakSet",(function(){return se})),n.d(r,"keys",(function(){return q})),n.d(r,"allKeys",(function(){return Y})),n.d(r,"values",(function(){return ae})),n.d(r,"pairs",(function(){return le})),n.d(r,"invert",(function(){return ce})),n.d(r,"functions",(function(){return ue})),n.d(r,"methods",(function(){return ue})),n.d(r,"extend",(function(){return de})),n.d(r,"extendOwn",(function(){return pe})),n.d(r,"assign",(function(){return pe})),n.d(r,"defaults",(function(){return fe})),n.d(r,"create",(function(){return me})),n.d(r,"clone",(function(){return _e})),n.d(r,"tap",(function(){return ve})),n.d(r,"get",(function(){return xe})),n.d(r,"has",(function(){return ke})),n.d(r,"mapObject",(function(){return Pe})),n.d(r,"identity",(function(){return Ee})),n.d(r,"constant",(function(){return L})),n.d(r,"noop",(function(){return Oe})),n.d(r,"toPath",(function(){return ye})),n.d(r,"property",(function(){return Me})),n.d(r,"propertyOf",(function(){return Le})),n.d(r,"matcher",(function(){return Se})),n.d(r,"matches",(function(){return Se})),n.d(r,"times",(function(){return Ie})),n.d(r,"random",(function(){return De})),n.d(r,"now",(function(){return Re})),n.d(r,"escape",(function(){return Ne})),n.d(r,"unescape",(function(){return Fe})),n.d(r,"templateSettings",(function(){return Ue})),n.d(r,"template",(function(){return Ke})),n.d(r,"result",(function(){return Ge})),n.d(r,"uniqueId",(function(){return Je})),n.d(r,"chain",(function(){return Xe})),n.d(r,"iteratee",(function(){return Ae})),n.d(r,"partial",(function(){return et})),n.d(r,"bind",(function(){return tt})),n.d(r,"bindAll",(function(){return it})),n.d(r,"memoize",(function(){return ot})),n.d(r,"delay",(function(){return st})),n.d(r,"defer",(function(){return at})),n.d(r,"throttle",(function(){return lt})),n.d(r,"debounce",(function(){return ct})),n.d(r,"wrap",(function(){return ut})),n.d(r,"negate",(function(){return ht})),n.d(r,"compose",(function(){return dt})),n.d(r,"after",(function(){return pt})),n.d(r,"before",(function(){return ft})),n.d(r,"once",(function(){return gt})),n.d(r,"findKey",(function(){return mt})),n.d(r,"findIndex",(function(){return vt})),n.d(r,"findLastIndex",(function(){return yt})),n.d(r,"sortedIndex",(function(){return bt})),n.d(r,"indexOf",(function(){return xt})),n.d(r,"lastIndexOf",(function(){return kt})),n.d(r,"find",(function(){return Et})),n.d(r,"detect",(function(){return Et})),n.d(r,"findWhere",(function(){return St})),n.d(r,"each",(function(){return Mt})),n.d(r,"forEach",(function(){return Mt})),n.d(r,"map",(function(){return Ct})),n.d(r,"collect",(function(){return Ct})),n.d(r,"reduce",(function(){return At})),n.d(r,"foldl",(function(){return At})),n.d(r,"inject",(function(){return At})),n.d(r,"reduceRight",(function(){return Tt})),n.d(r,"foldr",(function(){return Tt})),n.d(r,"filter",(function(){return Pt})),n.d(r,"select",(function(){return Pt})),n.d(r,"reject",(function(){return Ot})),n.d(r,"every",(function(){return Lt})),n.d(r,"all",(function(){return Lt})),n.d(r,"some",(function(){return It})),n.d(r,"any",(function(){return It})),n.d(r,"contains",(function(){return Dt})),n.d(r,"includes",(function(){return Dt})),n.d(r,"include",(function(){return Dt})),n.d(r,"invoke",(function(){return Rt})),n.d(r,"pluck",(function(){return Bt})),n.d(r,"where",(function(){return zt})),n.d(r,"max",(function(){return Nt})),n.d(r,"min",(function(){return Ft})),n.d(r,"shuffle",(function(){return Wt})),n.d(r,"sample",(function(){return Ht})),n.d(r,"sortBy",(function(){return Vt})),n.d(r,"groupBy",(function(){return Kt})),n.d(r,"indexBy",(function(){return Gt})),n.d(r,"countBy",(function(){return Yt})),n.d(r,"partition",(function(){return Jt})),n.d(r,"toArray",(function(){return qt})),n.d(r,"size",(function(){return Xt})),n.d(r,"pick",(function(){return Zt})),n.d(r,"omit",(function(){return en})),n.d(r,"first",(function(){return nn})),n.d(r,"head",(function(){return nn})),n.d(r,"take",(function(){return nn})),n.d(r,"initial",(function(){return tn})),n.d(r,"last",(function(){return on})),n.d(r,"rest",(function(){return rn})),n.d(r,"tail",(function(){return rn})),n.d(r,"drop",(function(){return rn})),n.d(r,"compact",(function(){return sn})),n.d(r,"flatten",(function(){return an})),n.d(r,"without",(function(){return cn})),n.d(r,"uniq",(function(){return un})),n.d(r,"unique",(function(){return un})),n.d(r,"union",(function(){return hn})),n.d(r,"intersection",(function(){return dn})),n.d(r,"difference",(function(){return ln})),n.d(r,"unzip",(function(){return pn})),n.d(r,"transpose",(function(){return pn})),n.d(r,"zip",(function(){return fn})),n.d(r,"object",(function(){return gn})),n.d(r,"range",(function(){return mn})),n.d(r,"chunk",(function(){return _n})),n.d(r,"mixin",(function(){return yn})),n.d(r,"default",(function(){return bn}));var i=n(2);function o(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var o=Array(t+1);for(i=0;i<t;i++)o[i]=arguments[i];return o[t]=r,e.apply(this,o)}}function s(e){var t=typeof e;return"function"===t||"object"===t&&!!e}function a(e){return null===e}function l(e){return void 0===e}function c(e){return!0===e||!1===e||"[object Boolean]"===i.t.call(e)}function u(e){return!(!e||1!==e.nodeType)}function h(e){var t="[object "+e+"]";return function(e){return i.t.call(e)===t}}var d=h("String"),p=h("Number"),f=h("Date"),g=h("RegExp"),m=h("Error"),_=h("Symbol"),v=h("ArrayBuffer"),y=h("Function"),b=i.p.document&&i.p.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof b&&(y=function(e){return"function"==typeof e||!1});var w=y,x=h("Object"),k=i.s&&x(new DataView(new ArrayBuffer(8))),E="undefined"!=typeof Map&&x(new Map),S=h("DataView");var M=k?function(e){return null!=e&&w(e.getInt8)&&v(e.buffer)}:S,C=i.k||h("Array");function j(e,t){return null!=e&&i.i.call(e,t)}var A=h("Arguments");!function(){A(arguments)||(A=function(e){return j(e,"callee")})}();var T=A;function P(e){return!_(e)&&Object(i.f)(e)&&!isNaN(parseFloat(e))}function O(e){return p(e)&&Object(i.g)(e)}function L(e){return function(){return e}}function I(e){return function(t){var n=e(t);return"number"==typeof n&&n>=0&&n<=i.b}}function D(e){return function(t){return null==t?void 0:t[e]}}var R=D("byteLength"),B=I(R),z=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var N=i.r?function(e){return i.l?Object(i.l)(e)&&!M(e):B(e)&&z.test(i.t.call(e))}:L(!1),F=D("length");function U(e,t){t=function(e){for(var t={},n=e.length,r=0;r<n;++r)t[e[r]]=!0;return{contains:function(e){return!0===t[e]},push:function(n){return t[n]=!0,e.push(n)}}}(t);var n=i.n.length,r=e.constructor,o=w(r)&&r.prototype||i.c,s="constructor";for(j(e,s)&&!t.contains(s)&&t.push(s);n--;)(s=i.n[n])in e&&e[s]!==o[s]&&!t.contains(s)&&t.push(s)}function q(e){if(!s(e))return[];if(i.m)return Object(i.m)(e);var t=[];for(var n in e)j(e,n)&&t.push(n);return i.h&&U(e,t),t}function H(e){if(null==e)return!0;var t=F(e);return"number"==typeof t&&(C(e)||d(e)||T(e))?0===t:0===F(q(e))}function W(e,t){var n=q(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o<r;o++){var s=n[o];if(t[s]!==i[s]||!(s in i))return!1}return!0}function V(e){return e instanceof V?e:this instanceof V?void(this._wrapped=e):new V(e)}function $(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,R(e))}V.VERSION=i.e,V.prototype.value=function(){return this._wrapped},V.prototype.valueOf=V.prototype.toJSON=V.prototype.value,V.prototype.toString=function(){return String(this._wrapped)};function K(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;return("function"===o||"object"===o||"object"==typeof t)&&function e(t,n,r,o){t instanceof V&&(t=t._wrapped);n instanceof V&&(n=n._wrapped);var s=i.t.call(t);if(s!==i.t.call(n))return!1;if(k&&"[object Object]"==s&&M(t)){if(!M(n))return!1;s="[object DataView]"}switch(s){case"[object RegExp]":case"[object String]":return""+t==""+n;case"[object Number]":return+t!=+t?+n!=+n:0==+t?1/+t==1/n:+t==+n;case"[object Date]":case"[object Boolean]":return+t==+n;case"[object Symbol]":return i.d.valueOf.call(t)===i.d.valueOf.call(n);case"[object ArrayBuffer]":case"[object DataView]":return e($(t),$(n),r,o)}var a="[object Array]"===s;if(!a&&N(t)){if(R(t)!==R(n))return!1;if(t.buffer===n.buffer&&t.byteOffset===n.byteOffset)return!0;a=!0}if(!a){if("object"!=typeof t||"object"!=typeof n)return!1;var l=t.constructor,c=n.constructor;if(l!==c&&!(w(l)&&l instanceof l&&w(c)&&c instanceof c)&&"constructor"in t&&"constructor"in n)return!1}o=o||[];var u=(r=r||[]).length;for(;u--;)if(r[u]===t)return o[u]===n;if(r.push(t),o.push(n),a){if((u=t.length)!==n.length)return!1;for(;u--;)if(!K(t[u],n[u],r,o))return!1}else{var h,d=q(t);if(u=d.length,q(n).length!==u)return!1;for(;u--;)if(h=d[u],!j(n,h)||!K(t[h],n[h],r,o))return!1}return r.pop(),o.pop(),!0}(e,t,n,r)}function G(e,t){return K(e,t)}function Y(e){if(!s(e))return[];var t=[];for(var n in e)t.push(n);return i.h&&U(e,t),t}function J(e){var t=F(e);return function(n){if(null==n)return!1;var r=Y(n);if(F(r))return!1;for(var i=0;i<t;i++)if(!w(n[e[i]]))return!1;return e!==te||!w(n[X])}}var X="forEach",Q=["clear","delete"],Z=["get","has","set"],ee=Q.concat(X,Z),te=Q.concat(Z),ne=["add"].concat(Q,X,"has"),re=E?J(ee):h("Map"),ie=E?J(te):h("WeakMap"),oe=E?J(ne):h("Set"),se=h("WeakSet");function ae(e){for(var t=q(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r}function le(e){for(var t=q(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r}function ce(e){for(var t={},n=q(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t}function ue(e){var t=[];for(var n in e)w(e[n])&&t.push(n);return t.sort()}function he(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=e(o),a=s.length,l=0;l<a;l++){var c=s[l];t&&void 0!==n[c]||(n[c]=o[c])}return n}}var de=he(Y),pe=he(q),fe=he(Y,!0);function ge(e){if(!s(e))return{};if(i.j)return Object(i.j)(e);var t=function(){};t.prototype=e;var n=new t;return t.prototype=null,n}function me(e,t){var n=ge(e);return t&&pe(n,t),n}function _e(e){return s(e)?C(e)?e.slice():de({},e):e}function ve(e,t){return t(e),e}function ye(e){return C(e)?e:[e]}function be(e){return V.toPath(e)}function we(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0}function xe(e,t,n){var r=we(e,be(t));return l(r)?n:r}function ke(e,t){for(var n=(t=be(t)).length,r=0;r<n;r++){var i=t[r];if(!j(e,i))return!1;e=e[i]}return!!n}function Ee(e){return e}function Se(e){return e=pe({},e),function(t){return W(t,e)}}function Me(e){return e=be(e),function(t){return we(t,e)}}function Ce(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}function je(e,t,n){return null==e?Ee:w(e)?Ce(e,t,n):s(e)&&!C(e)?Se(e):Me(e)}function Ae(e,t){return je(e,t,1/0)}function Te(e,t,n){return V.iteratee!==Ae?V.iteratee(e,t):je(e,t,n)}function Pe(e,t,n){t=Te(t,n);for(var r=q(e),i=r.length,o={},s=0;s<i;s++){var a=r[s];o[a]=t(e[a],a,e)}return o}function Oe(){}function Le(e){return null==e?Oe:function(t){return xe(e,t)}}function Ie(e,t,n){var r=Array(Math.max(0,e));t=Ce(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r}function De(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}V.toPath=ye,V.iteratee=Ae;var Re=Date.now||function(){return(new Date).getTime()};function Be(e){var t=function(t){return e[t]},n="(?:"+q(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}}var ze={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Ne=Be(ze),Fe=Be(ce(ze)),Ue=V.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},qe=/(.)^/,He={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},We=/\\|'|\r|\n|\u2028|\u2029/g;function Ve(e){return"\\"+He[e]}var $e=/^\s*(\w|\$)+\s*$/;function Ke(e,t,n){!t&&n&&(t=n),t=fe({},t,V.templateSettings);var r=RegExp([(t.escape||qe).source,(t.interpolate||qe).source,(t.evaluate||qe).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(r,(function(t,n,r,s,a){return o+=e.slice(i,a).replace(We,Ve),i=a+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),t})),o+="';\n";var s,a=t.variable;if(a){if(!$e.test(a))throw new Error("variable is not a bare identifier: "+a)}else o="with(obj||{}){\n"+o+"}\n",a="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{s=new Function(a,"_",o)}catch(e){throw e.source=o,e}var l=function(e){return s.call(this,e,V)};return l.source="function("+a+"){\n"+o+"}",l}function Ge(e,t,n){var r=(t=be(t)).length;if(!r)return w(n)?n.call(e):n;for(var i=0;i<r;i++){var o=null==e?void 0:e[t[i]];void 0===o&&(o=n,i=r),e=w(o)?o.call(e):o}return e}var Ye=0;function Je(e){var t=++Ye+"";return e?e+t:t}function Xe(e){var t=V(e);return t._chain=!0,t}function Qe(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=ge(e.prototype),a=e.apply(o,i);return s(a)?a:o}var Ze=o((function(e,t){var n=Ze.placeholder,r=function(){for(var i=0,o=t.length,s=Array(o),a=0;a<o;a++)s[a]=t[a]===n?arguments[i++]:t[a];for(;i<arguments.length;)s.push(arguments[i++]);return Qe(e,r,this,this,s)};return r}));Ze.placeholder=V;var et=Ze,tt=o((function(e,t,n){if(!w(e))throw new TypeError("Bind must be called on a function");var r=o((function(i){return Qe(e,r,t,this,n.concat(i))}));return r})),nt=I(F);function rt(e,t,n,r){if(r=r||[],t||0===t){if(t<=0)return r.concat(e)}else t=1/0;for(var i=r.length,o=0,s=F(e);o<s;o++){var a=e[o];if(nt(a)&&(C(a)||T(a)))if(t>1)rt(a,t-1,n,r),i=r.length;else for(var l=0,c=a.length;l<c;)r[i++]=a[l++];else n||(r[i++]=a)}return r}var it=o((function(e,t){var n=(t=rt(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=tt(e[r],e)}return e}));function ot(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return j(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n}var st=o((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})),at=et(st,V,1);function lt(e,t,n){var r,i,o,s,a=0;n||(n={});var l=function(){a=!1===n.leading?0:Re(),r=null,s=e.apply(i,o),r||(i=o=null)},c=function(){var c=Re();a||!1!==n.leading||(a=c);var u=t-(c-a);return i=this,o=arguments,u<=0||u>t?(r&&(clearTimeout(r),r=null),a=c,s=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,u)),s};return c.cancel=function(){clearTimeout(r),a=0,r=i=o=null},c}function ct(e,t,n){var r,i,s,a,l,c=function(){var o=Re()-i;t>o?r=setTimeout(c,t-o):(r=null,n||(a=e.apply(l,s)),r||(s=l=null))},u=o((function(o){return l=this,s=o,i=Re(),r||(r=setTimeout(c,t),n&&(a=e.apply(l,s))),a}));return u.cancel=function(){clearTimeout(r),r=s=l=null},u}function ut(e,t){return et(t,e)}function ht(e){return function(){return!e.apply(this,arguments)}}function dt(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}function pt(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}function ft(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}var gt=et(ft,2);function mt(e,t,n){t=Te(t,n);for(var r,i=q(e),o=0,s=i.length;o<s;o++)if(t(e[r=i[o]],r,e))return r}function _t(e){return function(t,n,r){n=Te(n,r);for(var i=F(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}}var vt=_t(1),yt=_t(-1);function bt(e,t,n,r){for(var i=(n=Te(n,r,1))(t),o=0,s=F(e);o<s;){var a=Math.floor((o+s)/2);n(e[a])<i?o=a+1:s=a}return o}function wt(e,t,n){return function(r,o,s){var a=0,l=F(r);if("number"==typeof s)e>0?a=s>=0?s:Math.max(s+l,a):l=s>=0?Math.min(s+1,l):s+l+1;else if(n&&s&&l)return r[s=n(r,o)]===o?s:-1;if(o!=o)return(s=t(i.q.call(r,a,l),O))>=0?s+a:-1;for(s=e>0?a:l-1;s>=0&&s<l;s+=e)if(r[s]===o)return s;return-1}}var xt=wt(1,vt,bt),kt=wt(-1,yt);function Et(e,t,n){var r=(nt(e)?vt:mt)(e,t,n);if(void 0!==r&&-1!==r)return e[r]}function St(e,t){return Et(e,Se(t))}function Mt(e,t,n){var r,i;if(t=Ce(t,n),nt(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=q(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e}function Ct(e,t,n){t=Te(t,n);for(var r=!nt(e)&&q(e),i=(r||e).length,o=Array(i),s=0;s<i;s++){var a=r?r[s]:s;o[s]=t(e[a],a,e)}return o}function jt(e){var t=function(t,n,r,i){var o=!nt(t)&&q(t),s=(o||t).length,a=e>0?0:s-1;for(i||(r=t[o?o[a]:a],a+=e);a>=0&&a<s;a+=e){var l=o?o[a]:a;r=n(r,t[l],l,t)}return r};return function(e,n,r,i){var o=arguments.length>=3;return t(e,Ce(n,i,4),r,o)}}var At=jt(1),Tt=jt(-1);function Pt(e,t,n){var r=[];return t=Te(t,n),Mt(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function Ot(e,t,n){return Pt(e,ht(Te(t)),n)}function Lt(e,t,n){t=Te(t,n);for(var r=!nt(e)&&q(e),i=(r||e).length,o=0;o<i;o++){var s=r?r[o]:o;if(!t(e[s],s,e))return!1}return!0}function It(e,t,n){t=Te(t,n);for(var r=!nt(e)&&q(e),i=(r||e).length,o=0;o<i;o++){var s=r?r[o]:o;if(t(e[s],s,e))return!0}return!1}function Dt(e,t,n,r){return nt(e)||(e=ae(e)),("number"!=typeof n||r)&&(n=0),xt(e,t,n)>=0}var Rt=o((function(e,t,n){var r,i;return w(t)?i=t:(t=be(t),r=t.slice(0,-1),t=t[t.length-1]),Ct(e,(function(e){var o=i;if(!o){if(r&&r.length&&(e=we(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)}))}));function Bt(e,t){return Ct(e,Me(t))}function zt(e,t){return Pt(e,Se(t))}function Nt(e,t,n){var r,i,o=-1/0,s=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var a=0,l=(e=nt(e)?e:ae(e)).length;a<l;a++)null!=(r=e[a])&&r>o&&(o=r);else t=Te(t,n),Mt(e,(function(e,n,r){((i=t(e,n,r))>s||i===-1/0&&o===-1/0)&&(o=e,s=i)}));return o}function Ft(e,t,n){var r,i,o=1/0,s=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var a=0,l=(e=nt(e)?e:ae(e)).length;a<l;a++)null!=(r=e[a])&&r<o&&(o=r);else t=Te(t,n),Mt(e,(function(e,n,r){((i=t(e,n,r))<s||i===1/0&&o===1/0)&&(o=e,s=i)}));return o}var Ut=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function qt(e){return e?C(e)?i.q.call(e):d(e)?e.match(Ut):nt(e)?Ct(e,Ee):ae(e):[]}function Ht(e,t,n){if(null==t||n)return nt(e)||(e=ae(e)),e[De(e.length-1)];var r=qt(e),i=F(r);t=Math.max(Math.min(t,i),0);for(var o=i-1,s=0;s<t;s++){var a=De(s,o),l=r[s];r[s]=r[a],r[a]=l}return r.slice(0,t)}function Wt(e){return Ht(e,1/0)}function Vt(e,t,n){var r=0;return t=Te(t,n),Bt(Ct(e,(function(e,n,i){return{value:e,index:r++,criteria:t(e,n,i)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index})),"value")}function $t(e,t){return function(n,r,i){var o=t?[[],[]]:{};return r=Te(r,i),Mt(n,(function(t,i){var s=r(t,i,n);e(o,t,s)})),o}}var Kt=$t((function(e,t,n){j(e,n)?e[n].push(t):e[n]=[t]})),Gt=$t((function(e,t,n){e[n]=t})),Yt=$t((function(e,t,n){j(e,n)?e[n]++:e[n]=1})),Jt=$t((function(e,t,n){e[n?0:1].push(t)}),!0);function Xt(e){return null==e?0:nt(e)?e.length:q(e).length}function Qt(e,t,n){return t in n}var Zt=o((function(e,t){var n={},r=t[0];if(null==e)return n;w(r)?(t.length>1&&(r=Ce(r,t[1])),t=Y(e)):(r=Qt,t=rt(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i<o;i++){var s=t[i],a=e[s];r(a,s,e)&&(n[s]=a)}return n})),en=o((function(e,t){var n,r=t[0];return w(r)?(r=ht(r),t.length>1&&(n=t[1])):(t=Ct(rt(t,!1,!1),String),r=function(e,n){return!Dt(t,n)}),Zt(e,r,n)}));function tn(e,t,n){return i.q.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}function nn(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:tn(e,e.length-t)}function rn(e,t,n){return i.q.call(e,null==t||n?1:t)}function on(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:rn(e,Math.max(0,e.length-t))}function sn(e){return Pt(e,Boolean)}function an(e,t){return rt(e,t,!1)}var ln=o((function(e,t){return t=rt(t,!0,!0),Pt(e,(function(e){return!Dt(t,e)}))})),cn=o((function(e,t){return ln(e,t)}));function un(e,t,n,r){c(t)||(r=n,n=t,t=!1),null!=n&&(n=Te(n,r));for(var i=[],o=[],s=0,a=F(e);s<a;s++){var l=e[s],u=n?n(l,s,e):l;t&&!n?(s&&o===u||i.push(l),o=u):n?Dt(o,u)||(o.push(u),i.push(l)):Dt(i,l)||i.push(l)}return i}var hn=o((function(e){return un(rt(e,!0,!0))}));function dn(e){for(var t=[],n=arguments.length,r=0,i=F(e);r<i;r++){var o=e[r];if(!Dt(t,o)){var s;for(s=1;s<n&&Dt(arguments[s],o);s++);s===n&&t.push(o)}}return t}function pn(e){for(var t=e&&Nt(e,F).length||0,n=Array(t),r=0;r<t;r++)n[r]=Bt(e,r);return n}var fn=o(pn);function gn(e,t){for(var n={},r=0,i=F(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n}function mn(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i}function _n(e,t){if(null==t||t<1)return[];for(var n=[],r=0,o=e.length;r<o;)n.push(i.q.call(e,r,r+=t));return n}function vn(e,t){return e._chain?V(t).chain():t}function yn(e){return Mt(ue(e),(function(t){var n=V[t]=e[t];V.prototype[t]=function(){var e=[this._wrapped];return i.o.apply(e,arguments),vn(this,n.apply(V,e))}})),V}Mt(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=i.a[e];V.prototype[e]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0]),vn(this,n)}})),Mt(["concat","join","slice"],(function(e){var t=i.a[e];V.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),vn(this,e)}}));var bn=V,wn=yn(r);wn._=wn;var xn=wn},function(e,t,n){var r,i;!function(){var o={version:"3.5.17"},s=[].slice,a=function(e){return s.call(e)},l=this.document;function c(e){return e&&(e.ownerDocument||e.document||e).documentElement}function u(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(l)try{a(l.documentElement.childNodes)[0].nodeType}catch(e){a=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var h=this.Element.prototype,d=h.setAttribute,p=h.setAttributeNS,f=this.CSSStyleDeclaration.prototype,g=f.setProperty;h.setAttribute=function(e,t){d.call(this,e,t+"")},h.setAttributeNS=function(e,t,n){p.call(this,e,t,n+"")},f.setProperty=function(e,t,n){g.call(this,e,t+"",n)}}function m(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function _(e){return null===e?NaN:+e}function v(e){return!isNaN(e)}function y(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}o.ascending=m,o.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},o.min=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&n>r&&(n=r)}return n},o.max=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&r>n&&(n=r)}return n},o.extent=function(e,t){var n,r,i,o=-1,s=e.length;if(1===arguments.length){for(;++o<s;)if(null!=(r=e[o])&&r>=r){n=i=r;break}for(;++o<s;)null!=(r=e[o])&&(n>r&&(n=r),i<r&&(i=r))}else{for(;++o<s;)if(null!=(r=t.call(e,e[o],o))&&r>=r){n=i=r;break}for(;++o<s;)null!=(r=t.call(e,e[o],o))&&(n>r&&(n=r),i<r&&(i=r))}return[n,i]},o.sum=function(e,t){var n,r=0,i=e.length,o=-1;if(1===arguments.length)for(;++o<i;)v(n=+e[o])&&(r+=n);else for(;++o<i;)v(n=+t.call(e,e[o],o))&&(r+=n);return r},o.mean=function(e,t){var n,r=0,i=e.length,o=-1,s=i;if(1===arguments.length)for(;++o<i;)v(n=_(e[o]))?r+=n:--s;else for(;++o<i;)v(n=_(t.call(e,e[o],o)))?r+=n:--s;if(s)return r/s},o.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],o=n-r;return o?i+o*(e[r]-i):i},o.median=function(e,t){var n,r=[],i=e.length,s=-1;if(1===arguments.length)for(;++s<i;)v(n=_(e[s]))&&r.push(n);else for(;++s<i;)v(n=_(t.call(e,e[s],s)))&&r.push(n);if(r.length)return o.quantile(r.sort(m),.5)},o.variance=function(e,t){var n,r,i=e.length,o=0,s=0,a=-1,l=0;if(1===arguments.length)for(;++a<i;)v(n=_(e[a]))&&(s+=(r=n-o)*(n-(o+=r/++l)));else for(;++a<i;)v(n=_(t.call(e,e[a],a)))&&(s+=(r=n-o)*(n-(o+=r/++l)));if(l>1)return s/(l-1)},o.deviation=function(){var e=o.variance.apply(this,arguments);return e?Math.sqrt(e):e};var b=y(m);function w(e){return e.length}o.bisectLeft=b.left,o.bisect=o.bisectRight=b.right,o.bisector=function(e){return y(1===e.length?function(t,n){return m(e(t),n)}:e)},o.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,o<2&&(t=0));for(var r,i,o=n-t;o;)i=Math.random()*o--|0,r=e[o+t],e[o+t]=e[i+t],e[i+t]=r;return e},o.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},o.pairs=function(e){for(var t=0,n=e.length-1,r=e[0],i=new Array(n<0?0:n);t<n;)i[t]=[r,r=e[++t]];return i},o.transpose=function(e){if(!(i=e.length))return[];for(var t=-1,n=o.min(e,w),r=new Array(n);++t<n;)for(var i,s=-1,a=r[t]=new Array(i);++s<i;)a[s]=e[s][t];return r},o.zip=function(){return o.transpose(arguments)},o.keys=function(e){var t=[];for(var n in e)t.push(n);return t},o.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},o.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},o.merge=function(e){for(var t,n,r,i=e.length,o=-1,s=0;++o<i;)s+=e[o].length;for(n=new Array(s);--i>=0;)for(t=(r=e[i]).length;--t>=0;)n[--s]=r[t];return n};var x=Math.abs;function k(e){for(var t=1;e*t%1;)t*=10;return t}function E(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function S(){this._=Object.create(null)}o.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("infinite range");var r,i=[],o=k(x(n)),s=-1;if(e*=o,t*=o,(n*=o)<0)for(;(r=e+n*++s)>t;)i.push(r/o);else for(;(r=e+n*++s)<t;)i.push(r/o);return i},o.map=function(e,t){var n=new S;if(e instanceof S)e.forEach((function(e,t){n.set(e,t)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(1===arguments.length)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t.call(e,r=e[i],i),r)}else for(var s in e)n.set(s,e[s]);return n};function M(e){return"__proto__"==(e+="")||"\0"===e[0]?"\0"+e:e}function C(e){return"\0"===(e+="")[0]?e.slice(1):e}function j(e){return M(e)in this._}function A(e){return(e=M(e))in this._&&delete this._[e]}function T(){var e=[];for(var t in this._)e.push(C(t));return e}function P(){var e=0;for(var t in this._)++e;return e}function O(){for(var e in this._)return!1;return!0}function L(){this._=Object.create(null)}function I(e){return e}function D(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function R(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=B.length;n<r;++n){var i=B[n]+t;if(i in e)return i}}E(S,{has:j,get:function(e){return this._[M(e)]},set:function(e,t){return this._[M(e)]=t},remove:A,keys:T,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:C(t),value:this._[t]});return e},size:P,empty:O,forEach:function(e){for(var t in this._)e.call(this,C(t),this._[t])}}),o.nest=function(){var e,t,n={},r=[],i=[];function s(i,o,a){if(a>=r.length)return t?t.call(n,o):e?o.sort(e):o;for(var l,c,u,h,d=-1,p=o.length,f=r[a++],g=new S;++d<p;)(h=g.get(l=f(c=o[d])))?h.push(c):g.set(l,[c]);return i?(c=i(),u=function(e,t){c.set(e,s(i,t,a))}):(c={},u=function(e,t){c[e]=s(i,t,a)}),g.forEach(u),c}return n.map=function(e,t){return s(t,e,0)},n.entries=function(e){return function e(t,n){if(n>=r.length)return t;var o=[],s=i[n++];return t.forEach((function(t,r){o.push({key:t,values:e(r,n)})})),s?o.sort((function(e,t){return s(e.key,t.key)})):o}(s(o.map,e,0),0)},n.key=function(e){return r.push(e),n},n.sortKeys=function(e){return i[r.length-1]=e,n},n.sortValues=function(t){return e=t,n},n.rollup=function(e){return t=e,n},n},o.set=function(e){var t=new L;if(e)for(var n=0,r=e.length;n<r;++n)t.add(e[n]);return t},E(L,{has:j,add:function(e){return this._[M(e+="")]=!0,e},remove:A,values:T,size:P,empty:O,forEach:function(e){for(var t in this._)e.call(this,C(t))}}),o.behavior={},o.rebind=function(e,t){for(var n,r=1,i=arguments.length;++r<i;)e[n=arguments[r]]=D(e,t,t[n]);return e};var B=["webkit","ms","moz","Moz","o","O"];function z(){}function N(){}function F(e){var t=[],n=new S;function r(){for(var n,r=t,i=-1,o=r.length;++i<o;)(n=r[i].on)&&n.apply(this,arguments);return e}return r.on=function(r,i){var o,s=n.get(r);return arguments.length<2?s&&s.on:(s&&(s.on=null,t=t.slice(0,o=t.indexOf(s)).concat(t.slice(o+1)),n.remove(r)),i&&t.push(n.set(r,{on:i})),e)},r}function U(){o.event.preventDefault()}function q(){for(var e,t=o.event;e=t.sourceEvent;)t=e;return t}function H(e){for(var t=new N,n=0,r=arguments.length;++n<r;)t[arguments[n]]=F(t);return t.of=function(n,r){return function(i){try{var s=i.sourceEvent=o.event;i.target=e,o.event=i,t[i.type].apply(n,r)}finally{o.event=s}}},t}o.dispatch=function(){for(var e=new N,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=F(e);return e},N.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},o.event=null,o.requote=function(e){return e.replace(W,"\\$&")};var W=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,V={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};function $(e){return V(e,J),e}var K=function(e,t){return t.querySelector(e)},G=function(e,t){return t.querySelectorAll(e)},Y=function(e,t){var n=e.matches||e[R(e,"matchesSelector")];return(Y=function(e,t){return n.call(e,t)})(e,t)};"function"==typeof Sizzle&&(K=function(e,t){return Sizzle(e,t)[0]||null},G=Sizzle,Y=Sizzle.matchesSelector),o.selection=function(){return o.select(l.documentElement)};var J=o.selection.prototype=[];function X(e){return"function"==typeof e?e:function(){return K(e,this)}}function Q(e){return"function"==typeof e?e:function(){return G(e,this)}}J.select=function(e){var t,n,r,i,o=[];e=X(e);for(var s=-1,a=this.length;++s<a;){o.push(t=[]),t.parentNode=(r=this[s]).parentNode;for(var l=-1,c=r.length;++l<c;)(i=r[l])?(t.push(n=e.call(i,i.__data__,l,s)),n&&"__data__"in i&&(n.__data__=i.__data__)):t.push(null)}return $(o)},J.selectAll=function(e){var t,n,r=[];e=Q(e);for(var i=-1,o=this.length;++i<o;)for(var s=this[i],l=-1,c=s.length;++l<c;)(n=s[l])&&(r.push(t=a(e.call(n,n.__data__,l,i))),t.parentNode=n);return $(r)};var Z="http://www.w3.org/1999/xhtml",ee={svg:"http://www.w3.org/2000/svg",xhtml:Z,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function te(e,t){return e=o.ns.qualify(e),null==t?e.local?function(){this.removeAttributeNS(e.space,e.local)}:function(){this.removeAttribute(e)}:"function"==typeof t?e.local?function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}:function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}:e.local?function(){this.setAttributeNS(e.space,e.local,t)}:function(){this.setAttribute(e,t)}}function ne(e){return e.trim().replace(/\s+/g," ")}function re(e){return new RegExp("(?:^|\\s+)"+o.requote(e)+"(?:\\s+|$)","g")}function ie(e){return(e+"").trim().split(/^|\s+/)}function oe(e,t){var n=(e=ie(e).map(se)).length;return"function"==typeof t?function(){for(var r=-1,i=t.apply(this,arguments);++r<n;)e[r](this,i)}:function(){for(var r=-1;++r<n;)e[r](this,t)}}function se(e){var t=re(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||n.setAttribute("class",ne(i+" "+e))):n.setAttribute("class",ne(i.replace(t," ")))}}function ae(e,t,n){return null==t?function(){this.style.removeProperty(e)}:"function"==typeof t?function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}:function(){this.style.setProperty(e,t,n)}}function le(e,t){return null==t?function(){delete this[e]}:"function"==typeof t?function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}:function(){this[e]=t}}function ce(e){return"function"==typeof e?e:(e=o.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Z&&t.documentElement.namespaceURI===Z?t.createElement(e):t.createElementNS(n,e)}}function ue(){var e=this.parentNode;e&&e.removeChild(this)}function he(e){return{__data__:e}}function de(e){return function(){return Y(this,e)}}function pe(e){return arguments.length||(e=m),function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function fe(e,t){for(var n=0,r=e.length;n<r;n++)for(var i,o=e[n],s=0,a=o.length;s<a;s++)(i=o[s])&&t(i,s,n);return e}function ge(e){return V(e,me),e}o.ns={prefix:ee,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),ee.hasOwnProperty(n)?{space:ee[n],local:e}:e}},J.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return(e=o.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(te(t,e[t]));return this}return this.each(te(e,t))},J.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=ie(e)).length,i=-1;if(t=n.classList){for(;++i<r;)if(!t.contains(e[i]))return!1}else for(t=n.getAttribute("class");++i<r;)if(!re(e[i]).test(t))return!1;return!0}for(t in e)this.each(oe(t,e[t]));return this}return this.each(oe(e,t))},J.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=""),e)this.each(ae(n,e[n],t));return this}if(r<2){var i=this.node();return u(i).getComputedStyle(i,null).getPropertyValue(e)}n=""}return this.each(ae(e,t,n))},J.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(le(t,e[t]));return this}return this.each(le(e,t))},J.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},J.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},J.append=function(e){return e=ce(e),this.select((function(){return this.appendChild(e.apply(this,arguments))}))},J.insert=function(e,t){return e=ce(e),t=X(t),this.select((function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)}))},J.remove=function(){return this.each(ue)},J.data=function(e,t){var n,r,i=-1,o=this.length;if(!arguments.length){for(e=new Array(o=(n=this[0]).length);++i<o;)(r=n[i])&&(e[i]=r.__data__);return e}function s(e,n){var r,i,o,s=e.length,u=n.length,h=Math.min(s,u),d=new Array(u),p=new Array(u),f=new Array(s);if(t){var g,m=new S,_=new Array(s);for(r=-1;++r<s;)(i=e[r])&&(m.has(g=t.call(i,i.__data__,r))?f[r]=i:m.set(g,i),_[r]=g);for(r=-1;++r<u;)(i=m.get(g=t.call(n,o=n[r],r)))?!0!==i&&(d[r]=i,i.__data__=o):p[r]=he(o),m.set(g,!0);for(r=-1;++r<s;)r in _&&!0!==m.get(_[r])&&(f[r]=e[r])}else{for(r=-1;++r<h;)i=e[r],o=n[r],i?(i.__data__=o,d[r]=i):p[r]=he(o);for(;r<u;++r)p[r]=he(n[r]);for(;r<s;++r)f[r]=e[r]}p.update=d,p.parentNode=d.parentNode=f.parentNode=e.parentNode,a.push(p),l.push(d),c.push(f)}var a=ge([]),l=$([]),c=$([]);if("function"==typeof e)for(;++i<o;)s(n=this[i],e.call(n,n.parentNode.__data__,i));else for(;++i<o;)s(n=this[i],e);return l.enter=function(){return a},l.exit=function(){return c},l},J.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},J.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=de(e));for(var o=0,s=this.length;o<s;o++){i.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var a=0,l=n.length;a<l;a++)(r=n[a])&&e.call(r,r.__data__,a,o)&&t.push(r)}return $(i)},J.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,r=this[e],i=r.length-1,o=r[i];--i>=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},J.sort=function(e){e=pe.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},J.each=function(e){return fe(this,(function(t,n,r){e.call(t,t.__data__,n,r)}))},J.call=function(e){var t=a(arguments);return e.apply(t[0]=this,t),this},J.empty=function(){return!this.node()},J.node=function(){for(var e=0,t=this.length;e<t;e++)for(var n=this[e],r=0,i=n.length;r<i;r++){var o=n[r];if(o)return o}return null},J.size=function(){var e=0;return fe(this,(function(){++e})),e};var me=[];function _e(e){var t,n;return function(r,i,o){var s,a=e[o].update,l=a.length;for(o!=n&&(n=o,t=0),i>=t&&(t=i+1);!(s=a[t])&&++t<l;);return s}}function ve(e,t,n){var r="__on"+e,i=e.indexOf("."),s=be;i>0&&(e=e.slice(0,i));var l=ye.get(e);function c(){var t=this[r];t&&(this.removeEventListener(e,t,t.$),delete this[r])}return l&&(e=l,s=we),i?t?function(){var i=s(t,a(arguments));c.call(this),this.addEventListener(e,this[r]=i,i.$=n),i._=t}:c:t?z:function(){var t,n=new RegExp("^__on([^.]+)"+o.requote(e)+"$");for(var r in this)if(t=r.match(n)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}}o.selection.enter=ge,o.selection.enter.prototype=me,me.append=J.append,me.empty=J.empty,me.node=J.node,me.call=J.call,me.size=J.size,me.select=function(e){for(var t,n,r,i,o,s=[],a=-1,l=this.length;++a<l;){r=(i=this[a]).update,s.push(t=[]),t.parentNode=i.parentNode;for(var c=-1,u=i.length;++c<u;)(o=i[c])?(t.push(r[c]=n=e.call(i.parentNode,o.__data__,c,a)),n.__data__=o.__data__):t.push(null)}return $(s)},me.insert=function(e,t){return arguments.length<2&&(t=_e(this)),J.insert.call(this,e,t)},o.select=function(e){var t;return"string"==typeof e?(t=[K(e,l)]).parentNode=l.documentElement:(t=[e]).parentNode=c(e),$([t])},o.selectAll=function(e){var t;return"string"==typeof e?(t=a(G(e,l))).parentNode=l.documentElement:(t=a(e)).parentNode=null,$([t])},J.on=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=!1),e)this.each(ve(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(ve(e,t,n))};var ye=o.map({mouseenter:"mouseover",mouseleave:"mouseout"});function be(e,t){return function(n){var r=o.event;o.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{o.event=r}}}function we(e,t){var n=be(e,t);return function(e){var t=e.relatedTarget;t&&(t===this||8&t.compareDocumentPosition(this))||n.call(this,e)}}l&&ye.forEach((function(e){"on"+e in l&&ye.remove(e)}));var xe,ke=0;function Ee(e){var t=".dragsuppress-"+ ++ke,n="click"+t,r=o.select(u(e)).on("touchmove"+t,U).on("dragstart"+t,U).on("selectstart"+t,U);if(null==xe&&(xe=!("onselectstart"in e)&&R(e.style,"userSelect")),xe){var i=c(e).style,s=i[xe];i[xe]="none"}return function(e){if(r.on(t,null),xe&&(i[xe]=s),e){var o=function(){r.on(n,null)};r.on(n,(function(){U(),o()}),!0),setTimeout(o,0)}}}o.mouse=function(e){return Me(e,q())};var Se=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Me(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(Se<0){var i=u(e);if(i.scrollX||i.scrollY){var s=(n=o.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();Se=!(s.f||s.e),n.remove()}}return Se?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}var a=e.getBoundingClientRect();return[t.clientX-a.left-e.clientLeft,t.clientY-a.top-e.clientTop]}function Ce(){return o.event.changedTouches[0].identifier}o.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=q().changedTouches),t)for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).identifier===n)return Me(e,r)},o.behavior.drag=function(){var e=H(i,"drag","dragstart","dragend"),t=null,n=s(z,o.mouse,u,"mousemove","mouseup"),r=s(Ce,o.touch,I,"touchmove","touchend");function i(){this.on("mousedown.drag",n).on("touchstart.drag",r)}function s(n,r,i,s,a){return function(){var l,c=this,u=o.event.target.correspondingElement||o.event.target,h=c.parentNode,d=e.of(c,arguments),p=0,f=n(),g=".drag"+(null==f?"":"-"+f),m=o.select(i(u)).on(s+g,y).on(a+g,b),_=Ee(u),v=r(h,f);function y(){var e,t,n=r(h,f);n&&(e=n[0]-v[0],t=n[1]-v[1],p|=e|t,v=n,d({type:"drag",x:n[0]+l[0],y:n[1]+l[1],dx:e,dy:t}))}function b(){r(h,f)&&(m.on(s+g,null).on(a+g,null),_(p),d({type:"dragend"}))}l=t?[(l=t.apply(c,arguments)).x-v[0],l.y-v[1]]:[0,0],d({type:"dragstart"})}}return i.origin=function(e){return arguments.length?(t=e,i):t},o.rebind(i,e,"on")},o.touches=function(e,t){return arguments.length<2&&(t=q().touches),t?a(t).map((function(t){var n=Me(e,t);return n.identifier=t.identifier,n})):[]};var je=1e-6,Ae=1e-12,Te=Math.PI,Pe=2*Te,Oe=Pe-je,Le=Te/2,Ie=Te/180,De=180/Te;function Re(e){return e>0?1:e<0?-1:0}function Be(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function ze(e){return e>1?0:e<-1?Te:Math.acos(e)}function Ne(e){return e>1?Le:e<-1?-Le:Math.asin(e)}function Fe(e){return((e=Math.exp(e))+1/e)/2}function Ue(e){return(e=Math.sin(e/2))*e}var qe=Math.SQRT2;o.interpolateZoom=function(e,t){var n,r,i=e[0],o=e[1],s=e[2],a=t[0],l=t[1],c=t[2],u=a-i,h=l-o,d=u*u+h*h;if(d<Ae)r=Math.log(c/s)/qe,n=function(e){return[i+e*u,o+e*h,s*Math.exp(qe*e*r)]};else{var p=Math.sqrt(d),f=(c*c-s*s+4*d)/(2*s*2*p),g=(c*c-s*s-4*d)/(2*c*2*p),m=Math.log(Math.sqrt(f*f+1)-f),_=Math.log(Math.sqrt(g*g+1)-g);r=(_-m)/qe,n=function(e){var t,n=e*r,a=Fe(m),l=s/(2*p)*(a*(t=qe*n+m,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(m));return[i+l*u,o+l*h,s*a/Fe(qe*n+m)]}}return n.duration=1e3*r,n},o.behavior.zoom=function(){var e,t,n,r,i,s,a,c,h,d={x:0,y:0,k:1},p=[960,500],f=Ve,g=250,m=0,_="mousedown.zoom",v="mousemove.zoom",y="mouseup.zoom",b="touchstart.zoom",w=H(x,"zoomstart","zoom","zoomend");function x(e){e.on(_,P).on(We+".zoom",L).on("dblclick.zoom",I).on(b,O)}function k(e){return[(e[0]-d.x)/d.k,(e[1]-d.y)/d.k]}function E(e){d.k=Math.max(f[0],Math.min(f[1],e))}function S(e,t){t=function(e){return[e[0]*d.k+d.x,e[1]*d.k+d.y]}(t),d.x+=e[0]-t[0],d.y+=e[1]-t[1]}function M(e,n,r,i){e.__chart__={x:d.x,y:d.y,k:d.k},E(Math.pow(2,i)),S(t=n,r),e=o.select(e),g>0&&(e=e.transition().duration(g)),e.call(x.event)}function C(){a&&a.domain(s.range().map((function(e){return(e-d.x)/d.k})).map(s.invert)),h&&h.domain(c.range().map((function(e){return(e-d.y)/d.k})).map(c.invert))}function j(e){m++||e({type:"zoomstart"})}function A(e){C(),e({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function T(e){--m||(e({type:"zoomend"}),t=null)}function P(){var e=this,t=w.of(e,arguments),n=0,r=o.select(u(e)).on(v,a).on(y,l),i=k(o.mouse(e)),s=Ee(e);function a(){n=1,S(o.mouse(e),i),A(t)}function l(){r.on(v,null).on(y,null),s(n),T(t)}wa.call(e),j(t)}function O(){var e,t=this,n=w.of(t,arguments),r={},s=0,a=".zoom-"+o.event.changedTouches[0].identifier,l="touchmove"+a,c="touchend"+a,u=[],h=o.select(t),p=Ee(t);function f(){var n=o.touches(t);return e=d.k,n.forEach((function(e){e.identifier in r&&(r[e.identifier]=k(e))})),n}function g(){var e=o.event.target;o.select(e).on(l,m).on(c,v),u.push(e);for(var n=o.event.changedTouches,a=0,h=n.length;a<h;++a)r[n[a].identifier]=null;var p=f(),g=Date.now();if(1===p.length){if(g-i<500){var _=p[0];M(t,_,r[_.identifier],Math.floor(Math.log(d.k)/Math.LN2)+1),U()}i=g}else if(p.length>1){_=p[0];var y=p[1],b=_[0]-y[0],w=_[1]-y[1];s=b*b+w*w}}function m(){var a,l,c,u,h=o.touches(t);wa.call(t);for(var d=0,p=h.length;d<p;++d,u=null)if(c=h[d],u=r[c.identifier]){if(l)break;a=c,l=u}if(u){var f=(f=c[0]-a[0])*f+(f=c[1]-a[1])*f,g=s&&Math.sqrt(f/s);a=[(a[0]+c[0])/2,(a[1]+c[1])/2],l=[(l[0]+u[0])/2,(l[1]+u[1])/2],E(g*e)}i=null,S(a,l),A(n)}function v(){if(o.event.touches.length){for(var e=o.event.changedTouches,t=0,i=e.length;t<i;++t)delete r[e[t].identifier];for(var s in r)return void f()}o.selectAll(u).on(a,null),h.on(_,P).on(b,O),p(),T(n)}g(),j(n),h.on(_,null).on(b,g)}function L(){var i=w.of(this,arguments);r?clearTimeout(r):(wa.call(this),e=k(t=n||o.mouse(this)),j(i)),r=setTimeout((function(){r=null,T(i)}),50),U(),E(Math.pow(2,.002*He())*d.k),S(t,e),A(i)}function I(){var e=o.mouse(this),t=Math.log(d.k)/Math.LN2;M(this,e,k(e),o.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}return We||(We="onwheel"in l?(He=function(){return-o.event.deltaY*(o.event.deltaMode?120:1)},"wheel"):"onmousewheel"in l?(He=function(){return o.event.wheelDelta},"mousewheel"):(He=function(){return-o.event.detail},"MozMousePixelScroll")),x.event=function(e){e.each((function(){var e=w.of(this,arguments),n=d;Ea?o.select(this).transition().each("start.zoom",(function(){d=this.__chart__||{x:0,y:0,k:1},j(e)})).tween("zoom:zoom",(function(){var r=p[0],i=p[1],s=t?t[0]:r/2,a=t?t[1]:i/2,l=o.interpolateZoom([(s-d.x)/d.k,(a-d.y)/d.k,r/d.k],[(s-n.x)/n.k,(a-n.y)/n.k,r/n.k]);return function(t){var n=l(t),i=r/n[2];this.__chart__=d={x:s-n[0]*i,y:a-n[1]*i,k:i},A(e)}})).each("interrupt.zoom",(function(){T(e)})).each("end.zoom",(function(){T(e)})):(this.__chart__=d,j(e),A(e),T(e))}))},x.translate=function(e){return arguments.length?(d={x:+e[0],y:+e[1],k:d.k},C(),x):[d.x,d.y]},x.scale=function(e){return arguments.length?(d={x:d.x,y:d.y,k:null},E(+e),C(),x):d.k},x.scaleExtent=function(e){return arguments.length?(f=null==e?Ve:[+e[0],+e[1]],x):f},x.center=function(e){return arguments.length?(n=e&&[+e[0],+e[1]],x):n},x.size=function(e){return arguments.length?(p=e&&[+e[0],+e[1]],x):p},x.duration=function(e){return arguments.length?(g=+e,x):g},x.x=function(e){return arguments.length?(a=e,s=e.copy(),d={x:0,y:0,k:1},x):a},x.y=function(e){return arguments.length?(h=e,c=e.copy(),d={x:0,y:0,k:1},x):h},o.rebind(x,w,"on")};var He,We,Ve=[0,1/0];function $e(){}function Ke(e,t,n){return this instanceof Ke?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof Ke?new Ke(e.h,e.s,e.l):dt(""+e,pt,Ke):new Ke(e,t,n)}o.color=$e,$e.prototype.toString=function(){return this.rgb()+""},o.hsl=Ke;var Ge=Ke.prototype=new $e;function Ye(e,t,n){var r,i;function o(e){return Math.round(255*function(e){return e>360?e-=360:e<0&&(e+=360),e<60?r+(i-r)*e/60:e<180?i:e<240?r+(i-r)*(240-e)/60:r}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,r=2*(n=n<0?0:n>1?1:n)-(i=n<=.5?n*(1+t):n+t-n*t),new at(o(e+120),o(e),o(e-120))}function Je(e,t,n){return this instanceof Je?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof Je?new Je(e.h,e.c,e.l):rt(e instanceof Ze?e.l:(e=ft((e=o.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Je(e,t,n)}Ge.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ke(this.h,this.s,this.l/e)},Ge.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ke(this.h,this.s,e*this.l)},Ge.rgb=function(){return Ye(this.h,this.s,this.l)},o.hcl=Je;var Xe=Je.prototype=new $e;function Qe(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Ze(n,Math.cos(e*=Ie)*t,Math.sin(e)*t)}function Ze(e,t,n){return this instanceof Ze?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof Ze?new Ze(e.l,e.a,e.b):e instanceof Je?Qe(e.h,e.c,e.l):ft((e=at(e)).r,e.g,e.b):new Ze(e,t,n)}Xe.brighter=function(e){return new Je(this.h,this.c,Math.min(100,this.l+et*(arguments.length?e:1)))},Xe.darker=function(e){return new Je(this.h,this.c,Math.max(0,this.l-et*(arguments.length?e:1)))},Xe.rgb=function(){return Qe(this.h,this.c,this.l).rgb()},o.lab=Ze;var et=18,tt=Ze.prototype=new $e;function nt(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;return new at(st(3.2404542*(i=.95047*it(i))-1.5371385*(r=1*it(r))-.4985314*(o=1.08883*it(o))),st(-.969266*i+1.8760108*r+.041556*o),st(.0556434*i-.2040259*r+1.0572252*o))}function rt(e,t,n){return e>0?new Je(Math.atan2(n,t)*De,Math.sqrt(t*t+n*n),e):new Je(NaN,NaN,e)}function it(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function ot(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function st(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function at(e,t,n){return this instanceof at?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof at?new at(e.r,e.g,e.b):dt(""+e,at,Ye):new at(e,t,n)}function lt(e){return new at(e>>16,e>>8&255,255&e)}function ct(e){return lt(e)+""}tt.brighter=function(e){return new Ze(Math.min(100,this.l+et*(arguments.length?e:1)),this.a,this.b)},tt.darker=function(e){return new Ze(Math.max(0,this.l-et*(arguments.length?e:1)),this.a,this.b)},tt.rgb=function(){return nt(this.l,this.a,this.b)},o.rgb=at;var ut=at.prototype=new $e;function ht(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function dt(e,t,n){var r,i,o,s=0,a=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(mt(i[0]),mt(i[1]),mt(i[2]))}return(o=_t.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(s=(3840&o)>>4,s|=s>>4,a=240&o,a|=a>>4,l=15&o,l|=l<<4):7===e.length&&(s=(16711680&o)>>16,a=(65280&o)>>8,l=255&o)),t(s,a,l))}function pt(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),s=Math.max(e,t,n),a=s-o,l=(s+o)/2;return a?(i=l<.5?a/(s+o):a/(2-s-o),r=e==s?(t-n)/a+(t<n?6:0):t==s?(n-e)/a+2:(e-t)/a+4,r*=60):(r=NaN,i=l>0&&l<1?0:r),new Ke(r,i,l)}function ft(e,t,n){var r=ot((.4124564*(e=gt(e))+.3575761*(t=gt(t))+.1804375*(n=gt(n)))/.95047),i=ot((.2126729*e+.7151522*t+.072175*n)/1);return Ze(116*i-16,500*(r-i),200*(i-ot((.0193339*e+.119192*t+.9503041*n)/1.08883)))}function gt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function mt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}ut.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return t||n||r?(t&&t<i&&(t=i),n&&n<i&&(n=i),r&&r<i&&(r=i),new at(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,r/e))):new at(i,i,i)},ut.darker=function(e){return new at((e=Math.pow(.7,arguments.length?e:1))*this.r,e*this.g,e*this.b)},ut.hsl=function(){return pt(this.r,this.g,this.b)},ut.toString=function(){return"#"+ht(this.r)+ht(this.g)+ht(this.b)};var _t=o.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function vt(e){return"function"==typeof e?e:function(){return e}}function yt(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),bt(t,n,e,r)}}function bt(e,t,n,r){var i={},s=o.dispatch("beforesend","progress","load","error"),l={},c=new XMLHttpRequest,u=null;function h(){var e,t=c.status;if(!t&&function(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}(c)||t>=200&&t<300||304===t){try{e=n.call(i,c)}catch(e){return void s.error.call(i,e)}s.load.call(i,e)}else s.error.call(i,c)}return this.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(e)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=h:c.onreadystatechange=function(){c.readyState>3&&h()},c.onprogress=function(e){var t=o.event;o.event=e;try{s.progress.call(i,c)}finally{o.event=t}},i.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?l[e]:(null==t?delete l[e]:l[e]=t+"",i)},i.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",i):t},i.responseType=function(e){return arguments.length?(u=e,i):u},i.response=function(e){return n=e,i},["get","post"].forEach((function(e){i[e]=function(){return i.send.apply(i,[e].concat(a(arguments)))}})),i.send=function(n,r,o){if(2===arguments.length&&"function"==typeof r&&(o=r,r=null),c.open(n,e,!0),null==t||"accept"in l||(l.accept=t+",*/*"),c.setRequestHeader)for(var a in l)c.setRequestHeader(a,l[a]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=u&&(c.responseType=u),null!=o&&i.on("error",o).on("load",(function(e){o(null,e)})),s.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},o.rebind(i,s,"on"),null==r?i:i.get(function(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}(r))}_t.forEach((function(e,t){_t.set(e,lt(t))})),o.functor=vt,o.xhr=yt(I),o.dsv=function(e,t){var n=new RegExp('["'+e+"\n]"),r=e.charCodeAt(0);function i(e,n,r){arguments.length<3&&(r=n,n=null);var i=bt(e,t,null==n?o:s(n),r);return i.row=function(e){return arguments.length?i.response(null==(n=e)?o:s(e)):n},i}function o(e){return i.parse(e.responseText)}function s(e){return function(t){return i.parse(t.responseText,e)}}function a(t){return t.map(l).join(e)}function l(e){return n.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return i.parse=function(e,t){var n;return i.parseRows(e,(function(e,r){if(n)return n(e,r-1);var i=new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+"]"})).join(",")+"}");n=t?function(e,n){return t(i(e),n)}:i}))},i.parseRows=function(e,t){var n,i,o={},s={},a=[],l=e.length,c=0,u=0;function h(){if(c>=l)return s;if(i)return i=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++<l;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}return c=n+2,13===(a=e.charCodeAt(n+1))?(i=!0,10===e.charCodeAt(n+2)&&++c):10===a&&(i=!0),e.slice(t+1,n).replace(/""/g,'"')}for(;c<l;){var a,u=1;if(10===(a=e.charCodeAt(c++)))i=!0;else if(13===a)i=!0,10===e.charCodeAt(c)&&(++c,++u);else if(a!==r)continue;return e.slice(t,c-u)}return e.slice(t)}for(;(n=h())!==s;){for(var d=[];n!==o&&n!==s;)d.push(n),n=h();t&&null==(d=t(d,u++))||a.push(d)}return a},i.format=function(t){if(Array.isArray(t[0]))return i.formatRows(t);var n=new L,r=[];return t.forEach((function(e){for(var t in e)n.has(t)||r.push(n.add(t))})),[r.map(l).join(e)].concat(t.map((function(t){return r.map((function(e){return l(t[e])})).join(e)}))).join("\n")},i.formatRows=function(e){return e.map(a).join("\n")},i},o.csv=o.dsv(",","text/csv"),o.tsv=o.dsv("\t","text/tab-separated-values");var wt,xt,kt,Et,St=this[R(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};function Mt(e,t,n){var r=arguments.length;r<2&&(t=0),r<3&&(n=Date.now());var i=n+t,o={c:e,t:i,n:null};return xt?xt.n=o:wt=o,xt=o,kt||(Et=clearTimeout(Et),kt=1,St(Ct)),o}function Ct(){var e=jt(),t=At()-e;t>24?(isFinite(t)&&(clearTimeout(Et),Et=setTimeout(Ct,t)),kt=0):(kt=1,St(Ct))}function jt(){for(var e=Date.now(),t=wt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function At(){for(var e,t=wt,n=1/0;t;)t.c?(t.t<n&&(n=t.t),t=(e=t).n):t=e?e.n=t.n:wt=t.n;return xt=e,n}function Tt(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}o.timer=function(){Mt.apply(this,arguments)},o.timer.flush=function(){jt(),At()},o.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var Pt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map((function(e,t){var n=Math.pow(10,3*x(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}));function Ot(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,s=r&&n?function(e,t){for(var i=e.length,o=[],s=0,a=r[0],l=0;i>0&&a>0&&(l+a+1>t&&(a=Math.max(1,t-l)),o.push(e.substring(i-=a,i+a)),!((l+=a+1)>t));)a=r[s=(s+1)%r.length];return o.reverse().join(n)}:I;return function(e){var n=Lt.exec(e),r=n[1]||" ",a=n[2]||">",l=n[3]||"-",c=n[4]||"",u=n[5],h=+n[6],d=n[7],p=n[8],f=n[9],g=1,m="",_="",v=!1,y=!0;switch(p&&(p=+p.substring(1)),(u||"0"===r&&"="===a)&&(u=r="0",a="="),f){case"n":d=!0,f="g";break;case"%":g=100,_="%",f="f";break;case"p":g=100,_="%",f="r";break;case"b":case"o":case"x":case"X":"#"===c&&(m="0"+f.toLowerCase());case"c":y=!1;case"d":v=!0,p=0;break;case"s":g=-1,f="r"}"$"===c&&(m=i[0],_=i[1]),"r"!=f||p||(f="g"),null!=p&&("g"==f?p=Math.max(1,Math.min(21,p)):"e"!=f&&"f"!=f||(p=Math.max(0,Math.min(20,p)))),f=It.get(f)||Dt;var b=u&&d;return function(e){var n=_;if(v&&e%1)return"";var i=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===l?"":l;if(g<0){var c=o.formatPrefix(e,p);e=c.scale(e),n=c.symbol+_}else e*=g;var w,x,k=(e=f(e,p)).lastIndexOf(".");if(k<0){var E=y?e.lastIndexOf("e"):-1;E<0?(w=e,x=""):(w=e.substring(0,E),x=e.substring(E))}else w=e.substring(0,k),x=t+e.substring(k+1);!u&&d&&(w=s(w,1/0));var S=m.length+w.length+x.length+(b?0:i.length),M=S<h?new Array(S=h-S+1).join(r):"";return b&&(w=s(M+w,M.length?h-x.length:1/0)),i+=m,e=w+x,("<"===a?i+e+M:">"===a?M+i+e:"^"===a?M.substring(0,S>>=1)+i+e+M.substring(S):i+(b?e:M+e))+n}}}o.formatPrefix=function(e,t){var n=0;return(e=+e)&&(e<0&&(e*=-1),t&&(e=o.round(e,Tt(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Pt[8+n/3]};var Lt=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,It=o.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=o.round(e,Tt(e,t))).toFixed(Math.max(0,Math.min(20,Tt(e*(1+1e-15),t))))}});function Dt(e){return e+""}var Rt=o.time={},Bt=Date;function zt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}zt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Nt.setUTCDate.apply(this._,arguments)},setDay:function(){Nt.setUTCDay.apply(this._,arguments)},setFullYear:function(){Nt.setUTCFullYear.apply(this._,arguments)},setHours:function(){Nt.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Nt.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Nt.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Nt.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Nt.setUTCSeconds.apply(this._,arguments)},setTime:function(){Nt.setTime.apply(this._,arguments)}};var Nt=Date.prototype;function Ft(e,t,n){function r(t){var n=e(t),r=o(n,1);return t-n<r-t?n:r}function i(n){return t(n=e(new Bt(n-1)),1),n}function o(e,n){return t(e=new Bt(+e),n),e}function s(e,r,o){var s=i(e),a=[];if(o>1)for(;s<r;)n(s)%o||a.push(new Date(+s)),t(s,1);else for(;s<r;)a.push(new Date(+s)),t(s,1);return a}e.floor=e,e.round=r,e.ceil=i,e.offset=o,e.range=s;var a=e.utc=Ut(e);return a.floor=a,a.round=Ut(r),a.ceil=Ut(i),a.offset=Ut(o),a.range=function(e,t,n){try{Bt=zt;var r=new zt;return r._=e,s(r,t,n)}finally{Bt=Date}},e}function Ut(e){return function(t,n){try{Bt=zt;var r=new zt;return r._=t,e(r,n)._}finally{Bt=Date}}}function qt(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,s=e.days,a=e.shortDays,l=e.months,c=e.shortMonths;function u(e){var t=e.length;function n(n){for(var r,i,o,s=[],a=-1,l=0;++a<t;)37===e.charCodeAt(a)&&(s.push(e.slice(l,a)),null!=(i=Ht[r=e.charAt(++a)])&&(r=e.charAt(++a)),(o=w[r])&&(r=o(n,null==i?"e"===r?" ":"0":i)),s.push(r),l=a+1);return s.push(e.slice(l,a)),s.join("")}return n.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(h(n,e,t,0)!=t.length)return null;"p"in n&&(n.H=n.H%12+12*n.p);var r=null!=n.Z&&Bt!==zt,i=new(r?zt:Bt);return"j"in n?i.setFullYear(n.y,0,n.j):"W"in n||"U"in n?("w"in n||(n.w="W"in n?1:0),i.setFullYear(n.y,0,1),i.setFullYear(n.y,0,"W"in n?(n.w+6)%7+7*n.W-(i.getDay()+5)%7:n.w+7*n.U-(i.getDay()+6)%7)):i.setFullYear(n.y,n.m,n.d),i.setHours(n.H+(n.Z/100|0),n.M+n.Z%100,n.S,n.L),r?i._:i},n.toString=function(){return e},n}function h(e,t,n,r){for(var i,o,s,a=0,l=t.length,c=n.length;a<l;){if(r>=c)return-1;if(37===(i=t.charCodeAt(a++))){if(s=t.charAt(a++),!(o=x[s in Ht?t.charAt(a++):s])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}u.utc=function(e){var t=u(e);function n(e){try{var n=new(Bt=zt);return n._=e,t(n)}finally{Bt=Date}}return n.parse=function(e){try{Bt=zt;var n=t.parse(e);return n&&n._}finally{Bt=Date}},n.toString=t.toString,n},u.multi=u.utc.multi=hn;var d=o.map(),p=Kt(s),f=Gt(s),g=Kt(a),m=Gt(a),_=Kt(l),v=Gt(l),y=Kt(c),b=Gt(c);i.forEach((function(e,t){d.set(e.toLowerCase(),t)}));var w={a:function(e){return a[e.getDay()]},A:function(e){return s[e.getDay()]},b:function(e){return c[e.getMonth()]},B:function(e){return l[e.getMonth()]},c:u(t),d:function(e,t){return $t(e.getDate(),t,2)},e:function(e,t){return $t(e.getDate(),t,2)},H:function(e,t){return $t(e.getHours(),t,2)},I:function(e,t){return $t(e.getHours()%12||12,t,2)},j:function(e,t){return $t(1+Rt.dayOfYear(e),t,3)},L:function(e,t){return $t(e.getMilliseconds(),t,3)},m:function(e,t){return $t(e.getMonth()+1,t,2)},M:function(e,t){return $t(e.getMinutes(),t,2)},p:function(e){return i[+(e.getHours()>=12)]},S:function(e,t){return $t(e.getSeconds(),t,2)},U:function(e,t){return $t(Rt.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return $t(Rt.mondayOfYear(e),t,2)},x:u(n),X:u(r),y:function(e,t){return $t(e.getFullYear()%100,t,2)},Y:function(e,t){return $t(e.getFullYear()%1e4,t,4)},Z:cn,"%":function(){return"%"}},x={a:function(e,t,n){g.lastIndex=0;var r=g.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){p.lastIndex=0;var r=p.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){y.lastIndex=0;var r=y.exec(t.slice(n));return r?(e.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){_.lastIndex=0;var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,t,n){return h(e,w.c.toString(),t,n)},d:nn,e:nn,H:on,I:on,j:rn,L:ln,m:tn,M:sn,p:function(e,t,n){var r=d.get(t.slice(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)},S:an,U:Jt,w:Yt,W:Xt,x:function(e,t,n){return h(e,w.x.toString(),t,n)},X:function(e,t,n){return h(e,w.X.toString(),t,n)},y:Zt,Y:Qt,Z:en,"%":un};return u}Rt.year=Ft((function(e){return(e=Rt.day(e)).setMonth(0,1),e}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e){return e.getFullYear()})),Rt.years=Rt.year.range,Rt.years.utc=Rt.year.utc.range,Rt.day=Ft((function(e){var t=new Bt(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e){return e.getDate()-1})),Rt.days=Rt.day.range,Rt.days.utc=Rt.day.utc.range,Rt.dayOfYear=function(e){var t=Rt.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(e,t){t=7-t;var n=Rt[e]=Ft((function(e){return(e=Rt.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e}),(function(e,t){e.setDate(e.getDate()+7*Math.floor(t))}),(function(e){var n=Rt.year(e).getDay();return Math.floor((Rt.dayOfYear(e)+(n+t)%7)/7)-(n!==t)}));Rt[e+"s"]=n.range,Rt[e+"s"].utc=n.utc.range,Rt[e+"OfYear"]=function(e){var n=Rt.year(e).getDay();return Math.floor((Rt.dayOfYear(e)+(n+t)%7)/7)}})),Rt.week=Rt.sunday,Rt.weeks=Rt.sunday.range,Rt.weeks.utc=Rt.sunday.utc.range,Rt.weekOfYear=Rt.sundayOfYear;var Ht={"-":"",_:" ",0:"0"},Wt=/^\s*\d+/,Vt=/^%/;function $t(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Kt(e){return new RegExp("^(?:"+e.map(o.requote).join("|")+")","i")}function Gt(e){for(var t=new S,n=-1,r=e.length;++n<r;)t.set(e[n].toLowerCase(),n);return t}function Yt(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Jt(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n));return r?(e.U=+r[0],n+r[0].length):-1}function Xt(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n));return r?(e.W=+r[0],n+r[0].length):-1}function Qt(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Zt(e,t,n){Wt.lastIndex=0;var r,i=Wt.exec(t.slice(n,n+2));return i?(e.y=(r=+i[0])+(r>68?1900:2e3),n+i[0].length):-1}function en(e,t,n){return/^[+-]\d{4}$/.test(t=t.slice(n,n+5))?(e.Z=-t,n+5):-1}function tn(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function nn(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function rn(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function on(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function sn(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function an(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ln(e,t,n){Wt.lastIndex=0;var r=Wt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function cn(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=x(t)/60|0,i=x(t)%60;return n+$t(r,"0",2)+$t(i,"0",2)}function un(e,t,n){Vt.lastIndex=0;var r=Vt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function hn(e){for(var t=e.length,n=-1;++n<t;)e[n][0]=this(e[n][0]);return function(t){for(var n=0,r=e[n];!r[1](t);)r=e[++n];return r[0](t)}}o.locale=function(e){return{numberFormat:Ot(e),timeFormat:qt(e)}};var dn=o.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function pn(){}o.format=dn.numberFormat,o.geo={},pn.prototype={s:0,t:0,add:function(e){gn(e,this.t,fn),gn(fn.s,this.s,this),this.s?this.t+=fn.t:this.s=fn.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var fn=new pn;function gn(e,t,n){var r=n.s=e+t,i=r-e,o=r-i;n.t=e-o+(t-i)}function mn(e,t){e&&vn.hasOwnProperty(e.type)&&vn[e.type](e,t)}o.geo.stream=function(e,t){e&&_n.hasOwnProperty(e.type)?_n[e.type](e,t):mn(e,t)};var _n={Feature:function(e,t){mn(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)mn(n[r].geometry,t)}},vn={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){yn(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)yn(n[r],t,0)},Polygon:function(e,t){bn(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)bn(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)mn(n[r],t)}};function yn(e,t,n){var r,i=-1,o=e.length-n;for(t.lineStart();++i<o;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function bn(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)yn(e[n],t,1);t.polygonEnd()}o.geo.area=function(e){return wn=0,o.geo.stream(e,In),wn};var wn,xn,kn,En,Sn,Mn,Cn,jn,An,Tn,Pn,On,Ln=new pn,In={sphere:function(){wn+=4*Te},point:z,lineStart:z,lineEnd:z,polygonStart:function(){Ln.reset(),In.lineStart=Dn},polygonEnd:function(){var e=2*Ln;wn+=e<0?4*Te+e:e,In.lineStart=In.lineEnd=In.point=z}};function Dn(){var e,t,n,r,i;function o(e,t){t=t*Ie/2+Te/4;var o=(e*=Ie)-n,s=o>=0?1:-1,a=s*o,l=Math.cos(t),c=Math.sin(t),u=i*c,h=r*l+u*Math.cos(a),d=u*s*Math.sin(a);Ln.add(Math.atan2(d,h)),n=e,r=l,i=c}In.point=function(s,a){In.point=o,n=(e=s)*Ie,r=Math.cos(a=(t=a)*Ie/2+Te/4),i=Math.sin(a)},In.lineEnd=function(){o(e,t)}}function Rn(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function Bn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function zn(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Nn(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Fn(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Un(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function qn(e){return[Math.atan2(e[1],e[0]),Ne(e[2])]}function Hn(e,t){return x(e[0]-t[0])<je&&x(e[1]-t[1])<je}o.geo.bounds=function(){var e,t,n,r,i,s,a,l,c,u,h,d={point:p,lineStart:g,lineEnd:m,polygonStart:function(){d.point=_,d.lineStart=v,d.lineEnd=y,c=0,In.polygonStart()},polygonEnd:function(){In.polygonEnd(),d.point=p,d.lineStart=g,d.lineEnd=m,Ln<0?(e=-(n=180),t=-(r=90)):c>je?r=90:c<-je&&(t=-90),h[0]=e,h[1]=n}};function p(i,o){u.push(h=[e=i,n=i]),o<t&&(t=o),o>r&&(r=o)}function f(o,s){var a=Rn([o*Ie,s*Ie]);if(l){var c=zn(l,a),u=zn([c[1],-c[0],0],c);Un(u),u=qn(u);var h=o-i,d=h>0?1:-1,f=u[0]*De*d,g=x(h)>180;if(g^(d*i<f&&f<d*o))(m=u[1]*De)>r&&(r=m);else if(g^(d*i<(f=(f+360)%360-180)&&f<d*o)){var m;(m=-u[1]*De)<t&&(t=m)}else s<t&&(t=s),s>r&&(r=s);g?o<i?b(e,o)>b(e,n)&&(n=o):b(o,n)>b(e,n)&&(e=o):n>=e?(o<e&&(e=o),o>n&&(n=o)):o>i?b(e,o)>b(e,n)&&(n=o):b(o,n)>b(e,n)&&(e=o)}else p(o,s);l=a,i=o}function g(){d.point=f}function m(){h[0]=e,h[1]=n,d.point=p,l=null}function _(e,t){if(l){var n=e-i;c+=x(n)>180?n+(n>0?360:-360):n}else s=e,a=t;In.point(e,t),f(e,t)}function v(){In.lineStart()}function y(){_(s,a),In.lineEnd(),x(c)>je&&(e=-(n=180)),h[0]=e,h[1]=n,l=null}function b(e,t){return(t-=e)<0?t+360:t}function w(e,t){return e[0]-t[0]}function k(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}return function(i){if(r=n=-(e=t=1/0),u=[],o.geo.stream(i,d),c=u.length){u.sort(w);for(var s=1,a=[g=u[0]];s<c;++s)k((p=u[s])[0],g)||k(p[1],g)?(b(g[0],p[1])>b(g[0],g[1])&&(g[1]=p[1]),b(p[0],g[1])>b(g[0],g[1])&&(g[0]=p[0])):a.push(g=p);for(var l,c,p,f=-1/0,g=(s=0,a[c=a.length-1]);s<=c;g=p,++s)p=a[s],(l=b(g[1],p[0]))>f&&(f=l,e=p[0],n=g[1])}return u=h=null,e===1/0||t===1/0?[[NaN,NaN],[NaN,NaN]]:[[e,t],[n,r]]}}(),o.geo.centroid=function(e){xn=kn=En=Sn=Mn=Cn=jn=An=Tn=Pn=On=0,o.geo.stream(e,Wn);var t=Tn,n=Pn,r=On,i=t*t+n*n+r*r;return i<Ae&&(t=Cn,n=jn,r=An,kn<je&&(t=En,n=Sn,r=Mn),(i=t*t+n*n+r*r)<Ae)?[NaN,NaN]:[Math.atan2(n,t)*De,Ne(r/Math.sqrt(i))*De]};var Wn={sphere:z,point:Vn,lineStart:Kn,lineEnd:Gn,polygonStart:function(){Wn.lineStart=Yn},polygonEnd:function(){Wn.lineStart=Kn}};function Vn(e,t){e*=Ie;var n=Math.cos(t*=Ie);$n(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function $n(e,t,n){++xn,En+=(e-En)/xn,Sn+=(t-Sn)/xn,Mn+=(n-Mn)/xn}function Kn(){var e,t,n;function r(r,i){r*=Ie;var o=Math.cos(i*=Ie),s=o*Math.cos(r),a=o*Math.sin(r),l=Math.sin(i),c=Math.atan2(Math.sqrt((c=t*l-n*a)*c+(c=n*s-e*l)*c+(c=e*a-t*s)*c),e*s+t*a+n*l);kn+=c,Cn+=c*(e+(e=s)),jn+=c*(t+(t=a)),An+=c*(n+(n=l)),$n(e,t,n)}Wn.point=function(i,o){i*=Ie;var s=Math.cos(o*=Ie);e=s*Math.cos(i),t=s*Math.sin(i),n=Math.sin(o),Wn.point=r,$n(e,t,n)}}function Gn(){Wn.point=Vn}function Yn(){var e,t,n,r,i;function o(e,t){e*=Ie;var o=Math.cos(t*=Ie),s=o*Math.cos(e),a=o*Math.sin(e),l=Math.sin(t),c=r*l-i*a,u=i*s-n*l,h=n*a-r*s,d=Math.sqrt(c*c+u*u+h*h),p=n*s+r*a+i*l,f=d&&-ze(p)/d,g=Math.atan2(d,p);Tn+=f*c,Pn+=f*u,On+=f*h,kn+=g,Cn+=g*(n+(n=s)),jn+=g*(r+(r=a)),An+=g*(i+(i=l)),$n(n,r,i)}Wn.point=function(s,a){e=s,t=a,Wn.point=o,s*=Ie;var l=Math.cos(a*=Ie);n=l*Math.cos(s),r=l*Math.sin(s),i=Math.sin(a),$n(n,r,i)},Wn.lineEnd=function(){o(e,t),Wn.lineEnd=Gn,Wn.point=Vn}}function Jn(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function Xn(){return!0}function Qn(e,t,n,r,i){var o=[],s=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t];if(Hn(n,r)){i.lineStart();for(var a=0;a<t;++a)i.point((n=e[a])[0],n[1]);i.lineEnd()}else{var l=new er(n,e,null,!0),c=new er(n,null,l,!1);l.o=c,o.push(l),s.push(c),l=new er(r,e,null,!1),c=new er(r,null,l,!0),l.o=c,o.push(l),s.push(c)}}})),s.sort(t),Zn(o),Zn(s),o.length){for(var a=0,l=n,c=s.length;a<c;++a)s[a].e=l=!l;for(var u,h,d=o[0];;){for(var p=d,f=!0;p.v;)if((p=p.n)===d)return;u=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(f)for(a=0,c=u.length;a<c;++a)i.point((h=u[a])[0],h[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(f)for(a=(u=p.p.z).length-1;a>=0;--a)i.point((h=u[a])[0],h[1]);else r(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,f=!f}while(!p.v);i.lineEnd()}}}function Zn(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function er(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function tr(e,t,n,r){return function(i,s){var a,l=t(s),c=i.invert(r[0],r[1]),u={point:h,lineStart:p,lineEnd:f,polygonStart:function(){u.point=b,u.lineStart=w,u.lineEnd=x,a=[],g=[]},polygonEnd:function(){u.point=h,u.lineStart=p,u.lineEnd=f,a=o.merge(a);var e=function(e,t){var n=e[0],r=e[1],i=[Math.sin(n),-Math.cos(n),0],o=0,s=0;Ln.reset();for(var a=0,l=t.length;a<l;++a){var c=t[a],u=c.length;if(u)for(var h=c[0],d=h[0],p=h[1]/2+Te/4,f=Math.sin(p),g=Math.cos(p),m=1;;){m===u&&(m=0);var _=(e=c[m])[0],v=e[1]/2+Te/4,y=Math.sin(v),b=Math.cos(v),w=_-d,x=w>=0?1:-1,k=x*w,E=k>Te,S=f*y;if(Ln.add(Math.atan2(S*x*Math.sin(k),g*b+S*Math.cos(k))),o+=E?w+x*Pe:w,E^d>=n^_>=n){var M=zn(Rn(h),Rn(e));Un(M);var C=zn(i,M);Un(C);var j=(E^w>=0?-1:1)*Ne(C[2]);(r>j||r===j&&(M[0]||M[1]))&&(s+=E^w>=0?1:-1)}if(!m++)break;d=_,f=y,g=b,h=e}}return(o<-je||o<je&&Ln<-je)^1&s}(c,g);a.length?(y||(s.polygonStart(),y=!0),Qn(a,ir,e,n,s)):e&&(y||(s.polygonStart(),y=!0),s.lineStart(),n(null,null,1,s),s.lineEnd()),y&&(s.polygonEnd(),y=!1),a=g=null},sphere:function(){s.polygonStart(),s.lineStart(),n(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function h(t,n){var r=i(t,n);e(t=r[0],n=r[1])&&s.point(t,n)}function d(e,t){var n=i(e,t);l.point(n[0],n[1])}function p(){u.point=d,l.lineStart()}function f(){u.point=h,l.lineEnd()}var g,m,_=rr(),v=t(_),y=!1;function b(e,t){m.push([e,t]);var n=i(e,t);v.point(n[0],n[1])}function w(){v.lineStart(),m=[]}function x(){b(m[0][0],m[0][1]),v.lineEnd();var e,t=v.clean(),n=_.buffer(),r=n.length;if(m.pop(),g.push(m),m=null,r)if(1&t){var i,o=-1;if((r=(e=n[0]).length-1)>0){for(y||(s.polygonStart(),y=!0),s.lineStart();++o<r;)s.point((i=e[o])[0],i[1]);s.lineEnd()}}else r>1&&2&t&&n.push(n.pop().concat(n.shift())),a.push(n.filter(nr))}return u}}function nr(e){return e.length>1}function rr(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:z,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function ir(e,t){return((e=e.x)[0]<0?e[1]-Le-je:Le-e[1])-((t=t.x)[0]<0?t[1]-Le-je:Le-t[1])}var or=tr(Xn,(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,s){var a=o>0?Te:-Te,l=x(o-n);x(l-Te)<je?(e.point(n,r=(r+s)/2>0?Le:-Le),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(a,r),e.point(o,r),t=0):i!==a&&l>=Te&&(x(n-i)<je&&(n-=i*je),x(o-a)<je&&(o-=a*je),r=function(e,t,n,r){var i,o,s=Math.sin(e-n);return x(s)>je?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*o*s)):(t+r)/2}(n,r,o,s),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(a,r),t=0),e.point(n=o,r=s),i=a},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*Le,r.point(-Te,i),r.point(0,i),r.point(Te,i),r.point(Te,0),r.point(Te,-i),r.point(0,-i),r.point(-Te,-i),r.point(-Te,0),r.point(-Te,i);else if(x(e[0]-t[0])>je){var o=e[0]<t[0]?Te:-Te;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}),[-Te,-Te/2]);function sr(e){var t=Math.cos(e),n=t>0,r=x(t)>je;return tr(i,(function(e){var t,a,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(h,d){var p,f=[h,d],g=i(h,d),m=n?g?0:s(h,d):g?s(h+(h<0?Te:-Te),d):0;if(!t&&(c=l=g)&&e.lineStart(),g!==l&&(p=o(t,f),(Hn(t,p)||Hn(f,p))&&(f[0]+=je,f[1]+=je,g=i(f[0],f[1]))),g!==l)u=0,g?(e.lineStart(),p=o(f,t),e.point(p[0],p[1])):(p=o(t,f),e.point(p[0],p[1]),e.lineEnd()),t=p;else if(r&&t&&n^g){var _;m&a||!(_=o(f,t,!0))||(u=0,n?(e.lineStart(),e.point(_[0][0],_[0][1]),e.point(_[1][0],_[1][1]),e.lineEnd()):(e.point(_[1][0],_[1][1]),e.lineEnd(),e.lineStart(),e.point(_[0][0],_[0][1])))}!g||t&&Hn(t,f)||e.point(f[0],f[1]),t=f,l=g,a=m},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return u|(c&&l)<<1}}}),qr(e,6*Ie),n?[0,-e]:[-Te,e-Te]);function i(e,n){return Math.cos(e)*Math.cos(n)>t}function o(e,n,r){var i=[1,0,0],o=zn(Rn(e),Rn(n)),s=Bn(o,o),a=o[0],l=s-a*a;if(!l)return!r&&e;var c=t*s/l,u=-t*a/l,h=zn(i,o),d=Fn(i,c);Nn(d,Fn(o,u));var p=h,f=Bn(d,p),g=Bn(p,p),m=f*f-g*(Bn(d,d)-1);if(!(m<0)){var _=Math.sqrt(m),v=Fn(p,(-f-_)/g);if(Nn(v,d),v=qn(v),!r)return v;var y,b=e[0],w=n[0],k=e[1],E=n[1];w<b&&(y=b,b=w,w=y);var S=w-b,M=x(S-Te)<je;if(!M&&E<k&&(y=k,k=E,E=y),M||S<je?M?k+E>0^v[1]<(x(v[0]-b)<je?k:E):k<=v[1]&&v[1]<=E:S>Te^(b<=v[0]&&v[0]<=w)){var C=Fn(p,(-f+_)/g);return Nn(C,d),[v,qn(C)]}}}function s(t,r){var i=n?e:Te-e,o=0;return t<-i?o|=1:t>i&&(o|=2),r<-i?o|=4:r>i&&(o|=8),o}}function ar(e,t,n,r){return function(i){var o,s=i.a,a=i.b,l=s.x,c=s.y,u=0,h=1,d=a.x-l,p=a.y-c;if(o=e-l,d||!(o>0)){if(o/=d,d<0){if(o<u)return;o<h&&(h=o)}else if(d>0){if(o>h)return;o>u&&(u=o)}if(o=n-l,d||!(o<0)){if(o/=d,d<0){if(o>h)return;o>u&&(u=o)}else if(d>0){if(o<u)return;o<h&&(h=o)}if(o=t-c,p||!(o>0)){if(o/=p,p<0){if(o<u)return;o<h&&(h=o)}else if(p>0){if(o>h)return;o>u&&(u=o)}if(o=r-c,p||!(o<0)){if(o/=p,p<0){if(o>h)return;o>u&&(u=o)}else if(p>0){if(o<u)return;o<h&&(h=o)}return u>0&&(i.a={x:l+u*d,y:c+u*p}),h<1&&(i.b={x:l+h*d,y:c+h*p}),i}}}}}}function lr(e,t,n,r){return function(l){var c,u,h,d,p,f,g,m,_,v,y,b=l,w=rr(),x=ar(e,t,n,r),k={point:M,lineStart:function(){k.point=C,u&&u.push(h=[]);v=!0,_=!1,g=m=NaN},lineEnd:function(){c&&(C(d,p),f&&_&&w.rejoin(),c.push(w.buffer()));k.point=M,_&&l.lineEnd()},polygonStart:function(){l=w,c=[],u=[],y=!0},polygonEnd:function(){l=b,c=o.merge(c);var t=function(e){for(var t=0,n=u.length,r=e[1],i=0;i<n;++i)for(var o,s=1,a=u[i],l=a.length,c=a[0];s<l;++s)o=a[s],c[1]<=r?o[1]>r&&Be(c,o,e)>0&&++t:o[1]<=r&&Be(c,o,e)<0&&--t,c=o;return 0!==t}([e,r]),n=y&&t,i=c.length;(n||i)&&(l.polygonStart(),n&&(l.lineStart(),E(null,null,1,l),l.lineEnd()),i&&Qn(c,s,t,E,l),l.polygonEnd()),c=u=h=null}};function E(o,s,l,c){var u=0,h=0;if(null==o||(u=i(o,l))!==(h=i(s,l))||a(o,s)<0^l>0)do{c.point(0===u||3===u?e:n,u>1?r:t)}while((u=(u+l+4)%4)!==h);else c.point(s[0],s[1])}function S(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function M(e,t){S(e,t)&&l.point(e,t)}function C(e,t){var n=S(e=Math.max(-1e9,Math.min(1e9,e)),t=Math.max(-1e9,Math.min(1e9,t)));if(u&&h.push([e,t]),v)d=e,p=t,f=n,v=!1,n&&(l.lineStart(),l.point(e,t));else if(n&&_)l.point(e,t);else{var r={a:{x:g,y:m},b:{x:e,y:t}};x(r)?(_||(l.lineStart(),l.point(r.a.x,r.a.y)),l.point(r.b.x,r.b.y),n||l.lineEnd(),y=!1):n&&(l.lineStart(),l.point(e,t),y=!1)}g=e,m=t,_=n}return k};function i(r,i){return x(r[0]-e)<je?i>0?0:3:x(r[0]-n)<je?i>0?2:1:x(r[1]-t)<je?i>0?1:0:i>0?3:2}function s(e,t){return a(e.x,t.x)}function a(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}}function cr(e){var t=0,n=Te/3,r=Ir(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*Te/180,n=e[1]*Te/180):[t/Te*180,n/Te*180]},i}function ur(e,t){var n=Math.sin(e),r=(n+Math.sin(t))/2,i=1+n*(2*r-n),o=Math.sqrt(i)/r;function s(e,t){var n=Math.sqrt(i-2*r*Math.sin(t))/r;return[n*Math.sin(e*=r),o-n*Math.cos(e)]}return s.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/r,Ne((i-(e*e+n*n)*r*r)/(2*r))]},s}o.geo.clipExtent=function(){var e,t,n,r,i,o,s={stream:function(e){return i&&(i.valid=!1),(i=o(e)).valid=!0,i},extent:function(a){return arguments.length?(o=lr(e=+a[0][0],t=+a[0][1],n=+a[1][0],r=+a[1][1]),i&&(i.valid=!1,i=null),s):[[e,t],[n,r]]}};return s.extent([[0,0],[960,500]])},(o.geo.conicEqualArea=function(){return cr(ur)}).raw=ur,o.geo.albers=function(){return o.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},o.geo.albersUsa=function(){var e,t,n,r,i=o.geo.albers(),s=o.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=o.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,n){e=[t,n]}};function c(i){var o=i[0],s=i[1];return e=null,t(o,s),e||(n(o,s),e)||r(o,s),e}return c.invert=function(e){var t=i.scale(),n=i.translate(),r=(e[0]-n[0])/t,o=(e[1]-n[1])/t;return(o>=.12&&o<.234&&r>=-.425&&r<-.214?s:o>=.166&&o<.234&&r>=-.214&&r<-.115?a:i).invert(e)},c.stream=function(e){var t=i.stream(e),n=s.stream(e),r=a.stream(e);return{point:function(e,i){t.point(e,i),n.point(e,i),r.point(e,i)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},c.precision=function(e){return arguments.length?(i.precision(e),s.precision(e),a.precision(e),c):i.precision()},c.scale=function(e){return arguments.length?(i.scale(e),s.scale(.35*e),a.scale(e),c.translate(i.translate())):i.scale()},c.translate=function(e){if(!arguments.length)return i.translate();var o=i.scale(),u=+e[0],h=+e[1];return t=i.translate(e).clipExtent([[u-.455*o,h-.238*o],[u+.455*o,h+.238*o]]).stream(l).point,n=s.translate([u-.307*o,h+.201*o]).clipExtent([[u-.425*o+je,h+.12*o+je],[u-.214*o-je,h+.234*o-je]]).stream(l).point,r=a.translate([u-.205*o,h+.212*o]).clipExtent([[u-.214*o+je,h+.166*o+je],[u-.115*o-je,h+.234*o-je]]).stream(l).point,c},c.scale(1070)};var hr,dr,pr,fr,gr,mr,_r={point:z,lineStart:z,lineEnd:z,polygonStart:function(){dr=0,_r.lineStart=vr},polygonEnd:function(){_r.lineStart=_r.lineEnd=_r.point=z,hr+=x(dr/2)}};function vr(){var e,t,n,r;function i(e,t){dr+=r*e-n*t,n=e,r=t}_r.point=function(o,s){_r.point=i,e=n=o,t=r=s},_r.lineEnd=function(){i(e,t)}}var yr={point:function(e,t){e<pr&&(pr=e);e>gr&&(gr=e);t<fr&&(fr=t);t>mr&&(mr=t)},lineStart:z,lineEnd:z,polygonStart:z,polygonEnd:z};function br(){var e=wr(4.5),t=[],n={point:r,lineStart:function(){n.point=i},lineEnd:s,polygonStart:function(){n.lineEnd=a},polygonEnd:function(){n.lineEnd=s,n.point=r},pointRadius:function(t){return e=wr(t),n},result:function(){if(t.length){var e=t.join("");return t=[],e}}};function r(n,r){t.push("M",n,",",r,e)}function i(e,r){t.push("M",e,",",r),n.point=o}function o(e,n){t.push("L",e,",",n)}function s(){n.point=r}function a(){t.push("Z")}return n}function wr(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}var xr,kr={point:Er,lineStart:Sr,lineEnd:Mr,polygonStart:function(){kr.lineStart=Cr},polygonEnd:function(){kr.point=Er,kr.lineStart=Sr,kr.lineEnd=Mr}};function Er(e,t){En+=e,Sn+=t,++Mn}function Sr(){var e,t;function n(n,r){var i=n-e,o=r-t,s=Math.sqrt(i*i+o*o);Cn+=s*(e+n)/2,jn+=s*(t+r)/2,An+=s,Er(e=n,t=r)}kr.point=function(r,i){kr.point=n,Er(e=r,t=i)}}function Mr(){kr.point=Er}function Cr(){var e,t,n,r;function i(e,t){var i=e-n,o=t-r,s=Math.sqrt(i*i+o*o);Cn+=s*(n+e)/2,jn+=s*(r+t)/2,An+=s,Tn+=(s=r*e-n*t)*(n+e),Pn+=s*(r+t),On+=3*s,Er(n=e,r=t)}kr.point=function(o,s){kr.point=i,Er(e=n=o,t=r=s)},kr.lineEnd=function(){i(e,t)}}function jr(e){var t=4.5,n={point:r,lineStart:function(){n.point=i},lineEnd:s,polygonStart:function(){n.lineEnd=a},polygonEnd:function(){n.lineEnd=s,n.point=r},pointRadius:function(e){return t=e,n},result:z};function r(n,r){e.moveTo(n+t,r),e.arc(n,r,t,0,Pe)}function i(t,r){e.moveTo(t,r),n.point=o}function o(t,n){e.lineTo(t,n)}function s(){n.point=r}function a(){e.closePath()}return n}function Ar(e){var t=.5,n=Math.cos(30*Ie),r=16;function i(e){return(r?s:o)(e)}function o(t){return Or(t,(function(n,r){n=e(n,r),t.point(n[0],n[1])}))}function s(t){var n,i,o,s,l,c,u,h,d,p,f,g,m={point:_,lineStart:v,lineEnd:b,polygonStart:function(){t.polygonStart(),m.lineStart=w},polygonEnd:function(){t.polygonEnd(),m.lineStart=v}};function _(n,r){n=e(n,r),t.point(n[0],n[1])}function v(){h=NaN,m.point=y,t.lineStart()}function y(n,i){var o=Rn([n,i]),s=e(n,i);a(h,d,u,p,f,g,h=s[0],d=s[1],u=n,p=o[0],f=o[1],g=o[2],r,t),t.point(h,d)}function b(){m.point=_,t.lineEnd()}function w(){v(),m.point=x,m.lineEnd=k}function x(e,t){y(n=e,t),i=h,o=d,s=p,l=f,c=g,m.point=y}function k(){a(h,d,u,p,f,g,i,o,n,s,l,c,r,t),m.lineEnd=b,b()}return m}function a(r,i,o,s,l,c,u,h,d,p,f,g,m,_){var v=u-r,y=h-i,b=v*v+y*y;if(b>4*t&&m--){var w=s+p,k=l+f,E=c+g,S=Math.sqrt(w*w+k*k+E*E),M=Math.asin(E/=S),C=x(x(E)-1)<je||x(o-d)<je?(o+d)/2:Math.atan2(k,w),j=e(C,M),A=j[0],T=j[1],P=A-r,O=T-i,L=y*P-v*O;(L*L/b>t||x((v*P+y*O)/b-.5)>.3||s*p+l*f+c*g<n)&&(a(r,i,o,s,l,c,A,T,C,w/=S,k/=S,E,m,_),_.point(A,T),a(A,T,C,w,k,E,u,h,d,p,f,g,m,_))}}return i.precision=function(e){return arguments.length?(r=(t=e*e)>0&&16,i):Math.sqrt(t)},i}function Tr(e){var t=Ar((function(t,n){return e([t*De,n*De])}));return function(e){return Dr(t(e))}}function Pr(e){this.stream=e}function Or(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function Lr(e){return Ir((function(){return e}))()}function Ir(e){var t,n,r,i,s,a,l=Ar((function(e,n){return[(e=t(e,n))[0]*c+i,s-e[1]*c]})),c=150,u=480,h=250,d=0,p=0,f=0,g=0,m=0,_=or,v=I,y=null,b=null;function w(e){return[(e=r(e[0]*Ie,e[1]*Ie))[0]*c+i,s-e[1]*c]}function x(e){return(e=r.invert((e[0]-i)/c,(s-e[1])/c))&&[e[0]*De,e[1]*De]}function k(){r=Jn(n=zr(f,g,m),t);var e=t(d,p);return i=u-e[0]*c,s=h+e[1]*c,E()}function E(){return a&&(a.valid=!1,a=null),w}return w.stream=function(e){return a&&(a.valid=!1),(a=Dr(_(n,l(v(e))))).valid=!0,a},w.clipAngle=function(e){return arguments.length?(_=null==e?(y=e,or):sr((y=+e)*Ie),E()):y},w.clipExtent=function(e){return arguments.length?(b=e,v=e?lr(e[0][0],e[0][1],e[1][0],e[1][1]):I,E()):b},w.scale=function(e){return arguments.length?(c=+e,k()):c},w.translate=function(e){return arguments.length?(u=+e[0],h=+e[1],k()):[u,h]},w.center=function(e){return arguments.length?(d=e[0]%360*Ie,p=e[1]%360*Ie,k()):[d*De,p*De]},w.rotate=function(e){return arguments.length?(f=e[0]%360*Ie,g=e[1]%360*Ie,m=e.length>2?e[2]%360*Ie:0,k()):[f*De,g*De,m*De]},o.rebind(w,l,"precision"),function(){return t=e.apply(this,arguments),w.invert=t.invert&&x,k()}}function Dr(e){return Or(e,(function(t,n){e.point(t*Ie,n*Ie)}))}function Rr(e,t){return[e,t]}function Br(e,t){return[e>Te?e-Pe:e<-Te?e+Pe:e,t]}function zr(e,t,n){return e?t||n?Jn(Fr(e),Ur(t,n)):Fr(e):t||n?Ur(t,n):Br}function Nr(e){return function(t,n){return[(t+=e)>Te?t-Pe:t<-Te?t+Pe:t,n]}}function Fr(e){var t=Nr(e);return t.invert=Nr(-e),t}function Ur(e,t){var n=Math.cos(e),r=Math.sin(e),i=Math.cos(t),o=Math.sin(t);function s(e,t){var s=Math.cos(t),a=Math.cos(e)*s,l=Math.sin(e)*s,c=Math.sin(t),u=c*n+a*r;return[Math.atan2(l*i-u*o,a*n-c*r),Ne(u*i+l*o)]}return s.invert=function(e,t){var s=Math.cos(t),a=Math.cos(e)*s,l=Math.sin(e)*s,c=Math.sin(t),u=c*i-l*o;return[Math.atan2(l*i+c*o,a*n+u*r),Ne(u*n-a*r)]},s}function qr(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,o,s,a){var l=s*t;null!=i?(i=Hr(n,i),o=Hr(n,o),(s>0?i<o:i>o)&&(i+=s*Pe)):(i=e+s*Pe,o=e-.5*l);for(var c,u=i;s>0?u>o:u<o;u-=l)a.point((c=qn([n,-r*Math.cos(u),-r*Math.sin(u)]))[0],c[1])}}function Hr(e,t){var n=Rn(t);n[0]-=e,Un(n);var r=ze(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-je)%(2*Math.PI)}function Wr(e,t,n){var r=o.range(e,t-je,n).concat(t);return function(e){return r.map((function(t){return[e,t]}))}}function Vr(e,t,n){var r=o.range(e,t-je,n).concat(t);return function(e){return r.map((function(t){return[t,e]}))}}function $r(e){return e.source}function Kr(e){return e.target}o.geo.path=function(){var e,t,n,r,i,s=4.5;function a(e){return e&&("function"==typeof s&&r.pointRadius(+s.apply(this,arguments)),i&&i.valid||(i=n(r)),o.geo.stream(e,i)),r.result()}function l(){return i=null,a}return a.area=function(e){return hr=0,o.geo.stream(e,n(_r)),hr},a.centroid=function(e){return En=Sn=Mn=Cn=jn=An=Tn=Pn=On=0,o.geo.stream(e,n(kr)),On?[Tn/On,Pn/On]:An?[Cn/An,jn/An]:Mn?[En/Mn,Sn/Mn]:[NaN,NaN]},a.bounds=function(e){return gr=mr=-(pr=fr=1/0),o.geo.stream(e,n(yr)),[[pr,fr],[gr,mr]]},a.projection=function(t){return arguments.length?(n=(e=t)?t.stream||Tr(t):I,l()):e},a.context=function(e){return arguments.length?(r=null==(t=e)?new br:new jr(e),"function"!=typeof s&&r.pointRadius(s),l()):t},a.pointRadius=function(e){return arguments.length?(s="function"==typeof e?e:(r.pointRadius(+e),+e),a):s},a.projection(o.geo.albersUsa()).context(null)},o.geo.transform=function(e){return{stream:function(t){var n=new Pr(t);for(var r in e)n[r]=e[r];return n}}},Pr.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},o.geo.projection=Lr,o.geo.projectionMutator=Ir,(o.geo.equirectangular=function(){return Lr(Rr)}).raw=Rr.invert=Rr,o.geo.rotation=function(e){function t(t){return(t=e(t[0]*Ie,t[1]*Ie))[0]*=De,t[1]*=De,t}return e=zr(e[0]%360*Ie,e[1]*Ie,e.length>2?e[2]*Ie:0),t.invert=function(t){return(t=e.invert(t[0]*Ie,t[1]*Ie))[0]*=De,t[1]*=De,t},t},Br.invert=Rr,o.geo.circle=function(){var e,t,n=[0,0],r=6;function i(){var e="function"==typeof n?n.apply(this,arguments):n,r=zr(-e[0]*Ie,-e[1]*Ie,0).invert,i=[];return t(null,null,1,{point:function(e,t){i.push(e=r(e,t)),e[0]*=De,e[1]*=De}}),{type:"Polygon",coordinates:[i]}}return i.origin=function(e){return arguments.length?(n=e,i):n},i.angle=function(n){return arguments.length?(t=qr((e=+n)*Ie,r*Ie),i):e},i.precision=function(n){return arguments.length?(t=qr(e*Ie,(r=+n)*Ie),i):r},i.angle(90)},o.geo.distance=function(e,t){var n,r=(t[0]-e[0])*Ie,i=e[1]*Ie,o=t[1]*Ie,s=Math.sin(r),a=Math.cos(r),l=Math.sin(i),c=Math.cos(i),u=Math.sin(o),h=Math.cos(o);return Math.atan2(Math.sqrt((n=h*s)*n+(n=c*u-l*h*a)*n),l*u+c*h*a)},o.geo.graticule=function(){var e,t,n,r,i,s,a,l,c,u,h,d,p=10,f=p,g=90,m=360,_=2.5;function v(){return{type:"MultiLineString",coordinates:y()}}function y(){return o.range(Math.ceil(r/g)*g,n,g).map(h).concat(o.range(Math.ceil(l/m)*m,a,m).map(d)).concat(o.range(Math.ceil(t/p)*p,e,p).filter((function(e){return x(e%g)>je})).map(c)).concat(o.range(Math.ceil(s/f)*f,i,f).filter((function(e){return x(e%m)>je})).map(u))}return v.lines=function(){return y().map((function(e){return{type:"LineString",coordinates:e}}))},v.outline=function(){return{type:"Polygon",coordinates:[h(r).concat(d(a).slice(1),h(n).reverse().slice(1),d(l).reverse().slice(1))]}},v.extent=function(e){return arguments.length?v.majorExtent(e).minorExtent(e):v.minorExtent()},v.majorExtent=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],l=+e[0][1],a=+e[1][1],r>n&&(e=r,r=n,n=e),l>a&&(e=l,l=a,a=e),v.precision(_)):[[r,l],[n,a]]},v.minorExtent=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],s=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),s>i&&(n=s,s=i,i=n),v.precision(_)):[[t,s],[e,i]]},v.step=function(e){return arguments.length?v.majorStep(e).minorStep(e):v.minorStep()},v.majorStep=function(e){return arguments.length?(g=+e[0],m=+e[1],v):[g,m]},v.minorStep=function(e){return arguments.length?(p=+e[0],f=+e[1],v):[p,f]},v.precision=function(o){return arguments.length?(_=+o,c=Wr(s,i,90),u=Vr(t,e,_),h=Wr(l,a,90),d=Vr(r,n,_),v):_},v.majorExtent([[-180,-90+je],[180,90-je]]).minorExtent([[-180,-80-je],[180,80+je]])},o.geo.greatArc=function(){var e,t,n=$r,r=Kr;function i(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),t||r.apply(this,arguments)]}}return i.distance=function(){return o.geo.distance(e||n.apply(this,arguments),t||r.apply(this,arguments))},i.source=function(t){return arguments.length?(n=t,e="function"==typeof t?null:t,i):n},i.target=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,i):r},i.precision=function(){return arguments.length?i:0},i},o.geo.interpolate=function(e,t){return n=e[0]*Ie,r=e[1]*Ie,i=t[0]*Ie,o=t[1]*Ie,s=Math.cos(r),a=Math.sin(r),l=Math.cos(o),c=Math.sin(o),u=s*Math.cos(n),h=s*Math.sin(n),d=l*Math.cos(i),p=l*Math.sin(i),f=2*Math.asin(Math.sqrt(Ue(o-r)+s*l*Ue(i-n))),g=1/Math.sin(f),(m=f?function(e){var t=Math.sin(e*=f)*g,n=Math.sin(f-e)*g,r=n*u+t*d,i=n*h+t*p,o=n*a+t*c;return[Math.atan2(i,r)*De,Math.atan2(o,Math.sqrt(r*r+i*i))*De]}:function(){return[n*De,r*De]}).distance=f,m;var n,r,i,o,s,a,l,c,u,h,d,p,f,g,m},o.geo.length=function(e){return xr=0,o.geo.stream(e,Gr),xr};var Gr={sphere:z,point:z,lineStart:function(){var e,t,n;function r(r,i){var o=Math.sin(i*=Ie),s=Math.cos(i),a=x((r*=Ie)-e),l=Math.cos(a);xr+=Math.atan2(Math.sqrt((a=s*Math.sin(a))*a+(a=n*o-t*s*l)*a),t*o+n*s*l),e=r,t=o,n=s}Gr.point=function(i,o){e=i*Ie,t=Math.sin(o*=Ie),n=Math.cos(o),Gr.point=r},Gr.lineEnd=function(){Gr.point=Gr.lineEnd=z}},lineEnd:z,polygonStart:z,polygonEnd:z};function Yr(e,t){function n(t,n){var r=Math.cos(t),i=Math.cos(n),o=e(r*i);return[o*i*Math.sin(t),o*Math.sin(n)]}return n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),o=Math.sin(i),s=Math.cos(i);return[Math.atan2(e*o,r*s),Math.asin(r&&n*o/r)]},n}var Jr=Yr((function(e){return Math.sqrt(2/(1+e))}),(function(e){return 2*Math.asin(e/2)}));(o.geo.azimuthalEqualArea=function(){return Lr(Jr)}).raw=Jr;var Xr=Yr((function(e){var t=Math.acos(e);return t&&t/Math.sin(t)}),I);function Qr(e,t){var n=Math.cos(e),r=function(e){return Math.tan(Te/4+e/2)},i=e===t?Math.sin(e):Math.log(n/Math.cos(t))/Math.log(r(t)/r(e)),o=n*Math.pow(r(e),i)/i;if(!i)return ti;function s(e,t){o>0?t<-Le+je&&(t=-Le+je):t>Le-je&&(t=Le-je);var n=o/Math.pow(r(t),i);return[n*Math.sin(i*e),o-n*Math.cos(i*e)]}return s.invert=function(e,t){var n=o-t,r=Re(i)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/i,2*Math.atan(Math.pow(o/r,1/i))-Le]},s}function Zr(e,t){var n=Math.cos(e),r=e===t?Math.sin(e):(n-Math.cos(t))/(t-e),i=n/r+e;if(x(r)<je)return Rr;function o(e,t){var n=i-t;return[n*Math.sin(r*e),i-n*Math.cos(r*e)]}return o.invert=function(e,t){var n=i-t;return[Math.atan2(e,n)/r,i-Re(r)*Math.sqrt(e*e+n*n)]},o}(o.geo.azimuthalEquidistant=function(){return Lr(Xr)}).raw=Xr,(o.geo.conicConformal=function(){return cr(Qr)}).raw=Qr,(o.geo.conicEquidistant=function(){return cr(Zr)}).raw=Zr;var ei=Yr((function(e){return 1/e}),Math.atan);function ti(e,t){return[e,Math.log(Math.tan(Te/4+t/2))]}function ni(e){var t,n=Lr(e),r=n.scale,i=n.translate,o=n.clipExtent;return n.scale=function(){var e=r.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.translate=function(){var e=i.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.clipExtent=function(e){var s=o.apply(n,arguments);if(s===n){if(t=null==e){var a=Te*r(),l=i();o([[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]])}}else t&&(s=null);return s},n.clipExtent(null)}(o.geo.gnomonic=function(){return Lr(ei)}).raw=ei,ti.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Le]},(o.geo.mercator=function(){return ni(ti)}).raw=ti;var ri=Yr((function(){return 1}),Math.asin);(o.geo.orthographic=function(){return Lr(ri)}).raw=ri;var ii=Yr((function(e){return 1/(1+e)}),(function(e){return 2*Math.atan(e)}));function oi(e,t){return[Math.log(Math.tan(Te/4+t/2)),-e]}function si(e){return e[0]}function ai(e){return e[1]}function li(e){for(var t=e.length,n=[0,1],r=2,i=2;i<t;i++){for(;r>1&&Be(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function ci(e,t){return e[0]-t[0]||e[1]-t[1]}(o.geo.stereographic=function(){return Lr(ii)}).raw=ii,oi.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Le]},(o.geo.transverseMercator=function(){var e=ni(oi),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90])}).raw=oi,o.geom={},o.geom.hull=function(e){var t=si,n=ai;if(arguments.length)return r(e);function r(e){if(e.length<3)return[];var r,i=vt(t),o=vt(n),s=e.length,a=[],l=[];for(r=0;r<s;r++)a.push([+i.call(this,e[r],r),+o.call(this,e[r],r),r]);for(a.sort(ci),r=0;r<s;r++)l.push([a[r][0],-a[r][1]]);var c=li(a),u=li(l),h=u[0]===c[0],d=u[u.length-1]===c[c.length-1],p=[];for(r=c.length-1;r>=0;--r)p.push(e[a[c[r]][2]]);for(r=+h;r<u.length-d;++r)p.push(e[a[u[r]][2]]);return p}return r.x=function(e){return arguments.length?(t=e,r):t},r.y=function(e){return arguments.length?(n=e,r):n},r},o.geom.polygon=function(e){return V(e,ui),e};var ui=o.geom.polygon.prototype=[];function hi(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function di(e,t,n,r){var i=e[0],o=n[0],s=t[0]-i,a=r[0]-o,l=e[1],c=n[1],u=t[1]-l,h=r[1]-c,d=(a*(l-c)-h*(i-o))/(h*s-a*u);return[i+d*s,l+d*u]}function pi(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}ui.area=function(){for(var e,t=-1,n=this.length,r=this[n-1],i=0;++t<n;)e=r,r=this[t],i+=e[1]*r[0]-e[0]*r[1];return.5*i},ui.centroid=function(e){var t,n,r=-1,i=this.length,o=0,s=0,a=this[i-1];for(arguments.length||(e=-1/(6*this.area()));++r<i;)t=a,a=this[r],n=t[0]*a[1]-a[0]*t[1],o+=(t[0]+a[0])*n,s+=(t[1]+a[1])*n;return[o*e,s*e]},ui.clip=function(e){for(var t,n,r,i,o,s,a=pi(e),l=-1,c=this.length-pi(this),u=this[c-1];++l<c;){for(t=e.slice(),e.length=0,i=this[l],o=t[(r=t.length-a)-1],n=-1;++n<r;)hi(s=t[n],u,i)?(hi(o,u,i)||e.push(di(o,s,u,i)),e.push(s)):hi(o,u,i)&&e.push(di(o,s,u,i)),o=s;a&&e.push(e[0]),u=i}return e};var fi,gi,mi,_i,vi,yi=[],bi=[];function wi(){Fi(this),this.edge=this.site=this.circle=null}function xi(e){var t=yi.pop()||new wi;return t.site=e,t}function ki(e){Oi(e),mi.remove(e),yi.push(e),Fi(e)}function Ei(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},o=e.P,s=e.N,a=[e];ki(e);for(var l=o;l.circle&&x(n-l.circle.x)<je&&x(r-l.circle.cy)<je;)o=l.P,a.unshift(l),ki(l),l=o;a.unshift(l),Oi(l);for(var c=s;c.circle&&x(n-c.circle.x)<je&&x(r-c.circle.cy)<je;)s=c.N,a.push(c),ki(c),c=s;a.push(c),Oi(c);var u,h=a.length;for(u=1;u<h;++u)c=a[u],l=a[u-1],Bi(c.edge,l.site,c.site,i);l=a[0],(c=a[h-1]).edge=Di(l.site,c.site,null,i),Pi(l),Pi(c)}function Si(e){for(var t,n,r,i,o=e.x,s=e.y,a=mi._;a;)if((r=Mi(a,s)-o)>je)a=a.L;else{if(!((i=o-Ci(a,s))>je)){r>-je?(t=a.P,n=a):i>-je?(t=a,n=a.N):t=n=a;break}if(!a.R){t=a;break}a=a.R}var l=xi(e);if(mi.insert(t,l),t||n){if(t===n)return Oi(t),n=xi(t.site),mi.insert(l,n),l.edge=n.edge=Di(t.site,l.site),Pi(t),void Pi(n);if(n){Oi(t),Oi(n);var c=t.site,u=c.x,h=c.y,d=e.x-u,p=e.y-h,f=n.site,g=f.x-u,m=f.y-h,_=2*(d*m-p*g),v=d*d+p*p,y=g*g+m*m,b={x:(m*v-p*y)/_+u,y:(d*y-g*v)/_+h};Bi(n.edge,c,f,b),l.edge=Di(c,e,null,b),n.edge=Di(e,f,null,b),Pi(t),Pi(n)}else l.edge=Di(t.site,l.site)}}function Mi(e,t){var n=e.site,r=n.x,i=n.y,o=i-t;if(!o)return r;var s=e.P;if(!s)return-1/0;var a=(n=s.site).x,l=n.y,c=l-t;if(!c)return a;var u=a-r,h=1/o-1/c,d=u/c;return h?(-d+Math.sqrt(d*d-2*h*(u*u/(-2*c)-l+c/2+i-o/2)))/h+r:(r+a)/2}function Ci(e,t){var n=e.N;if(n)return Mi(n,t);var r=e.site;return r.y===t?r.x:1/0}function ji(e){this.site=e,this.edges=[]}function Ai(e,t){return t.angle-e.angle}function Ti(){Fi(this),this.x=this.y=this.arc=this.site=this.cy=null}function Pi(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,i=e.site,o=n.site;if(r!==o){var s=i.x,a=i.y,l=r.x-s,c=r.y-a,u=o.x-s,h=2*(l*(m=o.y-a)-c*u);if(!(h>=-Ae)){var d=l*l+c*c,p=u*u+m*m,f=(m*d-c*p)/h,g=(l*p-u*d)/h,m=g+a,_=bi.pop()||new Ti;_.arc=e,_.site=i,_.x=f+s,_.y=m+Math.sqrt(f*f+g*g),_.cy=m,e.circle=_;for(var v=null,y=vi._;y;)if(_.y<y.y||_.y===y.y&&_.x<=y.x){if(!y.L){v=y.P;break}y=y.L}else{if(!y.R){v=y;break}y=y.R}vi.insert(v,_),v||(_i=_)}}}}function Oi(e){var t=e.circle;t&&(t.P||(_i=t.N),vi.remove(t),bi.push(t),Fi(t),e.circle=null)}function Li(e,t){var n=e.b;if(n)return!0;var r,i,o=e.a,s=t[0][0],a=t[1][0],l=t[0][1],c=t[1][1],u=e.l,h=e.r,d=u.x,p=u.y,f=h.x,g=h.y,m=(d+f)/2,_=(p+g)/2;if(g===p){if(m<s||m>=a)return;if(d>f){if(o){if(o.y>=c)return}else o={x:m,y:l};n={x:m,y:c}}else{if(o){if(o.y<l)return}else o={x:m,y:c};n={x:m,y:l}}}else if(i=_-(r=(d-f)/(g-p))*m,r<-1||r>1)if(d>f){if(o){if(o.y>=c)return}else o={x:(l-i)/r,y:l};n={x:(c-i)/r,y:c}}else{if(o){if(o.y<l)return}else o={x:(c-i)/r,y:c};n={x:(l-i)/r,y:l}}else if(p<g){if(o){if(o.x>=a)return}else o={x:s,y:r*s+i};n={x:a,y:r*a+i}}else{if(o){if(o.x<s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}return e.a=o,e.b=n,!0}function Ii(e,t){this.l=e,this.r=t,this.a=this.b=null}function Di(e,t,n,r){var i=new Ii(e,t);return fi.push(i),n&&Bi(i,e,t,n),r&&Bi(i,t,e,r),gi[e.i].edges.push(new zi(i,e,t)),gi[t.i].edges.push(new zi(i,t,e)),i}function Ri(e,t,n){var r=new Ii(e,null);return r.a=t,r.b=n,fi.push(r),r}function Bi(e,t,n,r){e.a||e.b?e.l===n?e.b=r:e.a=r:(e.a=r,e.l=t,e.r=n)}function zi(e,t,n){var r=e.a,i=e.b;this.edge=e,this.site=t,this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function Ni(){this._=null}function Fi(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function Ui(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function qi(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Hi(e){for(;e.L;)e=e.L;return e}function Wi(e,t){var n,r,i,o=e.sort(Vi).pop();for(fi=[],gi=new Array(e.length),mi=new Ni,vi=new Ni;;)if(i=_i,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===n&&o.y===r||(gi[o.i]=new ji(o),Si(o),n=o.x,r=o.y),o=e.pop();else{if(!i)break;Ei(i.arc)}t&&(function(e){for(var t,n=fi,r=ar(e[0][0],e[0][1],e[1][0],e[1][1]),i=n.length;i--;)(!Li(t=n[i],e)||!r(t)||x(t.a.x-t.b.x)<je&&x(t.a.y-t.b.y)<je)&&(t.a=t.b=null,n.splice(i,1))}(t),function(e){for(var t,n,r,i,o,s,a,l,c,u,h=e[0][0],d=e[1][0],p=e[0][1],f=e[1][1],g=gi,m=g.length;m--;)if((o=g[m])&&o.prepare())for(l=(a=o.edges).length,s=0;s<l;)r=(u=a[s].end()).x,i=u.y,t=(c=a[++s%l].start()).x,n=c.y,(x(r-t)>je||x(i-n)>je)&&(a.splice(s,0,new zi(Ri(o.site,u,x(r-h)<je&&f-i>je?{x:h,y:x(t-h)<je?n:f}:x(i-f)<je&&d-r>je?{x:x(n-f)<je?t:d,y:f}:x(r-d)<je&&i-p>je?{x:d,y:x(t-d)<je?n:p}:x(i-p)<je&&r-h>je?{x:x(n-p)<je?t:h,y:p}:null),o.site,null)),++l)}(t));var s={cells:gi,edges:fi};return mi=vi=fi=gi=null,s}function Vi(e,t){return t.y-e.y||t.x-e.x}ji.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;)(e=t[n].edge).b&&e.a||t.splice(n,1);return t.sort(Ai),t.length},zi.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Ni.prototype={insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=Hi(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(Ui(this,n),n=(e=n).U),n.C=!1,r.C=!0,qi(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(qi(this,n),n=(e=n).U),n.C=!1,r.C=!0,Ui(this,r)),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,r,i=e.U,o=e.L,s=e.R;if(n=o?s?Hi(s):o:s,i?i.L===e?i.L=n:i.R=n:this._=n,o&&s?(r=n.C,n.C=e.C,n.L=o,o.U=n,n!==s?(i=n.U,n.U=e.U,e=n.R,i.L=e,n.R=s,s.U=n):(n.U=i,i=n,e=n.R)):(r=e.C,e=n),e&&(e.U=i),!r)if(e&&e.C)e.C=!1;else{do{if(e===this._)break;if(e===i.L){if((t=i.R).C&&(t.C=!1,i.C=!0,Ui(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,qi(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,Ui(this,i),e=this._;break}}else if((t=i.L).C&&(t.C=!1,i.C=!0,qi(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Ui(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,qi(this,i),e=this._;break}t.C=!0,e=i,i=i.U}while(!e.C);e&&(e.C=!1)}}},o.geom.voronoi=function(e){var t=si,n=ai,r=t,i=n,o=$i;if(e)return s(e);function s(e){var t=new Array(e.length),n=o[0][0],r=o[0][1],i=o[1][0],s=o[1][1];return Wi(a(e),o).cells.forEach((function(o,a){var l=o.edges,c=o.site;(t[a]=l.length?l.map((function(e){var t=e.start();return[t.x,t.y]})):c.x>=n&&c.x<=i&&c.y>=r&&c.y<=s?[[n,s],[i,s],[i,r],[n,r]]:[]).point=e[a]})),t}function a(e){return e.map((function(e,t){return{x:Math.round(r(e,t)/je)*je,y:Math.round(i(e,t)/je)*je,i:t}}))}return s.links=function(e){return Wi(a(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},s.triangles=function(e){var t=[];return Wi(a(e)).cells.forEach((function(n,r){for(var i,o,s,a,l=n.site,c=n.edges.sort(Ai),u=-1,h=c.length,d=c[h-1].edge,p=d.l===l?d.r:d.l;++u<h;)d,i=p,p=(d=c[u].edge).l===l?d.r:d.l,r<i.i&&r<p.i&&(s=i,a=p,((o=l).x-a.x)*(s.y-o.y)-(o.x-s.x)*(a.y-o.y)<0)&&t.push([e[r],e[i.i],e[p.i]])})),t},s.x=function(e){return arguments.length?(r=vt(t=e),s):t},s.y=function(e){return arguments.length?(i=vt(n=e),s):n},s.clipExtent=function(e){return arguments.length?(o=null==e?$i:e,s):o===$i?null:o},s.size=function(e){return arguments.length?s.clipExtent(e&&[[0,0],e]):o===$i?null:o&&o[1]},s};var $i=[[-1e6,-1e6],[1e6,1e6]];function Ki(e){return e.x}function Gi(e){return e.y}function Yi(e,t,n,r,i,o){if(!e(t,n,r,i,o)){var s=.5*(n+i),a=.5*(r+o),l=t.nodes;l[0]&&Yi(e,l[0],n,r,s,a),l[1]&&Yi(e,l[1],s,r,i,a),l[2]&&Yi(e,l[2],n,a,s,o),l[3]&&Yi(e,l[3],s,a,i,o)}}function Ji(e,t,n,r,i,o,s){var a,l=1/0;return function e(c,u,h,d,p){if(!(u>o||h>s||d<r||p<i)){if(f=c.point){var f,g=t-c.x,m=n-c.y,_=g*g+m*m;if(_<l){var v=Math.sqrt(l=_);r=t-v,i=n-v,o=t+v,s=n+v,a=f}}for(var y=c.nodes,b=.5*(u+d),w=.5*(h+p),x=(n>=w)<<1|t>=b,k=x+4;x<k;++x)if(c=y[3&x])switch(3&x){case 0:e(c,u,h,b,w);break;case 1:e(c,b,h,d,w);break;case 2:e(c,u,w,b,p);break;case 3:e(c,b,w,d,p)}}}(e,r,i,o,s),a}function Xi(e,t){e=o.rgb(e),t=o.rgb(t);var n=e.r,r=e.g,i=e.b,s=t.r-n,a=t.g-r,l=t.b-i;return function(e){return"#"+ht(Math.round(n+s*e))+ht(Math.round(r+a*e))+ht(Math.round(i+l*e))}}function Qi(e,t){var n,r={},i={};for(n in e)n in t?r[n]=ro(e[n],t[n]):i[n]=e[n];for(n in t)n in e||(i[n]=t[n]);return function(e){for(n in r)i[n]=r[n](e);return i}}function Zi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function eo(e,t){var n,r,i,o=to.lastIndex=no.lastIndex=0,s=-1,a=[],l=[];for(e+="",t+="";(n=to.exec(e))&&(r=no.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),a[s]?a[s]+=i:a[++s]=i),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Zi(n,r)})),o=no.lastIndex;return o<t.length&&(i=t.slice(o),a[s]?a[s]+=i:a[++s]=i),a.length<2?l[0]?(t=l[0].x,function(e){return t(e)+""}):function(){return t}:(t=l.length,function(e){for(var n,r=0;r<t;++r)a[(n=l[r]).i]=n.x(e);return a.join("")})}o.geom.delaunay=function(e){return o.geom.voronoi().triangles(e)},o.geom.quadtree=function(e,t,n,r,i){var o,s=si,a=ai;if(o=arguments.length)return s=Ki,a=Gi,3===o&&(i=n,r=t,n=t=0),l(e);function l(e){var l,c,u,h,d,p,f,g,m,_=vt(s),v=vt(a);if(null!=t)p=t,f=n,g=r,m=i;else if(g=m=-(p=f=1/0),c=[],u=[],d=e.length,o)for(h=0;h<d;++h)(l=e[h]).x<p&&(p=l.x),l.y<f&&(f=l.y),l.x>g&&(g=l.x),l.y>m&&(m=l.y),c.push(l.x),u.push(l.y);else for(h=0;h<d;++h){var y=+_(l=e[h],h),b=+v(l,h);y<p&&(p=y),b<f&&(f=b),y>g&&(g=y),b>m&&(m=b),c.push(y),u.push(b)}var w=g-p,k=m-f;function E(e,t,n,r,i,o,s,a){if(!isNaN(n)&&!isNaN(r))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(x(l-n)+x(c-r)<.01)S(e,t,n,r,i,o,s,a);else{var u=e.point;e.x=e.y=e.point=null,S(e,u,l,c,i,o,s,a),S(e,t,n,r,i,o,s,a)}else e.x=n,e.y=r,e.point=t}else S(e,t,n,r,i,o,s,a)}function S(e,t,n,r,i,o,s,a){var l=.5*(i+s),c=.5*(o+a),u=n>=l,h=r>=c,d=h<<1|u;e.leaf=!1,u?i=l:s=l,h?o=c:a=c,E(e=e.nodes[d]||(e.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,n,r,i,o,s,a)}w>k?m=f+w:g=p+k;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){E(M,e,+_(e,++h),+v(e,h),p,f,g,m)},visit:function(e){Yi(e,M,p,f,g,m)},find:function(e){return Ji(M,e[0],e[1],p,f,g,m)}};if(h=-1,null==t){for(;++h<d;)E(M,e[h],c[h],u[h],p,f,g,m);--h}else e.forEach(M.add);return c=u=e=l=null,M}return l.x=function(e){return arguments.length?(s=e,l):s},l.y=function(e){return arguments.length?(a=e,l):a},l.extent=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=+e[0][0],n=+e[0][1],r=+e[1][0],i=+e[1][1]),l):null==t?null:[[t,n],[r,i]]},l.size=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=n=0,r=+e[0],i=+e[1]),l):null==t?null:[r-t,i-n]},l},o.interpolateRgb=Xi,o.interpolateObject=Qi,o.interpolateNumber=Zi,o.interpolateString=eo;var to=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,no=new RegExp(to.source,"g");function ro(e,t){for(var n,r=o.interpolators.length;--r>=0&&!(n=o.interpolators[r](e,t)););return n}function io(e,t){var n,r=[],i=[],o=e.length,s=t.length,a=Math.min(e.length,t.length);for(n=0;n<a;++n)r.push(ro(e[n],t[n]));for(;n<o;++n)i[n]=e[n];for(;n<s;++n)i[n]=t[n];return function(e){for(n=0;n<a;++n)i[n]=r[n](e);return i}}o.interpolate=ro,o.interpolators=[function(e,t){var n=typeof t;return("string"===n?_t.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?Xi:eo:t instanceof $e?Xi:Array.isArray(t)?io:"object"===n&&isNaN(t)?Qi:Zi)(e,t)}],o.interpolateArray=io;var oo=function(){return I},so=o.map({linear:oo,poly:function(e){return function(t){return Math.pow(t,e)}},quad:function(){return ho},cubic:function(){return po},sin:function(){return go},exp:function(){return mo},circle:function(){return _o},elastic:function(e,t){var n;arguments.length<2&&(t=.45);arguments.length?n=t/Pe*Math.asin(1/e):(e=1,n=t/4);return function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Pe/t)}},back:function(e){e||(e=1.70158);return function(t){return t*t*((e+1)*t-e)}},bounce:function(){return vo}}),ao=o.map({in:I,out:co,"in-out":uo,"out-in":function(e){return uo(co(e))}});function lo(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function co(e){return function(t){return 1-e(1-t)}}function uo(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function ho(e){return e*e}function po(e){return e*e*e}function fo(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function go(e){return 1-Math.cos(e*Le)}function mo(e){return Math.pow(2,10*(e-1))}function _o(e){return 1-Math.sqrt(1-e*e)}function vo(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function yo(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function bo(e){var t,n,r,i=[e.a,e.b],o=[e.c,e.d],s=xo(i),a=wo(i,o),l=xo(((t=o)[0]+=(r=-a)*(n=i)[0],t[1]+=r*n[1],t))||0;i[0]*o[1]<o[0]*i[1]&&(i[0]*=-1,i[1]*=-1,s*=-1,a*=-1),this.rotate=(s?Math.atan2(i[1],i[0]):Math.atan2(-o[0],o[1]))*De,this.translate=[e.e,e.f],this.scale=[s,l],this.skew=l?Math.atan2(a,l)*De:0}function wo(e,t){return e[0]*t[0]+e[1]*t[1]}function xo(e){var t=Math.sqrt(wo(e,e));return t&&(e[0]/=t,e[1]/=t),t}o.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):"in";return n=so.get(n)||oo,lo((r=ao.get(r)||I)(n.apply(null,s.call(arguments,1))))},o.interpolateHcl=function(e,t){e=o.hcl(e),t=o.hcl(t);var n=e.h,r=e.c,i=e.l,s=t.h-n,a=t.c-r,l=t.l-i;isNaN(a)&&(a=0,r=isNaN(r)?t.c:r);isNaN(s)?(s=0,n=isNaN(n)?t.h:n):s>180?s-=360:s<-180&&(s+=360);return function(e){return Qe(n+s*e,r+a*e,i+l*e)+""}},o.interpolateHsl=function(e,t){e=o.hsl(e),t=o.hsl(t);var n=e.h,r=e.s,i=e.l,s=t.h-n,a=t.s-r,l=t.l-i;isNaN(a)&&(a=0,r=isNaN(r)?t.s:r);isNaN(s)?(s=0,n=isNaN(n)?t.h:n):s>180?s-=360:s<-180&&(s+=360);return function(e){return Ye(n+s*e,r+a*e,i+l*e)+""}},o.interpolateLab=function(e,t){e=o.lab(e),t=o.lab(t);var n=e.l,r=e.a,i=e.b,s=t.l-n,a=t.a-r,l=t.b-i;return function(e){return nt(n+s*e,r+a*e,i+l*e)+""}},o.interpolateRound=yo,o.transform=function(e){var t=l.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new bo(n?n.matrix:ko)})(e)},bo.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ko={a:1,b:0,c:0,d:1,e:0,f:0};function Eo(e){return e.length?e.pop()+",":""}function So(e,t){var n=[],r=[];return e=o.transform(e),t=o.transform(t),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:Zi(e[0],t[0])},{i:i-2,x:Zi(e[1],t[1])})}else(t[0]||t[1])&&n.push("translate("+t+")")}(e.translate,t.translate,n,r),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(Eo(n)+"rotate(",null,")")-2,x:Zi(e,t)})):t&&n.push(Eo(n)+"rotate("+t+")")}(e.rotate,t.rotate,n,r),function(e,t,n,r){e!==t?r.push({i:n.push(Eo(n)+"skewX(",null,")")-2,x:Zi(e,t)}):t&&n.push(Eo(n)+"skewX("+t+")")}(e.skew,t.skew,n,r),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push(Eo(n)+"scale(",null,",",null,")");r.push({i:i-4,x:Zi(e[0],t[0])},{i:i-2,x:Zi(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(Eo(n)+"scale("+t+")")}(e.scale,t.scale,n,r),e=t=null,function(e){for(var t,i=-1,o=r.length;++i<o;)n[(t=r[i]).i]=t.x(e);return n.join("")}}function Mo(e,t){return t=(t-=e=+e)||1/t,function(n){return(n-e)/t}}function Co(e,t){return t=(t-=e=+e)||1/t,function(n){return Math.max(0,Math.min(1,(n-e)/t))}}function jo(e){for(var t=e.source,n=e.target,r=function(e,t){if(e===t)return e;var n=Ao(e),r=Ao(t),i=n.pop(),o=r.pop(),s=null;for(;i===o;)s=i,i=n.pop(),o=r.pop();return s}(t,n),i=[t];t!==r;)t=t.parent,i.push(t);for(var o=i.length;n!==r;)i.splice(o,0,n),n=n.parent;return i}function Ao(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function To(e){e.fixed|=2}function Po(e){e.fixed&=-7}function Oo(e){e.fixed|=4,e.px=e.x,e.py=e.y}function Lo(e){e.fixed&=-5}o.interpolateTransform=So,o.layout={},o.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n<r;)t.push(jo(e[n]));return t}},o.layout.chord=function(){var e,t,n,r,i,s,a,l={},c=0;function u(){var l,u,d,p,f,g={},m=[],_=o.range(r),v=[];for(e=[],t=[],l=0,p=-1;++p<r;){for(u=0,f=-1;++f<r;)u+=n[p][f];m.push(u),v.push(o.range(r)),l+=u}for(i&&_.sort((function(e,t){return i(m[e],m[t])})),s&&v.forEach((function(e,t){e.sort((function(e,r){return s(n[t][e],n[t][r])}))})),l=(Pe-c*r)/l,u=0,p=-1;++p<r;){for(d=u,f=-1;++f<r;){var y=_[p],b=v[y][f],w=n[y][b],x=u,k=u+=w*l;g[y+"-"+b]={index:y,subindex:b,startAngle:x,endAngle:k,value:w}}t[y]={index:y,startAngle:d,endAngle:u,value:m[y]},u+=c}for(p=-1;++p<r;)for(f=p-1;++f<r;){var E=g[p+"-"+f],S=g[f+"-"+p];(E.value||S.value)&&e.push(E.value<S.value?{source:S,target:E}:{source:E,target:S})}a&&h()}function h(){e.sort((function(e,t){return a((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)}))}return l.matrix=function(i){return arguments.length?(r=(n=i)&&n.length,e=t=null,l):n},l.padding=function(n){return arguments.length?(c=n,e=t=null,l):c},l.sortGroups=function(n){return arguments.length?(i=n,e=t=null,l):i},l.sortSubgroups=function(t){return arguments.length?(s=t,e=null,l):s},l.sortChords=function(t){return arguments.length?(a=t,e&&h(),l):a},l.chords=function(){return e||u(),e},l.groups=function(){return t||u(),t},l},o.layout.force=function(){var e,t,n,r,i,s,a={},l=o.dispatch("start","tick","end"),c=[1,1],u=.9,h=Io,d=Do,p=-30,f=Ro,g=.1,m=.64,_=[],v=[];function y(e){return function(t,n,r,i){if(t.point!==e){var o=t.cx-e.x,s=t.cy-e.y,a=i-n,l=o*o+s*s;if(a*a/m<l){if(l<f){var c=t.charge/l;e.px-=o*c,e.py-=s*c}return!0}if(t.point&&l&&l<f){c=t.pointCharge/l;e.px-=o*c,e.py-=s*c}}return!t.charge}}function b(e){e.px=o.event.x,e.py=o.event.y,a.resume()}return a.tick=function(){if((n*=.99)<.005)return e=null,l.end({type:"end",alpha:n=0}),!0;var t,a,h,d,f,m,b,w,x,k=_.length,E=v.length;for(a=0;a<E;++a)d=(h=v[a]).source,(m=(w=(f=h.target).x-d.x)*w+(x=f.y-d.y)*x)&&(w*=m=n*i[a]*((m=Math.sqrt(m))-r[a])/m,x*=m,f.x-=w*(b=d.weight+f.weight?d.weight/(d.weight+f.weight):.5),f.y-=x*b,d.x+=w*(b=1-b),d.y+=x*b);if((b=n*g)&&(w=c[0]/2,x=c[1]/2,a=-1,b))for(;++a<k;)(h=_[a]).x+=(w-h.x)*b,h.y+=(x-h.y)*b;if(p)for(!function e(t,n,r){var i=0,o=0;if(t.charge=0,!t.leaf)for(var s,a=t.nodes,l=a.length,c=-1;++c<l;)null!=(s=a[c])&&(e(s,n,r),t.charge+=s.charge,i+=s.charge*s.cx,o+=s.charge*s.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var u=n*r[t.point.index];t.charge+=t.pointCharge=u,i+=u*t.point.x,o+=u*t.point.y}t.cx=i/t.charge,t.cy=o/t.charge}(t=o.geom.quadtree(_),n,s),a=-1;++a<k;)(h=_[a]).fixed||t.visit(y(h));for(a=-1;++a<k;)(h=_[a]).fixed?(h.x=h.px,h.y=h.py):(h.x-=(h.px-(h.px=h.x))*u,h.y-=(h.py-(h.py=h.y))*u);l.tick({type:"tick",alpha:n})},a.nodes=function(e){return arguments.length?(_=e,a):_},a.links=function(e){return arguments.length?(v=e,a):v},a.size=function(e){return arguments.length?(c=e,a):c},a.linkDistance=function(e){return arguments.length?(h="function"==typeof e?e:+e,a):h},a.distance=a.linkDistance,a.linkStrength=function(e){return arguments.length?(d="function"==typeof e?e:+e,a):d},a.friction=function(e){return arguments.length?(u=+e,a):u},a.charge=function(e){return arguments.length?(p="function"==typeof e?e:+e,a):p},a.chargeDistance=function(e){return arguments.length?(f=e*e,a):Math.sqrt(f)},a.gravity=function(e){return arguments.length?(g=+e,a):g},a.theta=function(e){return arguments.length?(m=e*e,a):Math.sqrt(m)},a.alpha=function(t){return arguments.length?(t=+t,n?t>0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:n=0})):t>0&&(l.start({type:"start",alpha:n=t}),e=Mt(a.tick)),a):n},a.start=function(){var e,t,n,o=_.length,l=v.length,u=c[0],f=c[1];for(e=0;e<o;++e)(n=_[e]).index=e,n.weight=0;for(e=0;e<l;++e)"number"==typeof(n=v[e]).source&&(n.source=_[n.source]),"number"==typeof n.target&&(n.target=_[n.target]),++n.source.weight,++n.target.weight;for(e=0;e<o;++e)n=_[e],isNaN(n.x)&&(n.x=g("x",u)),isNaN(n.y)&&(n.y=g("y",f)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(r=[],"function"==typeof h)for(e=0;e<l;++e)r[e]=+h.call(this,v[e],e);else for(e=0;e<l;++e)r[e]=h;if(i=[],"function"==typeof d)for(e=0;e<l;++e)i[e]=+d.call(this,v[e],e);else for(e=0;e<l;++e)i[e]=d;if(s=[],"function"==typeof p)for(e=0;e<o;++e)s[e]=+p.call(this,_[e],e);else for(e=0;e<o;++e)s[e]=p;function g(n,r){if(!t){for(t=new Array(o),c=0;c<o;++c)t[c]=[];for(c=0;c<l;++c){var i=v[c];t[i.source.index].push(i.target),t[i.target.index].push(i.source)}}for(var s,a=t[e],c=-1,u=a.length;++c<u;)if(!isNaN(s=a[c][n]))return s;return Math.random()*r}return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){if(t||(t=o.behavior.drag().origin(I).on("dragstart.force",To).on("drag.force",b).on("dragend.force",Po)),!arguments.length)return t;this.on("mouseover.force",Oo).on("mouseout.force",Lo).call(t)},o.rebind(a,l,"on")};var Io=20,Do=1,Ro=1/0;function Bo(e,t){return o.rebind(e,t,"sort","children","value"),e.nodes=e,e.links=Ho,e}function zo(e,t){for(var n=[e];null!=(e=n.pop());)if(t(e),(i=e.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function No(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(o=e.children)&&(i=o.length))for(var i,o,s=-1;++s<i;)n.push(o[s]);for(;null!=(e=r.pop());)t(e)}function Fo(e){return e.children}function Uo(e){return e.value}function qo(e,t){return t.value-e.value}function Ho(e){return o.merge(e.map((function(e){return(e.children||[]).map((function(t){return{source:e,target:t}}))})))}o.layout.hierarchy=function(){var e=qo,t=Fo,n=Uo;function r(i){var o,s=[i],a=[];for(i.depth=0;null!=(o=s.pop());)if(a.push(o),(c=t.call(r,o,o.depth))&&(l=c.length)){for(var l,c,u;--l>=0;)s.push(u=c[l]),u.parent=o,u.depth=o.depth+1;n&&(o.value=0),o.children=c}else n&&(o.value=+n.call(r,o,o.depth)||0),delete o.children;return No(i,(function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)})),a}return r.sort=function(t){return arguments.length?(e=t,r):e},r.children=function(e){return arguments.length?(t=e,r):t},r.value=function(e){return arguments.length?(n=e,r):n},r.revalue=function(e){return n&&(zo(e,(function(e){e.children&&(e.value=0)})),No(e,(function(e){var t;e.children||(e.value=+n.call(r,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},r},o.layout.partition=function(){var e=o.layout.hierarchy(),t=[1,1];function n(n,r){var i=e.call(this,n,r);return function e(t,n,r,i){var o=t.children;if(t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i,o&&(s=o.length)){var s,a,l,c=-1;for(r=t.value?r/t.value:0;++c<s;)e(a=o[c],n,l=a.value*r,i),n+=l}}(i[0],0,t[0],t[1]/function e(t){var n=t.children,r=0;if(n&&(i=n.length))for(var i,o=-1;++o<i;)r=Math.max(r,e(n[o]));return 1+r}(i[0])),i}return n.size=function(e){return arguments.length?(t=e,n):t},Bo(n,e)},o.layout.pie=function(){var e=Number,t=Wo,n=0,r=Pe,i=0;function s(a){var l,c=a.length,u=a.map((function(t,n){return+e.call(s,t,n)})),h=+("function"==typeof n?n.apply(this,arguments):n),d=("function"==typeof r?r.apply(this,arguments):r)-h,p=Math.min(Math.abs(d)/c,+("function"==typeof i?i.apply(this,arguments):i)),f=p*(d<0?-1:1),g=o.sum(u),m=g?(d-c*f)/g:0,_=o.range(c),v=[];return null!=t&&_.sort(t===Wo?function(e,t){return u[t]-u[e]}:function(e,n){return t(a[e],a[n])}),_.forEach((function(e){v[e]={data:a[e],value:l=u[e],startAngle:h,endAngle:h+=l*m+f,padAngle:p}})),v}return s.value=function(t){return arguments.length?(e=t,s):e},s.sort=function(e){return arguments.length?(t=e,s):t},s.startAngle=function(e){return arguments.length?(n=e,s):n},s.endAngle=function(e){return arguments.length?(r=e,s):r},s.padAngle=function(e){return arguments.length?(i=e,s):i},s};var Wo={};function Vo(e){return e.x}function $o(e){return e.y}function Ko(e,t,n){e.y0=t,e.y=n}o.layout.stack=function(){var e=I,t=Jo,n=Xo,r=Ko,i=Vo,s=$o;function a(l,c){if(!(p=l.length))return l;var u=l.map((function(t,n){return e.call(a,t,n)})),h=u.map((function(e){return e.map((function(e,t){return[i.call(a,e,t),s.call(a,e,t)]}))})),d=t.call(a,h,c);u=o.permute(u,d),h=o.permute(h,d);var p,f,g,m,_=n.call(a,h,c),v=u[0].length;for(g=0;g<v;++g)for(r.call(a,u[0][g],m=_[g],h[0][g][1]),f=1;f<p;++f)r.call(a,u[f][g],m+=h[f-1][g][1],h[f][g][1]);return l}return a.values=function(t){return arguments.length?(e=t,a):e},a.order=function(e){return arguments.length?(t="function"==typeof e?e:Go.get(e)||Jo,a):t},a.offset=function(e){return arguments.length?(n="function"==typeof e?e:Yo.get(e)||Xo,a):n},a.x=function(e){return arguments.length?(i=e,a):i},a.y=function(e){return arguments.length?(s=e,a):s},a.out=function(e){return arguments.length?(r=e,a):r},a};var Go=o.map({"inside-out":function(e){var t,n,r=e.length,i=e.map(Qo),s=e.map(Zo),a=o.range(r).sort((function(e,t){return i[e]-i[t]})),l=0,c=0,u=[],h=[];for(t=0;t<r;++t)n=a[t],l<c?(l+=s[n],u.push(n)):(c+=s[n],h.push(n));return h.reverse().concat(u)},reverse:function(e){return o.range(e.length).reverse()},default:Jo}),Yo=o.map({silhouette:function(e){var t,n,r,i=e.length,o=e[0].length,s=[],a=0,l=[];for(n=0;n<o;++n){for(t=0,r=0;t<i;t++)r+=e[t][n][1];r>a&&(a=r),s.push(r)}for(n=0;n<o;++n)l[n]=(a-s[n])/2;return l},wiggle:function(e){var t,n,r,i,o,s,a,l,c,u=e.length,h=e[0],d=h.length,p=[];for(p[0]=l=c=0,n=1;n<d;++n){for(t=0,i=0;t<u;++t)i+=e[t][n][1];for(t=0,o=0,a=h[n][0]-h[n-1][0];t<u;++t){for(r=0,s=(e[t][n][1]-e[t][n-1][1])/(2*a);r<t;++r)s+=(e[r][n][1]-e[r][n-1][1])/a;o+=s*e[t][n][1]}p[n]=l-=i?o/i*a:0,l<c&&(c=l)}for(n=0;n<d;++n)p[n]-=c;return p},expand:function(e){var t,n,r,i=e.length,o=e[0].length,s=1/i,a=[];for(n=0;n<o;++n){for(t=0,r=0;t<i;t++)r+=e[t][n][1];if(r)for(t=0;t<i;t++)e[t][n][1]/=r;else for(t=0;t<i;t++)e[t][n][1]=s}for(n=0;n<o;++n)a[n]=0;return a},zero:Xo});function Jo(e){return o.range(e.length)}function Xo(e){for(var t=-1,n=e[0].length,r=[];++t<n;)r[t]=0;return r}function Qo(e){for(var t,n=1,r=0,i=e[0][1],o=e.length;n<o;++n)(t=e[n][1])>i&&(r=n,i=t);return r}function Zo(e){return e.reduce(es,0)}function es(e,t){return e+t[1]}function ts(e,t){return ns(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function ns(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,o=[];++n<=t;)o[n]=i*n+r;return o}function rs(e){return[o.min(e),o.max(e)]}function is(e,t){return e.value-t.value}function os(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function ss(e,t){e._pack_next=t,t._pack_prev=e}function as(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function ls(e){if((t=e.children)&&(l=t.length)){var t,n,r,i,o,s,a,l,c=1/0,u=-1/0,h=1/0,d=-1/0;if(t.forEach(cs),(n=t[0]).x=-n.r,n.y=0,y(n),l>1&&((r=t[1]).x=r.r,r.y=0,y(r),l>2))for(hs(n,r,i=t[2]),y(i),os(n,i),n._pack_prev=i,os(i,r),r=n._pack_next,o=3;o<l;o++){hs(n,r,i=t[o]);var p=0,f=1,g=1;for(s=r._pack_next;s!==r;s=s._pack_next,f++)if(as(s,i)){p=1;break}if(1==p)for(a=n._pack_prev;a!==s._pack_prev&&!as(a,i);a=a._pack_prev,g++);p?(f<g||f==g&&r.r<n.r?ss(n,r=s):ss(n=a,r),o--):(os(n,i),r=i,y(i))}var m=(c+u)/2,_=(h+d)/2,v=0;for(o=0;o<l;o++)(i=t[o]).x-=m,i.y-=_,v=Math.max(v,i.r+Math.sqrt(i.x*i.x+i.y*i.y));e.r=v,t.forEach(us)}function y(e){c=Math.min(e.x-e.r,c),u=Math.max(e.x+e.r,u),h=Math.min(e.y-e.r,h),d=Math.max(e.y+e.r,d)}}function cs(e){e._pack_next=e._pack_prev=e}function us(e){delete e._pack_next,delete e._pack_prev}function hs(e,t,n){var r=e.r+n.r,i=t.x-e.x,o=t.y-e.y;if(r&&(i||o)){var s=t.r+n.r,a=i*i+o*o,l=.5+((r*=r)-(s*=s))/(2*a),c=Math.sqrt(Math.max(0,2*s*(r+a)-(r-=a)*r-s*s))/(2*a);n.x=e.x+l*i+c*o,n.y=e.y+l*o-c*i}else n.x=e.x+r,n.y=e.y}function ds(e,t){return e.parent==t.parent?1:2}function ps(e){var t=e.children;return t.length?t[0]:e.t}function fs(e){var t,n=e.children;return(t=n.length)?n[t-1]:e.t}function gs(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function ms(e,t,n){return e.a.parent===t.parent?e.a:n}function _s(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function vs(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],o=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function ys(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function bs(e){return e.rangeExtent?e.rangeExtent():ys(e.range())}function ws(e,t,n,r){var i=n(e[0],e[1]),o=r(t[0],t[1]);return function(e){return o(i(e))}}function xs(e,t){var n,r=0,i=e.length-1,o=e[r],s=e[i];return s<o&&(n=r,r=i,i=n,n=o,o=s,s=n),e[r]=t.floor(o),e[i]=t.ceil(s),e}function ks(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:Es}o.layout.histogram=function(){var e=!0,t=Number,n=rs,r=ts;function i(i,s){for(var a,l,c=[],u=i.map(t,this),h=n.call(this,u,s),d=r.call(this,h,u,s),p=(s=-1,u.length),f=d.length-1,g=e?1:1/p;++s<f;)(a=c[s]=[]).dx=d[s+1]-(a.x=d[s]),a.y=0;if(f>0)for(s=-1;++s<p;)(l=u[s])>=h[0]&&l<=h[1]&&((a=c[o.bisect(d,l,1,f)-1]).y+=g,a.push(i[s]));return c}return i.value=function(e){return arguments.length?(t=e,i):t},i.range=function(e){return arguments.length?(n=vt(e),i):n},i.bins=function(e){return arguments.length?(r="number"==typeof e?function(t){return ns(t,e)}:vt(e),i):r},i.frequency=function(t){return arguments.length?(e=!!t,i):e},i},o.layout.pack=function(){var e,t=o.layout.hierarchy().sort(is),n=0,r=[1,1];function i(i,o){var s=t.call(this,i,o),a=s[0],l=r[0],c=r[1],u=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(a.x=a.y=0,No(a,(function(e){e.r=+u(e.value)})),No(a,ls),n){var h=n*(e?1:Math.max(2*a.r/l,2*a.r/c))/2;No(a,(function(e){e.r+=h})),No(a,ls),No(a,(function(e){e.r-=h}))}return function e(t,n,r,i){var o=t.children;if(t.x=n+=i*t.x,t.y=r+=i*t.y,t.r*=i,o)for(var s=-1,a=o.length;++s<a;)e(o[s],n,r,i)}(a,l/2,c/2,e?1:1/Math.max(2*a.r/l,2*a.r/c)),s}return i.size=function(e){return arguments.length?(r=e,i):r},i.radius=function(t){return arguments.length?(e=null==t||"function"==typeof t?t:+t,i):e},i.padding=function(e){return arguments.length?(n=+e,i):n},Bo(i,t)},o.layout.tree=function(){var e=o.layout.hierarchy().sort(null).value(null),t=ds,n=[1,1],r=null;function i(i,o){var c=e.call(this,i,o),u=c[0],h=function(e){var t,n={A:null,children:[e]},r=[n];for(;null!=(t=r.pop());)for(var i,o=t.children,s=0,a=o.length;s<a;++s)r.push((o[s]=i={_:o[s],parent:t,children:(i=o[s].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:s}).a=i);return n.children[0]}(u);if(No(h,s),h.parent.m=-h.z,zo(h,a),r)zo(u,l);else{var d=u,p=u,f=u;zo(u,(function(e){e.x<d.x&&(d=e),e.x>p.x&&(p=e),e.depth>f.depth&&(f=e)}));var g=t(d,p)/2-d.x,m=n[0]/(p.x+t(p,d)/2+g),_=n[1]/(f.depth||1);zo(u,(function(e){e.x=(e.x+g)*m,e.y=e.depth*_}))}return c}function s(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n.length){!function(e){var t,n=0,r=0,i=e.children,o=i.length;for(;--o>=0;)(t=i[o]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,s=e,a=n,l=o.parent.children[0],c=o.m,u=s.m,h=a.m,d=l.m;a=fs(a),o=ps(o),a&&o;)l=ps(l),(s=fs(s)).a=e,(i=a.z+h-o.z-c+t(a._,o._))>0&&(gs(ms(a,e,r),e,i),c+=i,u+=i),h+=a.m,c+=o.m,d+=l.m,u+=s.m;a&&!fs(s)&&(s.t=a,s.m+=h-u),o&&!ps(l)&&(l.t=o,l.m+=c-d,r=e)}return r}(e,i,e.parent.A||r[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=n[0],e.y=e.depth*n[1]}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(r=null==(n=e)?l:null,i):r?null:n},i.nodeSize=function(e){return arguments.length?(r=null==(n=e)?null:l,i):r?n:null},Bo(i,e)},o.layout.cluster=function(){var e=o.layout.hierarchy().sort(null).value(null),t=ds,n=[1,1],r=!1;function i(i,s){var a,l=e.call(this,i,s),c=l[0],u=0;No(c,(function(e){var n=e.children;n&&n.length?(e.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(n),e.y=function(e){return 1+o.max(e,(function(e){return e.y}))}(n)):(e.x=a?u+=t(e,a):0,e.y=0,a=e)}));var h=function e(t){var n=t.children;return n&&n.length?e(n[0]):t}(c),d=function e(t){var n,r=t.children;return r&&(n=r.length)?e(r[n-1]):t}(c),p=h.x-t(h,d)/2,f=d.x+t(d,h)/2;return No(c,r?function(e){e.x=(e.x-c.x)*n[0],e.y=(c.y-e.y)*n[1]}:function(e){e.x=(e.x-p)/(f-p)*n[0],e.y=(1-(c.y?e.y/c.y:1))*n[1]}),l}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(r=null==(n=e),i):r?null:n},i.nodeSize=function(e){return arguments.length?(r=null!=(n=e),i):r?n:null},Bo(i,e)},o.layout.treemap=function(){var e,t=o.layout.hierarchy(),n=Math.round,r=[1,1],i=null,s=_s,a=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var n,r,i=-1,o=e.length;++i<o;)r=(n=e[i]).value*(t<0?0:t),n.area=isNaN(r)||r<=0?0:r}function h(e){var t=e.children;if(t&&t.length){var n,r,i,o=s(e),a=[],c=t.slice(),d=1/0,g="slice"===l?o.dx:"dice"===l?o.dy:"slice-dice"===l?1&e.depth?o.dy:o.dx:Math.min(o.dx,o.dy);for(u(c,o.dx*o.dy/e.value),a.area=0;(i=c.length)>0;)a.push(n=c[i-1]),a.area+=n.area,"squarify"!==l||(r=p(a,g))<=d?(c.pop(),d=r):(a.area-=a.pop().area,f(a,g,o,!1),g=Math.min(o.dx,o.dy),a.length=a.area=0,d=1/0);a.length&&(f(a,g,o,!0),a.length=a.area=0),t.forEach(h)}}function d(e){var t=e.children;if(t&&t.length){var n,r=s(e),i=t.slice(),o=[];for(u(i,r.dx*r.dy/e.value),o.area=0;n=i.pop();)o.push(n),o.area+=n.area,null!=n.z&&(f(o,n.z?r.dx:r.dy,r,!i.length),o.length=o.area=0);t.forEach(d)}}function p(e,t){for(var n,r=e.area,i=0,o=1/0,s=-1,a=e.length;++s<a;)(n=e[s].area)&&(n<o&&(o=n),n>i&&(i=n));return t*=t,(r*=r)?Math.max(t*i*c/r,r/(t*o*c)):1/0}function f(e,t,r,i){var o,s=-1,a=e.length,l=r.x,c=r.y,u=t?n(e.area/t):0;if(t==r.dx){for((i||u>r.dy)&&(u=r.dy);++s<a;)(o=e[s]).x=l,o.y=c,o.dy=u,l+=o.dx=Math.min(r.x+r.dx-l,u?n(o.area/u):0);o.z=!0,o.dx+=r.x+r.dx-l,r.y+=u,r.dy-=u}else{for((i||u>r.dx)&&(u=r.dx);++s<a;)(o=e[s]).x=l,o.y=c,o.dx=u,c+=o.dy=Math.min(r.y+r.dy-c,u?n(o.area/u):0);o.z=!1,o.dy+=r.y+r.dy-c,r.x+=u,r.dx-=u}}function g(n){var i=e||t(n),o=i[0];return o.x=o.y=0,o.value?(o.dx=r[0],o.dy=r[1]):o.dx=o.dy=0,e&&t.revalue(o),u([o],o.dx*o.dy/o.value),(e?d:h)(o),a&&(e=i),i}return g.size=function(e){return arguments.length?(r=e,g):r},g.padding=function(e){if(!arguments.length)return i;function t(t){var n=e.call(g,t,t.depth);return null==n?_s(t):vs(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return vs(t,e)}var r;return s=null==(i=e)?_s:"function"==(r=typeof e)?t:"number"===r?(e=[e,e,e,e],n):n,g},g.round=function(e){return arguments.length?(n=e?Math.round:Number,g):n!=Number},g.sticky=function(t){return arguments.length?(a=t,e=null,g):a},g.ratio=function(e){return arguments.length?(c=e,g):c},g.mode=function(e){return arguments.length?(l=e+"",g):l},Bo(g,t)},o.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=0),function(){var n,r,i;do{i=(n=2*Math.random()-1)*n+(r=2*Math.random()-1)*r}while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=o.random.normal.apply(o,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=o.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t}}},o.scale={};var Es={floor:I,ceil:I};function Ss(e,t,n,r){var i=[],s=[],a=0,l=Math.min(e.length,t.length)-1;for(e[l]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<=l;)i.push(n(e[a-1],e[a])),s.push(r(t[a-1],t[a]));return function(t){var n=o.bisect(e,t,1,l)-1;return s[n](i[n](t))}}function Ms(e,t){return o.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Cs(e,t){return xs(e,ks(js(e,t)[2])),xs(e,ks(js(e,t)[2])),e}function js(e,t){null==t&&(t=10);var n=ys(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function As(e,t){return o.range.apply(o,js(e,t))}function Ts(e,t,n){var r=js(e,t);if(n){var i=Lt.exec(n);if(i.shift(),"s"===i[8]){var s=o.formatPrefix(Math.max(x(r[0]),x(r[1])));return i[7]||(i[7]="."+Os(s.scale(r[2]))),i[8]="f",n=o.format(i.join("")),function(e){return n(s.scale(e))+s.symbol}}i[7]||(i[7]="."+function(e,t){var n=Os(t[2]);return e in Ps?Math.abs(n-Os(Math.max(x(t[0]),x(t[1]))))+ +("e"!==e):n-2*("%"===e)}(i[8],r)),n=i.join("")}else n=",."+Os(r[2])+"f";return o.format(n)}o.scale.linear=function(){return function e(t,n,r,i){var o,s;function a(){var e=Math.min(t.length,n.length)>2?Ss:ws,a=i?Co:Mo;return o=e(t,n,a,r),s=e(n,t,a,ro),l}function l(e){return o(e)}return l.invert=function(e){return s(e)},l.domain=function(e){return arguments.length?(t=e.map(Number),a()):t},l.range=function(e){return arguments.length?(n=e,a()):n},l.rangeRound=function(e){return l.range(e).interpolate(yo)},l.clamp=function(e){return arguments.length?(i=e,a()):i},l.interpolate=function(e){return arguments.length?(r=e,a()):r},l.ticks=function(e){return As(t,e)},l.tickFormat=function(e,n){return Ts(t,e,n)},l.nice=function(e){return Cs(t,e),a()},l.copy=function(){return e(t,n,r,i)},a()}([0,1],[0,1],ro,!1)};var Ps={s:1,g:1,p:1,r:1,e:1};function Os(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}o.scale.log=function(){return function e(t,n,r,i){function s(e){return(r?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(n)}function a(e){return r?Math.pow(n,e):-Math.pow(n,-e)}function l(e){return t(s(e))}return l.invert=function(e){return a(t.invert(e))},l.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((i=e.map(Number)).map(s)),l):i},l.base=function(e){return arguments.length?(n=+e,t.domain(i.map(s)),l):n},l.nice=function(){var e=xs(i.map(s),r?Math:Is);return t.domain(e),i=e.map(a),l},l.ticks=function(){var e=ys(i),t=[],o=e[0],l=e[1],c=Math.floor(s(o)),u=Math.ceil(s(l)),h=n%1?2:n;if(isFinite(u-c)){if(r){for(;c<u;c++)for(var d=1;d<h;d++)t.push(a(c)*d);t.push(a(c))}else for(t.push(a(c));c++<u;)for(d=h-1;d>0;d--)t.push(a(c)*d);for(c=0;t[c]<o;c++);for(u=t.length;t[u-1]>l;u--);t=t.slice(c,u)}return t},l.tickFormat=function(e,t){if(!arguments.length)return Ls;arguments.length<2?t=Ls:"function"!=typeof t&&(t=o.format(t));var r=Math.max(1,n*e/l.ticks().length);return function(e){var i=e/a(Math.round(s(e)));return i*n<n-.5&&(i*=n),i<=r?t(e):""}},l.copy=function(){return e(t.copy(),n,r,i)},Ms(l,t)}(o.scale.linear().domain([0,1]),10,!0,[1,10])};var Ls=o.format(".0e"),Is={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function Ds(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}o.scale.pow=function(){return function e(t,n,r){var i=Ds(n),o=Ds(1/n);function s(e){return t(i(e))}return s.invert=function(e){return o(t.invert(e))},s.domain=function(e){return arguments.length?(t.domain((r=e.map(Number)).map(i)),s):r},s.ticks=function(e){return As(r,e)},s.tickFormat=function(e,t){return Ts(r,e,t)},s.nice=function(e){return s.domain(Cs(r,e))},s.exponent=function(e){return arguments.length?(i=Ds(n=e),o=Ds(1/n),t.domain(r.map(i)),s):n},s.copy=function(){return e(t.copy(),n,r)},Ms(s,t)}(o.scale.linear(),1,[0,1])},o.scale.sqrt=function(){return o.scale.pow().exponent(.5)},o.scale.ordinal=function(){return function e(t,n){var r,i,s;function a(e){return i[((r.get(e)||("range"===n.t?r.set(e,t.push(e)):NaN))-1)%i.length]}function l(e,n){return o.range(t.length).map((function(t){return e+n*t}))}return a.domain=function(e){if(!arguments.length)return t;t=[],r=new S;for(var i,o=-1,s=e.length;++o<s;)r.has(i=e[o])||r.set(i,t.push(i));return a[n.t].apply(a,n.a)},a.range=function(e){return arguments.length?(i=e,s=0,n={t:"range",a:arguments},a):i},a.rangePoints=function(e,r){arguments.length<2&&(r=0);var o=e[0],c=e[1],u=t.length<2?(o=(o+c)/2,0):(c-o)/(t.length-1+r);return i=l(o+u*r/2,u),s=0,n={t:"rangePoints",a:arguments},a},a.rangeRoundPoints=function(e,r){arguments.length<2&&(r=0);var o=e[0],c=e[1],u=t.length<2?(o=c=Math.round((o+c)/2),0):(c-o)/(t.length-1+r)|0;return i=l(o+Math.round(u*r/2+(c-o-(t.length-1+r)*u)/2),u),s=0,n={t:"rangeRoundPoints",a:arguments},a},a.rangeBands=function(e,r,o){arguments.length<2&&(r=0),arguments.length<3&&(o=r);var c=e[1]<e[0],u=e[c-0],h=e[1-c],d=(h-u)/(t.length-r+2*o);return i=l(u+d*o,d),c&&i.reverse(),s=d*(1-r),n={t:"rangeBands",a:arguments},a},a.rangeRoundBands=function(e,r,o){arguments.length<2&&(r=0),arguments.length<3&&(o=r);var c=e[1]<e[0],u=e[c-0],h=e[1-c],d=Math.floor((h-u)/(t.length-r+2*o));return i=l(u+Math.round((h-u-(t.length-r)*d)/2),d),c&&i.reverse(),s=Math.round(d*(1-r)),n={t:"rangeRoundBands",a:arguments},a},a.rangeBand=function(){return s},a.rangeExtent=function(){return ys(n.a[0])},a.copy=function(){return e(t,n)},a.domain(t)}([],{t:"range",a:[[]]})},o.scale.category10=function(){return o.scale.ordinal().range(Rs)},o.scale.category20=function(){return o.scale.ordinal().range(Bs)},o.scale.category20b=function(){return o.scale.ordinal().range(zs)},o.scale.category20c=function(){return o.scale.ordinal().range(Ns)};var Rs=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(ct),Bs=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(ct),zs=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(ct),Ns=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(ct);function Fs(){return 0}o.scale.quantile=function(){return function e(t,n){var r;function i(){var e=0,i=n.length;for(r=[];++e<i;)r[e-1]=o.quantile(t,e/i);return s}function s(e){if(!isNaN(e=+e))return n[o.bisect(r,e)]}return s.domain=function(e){return arguments.length?(t=e.map(_).filter(v).sort(m),i()):t},s.range=function(e){return arguments.length?(n=e,i()):n},s.quantiles=function(){return r},s.invertExtent=function(e){return(e=n.indexOf(e))<0?[NaN,NaN]:[e>0?r[e-1]:t[0],e<r.length?r[e]:t[t.length-1]]},s.copy=function(){return e(t,n)},i()}([],[])},o.scale.quantize=function(){return function e(t,n,r){var i,o;function s(e){return r[Math.max(0,Math.min(o,Math.floor(i*(e-t))))]}function a(){return i=r.length/(n-t),o=r.length-1,s}return s.domain=function(e){return arguments.length?(t=+e[0],n=+e[e.length-1],a()):[t,n]},s.range=function(e){return arguments.length?(r=e,a()):r},s.invertExtent=function(e){return[e=(e=r.indexOf(e))<0?NaN:e/i+t,e+1/i]},s.copy=function(){return e(t,n,r)},a()}(0,1,[0,1])},o.scale.threshold=function(){return function e(t,n){function r(e){if(e<=e)return n[o.bisect(t,e)]}return r.domain=function(e){return arguments.length?(t=e,r):t},r.range=function(e){return arguments.length?(n=e,r):n},r.invertExtent=function(e){return e=n.indexOf(e),[t[e-1],t[e]]},r.copy=function(){return e(t,n)},r}([.5],[0,1])},o.scale.identity=function(){return function e(t){function n(e){return+e}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=e.map(n),n):t},n.ticks=function(e){return As(t,e)},n.tickFormat=function(e,n){return Ts(t,e,n)},n.copy=function(){return e(t)},n}([0,1])},o.svg={},o.svg.arc=function(){var e=qs,t=Hs,n=Fs,r=Us,i=Ws,o=Vs,s=$s;function a(){var a=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+t.apply(this,arguments)),u=i.apply(this,arguments)-Le,h=o.apply(this,arguments)-Le,d=Math.abs(h-u),p=u>h?0:1;if(c<a&&(f=c,c=a,a=f),d>=Oe)return l(c,p)+(a?l(a,1-p):"")+"Z";var f,g,m,_,v,y,b,w,x,k,E,S,M=0,C=0,j=[];if((_=(+s.apply(this,arguments)||0)/2)&&(m=r===Us?Math.sqrt(a*a+c*c):+r.apply(this,arguments),p||(C*=-1),c&&(C=Ne(m/c*Math.sin(_))),a&&(M=Ne(m/a*Math.sin(_)))),c){v=c*Math.cos(u+C),y=c*Math.sin(u+C),b=c*Math.cos(h-C),w=c*Math.sin(h-C);var A=Math.abs(h-u-2*C)<=Te?0:1;if(C&&Ks(v,y,b,w)===p^A){var T=(u+h)/2;v=c*Math.cos(T),y=c*Math.sin(T),b=w=null}}else v=y=0;if(a){x=a*Math.cos(h-M),k=a*Math.sin(h-M),E=a*Math.cos(u+M),S=a*Math.sin(u+M);var P=Math.abs(u-h+2*M)<=Te?0:1;if(M&&Ks(x,k,E,S)===1-p^P){var O=(u+h)/2;x=a*Math.cos(O),k=a*Math.sin(O),E=S=null}}else x=k=0;if(d>je&&(f=Math.min(Math.abs(c-a)/2,+n.apply(this,arguments)))>.001){g=a<c^p?0:1;var L=f,I=f;if(d<Te){var D=null==E?[x,k]:null==b?[v,y]:di([v,y],[E,S],[b,w],[x,k]),R=v-D[0],B=y-D[1],z=b-D[0],N=w-D[1],F=1/Math.sin(Math.acos((R*z+B*N)/(Math.sqrt(R*R+B*B)*Math.sqrt(z*z+N*N)))/2),U=Math.sqrt(D[0]*D[0]+D[1]*D[1]);I=Math.min(f,(a-U)/(F-1)),L=Math.min(f,(c-U)/(F+1))}if(null!=b){var q=Gs(null==E?[x,k]:[E,S],[v,y],c,L,p),H=Gs([b,w],[x,k],c,L,p);f===L?j.push("M",q[0],"A",L,",",L," 0 0,",g," ",q[1],"A",c,",",c," 0 ",1-p^Ks(q[1][0],q[1][1],H[1][0],H[1][1]),",",p," ",H[1],"A",L,",",L," 0 0,",g," ",H[0]):j.push("M",q[0],"A",L,",",L," 0 1,",g," ",H[0])}else j.push("M",v,",",y);if(null!=E){var W=Gs([v,y],[E,S],a,-I,p),V=Gs([x,k],null==b?[v,y]:[b,w],a,-I,p);f===I?j.push("L",V[0],"A",I,",",I," 0 0,",g," ",V[1],"A",a,",",a," 0 ",p^Ks(V[1][0],V[1][1],W[1][0],W[1][1]),",",1-p," ",W[1],"A",I,",",I," 0 0,",g," ",W[0]):j.push("L",V[0],"A",I,",",I," 0 0,",g," ",W[0])}else j.push("L",x,",",k)}else j.push("M",v,",",y),null!=b&&j.push("A",c,",",c," 0 ",A,",",p," ",b,",",w),j.push("L",x,",",k),null!=E&&j.push("A",a,",",a," 0 ",P,",",1-p," ",E,",",S);return j.push("Z"),j.join("")}function l(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}return a.innerRadius=function(t){return arguments.length?(e=vt(t),a):e},a.outerRadius=function(e){return arguments.length?(t=vt(e),a):t},a.cornerRadius=function(e){return arguments.length?(n=vt(e),a):n},a.padRadius=function(e){return arguments.length?(r=e==Us?Us:vt(e),a):r},a.startAngle=function(e){return arguments.length?(i=vt(e),a):i},a.endAngle=function(e){return arguments.length?(o=vt(e),a):o},a.padAngle=function(e){return arguments.length?(s=vt(e),a):s},a.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Le;return[Math.cos(r)*n,Math.sin(r)*n]},a};var Us="auto";function qs(e){return e.innerRadius}function Hs(e){return e.outerRadius}function Ws(e){return e.startAngle}function Vs(e){return e.endAngle}function $s(e){return e&&e.padAngle}function Ks(e,t,n,r){return(e-n)*t-(t-r)*e>0?0:1}function Gs(e,t,n,r,i){var o=e[0]-t[0],s=e[1]-t[1],a=(i?r:-r)/Math.sqrt(o*o+s*s),l=a*s,c=-a*o,u=e[0]+l,h=e[1]+c,d=t[0]+l,p=t[1]+c,f=(u+d)/2,g=(h+p)/2,m=d-u,_=p-h,v=m*m+_*_,y=n-r,b=u*p-d*h,w=(_<0?-1:1)*Math.sqrt(Math.max(0,y*y*v-b*b)),x=(b*_-m*w)/v,k=(-b*m-_*w)/v,E=(b*_+m*w)/v,S=(-b*m+_*w)/v,M=x-f,C=k-g,j=E-f,A=S-g;return M*M+C*C>j*j+A*A&&(x=E,k=S),[[x-l,k-c],[x*n/y,k*n/y]]}function Ys(e){var t=si,n=ai,r=Xn,i=Xs,o=i.key,s=.7;function a(o){var a,l=[],c=[],u=-1,h=o.length,d=vt(t),p=vt(n);function f(){l.push("M",i(e(c),s))}for(;++u<h;)r.call(this,a=o[u],u)?c.push([+d.call(this,a,u),+p.call(this,a,u)]):c.length&&(f(),c=[]);return c.length&&f(),l.length?l.join(""):null}return a.x=function(e){return arguments.length?(t=e,a):t},a.y=function(e){return arguments.length?(n=e,a):n},a.defined=function(e){return arguments.length?(r=e,a):r},a.interpolate=function(e){return arguments.length?(o="function"==typeof e?i=e:(i=Js.get(e)||Xs).key,a):o},a.tension=function(e){return arguments.length?(s=e,a):s},a}o.svg.line=function(){return Ys(I)};var Js=o.map({linear:Xs,"linear-closed":Qs,step:function(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];for(;++t<n;)i.push("H",(r[0]+(r=e[t])[0])/2,"V",r[1]);n>1&&i.push("H",r[0]);return i.join("")},"step-before":Zs,"step-after":ea,basis:ra,"basis-open":function(e){if(e.length<4)return Xs(e);var t,n=[],r=-1,i=e.length,o=[0],s=[0];for(;++r<3;)t=e[r],o.push(t[0]),s.push(t[1]);n.push(ia(aa,o)+","+ia(aa,s)),--r;for(;++r<i;)t=e[r],o.shift(),o.push(t[0]),s.shift(),s.push(t[1]),la(n,o,s);return n.join("")},"basis-closed":function(e){var t,n,r=-1,i=e.length,o=i+4,s=[],a=[];for(;++r<4;)n=e[r%i],s.push(n[0]),a.push(n[1]);t=[ia(aa,s),",",ia(aa,a)],--r;for(;++r<o;)n=e[r%i],s.shift(),s.push(n[0]),a.shift(),a.push(n[1]),la(t,s,a);return t.join("")},bundle:function(e,t){var n=e.length-1;if(n)for(var r,i,o=e[0][0],s=e[0][1],a=e[n][0]-o,l=e[n][1]-s,c=-1;++c<=n;)r=e[c],i=c/n,r[0]=t*r[0]+(1-t)*(o+i*a),r[1]=t*r[1]+(1-t)*(s+i*l);return ra(e)},cardinal:function(e,t){return e.length<3?Xs(e):e[0]+ta(e,na(e,t))},"cardinal-open":function(e,t){return e.length<4?Xs(e):e[1]+ta(e.slice(1,-1),na(e,t))},"cardinal-closed":function(e,t){return e.length<3?Qs(e):e[0]+ta((e.push(e[0]),e),na([e[e.length-2]].concat(e,[e[1]]),t))},monotone:function(e){return e.length<3?Xs(e):e[0]+ta(e,function(e){var t,n,r,i,o=[],s=function(e){var t=0,n=e.length-1,r=[],i=e[0],o=e[1],s=r[0]=ca(i,o);for(;++t<n;)r[t]=(s+(s=ca(i=o,o=e[t+1])))/2;return r[t]=s,r}(e),a=-1,l=e.length-1;for(;++a<l;)t=ca(e[a],e[a+1]),x(t)<je?s[a]=s[a+1]=0:(n=s[a]/t,r=s[a+1]/t,(i=n*n+r*r)>9&&(i=3*t/Math.sqrt(i),s[a]=i*n,s[a+1]=i*r));a=-1;for(;++a<=l;)i=(e[Math.min(l,a+1)][0]-e[Math.max(0,a-1)][0])/(6*(1+s[a]*s[a])),o.push([i||0,s[a]*i||0]);return o}(e))}});function Xs(e){return e.length>1?e.join("L"):e+"Z"}function Qs(e){return e.join("L")+"Z"}function Zs(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function ea(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function ta(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return Xs(e);var n=e.length!=t.length,r="",i=e[0],o=e[1],s=t[0],a=s,l=1;if(n&&(r+="Q"+(o[0]-2*s[0]/3)+","+(o[1]-2*s[1]/3)+","+o[0]+","+o[1],i=e[1],l=2),t.length>1){a=t[1],o=e[l],l++,r+="C"+(i[0]+s[0])+","+(i[1]+s[1])+","+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1];for(var c=2;c<t.length;c++,l++)o=e[l],a=t[c],r+="S"+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1]}if(n){var u=e[l];r+="Q"+(o[0]+2*a[0]/3)+","+(o[1]+2*a[1]/3)+","+u[0]+","+u[1]}return r}function na(e,t){for(var n,r=[],i=(1-t)/2,o=e[0],s=e[1],a=1,l=e.length;++a<l;)n=o,o=s,s=e[a],r.push([i*(s[0]-n[0]),i*(s[1]-n[1])]);return r}function ra(e){if(e.length<3)return Xs(e);var t=1,n=e.length,r=e[0],i=r[0],o=r[1],s=[i,i,i,(r=e[1])[0]],a=[o,o,o,r[1]],l=[i,",",o,"L",ia(aa,s),",",ia(aa,a)];for(e.push(e[n-1]);++t<=n;)r=e[t],s.shift(),s.push(r[0]),a.shift(),a.push(r[1]),la(l,s,a);return e.pop(),l.push("L",r),l.join("")}function ia(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}Js.forEach((function(e,t){t.key=e,t.closed=/-closed$/.test(e)}));var oa=[0,2/3,1/3,0],sa=[0,1/3,2/3,0],aa=[0,1/6,2/3,1/6];function la(e,t,n){e.push("C",ia(oa,t),",",ia(oa,n),",",ia(sa,t),",",ia(sa,n),",",ia(aa,t),",",ia(aa,n))}function ca(e,t){return(t[1]-e[1])/(t[0]-e[0])}function ua(e){for(var t,n,r,i=-1,o=e.length;++i<o;)n=(t=e[i])[0],r=t[1]-Le,t[0]=n*Math.cos(r),t[1]=n*Math.sin(r);return e}function ha(e){var t=si,n=si,r=0,i=ai,o=Xn,s=Xs,a=s.key,l=s,c="L",u=.7;function h(a){var h,d,p,f=[],g=[],m=[],_=-1,v=a.length,y=vt(t),b=vt(r),w=t===n?function(){return d}:vt(n),x=r===i?function(){return p}:vt(i);function k(){f.push("M",s(e(m),u),c,l(e(g.reverse()),u),"Z")}for(;++_<v;)o.call(this,h=a[_],_)?(g.push([d=+y.call(this,h,_),p=+b.call(this,h,_)]),m.push([+w.call(this,h,_),+x.call(this,h,_)])):g.length&&(k(),g=[],m=[]);return g.length&&k(),f.length?f.join(""):null}return h.x=function(e){return arguments.length?(t=n=e,h):n},h.x0=function(e){return arguments.length?(t=e,h):t},h.x1=function(e){return arguments.length?(n=e,h):n},h.y=function(e){return arguments.length?(r=i=e,h):i},h.y0=function(e){return arguments.length?(r=e,h):r},h.y1=function(e){return arguments.length?(i=e,h):i},h.defined=function(e){return arguments.length?(o=e,h):o},h.interpolate=function(e){return arguments.length?(a="function"==typeof e?s=e:(s=Js.get(e)||Xs).key,l=s.reverse||s,c=s.closed?"M":"L",h):a},h.tension=function(e){return arguments.length?(u=e,h):u},h}function da(e){return e.radius}function pa(e){return[e.x,e.y]}function fa(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]-Le;return[n*Math.cos(r),n*Math.sin(r)]}}function ga(){return 64}function ma(){return"circle"}function _a(e){var t=Math.sqrt(e/Te);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}o.svg.line.radial=function(){var e=Ys(ua);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},Zs.reverse=ea,ea.reverse=Zs,o.svg.area=function(){return ha(I)},o.svg.area.radial=function(){var e=ha(ua);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},o.svg.chord=function(){var e=$r,t=Kr,n=da,r=Ws,i=Vs;function o(n,r){var i,o,c=s(this,e,n,r),u=s(this,t,n,r);return"M"+c.p0+a(c.r,c.p1,c.a1-c.a0)+(o=u,((i=c).a0==o.a0&&i.a1==o.a1?l(c.r,c.p1,c.r,c.p0):l(c.r,c.p1,u.r,u.p0)+a(u.r,u.p1,u.a1-u.a0)+l(u.r,u.p1,c.r,c.p0))+"Z")}function s(e,t,o,s){var a=t.call(e,o,s),l=n.call(e,a,s),c=r.call(e,a,s)-Le,u=i.call(e,a,s)-Le;return{r:l,a0:c,a1:u,p0:[l*Math.cos(c),l*Math.sin(c)],p1:[l*Math.cos(u),l*Math.sin(u)]}}function a(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Te)+",1 "+t}function l(e,t,n,r){return"Q 0,0 "+r}return o.radius=function(e){return arguments.length?(n=vt(e),o):n},o.source=function(t){return arguments.length?(e=vt(t),o):e},o.target=function(e){return arguments.length?(t=vt(e),o):t},o.startAngle=function(e){return arguments.length?(r=vt(e),o):r},o.endAngle=function(e){return arguments.length?(i=vt(e),o):i},o},o.svg.diagonal=function(){var e=$r,t=Kr,n=pa;function r(r,i){var o=e.call(this,r,i),s=t.call(this,r,i),a=(o.y+s.y)/2,l=[o,{x:o.x,y:a},{x:s.x,y:a},s];return"M"+(l=l.map(n))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return r.source=function(t){return arguments.length?(e=vt(t),r):e},r.target=function(e){return arguments.length?(t=vt(e),r):t},r.projection=function(e){return arguments.length?(n=e,r):n},r},o.svg.diagonal.radial=function(){var e=o.svg.diagonal(),t=pa,n=e.projection;return e.projection=function(e){return arguments.length?n(fa(t=e)):t},e},o.svg.symbol=function(){var e=ma,t=ga;function n(n,r){return(va.get(e.call(this,n,r))||_a)(t.call(this,n,r))}return n.type=function(t){return arguments.length?(e=vt(t),n):e},n.size=function(e){return arguments.length?(t=vt(e),n):t},n};var va=o.map({circle:_a,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*ba)),n=t*ba;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/ya),n=t*ya/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/ya),n=t*ya/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});o.svg.symbolTypes=va.keys();var ya=Math.sqrt(3),ba=Math.tan(30*Ie);J.transition=function(e){for(var t,n,r=Ea||++Ca,i=Ta(e),o=[],s=Sa||{time:Date.now(),ease:fo,delay:0,duration:250},a=-1,l=this.length;++a<l;){o.push(t=[]);for(var c=this[a],u=-1,h=c.length;++u<h;)(n=c[u])&&Pa(n,u,i,r,s),t.push(n)}return ka(o,i,r)},J.interrupt=function(e){return this.each(null==e?wa:xa(Ta(e)))};var wa=xa(Ta());function xa(e){return function(){var t,n,r;(t=this[e])&&(r=t[n=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[n]:delete this[e],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function ka(e,t,n){return V(e,Ma),e.namespace=t,e.id=n,e}var Ea,Sa,Ma=[],Ca=0;function ja(e,t,n,r){var i=e.id,o=e.namespace;return fe(e,"function"==typeof n?function(e,s,a){e[o][i].tween.set(t,r(n.call(e,e.__data__,s,a)))}:(n=r(n),function(e){e[o][i].tween.set(t,n)}))}function Aa(e){return null==e&&(e=""),function(){this.textContent=e}}function Ta(e){return null==e?"__transition__":"__transition_"+e+"__"}function Pa(e,t,n,r,i){var o,s,a,l,c,u=e[n]||(e[n]={active:0,count:0}),h=u[r];function d(n){var i=u.active,d=u[i];for(var f in d&&(d.timer.c=null,d.timer.t=NaN,--u.count,delete u[i],d.event&&d.event.interrupt.call(e,e.__data__,d.index)),u)if(+f<r){var g=u[f];g.timer.c=null,g.timer.t=NaN,--u.count,delete u[f]}s.c=p,Mt((function(){return s.c&&p(n||1)&&(s.c=null,s.t=NaN),1}),0,o),u.active=r,h.event&&h.event.start.call(e,e.__data__,t),c=[],h.tween.forEach((function(n,r){(r=r.call(e,e.__data__,t))&&c.push(r)})),l=h.ease,a=h.duration}function p(i){for(var o=i/a,s=l(o),d=c.length;d>0;)c[--d].call(e,s);if(o>=1)return h.event&&h.event.end.call(e,e.__data__,t),--u.count?delete u[r]:delete e[n],1}h||(o=i.time,s=Mt((function(e){var t=h.delay;if(s.t=t+o,t<=e)return d(e-t);s.c=d}),0,o),h=u[r]={tween:new S,time:o,timer:s,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++u.count)}Ma.call=J.call,Ma.empty=J.empty,Ma.node=J.node,Ma.size=J.size,o.transition=function(e,t){return e&&e.transition?Ea?e.transition(t):e:o.selection().transition(e)},o.transition.prototype=Ma,Ma.select=function(e){var t,n,r,i=this.id,o=this.namespace,s=[];e=X(e);for(var a=-1,l=this.length;++a<l;){s.push(t=[]);for(var c=this[a],u=-1,h=c.length;++u<h;)(r=c[u])&&(n=e.call(r,r.__data__,u,a))?("__data__"in r&&(n.__data__=r.__data__),Pa(n,u,o,i,r[o][i]),t.push(n)):t.push(null)}return ka(s,o,i)},Ma.selectAll=function(e){var t,n,r,i,o,s=this.id,a=this.namespace,l=[];e=Q(e);for(var c=-1,u=this.length;++c<u;)for(var h=this[c],d=-1,p=h.length;++d<p;)if(r=h[d]){o=r[a][s],n=e.call(r,r.__data__,d,c),l.push(t=[]);for(var f=-1,g=n.length;++f<g;)(i=n[f])&&Pa(i,f,a,s,o),t.push(i)}return ka(l,a,s)},Ma.filter=function(e){var t,n,r=[];"function"!=typeof e&&(e=de(e));for(var i=0,o=this.length;i<o;i++){r.push(t=[]);for(var s,a=0,l=(s=this[i]).length;a<l;a++)(n=s[a])&&e.call(n,n.__data__,a,i)&&t.push(n)}return ka(r,this.namespace,this.id)},Ma.tween=function(e,t){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(e):fe(this,null==t?function(t){t[r][n].tween.remove(e)}:function(i){i[r][n].tween.set(e,t)})},Ma.attr=function(e,t){if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var n="transform"==e?So:ro,r=o.ns.qualify(e);function i(){this.removeAttribute(r)}function s(){this.removeAttributeNS(r.space,r.local)}function a(e){return null==e?i:(e+="",function(){var t,i=this.getAttribute(r);return i!==e&&(t=n(i,e),function(e){this.setAttribute(r,t(e))})})}function l(e){return null==e?s:(e+="",function(){var t,i=this.getAttributeNS(r.space,r.local);return i!==e&&(t=n(i,e),function(e){this.setAttributeNS(r.space,r.local,t(e))})})}return ja(this,"attr."+e,t,r.local?l:a)},Ma.attrTween=function(e,t){var n=o.ns.qualify(e);return this.tween("attr."+e,n.local?function(e,r){var i=t.call(this,e,r,this.getAttributeNS(n.space,n.local));return i&&function(e){this.setAttributeNS(n.space,n.local,i(e))}}:function(e,r){var i=t.call(this,e,r,this.getAttribute(n));return i&&function(e){this.setAttribute(n,i(e))}})},Ma.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=""),e)this.style(n,e[n],t);return this}n=""}function i(){this.style.removeProperty(e)}function o(t){return null==t?i:(t+="",function(){var r,i=u(this).getComputedStyle(this,null).getPropertyValue(e);return i!==t&&(r=ro(i,t),function(t){this.style.setProperty(e,r(t),n)})})}return ja(this,"style."+e,t,o)},Ma.styleTween=function(e,t,n){function r(r,i){var o=t.call(this,r,i,u(this).getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),n)}}return arguments.length<3&&(n=""),this.tween("style."+e,r)},Ma.text=function(e){return ja(this,"text",e,Aa)},Ma.remove=function(){var e=this.namespace;return this.each("end.transition",(function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)}))},Ma.ease=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].ease:("function"!=typeof e&&(e=o.ease.apply(o,arguments)),fe(this,(function(r){r[n][t].ease=e})))},Ma.delay=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].delay:fe(this,"function"==typeof e?function(r,i,o){r[n][t].delay=+e.call(r,r.__data__,i,o)}:(e=+e,function(r){r[n][t].delay=e}))},Ma.duration=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].duration:fe(this,"function"==typeof e?function(r,i,o){r[n][t].duration=Math.max(1,e.call(r,r.__data__,i,o))}:(e=Math.max(1,e),function(r){r[n][t].duration=e}))},Ma.each=function(e,t){var n=this.id,r=this.namespace;if(arguments.length<2){var i=Sa,s=Ea;try{Ea=n,fe(this,(function(t,i,o){Sa=t[r][n],e.call(t,t.__data__,i,o)}))}finally{Sa=i,Ea=s}}else fe(this,(function(i){var s=i[r][n];(s.event||(s.event=o.dispatch("start","end","interrupt"))).on(e,t)}));return this},Ma.transition=function(){for(var e,t,n,r=this.id,i=++Ca,o=this.namespace,s=[],a=0,l=this.length;a<l;a++){s.push(e=[]);for(var c,u=0,h=(c=this[a]).length;u<h;u++)(t=c[u])&&Pa(t,u,o,i,{time:(n=t[o][r]).time,ease:n.ease,delay:n.delay+n.duration,duration:n.duration}),e.push(t)}return ka(s,o,i)},o.svg.axis=function(){var e,t=o.scale.linear(),n=Oa,r=6,i=6,s=3,l=[10],c=null;function u(a){a.each((function(){var a,u=o.select(this),h=this.__chart__||t,d=this.__chart__=t.copy(),p=null==c?d.ticks?d.ticks.apply(d,l):d.domain():c,f=null==e?d.tickFormat?d.tickFormat.apply(d,l):I:e,g=u.selectAll(".tick").data(p,d),m=g.enter().insert("g",".domain").attr("class","tick").style("opacity",je),_=o.transition(g.exit()).style("opacity",je).remove(),v=o.transition(g.order()).style("opacity",1),y=Math.max(r,0)+s,b=bs(d),w=u.selectAll(".domain").data([0]),x=(w.enter().append("path").attr("class","domain"),o.transition(w));m.append("line"),m.append("text");var k,E,S,M,C=m.select("line"),j=v.select("line"),A=g.select("text").text(f),T=m.select("text"),P=v.select("text"),O="top"===n||"left"===n?-1:1;if("bottom"===n||"top"===n?(a=Ia,k="x",S="y",E="x2",M="y2",A.attr("dy",O<0?"0em":".71em").style("text-anchor","middle"),x.attr("d","M"+b[0]+","+O*i+"V0H"+b[1]+"V"+O*i)):(a=Da,k="y",S="x",E="y2",M="x2",A.attr("dy",".32em").style("text-anchor",O<0?"end":"start"),x.attr("d","M"+O*i+","+b[0]+"H0V"+b[1]+"H"+O*i)),C.attr(M,O*r),T.attr(S,O*y),j.attr(E,0).attr(M,O*r),P.attr(k,0).attr(S,O*y),d.rangeBand){var L=d,D=L.rangeBand()/2;h=d=function(e){return L(e)+D}}else h.rangeBand?h=d:_.call(a,d,h);m.call(a,h,d),v.call(a,d,d)}))}return u.scale=function(e){return arguments.length?(t=e,u):t},u.orient=function(e){return arguments.length?(n=e in La?e+"":Oa,u):n},u.ticks=function(){return arguments.length?(l=a(arguments),u):l},u.tickValues=function(e){return arguments.length?(c=e,u):c},u.tickFormat=function(t){return arguments.length?(e=t,u):e},u.tickSize=function(e){var t=arguments.length;return t?(r=+e,i=+arguments[t-1],u):r},u.innerTickSize=function(e){return arguments.length?(r=+e,u):r},u.outerTickSize=function(e){return arguments.length?(i=+e,u):i},u.tickPadding=function(e){return arguments.length?(s=+e,u):s},u.tickSubdivide=function(){return arguments.length&&u},u};var Oa="bottom",La={top:1,right:1,bottom:1,left:1};function Ia(e,t,n){e.attr("transform",(function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"}))}function Da(e,t,n){e.attr("transform",(function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"}))}o.svg.brush=function(){var e,t,n=H(d,"brushstart","brush","brushend"),r=null,i=null,s=[0,0],a=[0,0],l=!0,c=!0,h=Ba[0];function d(e){e.each((function(){var e=o.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",m).on("touchstart.brush",m),t=e.selectAll(".background").data([0]);t.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),e.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var n=e.selectAll(".resize").data(h,I);n.exit().remove(),n.enter().append("g").attr("class",(function(e){return"resize "+e})).style("cursor",(function(e){return Ra[e]})).append("rect").attr("x",(function(e){return/[ew]$/.test(e)?-3:null})).attr("y",(function(e){return/^[ns]/.test(e)?-3:null})).attr("width",6).attr("height",6).style("visibility","hidden"),n.style("display",d.empty()?"none":null);var s,a=o.transition(e),l=o.transition(t);r&&(s=bs(r),l.attr("x",s[0]).attr("width",s[1]-s[0]),f(a)),i&&(s=bs(i),l.attr("y",s[0]).attr("height",s[1]-s[0]),g(a)),p(a)}))}function p(e){e.selectAll(".resize").attr("transform",(function(e){return"translate("+s[+/e$/.test(e)]+","+a[+/^s/.test(e)]+")"}))}function f(e){e.select(".extent").attr("x",s[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function g(e){e.select(".extent").attr("y",a[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",a[1]-a[0])}function m(){var h,m,_=this,v=o.select(o.event.target),y=n.of(_,arguments),b=o.select(_),w=v.datum(),x=!/^(n|s)$/.test(w)&&r,k=!/^(e|w)$/.test(w)&&i,E=v.classed("extent"),S=Ee(_),M=o.mouse(_),C=o.select(u(_)).on("keydown.brush",T).on("keyup.brush",P);if(o.event.changedTouches?C.on("touchmove.brush",O).on("touchend.brush",I):C.on("mousemove.brush",O).on("mouseup.brush",I),b.interrupt().selectAll("*").interrupt(),E)M[0]=s[0]-M[0],M[1]=a[0]-M[1];else if(w){var j=+/w$/.test(w),A=+/^n/.test(w);m=[s[1-j]-M[0],a[1-A]-M[1]],M[0]=s[j],M[1]=a[A]}else o.event.altKey&&(h=M.slice());function T(){32==o.event.keyCode&&(E||(h=null,M[0]-=s[1],M[1]-=a[1],E=2),U())}function P(){32==o.event.keyCode&&2==E&&(M[0]+=s[1],M[1]+=a[1],E=0,U())}function O(){var e=o.mouse(_),t=!1;m&&(e[0]+=m[0],e[1]+=m[1]),E||(o.event.altKey?(h||(h=[(s[0]+s[1])/2,(a[0]+a[1])/2]),M[0]=s[+(e[0]<h[0])],M[1]=a[+(e[1]<h[1])]):h=null),x&&L(e,r,0)&&(f(b),t=!0),k&&L(e,i,1)&&(g(b),t=!0),t&&(p(b),y({type:"brush",mode:E?"move":"resize"}))}function L(n,r,i){var o,u,d=bs(r),p=d[0],f=d[1],g=M[i],m=i?a:s,_=m[1]-m[0];if(E&&(p-=g,f-=_+g),o=(i?c:l)?Math.max(p,Math.min(f,n[i])):n[i],E?u=(o+=g)+_:(h&&(g=Math.max(p,Math.min(f,2*h[i]-o))),g<o?(u=o,o=g):u=g),m[0]!=o||m[1]!=u)return i?t=null:e=null,m[0]=o,m[1]=u,!0}function I(){O(),b.style("pointer-events","all").selectAll(".resize").style("display",d.empty()?"none":null),o.select("body").style("cursor",null),C.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),S(),y({type:"brushend"})}b.style("pointer-events","none").selectAll(".resize").style("display",null),o.select("body").style("cursor",v.style("cursor")),y({type:"brushstart"}),O()}return d.event=function(r){r.each((function(){var r=n.of(this,arguments),i={x:s,y:a,i:e,j:t},l=this.__chart__||i;this.__chart__=i,Ea?o.select(this).transition().each("start.brush",(function(){e=l.i,t=l.j,s=l.x,a=l.y,r({type:"brushstart"})})).tween("brush:brush",(function(){var n=io(s,i.x),o=io(a,i.y);return e=t=null,function(e){s=i.x=n(e),a=i.y=o(e),r({type:"brush",mode:"resize"})}})).each("end.brush",(function(){e=i.i,t=i.j,r({type:"brush",mode:"resize"}),r({type:"brushend"})})):(r({type:"brushstart"}),r({type:"brush",mode:"resize"}),r({type:"brushend"}))}))},d.x=function(e){return arguments.length?(h=Ba[!(r=e)<<1|!i],d):r},d.y=function(e){return arguments.length?(h=Ba[!r<<1|!(i=e)],d):i},d.clamp=function(e){return arguments.length?(r&&i?(l=!!e[0],c=!!e[1]):r?l=!!e:i&&(c=!!e),d):r&&i?[l,c]:r?l:i?c:null},d.extent=function(n){var o,l,c,u,h;return arguments.length?(r&&(o=n[0],l=n[1],i&&(o=o[0],l=l[0]),e=[o,l],r.invert&&(o=r(o),l=r(l)),l<o&&(h=o,o=l,l=h),o==s[0]&&l==s[1]||(s=[o,l])),i&&(c=n[0],u=n[1],r&&(c=c[1],u=u[1]),t=[c,u],i.invert&&(c=i(c),u=i(u)),u<c&&(h=c,c=u,u=h),c==a[0]&&u==a[1]||(a=[c,u])),d):(r&&(e?(o=e[0],l=e[1]):(o=s[0],l=s[1],r.invert&&(o=r.invert(o),l=r.invert(l)),l<o&&(h=o,o=l,l=h))),i&&(t?(c=t[0],u=t[1]):(c=a[0],u=a[1],i.invert&&(c=i.invert(c),u=i.invert(u)),u<c&&(h=c,c=u,u=h))),r&&i?[[o,c],[l,u]]:r?[o,l]:i&&[c,u])},d.clear=function(){return d.empty()||(s=[0,0],a=[0,0],e=t=null),d},d.empty=function(){return!!r&&s[0]==s[1]||!!i&&a[0]==a[1]},o.rebind(d,n,"on")};var Ra={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ba=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],za=Rt.format=dn.timeFormat,Na=za.utc,Fa=Na("%Y-%m-%dT%H:%M:%S.%LZ");function Ua(e){return e.toISOString()}function qa(e,t,n){function r(t){return e(t)}function i(e,n){var r=(e[1]-e[0])/n,i=o.bisect(Wa,r);return i==Wa.length?[t.year,js(e.map((function(e){return e/31536e6})),n)[2]]:i?t[r/Wa[i-1]<Wa[i]/r?i-1:i]:[Ka,js(e,n)[2]]}return r.invert=function(t){return Ha(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(Ha)},r.nice=function(e,t){var n=r.domain(),o=ys(n),s=null==e?i(o,10):"number"==typeof e&&i(o,e);function a(n){return!isNaN(n)&&!e.range(n,Ha(+n+1),t).length}return s&&(e=s[0],t=s[1]),r.domain(xs(n,t>1?{floor:function(t){for(;a(t=e.floor(t));)t=Ha(t-1);return t},ceil:function(t){for(;a(t=e.ceil(t));)t=Ha(+t+1);return t}}:e))},r.ticks=function(e,t){var n=ys(r.domain()),o=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],Ha(+n[1]+1),t<1?1:t)},r.tickFormat=function(){return n},r.copy=function(){return qa(e.copy(),t,n)},Ms(r,e)}function Ha(e){return new Date(e)}za.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ua:Fa,Ua.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Ua.toString=Fa.toString,Rt.second=Ft((function(e){return new Bt(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))}),(function(e){return e.getSeconds()})),Rt.seconds=Rt.second.range,Rt.seconds.utc=Rt.second.utc.range,Rt.minute=Ft((function(e){return new Bt(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))}),(function(e){return e.getMinutes()})),Rt.minutes=Rt.minute.range,Rt.minutes.utc=Rt.minute.utc.range,Rt.hour=Ft((function(e){var t=e.getTimezoneOffset()/60;return new Bt(36e5*(Math.floor(e/36e5-t)+t))}),(function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))}),(function(e){return e.getHours()})),Rt.hours=Rt.hour.range,Rt.hours.utc=Rt.hour.utc.range,Rt.month=Ft((function(e){return(e=Rt.day(e)).setDate(1),e}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e){return e.getMonth()})),Rt.months=Rt.month.range,Rt.months.utc=Rt.month.utc.range;var Wa=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Va=[[Rt.second,1],[Rt.second,5],[Rt.second,15],[Rt.second,30],[Rt.minute,1],[Rt.minute,5],[Rt.minute,15],[Rt.minute,30],[Rt.hour,1],[Rt.hour,3],[Rt.hour,6],[Rt.hour,12],[Rt.day,1],[Rt.day,2],[Rt.week,1],[Rt.month,1],[Rt.month,3],[Rt.year,1]],$a=za.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",Xn]]),Ka={range:function(e,t,n){return o.range(Math.ceil(e/n)*n,+t,n).map(Ha)},floor:I,ceil:I};Va.year=Rt.year,Rt.scale=function(){return qa(o.scale.linear(),Va,$a)};var Ga=Va.map((function(e){return[e[0].utc,e[1]]})),Ya=Na.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",Xn]]);function Ja(e){return JSON.parse(e.responseText)}function Xa(e){var t=l.createRange();return t.selectNode(l.body),t.createContextualFragment(e.responseText)}Ga.year=Rt.year.utc,Rt.scale.utc=function(){return qa(o.scale.linear(),Ga,Ya)},o.text=yt((function(e){return e.responseText})),o.json=function(e,t){return bt(e,"application/json",Ja,t)},o.html=function(e,t){return bt(e,"text/html",Xa,t)},o.xml=yt((function(e){return e.responseXML})),this.d3=o,void 0===(i="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i)}()},function(e,t,n){"use strict";(function(e){n.d(t,"e",(function(){return r})),n.d(t,"p",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return a})),n.d(t,"o",(function(){return l})),n.d(t,"q",(function(){return c})),n.d(t,"t",(function(){return u})),n.d(t,"i",(function(){return h})),n.d(t,"r",(function(){return d})),n.d(t,"s",(function(){return p})),n.d(t,"k",(function(){return f})),n.d(t,"m",(function(){return g})),n.d(t,"j",(function(){return m})),n.d(t,"l",(function(){return _})),n.d(t,"g",(function(){return v})),n.d(t,"f",(function(){return y})),n.d(t,"h",(function(){return b})),n.d(t,"n",(function(){return w})),n.d(t,"b",(function(){return x}));var r="1.13.2",i="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||Function("return this")()||{},o=Array.prototype,s=Object.prototype,a="undefined"!=typeof Symbol?Symbol.prototype:null,l=o.push,c=o.slice,u=s.toString,h=s.hasOwnProperty,d="undefined"!=typeof ArrayBuffer,p="undefined"!=typeof DataView,f=Array.isArray,g=Object.keys,m=Object.create,_=d&&ArrayBuffer.isView,v=isNaN,y=isFinite,b=!{toString:null}.propertyIsEnumerable("toString"),w=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],x=Math.pow(2,53)-1}).call(this,n(17))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(237)),r(n(238)),r(n(239)),r(n(240)),r(n(241)),r(n(242)),r(n(22)),r(n(243)),r(n(244)),r(n(245)),r(n(246)),r(n(247)),r(n(248)),r(n(249)),r(n(250)),r(n(251)),r(n(252))},function(e,t,n){
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var r=n(24),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(49)),r(n(96)),r(n(457)),r(n(458)),r(n(459)),r(n(178)),r(n(460)),r(n(461)),r(n(462)),r(n(30)),r(n(176)),r(n(463)),r(n(66)),r(n(50)),r(n(464)),r(n(465)),r(n(179)),r(n(466)),r(n(180)),r(n(181)),r(n(98)),r(n(467)),r(n(97)),r(n(15))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(3),o=function(){function e(e){this.sender=e}return e.prototype.connect=function(e,t){return r.connect(this,e,t)},e.prototype.disconnect=function(e,t){return r.disconnect(this,e,t)},e.prototype.emit=function(e){r.emit(this,e)},e}();t.Signal=o,function(e){e.disconnectBetween=function(e,t){r.disconnectBetween(e,t)},e.disconnectSender=function(e){r.disconnectSender(e)},e.disconnectReceiver=function(e){r.disconnectReceiver(e)},e.disconnectAll=function(e){r.disconnectAll(e)},e.clearData=function(e){r.disconnectAll(e)},e.getExceptionHandler=function(){return r.exceptionHandler},e.setExceptionHandler=function(e){var t=r.exceptionHandler;return r.exceptionHandler=e,t}}(o=t.Signal||(t.Signal={})),t.Signal=o,function(t){t.exceptionHandler=function(e){console.error(e)},t.connect=function(e,t,i){i=i||void 0;var o=n.get(e.sender);if(o||(o=[],n.set(e.sender,o)),a(o,e,t,i))return!1;var s=i||t,l=r.get(s);l||(l=[],r.set(s,l));var c={signal:e,slot:t,thisArg:i};return o.push(c),l.push(c),!0},t.disconnect=function(e,t,i){i=i||void 0;var o=n.get(e.sender);if(!o||0===o.length)return!1;var s=a(o,e,t,i);if(!s)return!1;var l=i||t,u=r.get(l);return s.signal=null,c(o),c(u),!0},t.disconnectBetween=function(e,t){var o=n.get(e);if(o&&0!==o.length){var s=r.get(t);s&&0!==s.length&&(i.each(s,(function(t){t.signal&&t.signal.sender===e&&(t.signal=null)})),c(o),c(s))}},t.disconnectSender=function(e){var t=n.get(e);t&&0!==t.length&&(i.each(t,(function(e){if(e.signal){var t=e.thisArg||e.slot;e.signal=null,c(r.get(t))}})),c(t))},t.disconnectReceiver=function(e){var t=r.get(e);t&&0!==t.length&&(i.each(t,(function(e){if(e.signal){var t=e.signal.sender;e.signal=null,c(n.get(t))}})),c(t))},t.disconnectAll=function(e){var t=n.get(e);t&&t.length>0&&(i.each(t,(function(e){e.signal=null})),c(t));var o=r.get(e);o&&o.length>0&&(i.each(o,(function(e){e.signal=null})),c(o))},t.emit=function(e,t){var r=n.get(e.sender);if(r&&0!==r.length)for(var i=0,o=r.length;i<o;++i){var s=r[i];s.signal===e&&l(s,t)}};var n=new WeakMap,r=new WeakMap,o=new Set,s="function"==typeof requestAnimationFrame?requestAnimationFrame:e;function a(e,t,n,r){return i.find(e,(function(e){return e.signal===t&&e.slot===n&&e.thisArg===r}))}function l(e,n){var r=e.signal,i=e.slot,o=e.thisArg;try{i.call(o,r.sender,n)}catch(e){t.exceptionHandler(e)}}function c(e){0===o.size&&s(u),o.add(e)}function u(){o.forEach(h),o.clear()}function h(e){i.ArrayExt.removeAllWhere(e,d)}function d(e){return null===e.signal}}(r||(r={}))}).call(this,n(57).setImmediate)},function(e,t,n){"use strict";n.r(t),t.default={}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(473)),r(n(100)),r(n(476)),r(n(477)),r(n(478)),r(n(479)),r(n(99)),r(n(37)),r(n(480))},function(e,t,n){"use strict";(function(e,r){var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),a=n(454),l=function(){function e(e){this.type=e}return Object.defineProperty(e.prototype,"isConflatable",{get:function(){return!1},enumerable:!0,configurable:!0}),e.prototype.conflate=function(e){return!1},e}();t.Message=l;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"isConflatable",{get:function(){return!0},enumerable:!0,configurable:!0}),t.prototype.conflate=function(e){return!0},t}(l);t.ConflatableMessage=c,function(t){function n(e,t){var n=o.get(e);n&&0!==n.length?s.every(s.retro(n),(function(n){return!n||function(e,t,n){var r=!0;try{r="function"==typeof e?e(t,n):e.messageHook(t,n)}catch(e){c(e)}return r}(n,e,t)}))&&f(e,t):f(e,t)}t.sendMessage=n,t.postMessage=function(e,t){t.isConflatable&&s.some(i,(function(n){return n.handler===e&&(!!n.msg&&(n.msg.type===t.type&&(!!n.msg.isConflatable&&n.msg.conflate(t))))}))||g(e,t)},t.installMessageHook=function(e,t){var n=o.get(e);n&&-1!==n.indexOf(t)||(n?n.push(t):o.set(e,[t]))},t.removeMessageHook=function(e,t){var n=o.get(e);if(n){var r=n.indexOf(t);-1!==r&&(n[r]=null,_(n))}},t.clearData=function(e){var t=o.get(e);t&&t.length>0&&(s.ArrayExt.fill(t,null),_(t)),s.each(i,(function(t){t.handler===e&&(t.handler=null,t.msg=null)}))},t.flush=function(){h||0===u||(p(u),h=!0,m(),h=!1)},t.getExceptionHandler=function(){return c},t.setExceptionHandler=function(e){var t=c;return c=e,t};var i=new a.LinkedList,o=new WeakMap,l=new Set,c=function(e){console.error(e)},u=0,h=!1,d="function"==typeof requestAnimationFrame?requestAnimationFrame:e,p="function"==typeof cancelAnimationFrame?cancelAnimationFrame:r;function f(e,t){try{e.processMessage(t)}catch(e){c(e)}}function g(e,t){i.addLast({handler:e,msg:t}),0===u&&(u=d(m))}function m(){if(u=0,!i.isEmpty){var e={handler:null,msg:null};for(i.addLast(e);;){var t=i.removeFirst();if(t===e)return;t.handler&&t.msg&&n(t.handler,t.msg)}}}function _(e){0===l.size&&d(v),l.add(e)}function v(){l.forEach(y),l.clear()}function y(e){s.ArrayExt.removeAllWhere(e,b)}function b(e){return null===e}}(t.MessageLoop||(t.MessageLoop={}))}).call(this,n(57).setImmediate,n(57).clearImmediate)},function(e,t,n){var r;
/*!
 * jQuery JavaScript Library v3.6.0
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2021-03-02T17:08Z
 */!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,i){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,l=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},c=o.push,u=o.indexOf,h={},d=h.toString,p=h.hasOwnProperty,f=p.toString,g=f.call(Object),m={},_=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},v=function(e){return null!=e&&e===e.window},y=n.document,b={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,i,o=(n=n||y).createElement("script");if(o.text=e,t)for(r in b)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?h[d.call(e)]||"object":typeof e}var k=function(e,t){return new k.fn.init(e,t)};function E(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!_(e)&&!v(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}k.fn=k.prototype={jquery:"3.6.0",constructor:k,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(e){return this.pushStack(k.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(k.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(k.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:o.sort,splice:o.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||_(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)r=e[t],"__proto__"!==t&&s!==r&&(c&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(n=s[t],o=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,s[t]=k.extend(c,o,r)):void 0!==r&&(s[t]=r));return s},k.extend({expando:"jQuery"+("3.6.0"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==d.call(e))&&(!(t=s(e))||"function"==typeof(n=p.call(t,"constructor")&&t.constructor)&&f.call(n)===g)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){w(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(E(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(E(Object(e))?k.merge(n,"string"==typeof e?[e]:e):c.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,s=!n;i<o;i++)!t(e[i],i)!==s&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,s=[];if(E(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return l(s)},guid:1,support:m}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=o[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){h["[object "+t+"]"]=t.toLowerCase()}));var S=
/*!
 * Sizzle CSS Selector Engine v2.3.6
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://js.foundation/
 *
 * Date: 2021-02-16
 */
function(e){var t,n,r,i,o,s,a,l,c,u,h,d,p,f,g,m,_,v,y,b="sizzle"+1*new Date,w=e.document,x=0,k=0,E=le(),S=le(),M=le(),C=le(),j=function(e,t){return e===t&&(h=!0),0},A={}.hasOwnProperty,T=[],P=T.pop,O=T.push,L=T.push,I=T.slice,D=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",B="[\\x20\\t\\r\\n\\f]",z="(?:\\\\[\\da-fA-F]{1,6}"+B+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",N="\\["+B+"*("+z+")(?:"+B+"*([*^$|!~]?=)"+B+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+z+"))|)"+B+"*\\]",F=":("+z+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",U=new RegExp(B+"+","g"),q=new RegExp("^"+B+"+|((?:^|[^\\\\])(?:\\\\.)*)"+B+"+$","g"),H=new RegExp("^"+B+"*,"+B+"*"),W=new RegExp("^"+B+"*([>+~]|"+B+")"+B+"*"),V=new RegExp(B+"|>"),$=new RegExp(F),K=new RegExp("^"+z+"$"),G={ID:new RegExp("^#("+z+")"),CLASS:new RegExp("^\\.("+z+")"),TAG:new RegExp("^("+z+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+B+"*(even|odd|(([+-]|)(\\d*)n|)"+B+"*(?:([+-]|)"+B+"*(\\d+)|))"+B+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+B+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+B+"*((?:-\\d)?\\d*)"+B+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+B+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){d()},se=be((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{L.apply(T=I.call(w.childNodes),w.childNodes),T[w.childNodes.length].nodeType}catch(e){L={apply:T.length?function(e,t){O.apply(e,I.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function ae(e,t,r,i){var o,a,c,u,h,f,_,v=t&&t.ownerDocument,w=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return r;if(!i&&(d(t),t=t||p,g)){if(11!==w&&(h=Z.exec(e)))if(o=h[1]){if(9===w){if(!(c=t.getElementById(o)))return r;if(c.id===o)return r.push(c),r}else if(v&&(c=v.getElementById(o))&&y(t,c)&&c.id===o)return r.push(c),r}else{if(h[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=h[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!C[e+" "]&&(!m||!m.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(_=e,v=t,1===w&&(V.test(e)||W.test(e))){for((v=ee.test(e)&&_e(t.parentNode)||t)===t&&n.scope||((u=t.getAttribute("id"))?u=u.replace(re,ie):t.setAttribute("id",u=b)),a=(f=s(e)).length;a--;)f[a]=(u?"#"+u:":scope")+" "+ye(f[a]);_=f.join(",")}try{return L.apply(r,v.querySelectorAll(_)),r}catch(t){C(e,!0)}finally{u===b&&t.removeAttribute("id")}}}return l(e.replace(q,"$1"),t,r,i)}function le(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ce(e){return e[b]=!0,e}function ue(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function he(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function de(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return ce((function(t){return t=+t,ce((function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))}))}))}function _e(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ae.support={},o=ae.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},d=ae.setDocument=function(e){var t,i,s=e?e.ownerDocument||e:w;return s!=p&&9===s.nodeType&&s.documentElement?(f=(p=s).documentElement,g=!o(p),w!=p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ue((function(e){return f.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ue((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(p.getElementsByClassName),n.getById=ue((function(e){return f.appendChild(e).id=b,!p.getElementsByName||!p.getElementsByName(b).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},_=[],m=[],(n.qsa=Q.test(p.querySelectorAll))&&(ue((function(e){var t;f.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+B+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+B+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+b+"-]").length||m.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\["+B+"*name"+B+"*="+B+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+B+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=Q.test(v=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ue((function(e){n.disconnectedMatch=v.call(e,"*"),v.call(e,"[s!='']:x"),_.push("!=",F)})),m=m.length&&new RegExp(m.join("|")),_=_.length&&new RegExp(_.join("|")),t=Q.test(f.compareDocumentPosition),y=t||Q.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return h=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==p||e.ownerDocument==w&&y(w,e)?-1:t==p||t.ownerDocument==w&&y(w,t)?1:u?D(u,e)-D(u,t):0:4&r?-1:1)}:function(e,t){if(e===t)return h=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!i||!o)return e==p?-1:t==p?1:i?-1:o?1:u?D(u,e)-D(u,t):0;if(i===o)return de(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?de(s[r],a[r]):s[r]==w?-1:a[r]==w?1:0},p):p},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if(d(e),n.matchesSelector&&g&&!C[t+" "]&&(!_||!_.test(t))&&(!m||!m.test(t)))try{var r=v.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){C(t,!0)}return ae(t,p,null,[e]).length>0},ae.contains=function(e,t){return(e.ownerDocument||e)!=p&&d(e),y(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!=p&&d(e);var i=r.attrHandle[t.toLowerCase()],o=i&&A.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ae.escape=function(e){return(e+"").replace(re,ie)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,r=[],i=0,o=0;if(h=!n.detectDuplicates,u=!n.sortStable&&e.slice(0),e.sort(j),h){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return u=null,e},i=ae.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=ae.selectors={cacheLength:50,createPseudo:ce,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&$.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+B+")"+e+"("+B+"|$)"))&&E(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=ae.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(U," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,h,d,p,f,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,_=a&&t.nodeName.toLowerCase(),v=!l&&!a,y=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(a?d.nodeName.toLowerCase()===_:1===d.nodeType)return!1;f=g="only"===e&&!f&&"nextSibling"}return!0}if(f=[s?m.firstChild:m.lastChild],s&&v){for(y=(p=(c=(u=(h=(d=m)[b]||(d[b]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]||[])[0]===x&&c[1])&&c[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(y=p=0)||f.pop();)if(1===d.nodeType&&++y&&d===t){u[e]=[x,p,y];break}}else if(v&&(y=p=(c=(u=(h=(d=t)[b]||(d[b]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]||[])[0]===x&&c[1]),!1===y)for(;(d=++p&&d&&d[g]||(y=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==_:1!==d.nodeType)||!++y||(v&&((u=(h=d[b]||(d[b]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]=[x,y]),d!==t)););return(y-=i)===r||y%r==0&&y/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ce((function(e,n){for(var r,o=i(e,t),s=o.length;s--;)e[r=D(e,o[s])]=!(n[r]=o[s])})):function(e){return i(e,0,n)}):i}},pseudos:{not:ce((function(e){var t=[],n=[],r=a(e.replace(q,"$1"));return r[b]?ce((function(e,t,n,i){for(var o,s=r(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:ce((function(e){return function(t){return ae(e,t).length>0}})),contains:ce((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:ce((function(e){return K.test(e||"")||ae.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return J.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me((function(){return[0]})),last:me((function(e,t){return[t-1]})),eq:me((function(e,t,n){return[n<0?n+t:n]})),even:me((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:me((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:me((function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:me((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=fe(t);function ve(){}function ye(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(e,t,n){var r=t.dir,i=t.next,o=i||r,s=n&&"parentNode"===o,a=k++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||s)return e(t,n,i);return!1}:function(t,n,l){var c,u,h,d=[x,a];if(l){for(;t=t[r];)if((1===t.nodeType||s)&&e(t,n,l))return!0}else for(;t=t[r];)if(1===t.nodeType||s)if(u=(h=t[b]||(t[b]={}))[t.uniqueID]||(h[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((c=u[o])&&c[0]===x&&c[1]===a)return d[2]=c[2];if(u[o]=d,d[2]=e(t,n,l))return!0}return!1}}function we(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xe(e,t,n,r,i){for(var o,s=[],a=0,l=e.length,c=null!=t;a<l;a++)(o=e[a])&&(n&&!n(o,r,i)||(s.push(o),c&&t.push(a)));return s}function ke(e,t,n,r,i,o){return r&&!r[b]&&(r=ke(r)),i&&!i[b]&&(i=ke(i,o)),ce((function(o,s,a,l){var c,u,h,d=[],p=[],f=s.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)ae(e,t[r],n);return n}(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:xe(g,d,e,a,l),_=n?i||(o?e:f||r)?[]:s:m;if(n&&n(m,_,a,l),r)for(c=xe(_,p),r(c,[],a,l),u=c.length;u--;)(h=c[u])&&(_[p[u]]=!(m[p[u]]=h));if(o){if(i||e){if(i){for(c=[],u=_.length;u--;)(h=_[u])&&c.push(m[u]=h);i(null,_=[],c,l)}for(u=_.length;u--;)(h=_[u])&&(c=i?D(o,h):d[u])>-1&&(o[c]=!(s[c]=h))}}else _=xe(_===s?_.splice(f,_.length):_),i?i(null,s,_,l):L.apply(s,_)}))}function Ee(e){for(var t,n,i,o=e.length,s=r.relative[e[0].type],a=s||r.relative[" "],l=s?1:0,u=be((function(e){return e===t}),a,!0),h=be((function(e){return D(t,e)>-1}),a,!0),d=[function(e,n,r){var i=!s&&(r||n!==c)||((t=n).nodeType?u(e,n,r):h(e,n,r));return t=null,i}];l<o;l++)if(n=r.relative[e[l].type])d=[be(we(d),n)];else{if((n=r.filter[e[l].type].apply(null,e[l].matches))[b]){for(i=++l;i<o&&!r.relative[e[i].type];i++);return ke(l>1&&we(d),l>1&&ye(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(q,"$1"),n,l<i&&Ee(e.slice(l,i)),i<o&&Ee(e=e.slice(i)),i<o&&ye(e))}d.push(n)}return we(d)}return ve.prototype=r.filters=r.pseudos,r.setFilters=new ve,s=ae.tokenize=function(e,t){var n,i,o,s,a,l,c,u=S[e+" "];if(u)return t?0:u.slice(0);for(a=e,l=[],c=r.preFilter;a;){for(s in n&&!(i=H.exec(a))||(i&&(a=a.slice(i[0].length)||a),l.push(o=[])),n=!1,(i=W.exec(a))&&(n=i.shift(),o.push({value:n,type:i[0].replace(q," ")}),a=a.slice(n.length)),r.filter)!(i=G[s].exec(a))||c[s]&&!(i=c[s](i))||(n=i.shift(),o.push({value:n,type:s,matches:i}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ae.error(e):S(e,l).slice(0)},a=ae.compile=function(e,t){var n,i=[],o=[],a=M[e+" "];if(!a){for(t||(t=s(e)),n=t.length;n--;)(a=Ee(t[n]))[b]?i.push(a):o.push(a);(a=M(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,s,a,l,u){var h,f,m,_=0,v="0",y=o&&[],b=[],w=c,k=o||i&&r.find.TAG("*",u),E=x+=null==w?1:Math.random()||.1,S=k.length;for(u&&(c=s==p||s||u);v!==S&&null!=(h=k[v]);v++){if(i&&h){for(f=0,s||h.ownerDocument==p||(d(h),a=!g);m=e[f++];)if(m(h,s||p,a)){l.push(h);break}u&&(x=E)}n&&((h=!m&&h)&&_--,o&&y.push(h))}if(_+=v,n&&v!==_){for(f=0;m=t[f++];)m(y,b,s,a);if(o){if(_>0)for(;v--;)y[v]||b[v]||(b[v]=P.call(l));b=xe(b)}L.apply(l,b),u&&!o&&b.length>0&&_+t.length>1&&ae.uniqueSort(l)}return u&&(x=E,c=w),y};return n?ce(o):o}(o,i))).selector=e}return a},l=ae.select=function(e,t,n,i){var o,l,c,u,h,d="function"==typeof e&&e,p=!i&&s(e=d.selector||e);if(n=n||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===t.nodeType&&g&&r.relative[l[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(te,ne),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(o=G.needsContext.test(e)?0:l.length;o--&&(c=l[o],!r.relative[u=c.type]);)if((h=r.find[u])&&(i=h(c.matches[0].replace(te,ne),ee.test(l[0].type)&&_e(t.parentNode)||t))){if(l.splice(o,1),!(e=i.length&&ye(l)))return L.apply(n,i),n;break}}return(d||a(e,p))(i,t,!g,n,!t||ee.test(e)&&_e(t.parentNode)||t),n},n.sortStable=b.split("").sort(j).join("")===b,n.detectDuplicates=!!h,d(),n.sortDetached=ue((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),ue((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||he("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ue((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||he("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ue((function(e){return null==e.getAttribute("disabled")}))||he(R,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),ae}(n);k.find=S,k.expr=S.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=S.uniqueSort,k.text=S.getText,k.isXMLDoc=S.isXML,k.contains=S.contains,k.escapeSelector=S.escape;var M=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r},C=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},j=k.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var T=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(e,t,n){return _(t)?k.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?k.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?k.grep(e,(function(e){return u.call(t,e)>-1!==n})):k.filter(t,e,n)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,(function(e){return 1===e.nodeType})))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter((function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return r>1?k.uniqueSort(n):n},filter:function(e){return this.pushStack(P(this,e||[],!1))},not:function(e){return this.pushStack(P(this,e||[],!0))},is:function(e){return!!P(this,"string"==typeof e&&j.test(e)?k(e):e||[],!1).length}});var O,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||O,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:y,!0)),T.test(r[1])&&k.isPlainObject(t))for(r in t)_(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=y.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):_(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,O=k(y);var I=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};function R(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],s="string"!=typeof e&&k(e);if(!j.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(k(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return M(e,"parentNode")},parentsUntil:function(e,t,n){return M(e,"parentNode",n)},next:function(e){return R(e,"nextSibling")},prev:function(e){return R(e,"previousSibling")},nextAll:function(e){return M(e,"nextSibling")},prevAll:function(e){return M(e,"previousSibling")},nextUntil:function(e,t,n){return M(e,"nextSibling",n)},prevUntil:function(e,t,n){return M(e,"previousSibling",n)},siblings:function(e){return C((e.parentNode||{}).firstChild,e)},children:function(e){return C(e.firstChild)},contents:function(e){return null!=e.contentDocument&&s(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},(function(e,t){k.fn[e]=function(n,r){var i=k.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=k.filter(r,i)),this.length>1&&(D[e]||k.uniqueSort(i),I.test(e)&&i.reverse()),this.pushStack(i)}}));var B=/[^\x20\t\r\n\f]+/g;function z(e){return e}function N(e){throw e}function F(e,t,n,r){var i;try{e&&_(i=e.promise)?i.call(e).done(t).fail(n):e&&_(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return k.each(e.match(B)||[],(function(e,n){t[n]=!0})),t}(e):k.extend({},e);var t,n,r,i,o=[],s=[],a=-1,l=function(){for(i=i||e.once,r=t=!0;s.length;a=-1)for(n=s.shift();++a<o.length;)!1===o[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(a=o.length-1,s.push(n)),function t(n){k.each(n,(function(n,r){_(r)?e.unique&&c.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)}))}(arguments),n&&!t&&l()),this},remove:function(){return k.each(arguments,(function(e,t){for(var n;(n=k.inArray(t,o,n))>-1;)o.splice(n,1),n<=a&&a--})),this},has:function(e){return e?k.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},k.extend({Deferred:function(e){var t=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return k.Deferred((function(n){k.each(t,(function(t,r){var i=_(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&_(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,i){var o=0;function s(e,t,r,i){return function(){var a=this,l=arguments,c=function(){var n,c;if(!(e<o)){if((n=r.apply(a,l))===t.promise())throw new TypeError("Thenable self-resolution");c=n&&("object"==typeof n||"function"==typeof n)&&n.then,_(c)?i?c.call(n,s(o,t,z,i),s(o,t,N,i)):(o++,c.call(n,s(o,t,z,i),s(o,t,N,i),s(o,t,z,t.notifyWith))):(r!==z&&(a=void 0,l=[n]),(i||t.resolveWith)(a,l))}},u=i?c:function(){try{c()}catch(n){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(n,u.stackTrace),e+1>=o&&(r!==N&&(a=void 0,l=[n]),t.rejectWith(a,l))}};e?u():(k.Deferred.getStackHook&&(u.stackTrace=k.Deferred.getStackHook()),n.setTimeout(u))}}return k.Deferred((function(n){t[0][3].add(s(0,n,_(i)?i:z,n.notifyWith)),t[1][3].add(s(0,n,_(e)?e:z)),t[2][3].add(s(0,n,_(r)?r:N))})).promise()},promise:function(e){return null!=e?k.extend(e,i):i}},o={};return k.each(t,(function(e,n){var s=n[2],a=n[5];i[n[1]]=s.add,a&&s.add((function(){r=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=a.call(arguments),o=k.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?a.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(F(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||_(i[n]&&i[n].then)))return o.then();for(;n--;)F(i[n],s(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&U.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){n.setTimeout((function(){throw e}))};var q=k.Deferred();function H(){y.removeEventListener("DOMContentLoaded",H),n.removeEventListener("load",H),k.ready()}k.fn.ready=function(e){return q.then(e).catch((function(e){k.readyException(e)})),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0,!0!==e&&--k.readyWait>0||q.resolveWith(y,[k]))}}),k.ready.then=q.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?n.setTimeout(k.ready):(y.addEventListener("DOMContentLoaded",H),n.addEventListener("load",H));var W=function(e,t,n,r,i,o,s){var a=0,l=e.length,c=null==n;if("object"===x(n))for(a in i=!0,n)W(e,t,a,n[a],!0,o,s);else if(void 0!==r&&(i=!0,_(r)||(s=!0),c&&(s?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(k(e),n)})),t))for(;a<l;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:c?t.call(e):l?t(e[0],n):o},V=/^-ms-/,$=/-([a-z])/g;function K(e,t){return t.toUpperCase()}function G(e){return e.replace(V,"ms-").replace($,K)}var Y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function J(){this.expando=k.expando+J.uid++}J.uid=1,J.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Y(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[G(t)]=n;else for(r in t)i[G(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][G(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(G):(t=G(t))in r?[t]:t.match(B)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||k.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var X=new J,Q=new J,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Z.test(e)?JSON.parse(e):e)}(n)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return Q.hasData(e)||X.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return X.access(e,t,n)},_removeData:function(e,t){X.remove(e,t)}}),k.fn.extend({data:function(e,t){var n,r,i,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(i=Q.get(o),1===o.nodeType&&!X.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(r=s[n].name).indexOf("data-")&&(r=G(r.slice(5)),te(o,r,i[r]));X.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){Q.set(this,e)})):W(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=Q.get(o,e))||void 0!==(n=te(o,e))?n:void 0;this.each((function(){Q.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){Q.remove(this,e)}))}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=X.get(e,t),n&&(!r||Array.isArray(n)?r=X.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){k.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return X.get(e,n)||X.access(e,n,{empty:k.Callbacks("once memory").add((function(){X.remove(e,[t+"queue",n])}))})}}),k.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?k.queue(this[0],e):void 0===t?this:this.each((function(){var n=k.queue(this,e,t);k._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&k.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){k.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=k.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=X.get(o[s],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var ne=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,re=new RegExp("^(?:([+-])=|)("+ne+")([a-z%]*)$","i"),ie=["Top","Right","Bottom","Left"],oe=y.documentElement,se=function(e){return k.contains(e.ownerDocument,e)},ae={composed:!0};oe.getRootNode&&(se=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(ae)===e.ownerDocument});var le=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&se(e)&&"none"===k.css(e,"display")};function ce(e,t,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return k.css(e,t,"")},l=a(),c=n&&n[3]||(k.cssNumber[t]?"":"px"),u=e.nodeType&&(k.cssNumber[t]||"px"!==c&&+l)&&re.exec(k.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;s--;)k.style(e,t,u+c),(1-o)*(1-(o=a()/l||.5))<=0&&(s=0),u/=o;u*=2,k.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=u,r.end=i)),i}var ue={};function he(e){var t,n=e.ownerDocument,r=e.nodeName,i=ue[r];return i||(t=n.body.appendChild(n.createElement(r)),i=k.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),ue[r]=i,i)}function de(e,t){for(var n,r,i=[],o=0,s=e.length;o<s;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=X.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&le(r)&&(i[o]=he(r))):"none"!==n&&(i[o]="none",X.set(r,"display",n)));for(o=0;o<s;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}k.fn.extend({show:function(){return de(this,!0)},hide:function(){return de(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){le(this)?k(this).show():k(this).hide()}))}});var pe,fe,ge=/^(?:checkbox|radio)$/i,me=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,_e=/^$|^module$|\/(?:java|ecma)script/i;pe=y.createDocumentFragment().appendChild(y.createElement("div")),(fe=y.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),pe.appendChild(fe),m.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue,pe.innerHTML="<option></option>",m.option=!!pe.lastChild;var ve={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ye(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function be(e,t){for(var n=0,r=e.length;n<r;n++)X.set(e[n],"globalEval",!t||X.get(t[n],"globalEval"))}ve.tbody=ve.tfoot=ve.colgroup=ve.caption=ve.thead,ve.th=ve.td,m.option||(ve.optgroup=ve.option=[1,"<select multiple='multiple'>","</select>"]);var we=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,s,a,l,c,u,h=t.createDocumentFragment(),d=[],p=0,f=e.length;p<f;p++)if((o=e[p])||0===o)if("object"===x(o))k.merge(d,o.nodeType?[o]:o);else if(we.test(o)){for(s=s||h.appendChild(t.createElement("div")),a=(me.exec(o)||["",""])[1].toLowerCase(),l=ve[a]||ve._default,s.innerHTML=l[1]+k.htmlPrefilter(o)+l[2],u=l[0];u--;)s=s.lastChild;k.merge(d,s.childNodes),(s=h.firstChild).textContent=""}else d.push(t.createTextNode(o));for(h.textContent="",p=0;o=d[p++];)if(r&&k.inArray(o,r)>-1)i&&i.push(o);else if(c=se(o),s=ye(h.appendChild(o),"script"),c&&be(s),n)for(u=0;o=s[u++];)_e.test(o.type||"")&&n.push(o);return h}var ke=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function Se(){return!1}function Me(e,t){return e===function(){try{return y.activeElement}catch(e){}}()==("focus"===t)}function Ce(e,t,n,r,i,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)Ce(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(s=i,(i=function(e){return k().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=k.guid++)),e.each((function(){k.event.add(this,t,i,r,n)}))}function je(e,t,n){n?(X.set(e,t,!1),k.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=X.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(k.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=a.call(arguments),X.set(this,t,o),r=n(this,t),this[t](),o!==(i=X.get(this,t))||r?X.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i&&i.value}else o.length&&(X.set(this,t,{value:k.event.trigger(k.extend(o[0],k.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===X.get(e,t)&&k.event.add(e,t,Ee)}k.event={global:{},add:function(e,t,n,r,i){var o,s,a,l,c,u,h,d,p,f,g,m=X.get(e);if(Y(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(oe,i),n.guid||(n.guid=k.guid++),(l=m.events)||(l=m.events=Object.create(null)),(s=m.handle)||(s=m.handle=function(t){return void 0!==k&&k.event.triggered!==t.type?k.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(B)||[""]).length;c--;)p=g=(a=ke.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(h=k.event.special[p]||{},p=(i?h.delegateType:h.bindType)||p,h=k.event.special[p]||{},u=k.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:f.join(".")},o),(d=l[p])||((d=l[p]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,r,f,s)||e.addEventListener&&e.addEventListener(p,s)),h.add&&(h.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,u):d.push(u),k.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,s,a,l,c,u,h,d,p,f,g,m=X.hasData(e)&&X.get(e);if(m&&(l=m.events)){for(c=(t=(t||"").match(B)||[""]).length;c--;)if(p=g=(a=ke.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(h=k.event.special[p]||{},d=l[p=(r?h.delegateType:h.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)u=d[o],!i&&g!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(d.splice(o,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(e,u));s&&!d.length&&(h.teardown&&!1!==h.teardown.call(e,f,m.handle)||k.removeEvent(e,p,m.handle),delete l[p])}else for(p in l)k.event.remove(e,p+t[c],n,r,!0);k.isEmptyObject(l)&&X.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=new Array(arguments.length),l=k.event.fix(e),c=(X.get(this,"events")||Object.create(null))[l.type]||[],u=k.event.special[l.type]||{};for(a[0]=l,t=1;t<arguments.length;t++)a[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(s=k.event.handlers.call(this,l,c),t=0;(i=s[t++])&&!l.isPropagationStopped();)for(l.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a))&&!1===(l.result=r)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,r,i,o,s,a=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],s={},n=0;n<l;n++)void 0===s[i=(r=t[n]).selector+" "]&&(s[i]=r.needsContext?k(i,this).index(c)>-1:k.find(i,this,null,[c]).length),s[i]&&o.push(r);o.length&&a.push({elem:c,handlers:o})}return c=this,l<t.length&&a.push({elem:c,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(k.Event.prototype,e,{enumerable:!0,configurable:!0,get:_(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ge.test(t.type)&&t.click&&A(t,"input")&&je(t,"click",Ee),!1},trigger:function(e){var t=this||e;return ge.test(t.type)&&t.click&&A(t,"input")&&je(t,"click"),!0},_default:function(e){var t=e.target;return ge.test(t.type)&&t.click&&A(t,"input")&&X.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:Se,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Se,isPropagationStopped:Se,isImmediatePropagationStopped:Se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},(function(e,t){k.event.special[e]={setup:function(){return je(this,e,Me),!1},trigger:function(){return je(this,e),!0},_default:function(){return!0},delegateType:t}})),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){k.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||k.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),k.fn.extend({on:function(e,t,n,r){return Ce(this,e,t,n,r)},one:function(e,t,n,r){return Ce(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Se),this.each((function(){k.event.remove(this,e,n,t)}))}});var Ae=/<script|<style|<link/i,Te=/checked\s*(?:[^=]|=\s*.checked.)/i,Pe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ie(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function De(e,t){var n,r,i,o,s,a;if(1===t.nodeType){if(X.hasData(e)&&(a=X.get(e).events))for(i in X.remove(t,"handle events"),a)for(n=0,r=a[i].length;n<r;n++)k.event.add(t,i,a[i][n]);Q.hasData(e)&&(o=Q.access(e),s=k.extend({},o),Q.set(t,s))}}function Re(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ge.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Be(e,t,n,r){t=l(t);var i,o,s,a,c,u,h=0,d=e.length,p=d-1,f=t[0],g=_(f);if(g||d>1&&"string"==typeof f&&!m.checkClone&&Te.test(f))return e.each((function(i){var o=e.eq(i);g&&(t[0]=f.call(this,i,o.html())),Be(o,t,n,r)}));if(d&&(o=(i=xe(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(s=k.map(ye(i,"script"),Le)).length;h<d;h++)c=i,h!==p&&(c=k.clone(c,!0,!0),a&&k.merge(s,ye(c,"script"))),n.call(e[h],c,h);if(a)for(u=s[s.length-1].ownerDocument,k.map(s,Ie),h=0;h<a;h++)c=s[h],_e.test(c.type||"")&&!X.access(c,"globalEval")&&k.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?k._evalUrl&&!c.noModule&&k._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):w(c.textContent.replace(Pe,""),c,u))}return e}function ze(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(ye(r)),r.parentNode&&(n&&se(r)&&be(ye(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),l=se(e);if(!(m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(s=ye(a),r=0,i=(o=ye(e)).length;r<i;r++)Re(o[r],s[r]);if(t)if(n)for(o=o||ye(e),s=s||ye(a),r=0,i=o.length;r<i;r++)De(o[r],s[r]);else De(e,a);return(s=ye(a,"script")).length>0&&be(s,!l&&ye(e,"script")),a},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[X.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[X.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),k.fn.extend({detach:function(e){return ze(this,e,!0)},remove:function(e){return ze(this,e)},text:function(e){return W(this,(function(e){return void 0===e?k.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Be(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Oe(this,e).appendChild(e)}))},prepend:function(){return Be(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Oe(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Be(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Be(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return k.clone(this,e,t)}))},html:function(e){return W(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!ve[(me.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Be(this,arguments,(function(t){var n=this.parentNode;k.inArray(this,e)<0&&(k.cleanData(ye(this)),n&&n.replaceChild(t,this))}),e)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){k.fn[e]=function(e){for(var n,r=[],i=k(e),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),k(i[s])[t](n),c.apply(r,n.get());return this.pushStack(r)}}));var Ne=new RegExp("^("+ne+")(?!px)[a-z%]+$","i"),Fe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},Ue=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},qe=new RegExp(ie.join("|"),"i");function He(e,t,n){var r,i,o,s,a=e.style;return(n=n||Fe(e))&&(""!==(s=n.getPropertyValue(t)||n[t])||se(e)||(s=k.style(e,t)),!m.pixelBoxStyles()&&Ne.test(s)&&qe.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==s?s+"":s}function We(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",oe.appendChild(c).appendChild(u);var e=n.getComputedStyle(u);r="1%"!==e.top,l=12===t(e.marginLeft),u.style.right="60%",s=36===t(e.right),i=36===t(e.width),u.style.position="absolute",o=12===t(u.offsetWidth/3),oe.removeChild(c),u=null}}function t(e){return Math.round(parseFloat(e))}var r,i,o,s,a,l,c=y.createElement("div"),u=y.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===u.style.backgroundClip,k.extend(m,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),s},pixelPosition:function(){return e(),r},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,t,r,i;return null==a&&(e=y.createElement("table"),t=y.createElement("tr"),r=y.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",r.style.height="9px",r.style.display="block",oe.appendChild(e).appendChild(t).appendChild(r),i=n.getComputedStyle(t),a=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===t.offsetHeight,oe.removeChild(e)),a}}))}();var Ve=["Webkit","Moz","ms"],$e=y.createElement("div").style,Ke={};function Ge(e){var t=k.cssProps[e]||Ke[e];return t||(e in $e?e:Ke[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Ve.length;n--;)if((e=Ve[n]+t)in $e)return e}(e)||e)}var Ye=/^(none|table(?!-c[ea]).+)/,Je=/^--/,Xe={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Ze(e,t,n){var r=re.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function et(e,t,n,r,i,o){var s="width"===t?1:0,a=0,l=0;if(n===(r?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(l+=k.css(e,n+ie[s],!0,i)),r?("content"===n&&(l-=k.css(e,"padding"+ie[s],!0,i)),"margin"!==n&&(l-=k.css(e,"border"+ie[s]+"Width",!0,i))):(l+=k.css(e,"padding"+ie[s],!0,i),"padding"!==n?l+=k.css(e,"border"+ie[s]+"Width",!0,i):a+=k.css(e,"border"+ie[s]+"Width",!0,i));return!r&&o>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))||0),l}function tt(e,t,n){var r=Fe(e),i=(!m.boxSizingReliable()||n)&&"border-box"===k.css(e,"boxSizing",!1,r),o=i,s=He(e,t,r),a="offset"+t[0].toUpperCase()+t.slice(1);if(Ne.test(s)){if(!n)return s;s="auto"}return(!m.boxSizingReliable()&&i||!m.reliableTrDimensions()&&A(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===k.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===k.css(e,"boxSizing",!1,r),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+et(e,t,n||(i?"border":"content"),o,r,s)+"px"}function nt(e,t,n,r,i){return new nt.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=He(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=G(t),l=Je.test(t),c=e.style;if(l||(t=Ge(a)),s=k.cssHooks[t]||k.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:c[t];"string"===(o=typeof n)&&(i=re.exec(n))&&i[1]&&(n=ce(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=i&&i[3]||(k.cssNumber[a]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,s,a=G(t);return Je.test(t)||(t=Ge(a)),(s=k.cssHooks[t]||k.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=He(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],(function(e,t){k.cssHooks[t]={get:function(e,n,r){if(n)return!Ye.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?tt(e,t,r):Ue(e,Xe,(function(){return tt(e,t,r)}))},set:function(e,n,r){var i,o=Fe(e),s=!m.scrollboxSize()&&"absolute"===o.position,a=(s||r)&&"border-box"===k.css(e,"boxSizing",!1,o),l=r?et(e,t,r,a,o):0;return a&&s&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-et(e,t,"border",!1,o)-.5)),l&&(i=re.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=k.css(e,t)),Ze(0,n,l)}}})),k.cssHooks.marginLeft=We(m.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(He(e,"marginLeft"))||e.getBoundingClientRect().left-Ue(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),k.each({margin:"",padding:"",border:"Width"},(function(e,t){k.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+ie[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(k.cssHooks[e+t].set=Ze)})),k.fn.extend({css:function(e,t){return W(this,(function(e,t,n){var r,i,o={},s=0;if(Array.isArray(t)){for(r=Fe(e),i=t.length;s<i;s++)o[t[s]]=k.css(e,t[s],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)}),e,t,arguments.length>1)}}),k.Tween=nt,nt.prototype={constructor:nt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=nt.propHooks[this.prop];return e&&e.get?e.get(this):nt.propHooks._default.get(this)},run:function(e){var t,n=nt.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):nt.propHooks._default.set(this),this}},nt.prototype.init.prototype=nt.prototype,nt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[Ge(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},nt.propHooks.scrollTop=nt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=nt.prototype.init,k.fx.step={};var rt,it,ot=/^(?:toggle|show|hide)$/,st=/queueHooks$/;function at(){it&&(!1===y.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(at):n.setTimeout(at,k.fx.interval),k.fx.tick())}function lt(){return n.setTimeout((function(){rt=void 0})),rt=Date.now()}function ct(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ie[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(ht.tweeners[t]||[]).concat(ht.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,t,e))return r}function ht(e,t,n){var r,i,o=0,s=ht.prefilters.length,a=k.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var t=rt||lt(),n=Math.max(0,c.startTime+c.duration-t),r=1-(n/c.duration||0),o=0,s=c.tweens.length;o<s;o++)c.tweens[o].run(r);return a.notifyWith(e,[c,r,n]),r<1&&s?n:(s||a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:k.extend({},t),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},n),originalProperties:t,originalOptions:n,startTime:rt||lt(),duration:n.duration,tweens:[],createTween:function(t,n){var r=k.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(r),r},stop:function(t){var n=0,r=t?c.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)c.tweens[n].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),u=c.props;for(!function(e,t){var n,r,i,o,s;for(n in e)if(i=t[r=G(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(s=k.cssHooks[r])&&"expand"in s)for(n in o=s.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(u,c.opts.specialEasing);o<s;o++)if(r=ht.prefilters[o].call(c,e,u,c.opts))return _(r.stop)&&(k._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return k.map(u,ut,c),_(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),k.fx.timer(k.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}k.Animation=k.extend(ht,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ce(n.elem,e,re.exec(t),n),n}]},tweener:function(e,t){_(e)?(t=e,e=["*"]):e=e.match(B);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ht.tweeners[n]=ht.tweeners[n]||[],ht.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,s,a,l,c,u,h="width"in t||"height"in t,d=this,p={},f=e.style,g=e.nodeType&&le(e),m=X.get(e,"fxshow");for(r in n.queue||(null==(s=k._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always((function(){d.always((function(){s.unqueued--,k.queue(e,"fx").length||s.empty.fire()}))}))),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;g=!0}p[r]=m&&m[r]||k.style(e,r)}if((l=!k.isEmptyObject(t))||!k.isEmptyObject(p))for(r in h&&1===e.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=m&&m.display)&&(c=X.get(e,"display")),"none"===(u=k.css(e,"display"))&&(c?u=c:(de([e],!0),c=e.style.display||c,u=k.css(e,"display"),de([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===k.css(e,"float")&&(l||(d.done((function(){f.display=c})),null==c&&(u=f.display,c="none"===u?"":u)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",d.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),l=!1,p)l||(m?"hidden"in m&&(g=m.hidden):m=X.access(e,"fxshow",{display:c}),o&&(m.hidden=!g),g&&de([e],!0),d.done((function(){for(r in g||de([e]),X.remove(e,"fxshow"),p)k.style(e,r,p[r])}))),l=ut(g?m[r]:0,r,d),r in m||(m[r]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?ht.prefilters.unshift(e):ht.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||_(e)&&e,duration:e,easing:n&&t||t&&!_(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){_(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(le).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=k.isEmptyObject(e),o=k.speed(t,n,r),s=function(){var t=ht(this,k.extend({},e),o);(i||X.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=k.timers,s=X.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&st.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||k.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=X.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=k.timers,s=r?r.length:0;for(n.finish=!0,k.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),k.each(["toggle","show","hide"],(function(e,t){var n=k.fn[t];k.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ct(t,!0),e,r,i)}})),k.each({slideDown:ct("show"),slideUp:ct("hide"),slideToggle:ct("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){k.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(rt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),rt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){it||(it=!0,at())},k.fx.stop=function(){it=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(e,t){return e=k.fx&&k.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,r){var i=n.setTimeout(t,e);r.stop=function(){n.clearTimeout(i)}}))},function(){var e=y.createElement("input"),t=y.createElement("select").appendChild(y.createElement("option"));e.type="checkbox",m.checkOn=""!==e.value,m.optSelected=t.selected,(e=y.createElement("input")).value="t",e.type="radio",m.radioValue="t"===e.value}();var dt,pt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return W(this,k.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){k.removeAttr(this,e)}))}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(B);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=pt[t]||k.find.attr;pt[t]=function(e,t,r){var i,o,s=t.toLowerCase();return r||(o=pt[s],pt[s]=i,i=null!=n(e,t,r)?s:null,pt[s]=o),i}}));var ft=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function mt(e){return(e.match(B)||[]).join(" ")}function _t(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(B)||[]}k.fn.extend({prop:function(e,t){return W(this,k.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[k.propFix[e]||e]}))}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):ft.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){k.propFix[this.toLowerCase()]=this})),k.fn.extend({addClass:function(e){var t,n,r,i,o,s,a,l=0;if(_(e))return this.each((function(t){k(this).addClass(e.call(this,t,_t(this)))}));if((t=vt(e)).length)for(;n=this[l++];)if(i=_t(n),r=1===n.nodeType&&" "+mt(i)+" "){for(s=0;o=t[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=mt(r))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,s,a,l=0;if(_(e))return this.each((function(t){k(this).removeClass(e.call(this,t,_t(this)))}));if(!arguments.length)return this.attr("class","");if((t=vt(e)).length)for(;n=this[l++];)if(i=_t(n),r=1===n.nodeType&&" "+mt(i)+" "){for(s=0;o=t[s++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(a=mt(r))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):_(e)?this.each((function(n){k(this).toggleClass(e.call(this,n,_t(this),t),t)})):this.each((function(){var t,i,o,s;if(r)for(i=0,o=k(this),s=vt(e);t=s[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=_t(this))&&X.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":X.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+mt(_t(n))+" ").indexOf(t)>-1)return!0;return!1}});var yt=/\r/g;k.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=_(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,k(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=k.map(i,(function(e){return null==e?"":e+""}))),(t=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=k.valHooks[i.type]||k.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(yt,""):null==n?"":n:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:mt(k.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?o+1:i.length;for(r=o<0?l:s?o:0;r<l;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=k(n).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=k.makeArray(t),s=i.length;s--;)((r=i[s]).selected=k.inArray(k.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],(function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=k.inArray(k(e).val(),t)>-1}},m.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),m.focusin="onfocusin"in n;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,r,i){var o,s,a,l,c,u,h,d,f=[r||y],g=p.call(e,"type")?e.type:e,m=p.call(e,"namespace")?e.namespace.split("."):[];if(s=d=a=r=r||y,3!==r.nodeType&&8!==r.nodeType&&!bt.test(g+k.event.triggered)&&(g.indexOf(".")>-1&&(m=g.split("."),g=m.shift(),m.sort()),c=g.indexOf(":")<0&&"on"+g,(e=e[k.expando]?e:new k.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:k.makeArray(t,[e]),h=k.event.special[g]||{},i||!h.trigger||!1!==h.trigger.apply(r,t))){if(!i&&!h.noBubble&&!v(r)){for(l=h.delegateType||g,bt.test(l+g)||(s=s.parentNode);s;s=s.parentNode)f.push(s),a=s;a===(r.ownerDocument||y)&&f.push(a.defaultView||a.parentWindow||n)}for(o=0;(s=f[o++])&&!e.isPropagationStopped();)d=s,e.type=o>1?l:h.bindType||g,(u=(X.get(s,"events")||Object.create(null))[e.type]&&X.get(s,"handle"))&&u.apply(s,t),(u=c&&s[c])&&u.apply&&Y(s)&&(e.result=u.apply(s,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(f.pop(),t)||!Y(r)||c&&_(r[g])&&!v(r)&&((a=r[c])&&(r[c]=null),k.event.triggered=g,e.isPropagationStopped()&&d.addEventListener(g,wt),r[g](),e.isPropagationStopped()&&d.removeEventListener(g,wt),k.event.triggered=void 0,a&&(r[c]=a)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each((function(){k.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),m.focusin||k.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){k.event.simulate(t,e.target,k.event.fix(e))};k.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=X.access(r,t);i||r.addEventListener(e,n,!0),X.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=X.access(r,t)-1;i?X.access(r,t,i):(r.removeEventListener(e,n,!0),X.remove(r,t))}}}));var xt=n.location,kt={guid:Date.now()},Et=/\?/;k.parseXML=function(e){var t,r;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){}return r=t&&t.getElementsByTagName("parsererror")[0],t&&!r||k.error("Invalid XML: "+(r?k.map(r.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var St=/\[\]$/,Mt=/\r?\n/g,Ct=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;function At(e,t,n,r){var i;if(Array.isArray(t))k.each(t,(function(t,i){n||St.test(e)?r(e,i):At(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==x(t))r(e,t);else for(i in t)At(e+"["+i+"]",t[i],n,r)}k.param=function(e,t){var n,r=[],i=function(e,t){var n=_(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,(function(){i(this.name,this.value)}));else for(n in e)At(n,e[n],t,i);return r.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&jt.test(this.nodeName)&&!Ct.test(e)&&(this.checked||!ge.test(e))})).map((function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,(function(e){return{name:t.name,value:e.replace(Mt,"\r\n")}})):{name:t.name,value:n.replace(Mt,"\r\n")}})).get()}});var Tt=/%20/g,Pt=/#.*$/,Ot=/([?&])_=[^&]*/,Lt=/^(.*?):[ \t]*([^\r\n]*)$/gm,It=/^(?:GET|HEAD)$/,Dt=/^\/\//,Rt={},Bt={},zt="*/".concat("*"),Nt=y.createElement("a");function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(B)||[];if(_(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Ut(e,t,n,r){var i={},o=e===Bt;function s(a){var l;return i[a]=!0,k.each(e[a]||[],(function(e,a){var c=a(t,n,r);return"string"!=typeof c||o||i[c]?o?!(l=c):void 0:(t.dataTypes.unshift(c),s(c),!1)})),l}return s(t.dataTypes[0])||!i["*"]&&s("*")}function qt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&k.extend(!0,e,r),e}Nt.href=xt.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?qt(qt(e,k.ajaxSettings),t):qt(k.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Bt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,s,a,l,c,u,h,d,p=k.ajaxSetup({},t),f=p.context||p,g=p.context&&(f.nodeType||f.jquery)?k(f):k.event,m=k.Deferred(),_=k.Callbacks("once memory"),v=p.statusCode||{},b={},w={},x="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Lt.exec(o);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||x;return r&&r.abort(t),S(0,t),this}};if(m.promise(E),p.url=((e||p.url||xt.href)+"").replace(Dt,xt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(B)||[""],null==p.crossDomain){l=y.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Nt.protocol+"//"+Nt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=k.param(p.data,p.traditional)),Ut(Rt,p,t,E),c)return E;for(h in(u=k.event&&p.global)&&0==k.active++&&k.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!It.test(p.type),i=p.url.replace(Pt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Tt,"+")):(d=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Et.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(Ot,"$1"),d=(Et.test(i)?"&":"?")+"_="+kt.guid+++d),p.url=i+d),p.ifModified&&(k.lastModified[i]&&E.setRequestHeader("If-Modified-Since",k.lastModified[i]),k.etag[i]&&E.setRequestHeader("If-None-Match",k.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&E.setRequestHeader("Content-Type",p.contentType),E.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+zt+"; q=0.01":""):p.accepts["*"]),p.headers)E.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(f,E,p)||c))return E.abort();if(x="abort",_.add(p.complete),E.done(p.success),E.fail(p.error),r=Ut(Bt,p,t,E)){if(E.readyState=1,u&&g.trigger("ajaxSend",[E,p]),c)return E;p.async&&p.timeout>0&&(a=n.setTimeout((function(){E.abort("timeout")}),p.timeout));try{c=!1,r.send(b,S)}catch(e){if(c)throw e;S(-1,e)}}else S(-1,"No Transport");function S(e,t,s,l){var h,d,y,b,w,x=t;c||(c=!0,a&&n.clearTimeout(a),r=void 0,o=l||"",E.readyState=e>0?4:0,h=e>=200&&e<300||304===e,s&&(b=function(e,t,n){for(var r,i,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}(p,E,s)),!h&&k.inArray("script",p.dataTypes)>-1&&k.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),b=function(e,t,n,r){var i,o,s,a,l,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=c[l+" "+o]||c["* "+o]))for(i in c)if((a=i.split(" "))[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[i]:!0!==c[i]&&(o=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(p,b,E,h),h?(p.ifModified&&((w=E.getResponseHeader("Last-Modified"))&&(k.lastModified[i]=w),(w=E.getResponseHeader("etag"))&&(k.etag[i]=w)),204===e||"HEAD"===p.type?x="nocontent":304===e?x="notmodified":(x=b.state,d=b.data,h=!(y=b.error))):(y=x,!e&&x||(x="error",e<0&&(e=0))),E.status=e,E.statusText=(t||x)+"",h?m.resolveWith(f,[d,x,E]):m.rejectWith(f,[E,x,y]),E.statusCode(v),v=void 0,u&&g.trigger(h?"ajaxSuccess":"ajaxError",[E,p,h?d:y]),_.fireWith(f,[E,x]),u&&(g.trigger("ajaxComplete",[E,p]),--k.active||k.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],(function(e,t){k[t]=function(e,n,r,i){return _(n)&&(i=i||r,r=n,n=void 0),k.ajax(k.extend({url:e,type:t,dataType:i,data:n,success:r},k.isPlainObject(e)&&e))}})),k.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),k._evalUrl=function(e,t,n){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t,n)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(_(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return _(e)?this.each((function(t){k(this).wrapInner(e.call(this,t))})):this.each((function(){var t=k(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=_(e);return this.each((function(n){k(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){k(this).replaceWith(this.childNodes)})),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Ht={0:200,1223:204},Wt=k.ajaxSettings.xhr();m.cors=!!Wt&&"withCredentials"in Wt,m.ajax=Wt=!!Wt,k.ajaxTransport((function(e){var t,r;if(m.cors||Wt&&!e.crossDomain)return{send:function(i,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);t=function(e){return function(){t&&(t=r=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Ht[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),r=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),k.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),k.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=k("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),y.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Vt,$t=[],Kt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=$t.pop()||k.expando+"_"+kt.guid++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",(function(e,t,r){var i,o,s,a=!1!==e.jsonp&&(Kt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=_(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Kt,"$1"+i):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return s||k.error(i+" was not called"),s[0]},e.dataTypes[0]="json",o=n[i],n[i]=function(){s=arguments},r.always((function(){void 0===o?k(n).removeProp(i):n[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,$t.push(i)),s&&_(o)&&o(s[0]),s=o=void 0})),"script"})),m.createHTMLDocument=((Vt=y.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(m.createHTMLDocument?((r=(t=y.implementation.createHTMLDocument("")).createElement("base")).href=y.location.href,t.head.appendChild(r)):t=y),o=!n&&[],(i=T.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,s=this,a=e.indexOf(" ");return a>-1&&(r=mt(e.slice(a)),e=e.slice(0,a)),_(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),s.length>0&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,s.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)})).always(n&&function(e,t){s.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},k.expr.pseudos.animated=function(e){return k.grep(k.timers,(function(t){return e===t.elem})).length},k.offset={setOffset:function(e,t,n){var r,i,o,s,a,l,c=k.css(e,"position"),u=k(e),h={};"static"===c&&(e.style.position="relative"),a=u.offset(),o=k.css(e,"top"),l=k.css(e,"left"),("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1?(s=(r=u.position()).top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(l)||0),_(t)&&(t=t.call(e,n,k.extend({},a))),null!=t.top&&(h.top=t.top-a.top+s),null!=t.left&&(h.left=t.left-a.left+i),"using"in t?t.using.call(e,h):u.css(h)}},k.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){k.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||oe}))}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;k.fn[e]=function(r){return W(this,(function(e,r,i){var o;if(v(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),k.each(["top","left"],(function(e,t){k.cssHooks[t]=We(m.pixelPosition,(function(e,n){if(n)return n=He(e,t),Ne.test(n)?k(e).position()[t]+"px":n}))})),k.each({Height:"height",Width:"width"},(function(e,t){k.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){k.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return W(this,(function(t,n,i){var o;return v(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?k.css(t,n,a):k.style(t,n,i,a)}),t,s?i:void 0,s)}}))})),k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){k.fn[t]=function(e){return this.on(t,e)}})),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){k.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var Gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),_(e))return r=a.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(a.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=A,k.isFunction=_,k.isWindow=v,k.camelCase=G,k.type=x,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},k.trim=function(e){return null==e?"":(e+"").replace(Gt,"")},void 0===(r=function(){return k}.apply(t,[]))||(e.exports=r);var Yt=n.jQuery,Jt=n.$;return k.noConflict=function(e){return n.$===k&&(n.$=Jt),e&&n.jQuery===k&&(n.jQuery=Yt),k},void 0===i&&(n.jQuery=n.$=k),k}))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(256)),r(n(257)),r(n(258)),r(n(118)),r(n(310)),r(n(311))},function(e,t,n){var r=n(1),i=new RegExp("^(((((\\*)|(/*)|(-*))(\\s*)%([aAbBdeHIjmMLpSUwWyYZ]{1}))+)|((\\s*)%([cxX]{1})))$");e.exports={getCustomRange:function(e){var t,n=e[0],i=e[e.length-1];return t=e[0]>e[1]?r.min(e):r.max(e),[r.scale.linear().range([n,t]),r.scale.linear().range([t,i])]},deepCopy:function(e){return JSON.parse(JSON.stringify(e))},is_valid_time_format:function(e){return i.test(e)}}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(234)),r(n(157)),r(n(91)),r(n(375)),r(n(46)),r(n(160)),r(n(162)),r(n(163)),r(n(164))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(3),a=n(10),l=n(36),c=n(6),u=n(97),h=function(){function e(e){void 0===e&&(e={}),this._flags=0,this._layout=null,this._parent=null,this._disposed=new c.Signal(this),this.node=o.createNode(e),this.addClass("p-Widget")}return e.prototype.dispose=function(){this.isDisposed||(this.setFlag(e.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&e.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),c.Signal.clearData(this),a.MessageLoop.clearData(this),l.AttachedProperty.clearData(this))},Object.defineProperty(e.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this.testFlag(e.Flag.IsDisposed)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isAttached",{get:function(){return this.testFlag(e.Flag.IsAttached)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isHidden",{get:function(){return this.testFlag(e.Flag.IsHidden)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isVisible",{get:function(){return this.testFlag(e.Flag.IsVisible)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return o.titleProperty.get(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.node.id},set:function(e){this.node.id=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataset",{get:function(){return this.node.dataset},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},set:function(t){if(this._parent!==t){if(t&&this.contains(t))throw new Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){var n=new e.ChildMessage("child-removed",this);a.MessageLoop.sendMessage(this._parent,n)}if(this._parent=t,this._parent&&!this._parent.isDisposed){n=new e.ChildMessage("child-added",this);a.MessageLoop.sendMessage(this._parent,n)}this.isDisposed||a.MessageLoop.sendMessage(this,e.Msg.ParentChanged)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){return this._layout},set:function(t){if(this._layout!==t){if(this.testFlag(e.Flag.DisallowLayout))throw new Error("Cannot set widget layout.");if(this._layout)throw new Error("Cannot change widget layout.");if(t.parent)throw new Error("Cannot change layout parent.");this._layout=t,t.parent=this}},enumerable:!0,configurable:!0}),e.prototype.children=function(){return this._layout?this._layout.iter():s.empty()},e.prototype.contains=function(e){for(var t=e;t;t=t._parent)if(t===this)return!0;return!1},e.prototype.hasClass=function(e){return this.node.classList.contains(e)},e.prototype.addClass=function(e){this.node.classList.add(e)},e.prototype.removeClass=function(e){this.node.classList.remove(e)},e.prototype.toggleClass=function(e,t){return!0===t?(this.node.classList.add(e),!0):!1===t?(this.node.classList.remove(e),!1):this.node.classList.toggle(e)},e.prototype.update=function(){a.MessageLoop.postMessage(this,e.Msg.UpdateRequest)},e.prototype.fit=function(){a.MessageLoop.postMessage(this,e.Msg.FitRequest)},e.prototype.activate=function(){a.MessageLoop.postMessage(this,e.Msg.ActivateRequest)},e.prototype.close=function(){a.MessageLoop.sendMessage(this,e.Msg.CloseRequest)},e.prototype.show=function(){if(this.testFlag(e.Flag.IsHidden)&&(!this.isAttached||this.parent&&!this.parent.isVisible||a.MessageLoop.sendMessage(this,e.Msg.BeforeShow),this.clearFlag(e.Flag.IsHidden),this.removeClass("p-mod-hidden"),!this.isAttached||this.parent&&!this.parent.isVisible||a.MessageLoop.sendMessage(this,e.Msg.AfterShow),this.parent)){var t=new e.ChildMessage("child-shown",this);a.MessageLoop.sendMessage(this.parent,t)}},e.prototype.hide=function(){if(!this.testFlag(e.Flag.IsHidden)&&(!this.isAttached||this.parent&&!this.parent.isVisible||a.MessageLoop.sendMessage(this,e.Msg.BeforeHide),this.setFlag(e.Flag.IsHidden),this.addClass("p-mod-hidden"),!this.isAttached||this.parent&&!this.parent.isVisible||a.MessageLoop.sendMessage(this,e.Msg.AfterHide),this.parent)){var t=new e.ChildMessage("child-hidden",this);a.MessageLoop.sendMessage(this.parent,t)}},e.prototype.setHidden=function(e){e?this.hide():this.show()},e.prototype.testFlag=function(e){return 0!=(this._flags&e)},e.prototype.setFlag=function(e){this._flags|=e},e.prototype.clearFlag=function(e){this._flags&=~e},e.prototype.processMessage=function(t){switch(t.type){case"resize":this.notifyLayout(t),this.onResize(t);break;case"update-request":this.notifyLayout(t),this.onUpdateRequest(t);break;case"fit-request":this.notifyLayout(t),this.onFitRequest(t);break;case"before-show":this.notifyLayout(t),this.onBeforeShow(t);break;case"after-show":this.setFlag(e.Flag.IsVisible),this.notifyLayout(t),this.onAfterShow(t);break;case"before-hide":this.notifyLayout(t),this.onBeforeHide(t);break;case"after-hide":this.clearFlag(e.Flag.IsVisible),this.notifyLayout(t),this.onAfterHide(t);break;case"before-attach":this.notifyLayout(t),this.onBeforeAttach(t);break;case"after-attach":this.isHidden||this.parent&&!this.parent.isVisible||this.setFlag(e.Flag.IsVisible),this.setFlag(e.Flag.IsAttached),this.notifyLayout(t),this.onAfterAttach(t);break;case"before-detach":this.notifyLayout(t),this.onBeforeDetach(t);break;case"after-detach":this.clearFlag(e.Flag.IsVisible),this.clearFlag(e.Flag.IsAttached),this.notifyLayout(t),this.onAfterDetach(t);break;case"activate-request":this.notifyLayout(t),this.onActivateRequest(t);break;case"close-request":this.notifyLayout(t),this.onCloseRequest(t);break;case"child-added":this.notifyLayout(t),this.onChildAdded(t);break;case"child-removed":this.notifyLayout(t),this.onChildRemoved(t);break;default:this.notifyLayout(t)}},e.prototype.notifyLayout=function(e){this._layout&&this._layout.processParentMessage(e)},e.prototype.onCloseRequest=function(t){this.parent?this.parent=null:this.isAttached&&e.detach(this)},e.prototype.onResize=function(e){},e.prototype.onUpdateRequest=function(e){},e.prototype.onFitRequest=function(e){},e.prototype.onActivateRequest=function(e){},e.prototype.onBeforeShow=function(e){},e.prototype.onAfterShow=function(e){},e.prototype.onBeforeHide=function(e){},e.prototype.onAfterHide=function(e){},e.prototype.onBeforeAttach=function(e){},e.prototype.onAfterAttach=function(e){},e.prototype.onBeforeDetach=function(e){},e.prototype.onAfterDetach=function(e){},e.prototype.onChildAdded=function(e){},e.prototype.onChildRemoved=function(e){},e}();t.Widget=h,function(e){!function(e){e[e.IsDisposed=1]="IsDisposed",e[e.IsAttached=2]="IsAttached",e[e.IsHidden=4]="IsHidden",e[e.IsVisible=8]="IsVisible",e[e.DisallowLayout=16]="DisallowLayout"}(e.Flag||(e.Flag={})),function(e){e.BeforeShow=new a.Message("before-show"),e.AfterShow=new a.Message("after-show"),e.BeforeHide=new a.Message("before-hide"),e.AfterHide=new a.Message("after-hide"),e.BeforeAttach=new a.Message("before-attach"),e.AfterAttach=new a.Message("after-attach"),e.BeforeDetach=new a.Message("before-detach"),e.AfterDetach=new a.Message("after-detach"),e.ParentChanged=new a.Message("parent-changed"),e.UpdateRequest=new a.ConflatableMessage("update-request"),e.FitRequest=new a.ConflatableMessage("fit-request"),e.ActivateRequest=new a.ConflatableMessage("activate-request"),e.CloseRequest=new a.ConflatableMessage("close-request")}(e.Msg||(e.Msg={}));var t=function(e){function t(t,n){var r=e.call(this,t)||this;return r.child=n,r}return i(t,e),t}(a.Message);e.ChildMessage=t;var n=function(e){function t(t,n){var r=e.call(this,"resize")||this;return r.width=t,r.height=n,r}return i(t,e),t}(a.Message);e.ResizeMessage=n,function(e){e.UnknownSize=new e(-1,-1)}(n=e.ResizeMessage||(e.ResizeMessage={})),e.attach=function(t,n,r){if(void 0===r&&(r=null),t.parent)throw new Error("Cannot attach a child widget.");if(t.isAttached||document.body.contains(t.node))throw new Error("Widget is already attached.");if(!document.body.contains(n))throw new Error("Host is not attached.");a.MessageLoop.sendMessage(t,e.Msg.BeforeAttach),n.insertBefore(t.node,r),a.MessageLoop.sendMessage(t,e.Msg.AfterAttach)},e.detach=function(t){if(t.parent)throw new Error("Cannot detach a child widget.");if(!t.isAttached||!document.body.contains(t.node))throw new Error("Widget is not attached.");a.MessageLoop.sendMessage(t,e.Msg.BeforeDetach),t.node.parentNode.removeChild(t.node),a.MessageLoop.sendMessage(t,e.Msg.AfterDetach)}}(h=t.Widget||(t.Widget={})),t.Widget=h,function(e){e.titleProperty=new l.AttachedProperty({name:"title",create:function(e){return new u.Title({owner:e})}}),e.createNode=function(e){return e.node||document.createElement("div")}}(o||(o={}))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(450)),r(n(451)),r(n(452)),r(n(453))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(235)),r(n(253)),r(n(254)),r(n(255)),r(n(312)),r(n(318)),r(n(323)),r(n(365)),r(n(366)),r(n(367)),r(n(148)),r(n(368))},function(e,t,n){var r=n(9),i=n(1),o=n(0),s=r.WidgetView.extend({initialize:function(){this.setElement(document.createElementNS(i.ns.prefix.svg,"g")),this.d3el=i.select(this.el),s.__super__.initialize.apply(this,arguments)},render:function(){this.x_padding=0,this.y_padding=0,this.parent=this.options.parent,this.uuid=r.uuid();var e=this.set_scale_views();return this.listenTo(this.model,"scales_updated",(function(){this.set_scale_views().then(o.bind(this.draw,this))}),this),this.colors=this.model.get("colors"),this.options.clip_id&&this.model.get("apply_clip")&&this.d3el.attr("clip-path","url(#"+this.options.clip_id+")"),this.tooltip_div=i.select(document.createElement("div")).attr("class","mark_tooltip").attr("id","tooltip_"+this.uuid).style("display","none").style("opacity",0),this.bisect=i.bisector((function(e){return e})).left,this.d3el.style("display",this.model.get("visible")?"inline":"none"),this.display_el_classes=[],this.event_metadata={mouse_over:{msg_name:"hover",lookup_data:!0,hit_test:!0},legend_clicked:{msg_name:"legend_click",hit_test:!0},element_clicked:{msg_name:"element_click",lookup_data:!0,hit_test:!0},parent_clicked:{msg_name:"background_click",hit_test:!1},legend_mouse_over:{msg_name:"legend_hover",hit_test:!0}},e},set_scale_views:function(){for(var e in this.scales)this.stopListening(this.scales[e]);var t=this.model.get("scales"),n=this,i={};return o.each(t,(function(e,t){i[t]=n.create_child_view(e)})),r.resolvePromisesDict(i).then((function(e){n.scales=e,n.set_positional_scales(),n.initialize_additional_scales(),n.set_ranges(),n.trigger("mark_scales_updated")}))},set_positional_scales:function(){},initialize_additional_scales:function(){},set_internal_scales:function(){},create_listeners:function(){this.listenTo(this.model,"change:visible",this.update_visibility,this),this.listenTo(this.model,"change:selected_style",this.selected_style_updated,this),this.listenTo(this.model,"change:unselected_style",this.unselected_style_updated,this),this.parent.on("margin_updated",this.relayout,this),this.model.on_some_change(["labels","display_legend"],(function(){this.model.trigger("redraw_legend")}),this)},remove:function(){this.model.off(null,null,this),this.d3el.transition("remove").duration(0).remove(),this.tooltip_div.remove(),s.__super__.remove.apply(this)},draw_legend:function(e,t,n,r,i){return e.selectAll(".legend"+this.uuid).remove(),e.append("g").attr("transform","translate("+t+", "+n+")").attr("class","legend"+this.uuid).on("mouseover",o.bind(this.highlight_axes,this)).on("mouseout",o.bind(this.unhighlight_axes,this)).append("text").text(this.model.get("labels")[0]),[1,1]},highlight_axes:function(){o.each(this.model.get("scales"),(function(e){e.trigger("highlight_axis")}))},unhighlight_axes:function(){o.each(this.model.get("scales"),(function(e){e.trigger("unhighlight_axis")}))},relayout:function(){},invert_range:function(e,t){return[e,t]},invert_point:function(e){return[e]},invert_multi_range:function(e){return e},update_visibility:function(e,t){this.d3el.style("display",t?"inline":"none")},get_colors:function(e){this.colors=this.model.get("colors");var t=this.colors.length;return this.colors[e%t]},selected_style_updated:function(e,t){this.selected_style=t,this.clear_style(e.previous("selected_style"),this.selected_indices),this.style_updated(t,this.selected_indices)},unselected_style_updated:function(e,t){this.unselected_style=t;var n=this.selected_indices,r=n?o.range(this.model.mark_data.length).filter((function(e){return-1===n.indexOf(e)})):[];this.clear_style(e.previous("unselected_style"),r),this.style_updated(t,r)},style_updated:function(e,t){this.set_default_style(t),this.set_style_on_elements(e,t)},apply_styles:function(e){void 0!==e&&null!=e||(e=[this.selected_style,this.unselected_style]);for(var t=o.range(this.model.mark_data.length),n=0;n<e.length;n++)this.clear_style(e[n]);this.set_default_style(t),this.set_style_on_elements(this.selected_style,this.selected_indices);var r=this.selected_indices?o.difference(t,this.selected_indices):[];this.set_style_on_elements(this.unselected_style,r)},clear_style:function(e,t){},set_default_style:function(e){},set_style_on_elements:function(e,t){},compute_view_padding:function(){},show_tooltip:function(e){if(this.tooltip_view){i.mouse(this.parent.el);null!=e&&e?this.tooltip_div.style("pointer-events","all"):this.tooltip_div.style("pointer-events","none");this.tooltip_div.style(this.model.get("tooltip_style")).style("display",null);this.parent.popper.enableEventListeners(),this.move_tooltip()}},move_tooltip:function(e){this.tooltip_view&&(this.parent.popper_reference.x=i.event.clientX,this.parent.popper_reference.y=i.event.clientY,this.parent.popper.scheduleUpdate())},hide_tooltip:function(){this.parent.popper.disableEventListeners(),this.tooltip_div.style("pointer-events","none"),this.tooltip_div.style("opacity",0).style("display","none")},refresh_tooltip:function(e){var t=i.select(i.event.target);if(this.is_hover_element(t)){var n=t.data()[0],r=this.model.get_data_dict(n,n.index);this.trigger("update_tooltip",r),this.show_tooltip(e)}},create_tooltip:function(){var e=this.model.get("tooltip"),t=this;e?this.create_child_view(e).then((function(e){t.tooltip_view&&t.tooltip_view.remove(),t.tooltip_view=e,t.tooltip_div.node().appendChild(e.el),e.trigger("displayed",{add_to_dom_only:!0})})):t.tooltip_view&&t.tooltip_view.remove()},event_dispatcher:function(e,t){this.custom_msg_sender(e),void 0!==this.event_listeners[e]&&o.bind(this.event_listeners[e],this,t)()},custom_msg_sender:function(e){var t=this.event_metadata[e];if(void 0!==t){var n=null;if(t.hit_test){var r=i.select(i.event.target);if(!this.is_hover_element(r))return;n=r.data()[0],t.lookup_data&&(n=this.model.get_data_dict(n,n.index))}this.send({event:t.msg_name,data:n})}},reset_interactions:function(){this.reset_click(),this.reset_hover(),this.reset_legend_hover(),this.event_listeners.legend_clicked=function(){}},reset_click:function(){this.event_listeners.element_clicked=function(){},this.event_listeners.parent_clicked=function(){}},reset_hover:function(){this.event_listeners.mouse_over=function(){},this.event_listeners.mouse_move=function(){},this.event_listeners.mouse_out=function(){}},reset_legend_hover:function(){this.event_listeners.legend_mouse_over=function(){},this.event_listeners.legend_mouse_out=function(){}},mouse_over:function(){if(this.model.get("enable_hover")){var e=i.select(i.event.target);if(this.is_hover_element(e)){var t=e.data()[0],n=this.model.get_data_dict(t,t.index);this.trigger("update_tooltip",n),this.show_tooltip(),this.send({event:"hover",point:n})}}},mouse_out:function(){if(this.model.get("enable_hover")){var e=i.select(i.event.target);if(this.is_hover_element(e)){var t=e.data()[0],n=this.model.get_data_dict(t,t.index);this.hide_tooltip(),this.send({event:"hover",point:n})}}},mouse_move:function(){this.model.get("enable_hover")&&this.is_hover_element(i.select(i.event.target))&&this.move_tooltip()},is_hover_element:function(e){var t=this.display_el_classes.map((function(t){return e.classed(t)}));return o.compact(t).length>0}});e.exports={Mark:s}},function(e,t,n){var r=n(9),i=(n(1),n(0)),o=n(28),s="^"+n(21).version,a=o.BaseModel.extend({defaults:function(){return i.extend(o.BaseModel.prototype.defaults(),{_model_name:"MarkModel",_model_module:"bqplot",_view_module:"bqplot",_model_module_version:s,_view_module_version:s,scales:{},scales_metadata:{},preserve_domain:{},display_legend:!0,labels:[],apply_clip:!0,visible:!0,selected_style:{},unselected_style:{},selected:null,enable_hover:!0,tooltip:null,tooltip_style:{opacity:.9},interactions:{hover:"tooltip"},tooltip_location:"mouse"})},initialize:function(){a.__super__.initialize.apply(this,arguments),this.on("change:scales",this.update_scales,this),this.once("destroy",this.handle_destroy,this),this.dirty=!1,this.display_el_classes=["mark"],this.update_scales()},update_data:function(){this.update_domains(),this.trigger("data_updated")},update_domains:function(){},update_scales:function(){this.unregister_all_scales(this.previous("scales")),this.trigger("scales_updated"),this.update_domains()},unregister_all_scales:function(e){for(var t in this.dirty=!0,e)e[t].del_domain([],this.model_id+"_"+t);this.dirty=!1},handle_destroy:function(){this.unregister_all_scales(this.get("scales"))},get_key_for_dimension:function(e){var t=this.get("scales_metadata");for(var n in t)if(t[n].dimension===e)return n;return null},get_key_for_orientation:function(e){var t=this.get("scales_metadata");for(var n in t)if(t[n].orientation===e)return n;return null}},{serializers:i.extend({scales:{deserialize:r.unpack_models},tooltip:{deserialize:r.unpack_models}},o.BaseModel.serializers)});e.exports={MarkModel:a}},function(e){e.exports=JSON.parse('{"name":"bqplot","version":"0.4.0","description":"bqplot","author":{"name":"BQPlot Development team","email":"bqplot@bloomberg.net"},"license":"Apache-2.0","main":"src/index.js","repository":{"type":"git","url":"https://github.com/bloomberg/bqplot.git"},"scripts":{"build":"webpack && lessc src/bqplot.less css/bqplot.css","prepublish":"npm run build","test":"echo \\"Error: no test specified\\" && exit 1"},"devDependencies":{"css-loader":"^0.23.1","file-loader":"^0.8.5","imports-loader":"^0.6.5","json-loader":"^0.5.4","less":"^2.6.1","less-loader":"^2.2.3","rimraf":"^2.4.1","style-loader":"^0.13.1","webpack":"^1.12.14"},"dependencies":{"@jupyter-widgets/base":"^1.0.0","d3":"^3.5.16","popper.js":"^1.0.0","topojson":"^1.6.24","underscore":"^1.8.3"},"files":["dist/","css/","src/"],"jupyterlab":{"extension":"src/jupyterlab-plugin"}}')},function(e,t,n){"use strict";function r(e){return"function"==typeof e.iter?e.iter():new i(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.iter=r,t.iterKeys=function(e){return new o(e)},t.iterValues=function(e){return new s(e)},t.iterItems=function(e){return new a(e)},t.iterFn=function(e){return new l(e)},t.each=function(e,t){for(var n,i=0,o=r(e);void 0!==(n=o.next());)if(!1===t(n,i++))return},t.every=function(e,t){for(var n,i=0,o=r(e);void 0!==(n=o.next());)if(!t(n,i++))return!1;return!0},t.some=function(e,t){for(var n,i=0,o=r(e);void 0!==(n=o.next());)if(t(n,i++))return!0;return!1},t.toArray=function(e){for(var t,n=0,i=[],o=r(e);void 0!==(t=o.next());)i[n++]=t;return i},t.toObject=function(e){for(var t,n=r(e),i={};void 0!==(t=n.next());)i[t[0]]=t[1];return i};var i=function(){function e(e){this._index=0,this._source=e}return e.prototype.iter=function(){return this},e.prototype.clone=function(){var t=new e(this._source);return t._index=this._index,t},e.prototype.next=function(){if(!(this._index>=this._source.length))return this._source[this._index++]},e}();t.ArrayIterator=i;var o=function(){function e(e,t){void 0===t&&(t=Object.keys(e)),this._index=0,this._source=e,this._keys=t}return e.prototype.iter=function(){return this},e.prototype.clone=function(){var t=new e(this._source,this._keys);return t._index=this._index,t},e.prototype.next=function(){if(!(this._index>=this._keys.length)){var e=this._keys[this._index++];return e in this._source?e:this.next()}},e}();t.KeyIterator=o;var s=function(){function e(e,t){void 0===t&&(t=Object.keys(e)),this._index=0,this._source=e,this._keys=t}return e.prototype.iter=function(){return this},e.prototype.clone=function(){var t=new e(this._source,this._keys);return t._index=this._index,t},e.prototype.next=function(){if(!(this._index>=this._keys.length)){var e=this._keys[this._index++];return e in this._source?this._source[e]:this.next()}},e}();t.ValueIterator=s;var a=function(){function e(e,t){void 0===t&&(t=Object.keys(e)),this._index=0,this._source=e,this._keys=t}return e.prototype.iter=function(){return this},e.prototype.clone=function(){var t=new e(this._source,this._keys);return t._index=this._index,t},e.prototype.next=function(){if(!(this._index>=this._keys.length)){var e=this._keys[this._index++];return e in this._source?[e,this._source[e]]:this.next()}},e}();t.ItemIterator=a;var l=function(){function e(e){this._fn=e}return e.prototype.iter=function(){return this},e.prototype.clone=function(){throw new Error("An `FnIterator` cannot be cloned.")},e.prototype.next=function(){return this._fn.call(void 0)},e}();t.FnIterator=l},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";(function(e){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */
var r=n(53),i=n(260),o=n(261);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|f(t,n),i=(e=a(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|p(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t){if(u(t),e=a(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|p(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return M(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return j(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function _(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,s=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var u=-1;for(o=n;o<a;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(n+l>a&&(n=a-l),o=n;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(c(e,o+d)!==c(t,d)){h=!1;break}if(h)return o}return-1}function y(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function b(e,t,n,r){return q(F(t,e.length-n),e,n,r)}function w(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return w(e,t,n,r)}function k(e,t,n,r){return q(U(t),e,n,r)}function E(e,t,n,r){return q(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function M(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,l,c=e[i],u=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(l=(15&c)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return u(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return h(null,e)},l.allocUnsafeSlow=function(e){return h(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?M(this,0,e):g.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(r,i),u=e.slice(t,n),h=0;h<a;++h)if(c[h]!==u[h]){o=c[h],s=u[h];break}return o<s?-1:s<o?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return _(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return _(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function j(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function A(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=N(e[o]);return i}function T(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function P(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function I(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,o){return o||D(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,o){return o||D(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;n=new l(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=l.isBuffer(e)?e:F(new l(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var z=/[^+\/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(17))},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(s=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),o=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[n].concat(o).concat([i]).join("\n")}var s;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var s=e[i];"number"==typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var l,c=[],u=!1,h=-1;function d(){u&&l&&(u=!1,l.length?c=l.concat(c):h=-1,c.length&&p())}function p(){if(!u){var e=a(d);u=!0;for(var t=c.length;t;){for(l=c,c=[];++h<t;)l&&l[h].run();h=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new f(e,t)),1!==c.length||u||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){var r=n(167),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t,n){var r=n(9),i=n(0),o="^"+n(21).version,s=r.WidgetModel.extend({defaults:function(){return i.extend(r.WidgetModel.prototype.defaults(),{_model_name:"BaseModel",_model_module:"bqplot",_model_module_version:o})},get_typed_field:function(e){var t=this.get(e),n=[],r=this;return t.hasOwnProperty("type")&&t.hasOwnProperty("values")&&null!==t.values&&(n="date"===t.type?(n=this.get(e).values)[0]instanceof Array?n.map((function(e){return e.map((function(e){return r.convert_to_date(e)}))})):n.map((function(e){return r.convert_to_date(e)})):this.get(e).values),n},set_typed_field:function(e,t,n){var r=t,i={},o=this,s=this.get(e).type;(r[0]instanceof Array&&r[0][0]instanceof Date||r[0]instanceof Date)&&(s="date"),r[0]instanceof Array?"date"===s&&(r=r.map((function(e){return e.map((function(e){return o.convert_to_json(e)}))}))):"date"===s&&(r=r.map((function(e){return o.convert_to_json(e)}))),i.type=s,i.values=r,this.set(e,i,n)},get_date_elem:function(e){return this.convert_to_date(this.get(e))},set_date_elem:function(e,t){this.set(e,this.convert_to_json(t))},convert_to_date:function(e){return null==e?null:new Date(e)},convert_to_json:function(e){return null==e?null:void 0===e.toJSON?e:e.toJSON().slice(0,-1)+"000"}});e.exports={BaseModel:s}},function(e,t,n){var r=n(4).Buffer,i=n(266).Transform,o=n(268).StringDecoder;function s(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(8)(s,i),s.prototype.update=function(e,t,n){"string"==typeof e&&(e=r.from(e,t));var i=this._update(e);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{n(r)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(16),o=n(10),s=n(36),a=n(6),l=n(15),c=function(){function e(e){void 0===e&&(e={}),this._disposed=!1,this._parent=null,this._fitPolicy=e.fitPolicy||"set-min-size"}return e.prototype.dispose=function(){this._parent=null,this._disposed=!0,a.Signal.clearData(this),s.AttachedProperty.clearData(this)},Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},set:function(e){if(this._parent!==e){if(this._parent)throw new Error("Cannot change parent widget.");if(e.layout!==this)throw new Error("Invalid parent widget.");this._parent=e,this.init()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fitPolicy",{get:function(){return this._fitPolicy},set:function(e){if(this._fitPolicy!==e&&(this._fitPolicy=e,this._parent)){var t=this._parent.node.style;t.minWidth="",t.minHeight="",t.maxWidth="",t.maxHeight="",this._parent.fit()}},enumerable:!0,configurable:!0}),e.prototype.processParentMessage=function(e){switch(e.type){case"resize":this.onResize(e);break;case"update-request":this.onUpdateRequest(e);break;case"fit-request":this.onFitRequest(e);break;case"before-show":this.onBeforeShow(e);break;case"after-show":this.onAfterShow(e);break;case"before-hide":this.onBeforeHide(e);break;case"after-hide":this.onAfterHide(e);break;case"before-attach":this.onBeforeAttach(e);break;case"after-attach":this.onAfterAttach(e);break;case"before-detach":this.onBeforeDetach(e);break;case"after-detach":this.onAfterDetach(e);break;case"child-removed":this.onChildRemoved(e);break;case"child-shown":this.onChildShown(e);break;case"child-hidden":this.onChildHidden(e)}},e.prototype.init=function(){var e=this;r.each(this,(function(t){t.parent=e.parent}))},e.prototype.onResize=function(e){r.each(this,(function(e){o.MessageLoop.sendMessage(e,l.Widget.ResizeMessage.UnknownSize)}))},e.prototype.onUpdateRequest=function(e){r.each(this,(function(e){o.MessageLoop.sendMessage(e,l.Widget.ResizeMessage.UnknownSize)}))},e.prototype.onBeforeAttach=function(e){r.each(this,(function(t){o.MessageLoop.sendMessage(t,e)}))},e.prototype.onAfterAttach=function(e){r.each(this,(function(t){o.MessageLoop.sendMessage(t,e)}))},e.prototype.onBeforeDetach=function(e){r.each(this,(function(t){o.MessageLoop.sendMessage(t,e)}))},e.prototype.onAfterDetach=function(e){r.each(this,(function(t){o.MessageLoop.sendMessage(t,e)}))},e.prototype.onBeforeShow=function(e){r.each(this,(function(t){t.isHidden||o.MessageLoop.sendMessage(t,e)}))},e.prototype.onAfterShow=function(e){r.each(this,(function(t){t.isHidden||o.MessageLoop.sendMessage(t,e)}))},e.prototype.onBeforeHide=function(e){r.each(this,(function(t){t.isHidden||o.MessageLoop.sendMessage(t,e)}))},e.prototype.onAfterHide=function(e){r.each(this,(function(t){t.isHidden||o.MessageLoop.sendMessage(t,e)}))},e.prototype.onChildRemoved=function(e){this.removeWidget(e.child)},e.prototype.onFitRequest=function(e){},e.prototype.onChildShown=function(e){},e.prototype.onChildHidden=function(e){},e}();t.Layout=c,function(e){e.getHorizontalAlignment=function(e){return u.horizontalAlignmentProperty.get(e)},e.setHorizontalAlignment=function(e,t){u.horizontalAlignmentProperty.set(e,t)},e.getVerticalAlignment=function(e){return u.verticalAlignmentProperty.get(e)},e.setVerticalAlignment=function(e,t){u.verticalAlignmentProperty.set(e,t)}}(c=t.Layout||(t.Layout={})),t.Layout=c;var u,h=function(){function e(e){this._top=NaN,this._left=NaN,this._width=NaN,this._height=NaN,this._minWidth=0,this._minHeight=0,this._maxWidth=1/0,this._maxHeight=1/0,this._disposed=!1,this.widget=e,this.widget.node.style.position="absolute"}return e.prototype.dispose=function(){if(!this._disposed){this._disposed=!0;var e=this.widget.node.style;e.position="",e.top="",e.left="",e.width="",e.height=""}},Object.defineProperty(e.prototype,"minWidth",{get:function(){return this._minWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minHeight",{get:function(){return this._minHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxWidth",{get:function(){return this._maxWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxHeight",{get:function(){return this._maxHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isHidden",{get:function(){return this.widget.isHidden},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isVisible",{get:function(){return this.widget.isVisible},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isAttached",{get:function(){return this.widget.isAttached},enumerable:!0,configurable:!0}),e.prototype.fit=function(){var e=i.ElementExt.sizeLimits(this.widget.node);this._minWidth=e.minWidth,this._minHeight=e.minHeight,this._maxWidth=e.maxWidth,this._maxHeight=e.maxHeight},e.prototype.update=function(e,t,n,r){var i=Math.max(this._minWidth,Math.min(n,this._maxWidth)),s=Math.max(this._minHeight,Math.min(r,this._maxHeight));if(i<n)switch(c.getHorizontalAlignment(this.widget)){case"left":break;case"center":e+=(n-i)/2;break;case"right":e+=n-i;break;default:throw"unreachable"}if(s<r)switch(c.getVerticalAlignment(this.widget)){case"top":break;case"center":t+=(r-s)/2;break;case"bottom":t+=r-s;break;default:throw"unreachable"}var a=!1,u=this.widget.node.style;if(this._top!==t&&(this._top=t,u.top=t+"px"),this._left!==e&&(this._left=e,u.left=e+"px"),this._width!==i&&(a=!0,this._width=i,u.width=i+"px"),this._height!==s&&(a=!0,this._height=s,u.height=s+"px"),a){var h=new l.Widget.ResizeMessage(i,s);o.MessageLoop.sendMessage(this.widget,h)}},e}();t.LayoutItem=h,function(e){function t(e){e.parent&&e.parent.layout&&e.parent.update()}e.horizontalAlignmentProperty=new s.AttachedProperty({name:"horizontalAlignment",create:function(){return"center"},changed:t}),e.verticalAlignmentProperty=new s.AttachedProperty({name:"verticalAlignment",create:function(){return"top"},changed:t})}(u||(u={}))},function(e,t,n){var r=n(56),i=n(110);e.exports=n(210)?function(e,t,n){return r.setDesc(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";(function(t,r){var i=n(4).Buffer,o=t.crypto||t.msCrypto;o&&o.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var n=i.allocUnsafe(e);if(e>0)if(e>65536)for(var s=0;s<e;s+=65536)o.getRandomValues(n.slice(s,s+65536));else o.getRandomValues(n);if("function"==typeof t)return r.nextTick((function(){t(null,n)}));return n}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,n(17),n(26))},function(e,t,n){var r=n(4).Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,i=this._blockSize,o=e.length,s=this._len,a=0;a<o;){for(var l=s%i,c=Math.min(o-a,i-l),u=0;u<c;u++)n[l+u]=e[a+u];a+=c,(s+=c)%i==0&&this._update(n)}return this._len+=o,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,n){"use strict";function r(e,t,n){var r=n?" !== ":" === ",i=n?" || ":" && ",o=n?"!":"",s=n?"":"!";switch(e){case"null":return t+r+"null";case"array":return o+"Array.isArray("+t+")";case"object":return"("+o+t+i+"typeof "+t+r+'"object"'+i+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+r+'"number"'+i+s+"("+t+" % 1)"+i+t+r+t+")";default:return"typeof "+t+r+'"'+e+'"'}}e.exports={copy:function(e,t){for(var n in t=t||{},e)t[n]=e[n];return t},checkDataType:r,checkDataTypes:function(e,t){switch(e.length){case 1:return r(e[0],t,!0);default:var n="",i=o(e);for(var s in i.array&&i.object&&(n=i.null?"(":"(!"+t+" || ",n+="typeof "+t+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)n+=(n?" && ":"")+r(s,t,!0);return n}},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var n=[],r=0;r<t.length;r++){var o=t[r];(i[o]||"array"===e&&"array"===o)&&(n[n.length]=o)}if(n.length)return n}else{if(i[t])return[t];if("array"===e&&"array"===t)return["array"]}},toHash:o,getProperty:l,escapeQuotes:c,equal:n(89),ucs2length:n(332),varOccurences:function(e,t){t+="[^0-9]";var n=e.match(new RegExp(t,"g"));return n?n.length:0},varReplace:function(e,t,n){return t+="([^0-9])",n=n.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),n+"$1")},cleanUpCode:function(e){return e.replace(u,"").replace(h,"").replace(d,"if (!($1))")},finalCleanUpCode:function(e,t){var n=e.match(p);n&&2==n.length&&(e=t?e.replace(g,"").replace(m,"return data;"):e.replace(f,"").replace("return errors === 0;","validate.errors = null; return true;"));return(n=e.match(_))&&3===n.length?e.replace(v,""):e},schemaHasRules:function(e,t){if("boolean"==typeof e)return!e;for(var n in e)if(t[n])return!0},schemaHasRulesExcept:function(e,t,n){if("boolean"==typeof e)return!e&&"not"!=n;for(var r in e)if(r!=n&&t[r])return!0},toQuotedString:y,getPathExpr:function(e,t,n,r){return x(e,n?"'/' + "+t+(r?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):r?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'")},getPath:function(e,t,n){var r=y(n?"/"+k(t):l(t));return x(e,r)},getData:function(e,t,n){var r,i,o,s;if(""===e)return"rootData";if("/"==e[0]){if(!b.test(e))throw new Error("Invalid JSON-pointer: "+e);i=e,o="rootData"}else{if(!(s=e.match(w)))throw new Error("Invalid JSON-pointer: "+e);if(r=+s[1],"#"==(i=s[2])){if(r>=t)throw new Error("Cannot access property/index "+r+" levels up, current level is "+t);return n[t-r]}if(r>t)throw new Error("Cannot access data "+r+" levels up, current level is "+t);if(o="data"+(t-r||""),!i)return o}for(var a=o,c=i.split("/"),u=0;u<c.length;u++){var h=c[u];h&&(o+=l(E(h)),a+=" && "+o)}return a},unescapeFragment:function(e){return E(decodeURIComponent(e))},escapeFragment:function(e){return encodeURIComponent(k(e))},escapeJsonPointer:k};var i=o(["string","number","integer","boolean","null"]);function o(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}var s=/^[a-z$_][a-z$_0-9]*$/i,a=/'|\\/g;function l(e){return"number"==typeof e?"["+e+"]":s.test(e)?"."+e:"['"+c(e)+"']"}function c(e){return e.replace(a,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}var u=/else\s*{\s*}/g,h=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,d=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;var p=/[^v\.]errors/g,f=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,g=/var errors = 0;|var vErrors = null;/g,m=/if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/,_=/[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g,v=/if \(rootData === undefined\) rootData = data;/;function y(e){return"'"+c(e)+"'"}var b=/^\/(?:[^~]|~0|~1)*$/,w=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function x(e,t){return'""'==e?t:(e+" + "+t).replace(/' \+ '/g,"")}function k(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function E(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},function(e,t,n){var r=n(396),i=n(401);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e){this._pid=r.nextPID(),this.name=e.name,this._create=e.create,this._coerce=e.coerce||null,this._compare=e.compare||null,this._changed=e.changed||null}return e.prototype.get=function(e){var t=r.ensureMap(e);return this._pid in t?t[this._pid]:t[this._pid]=this._createValue(e)},e.prototype.set=function(e,t){var n,i=r.ensureMap(e);n=this._pid in i?i[this._pid]:i[this._pid]=this._createValue(e);var o=this._coerceValue(e,t);this._maybeNotify(e,n,i[this._pid]=o)},e.prototype.coerce=function(e){var t,n=r.ensureMap(e);t=this._pid in n?n[this._pid]:n[this._pid]=this._createValue(e);var i=this._coerceValue(e,t);this._maybeNotify(e,t,n[this._pid]=i)},e.prototype._createValue=function(e){return(0,this._create)(e)},e.prototype._coerceValue=function(e,t){var n=this._coerce;return n?n(e,t):t},e.prototype._compareValue=function(e,t){var n=this._compare;return n?n(e,t):e===t},e.prototype._maybeNotify=function(e,t,n){var r=this._changed;r&&!this._compareValue(t,n)&&r(e,t,n)},e}();t.AttachedProperty=i,function(e){e.clearData=function(e){r.ownerData.delete(e)}}(i=t.AttachedProperty||(t.AttachedProperty={})),t.AttachedProperty=i,function(e){var t;e.ownerData=new WeakMap,e.nextPID=(t=0,function(){return"pid-"+(""+Math.random()).slice(2)+"-"+t++}),e.ensureMap=function(t){var n=e.ownerData.get(t);return n||(n=Object.create(null),e.ownerData.set(t,n),n)}}(r||(r={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(53),a=n(12),l=n(106),c=n(107);t.difference=function(e,t){return e.filter((function(e){return-1===t.indexOf(e)}))},t.isEqual=function(e,t){return l(e,t)},t.assign=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.uuid=function(){return a.UUID.uuid4()};var u=function(e){function t(n,r){var i=e.call(this,n)||this;return console.warn("WrappedError has been deprecated!"),i.error_stack=r instanceof t?r.error_stack:[r],i.error_stack.push(i),i}return i(t,e),t}(Error);t.WrappedError=u,t.resolvePromisesDict=function(e){var t=Object.keys(e),n=[];return t.forEach((function(t){n.push(e[t])})),Promise.all(n).then((function(e){for(var n={},r=0;r<t.length;r++)n[t[r]]=e[r];return n}))},t.reject=function(e,t){return function(n){throw t&&console.error(new Error(e)),n}},t.put_buffers=function(e,t,n){for(var r=0;r<t.length;r++){for(var i=t[r],o=e,s=0;s<i.length-1;s++)o=o[i[s]];o[i[i.length-1]]=n[r]}},t.remove_buffers=function(e){var t=[],n=[];return{state:function e(r,i){if(r.toJSON&&(r=r.toJSON()),Array.isArray(r))for(var s=!1,a=0;a<r.length;a++){if(u=r[a])if(u instanceof ArrayBuffer||ArrayBuffer.isView(u))s||(r=r.slice(),s=!0),t.push(ArrayBuffer.isView(u)?u.buffer:u),n.push(i.concat([a])),r[a]=null;else(h=e(u,i.concat([a])))!==u&&(s||(r=r.slice(),s=!0),r[a]=h)}else if(c(r))for(var l in r){var u,h;s=!1;if(r.hasOwnProperty(l))if(u=r[l])if(u instanceof ArrayBuffer||ArrayBuffer.isView(u))s||(r=o({},r),s=!0),t.push(ArrayBuffer.isView(u)?u.buffer:u),n.push(i.concat([l])),delete r[l];else(h=e(u,i.concat([l])))!==u&&(s||(r=o({},r),s=!0),r[l]=h)}return r}(e,[]),buffers:t,buffer_paths:n}};var h=["00","01","02","03","04","05","06","07","08","09","0A","0B","0C","0D","0E","0F","10","11","12","13","14","15","16","17","18","19","1A","1B","1C","1D","1E","1F","20","21","22","23","24","25","26","27","28","29","2A","2B","2C","2D","2E","2F","30","31","32","33","34","35","36","37","38","39","3A","3B","3C","3D","3E","3F","40","41","42","43","44","45","46","47","48","49","4A","4B","4C","4D","4E","4F","50","51","52","53","54","55","56","57","58","59","5A","5B","5C","5D","5E","5F","60","61","62","63","64","65","66","67","68","69","6A","6B","6C","6D","6E","6F","70","71","72","73","74","75","76","77","78","79","7A","7B","7C","7D","7E","7F","80","81","82","83","84","85","86","87","88","89","8A","8B","8C","8D","8E","8F","90","91","92","93","94","95","96","97","98","99","9A","9B","9C","9D","9E","9F","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","AA","AB","AC","AD","AE","AF","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","BA","BB","BC","BD","BE","BF","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","CA","CB","CC","CD","CE","CF","D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","DA","DB","DC","DD","DE","DF","E0","E1","E2","E3","E4","E5","E6","E7","E8","E9","EA","EB","EC","ED","EE","EF","F0","F1","F2","F3","F4","F5","F6","F7","F8","F9","FA","FB","FC","FD","FE","FF"];t.bufferToHex=function(e){for(var t=new Uint8Array(e),n=[],r=0;r<t.length;r++)n.push(h[t[r]]);return n.join("")},t.hexToBuffer=function(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length;n+=2)t[n/2]=parseInt(e.slice(n,n+2),16);return t.buffer},t.bufferToBase64=function(e){return s.fromByteArray(new Uint8Array(e))},t.base64ToBuffer=function(e){return s.toByteArray(e).buffer}},function(e,t,n){(function(r){var i,o,s;s="object"==typeof self&&self.self==self&&self||"object"==typeof r&&r.global==r&&r,i=[n(0),n(11),t],void 0===(o=function(e,t,n){s.Backbone=function(e,t,n,r){var i=e.Backbone,o=Array.prototype.slice;t.VERSION="1.2.3",t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var s=function(e,t,r){n.each(t,(function(t,i){n[i]&&(e.prototype[i]=function(e,t,r){switch(e){case 1:return function(){return n[t](this[r])};case 2:return function(e){return n[t](this[r],e)};case 3:return function(e,i){return n[t](this[r],a(e,this),i)};case 4:return function(e,i,o){return n[t](this[r],a(e,this),i,o)};default:return function(){var e=o.call(arguments);return e.unshift(this[r]),n[t].apply(n,e)}}}(t,i,r))}))},a=function(e,t){return n.isFunction(e)?e:n.isObject(e)&&!t._isModel(e)?l(e):n.isString(e)?function(t){return t.get(e)}:e},l=function(e){var t=n.matches(e);return function(e){return t(e.attributes)}},c=t.Events={},u=/\s+/,h=function(e,t,r,i,o){var s,a=0;if(r&&"object"==typeof r){void 0!==i&&"context"in o&&void 0===o.context&&(o.context=i);for(s=n.keys(r);a<s.length;a++)t=h(e,t,s[a],r[s[a]],o)}else if(r&&u.test(r))for(s=r.split(u);a<s.length;a++)t=e(t,s[a],i,o);else t=e(t,r,i,o);return t};c.on=function(e,t,n){return d(this,e,t,n)};var d=function(e,t,n,r,i){return e._events=h(p,e._events||{},t,n,{context:r,ctx:e,listening:i}),i&&((e._listeners||(e._listeners={}))[i.id]=i),e};c.listenTo=function(e,t,r){if(!e)return this;var i=e._listenId||(e._listenId=n.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),s=o[i];if(!s){var a=this._listenId||(this._listenId=n.uniqueId("l"));s=o[i]={obj:e,objId:i,id:a,listeningTo:o,count:0}}return d(e,t,r,this,s),this};var p=function(e,t,n,r){if(n){var i=e[t]||(e[t]=[]),o=r.context,s=r.ctx,a=r.listening;a&&a.count++,i.push({callback:n,context:o,ctx:o||s,listening:a})}return e};c.off=function(e,t,n){return this._events?(this._events=h(f,this._events,e,t,{context:n,listeners:this._listeners}),this):this},c.stopListening=function(e,t,r){var i=this._listeningTo;if(!i)return this;for(var o=e?[e._listenId]:n.keys(i),s=0;s<o.length;s++){var a=i[o[s]];if(!a)break;a.obj.off(t,r,this)}return n.isEmpty(i)&&(this._listeningTo=void 0),this};var f=function(e,t,r,i){if(e){var o,s=0,a=i.context,l=i.listeners;if(t||r||a){for(var c=t?[t]:n.keys(e);s<c.length;s++){var u=e[t=c[s]];if(!u)break;for(var h=[],d=0;d<u.length;d++){var p=u[d];r&&r!==p.callback&&r!==p.callback._callback||a&&a!==p.context?h.push(p):(o=p.listening)&&0==--o.count&&(delete l[o.id],delete o.listeningTo[o.objId])}h.length?e[t]=h:delete e[t]}return n.size(e)?e:void 0}for(var f=n.keys(l);s<f.length;s++)delete l[(o=l[f[s]]).id],delete o.listeningTo[o.objId]}};c.once=function(e,t,r){var i=h(g,{},e,t,n.bind(this.off,this));return this.on(i,void 0,r)},c.listenToOnce=function(e,t,r){var i=h(g,{},t,r,n.bind(this.stopListening,this,e));return this.listenTo(e,i)};var g=function(e,t,r,i){if(r){var o=e[t]=n.once((function(){i(t,o),r.apply(this,arguments)}));o._callback=r}return e};c.trigger=function(e){if(!this._events)return this;for(var t=Math.max(0,arguments.length-1),n=Array(t),r=0;r<t;r++)n[r]=arguments[r+1];return h(m,this._events,e,void 0,n),this};var m=function(e,t,n,r){if(e){var i=e[t],o=e.all;i&&o&&(o=o.slice()),i&&_(i,r),o&&_(o,[t].concat(r))}return e},_=function(e,t){var n,r=-1,i=e.length,o=t[0],s=t[1],a=t[2];switch(t.length){case 0:for(;++r<i;)(n=e[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,s);return;case 3:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,s,a);return;default:for(;++r<i;)(n=e[r]).callback.apply(n.ctx,t);return}};c.bind=c.on,c.unbind=c.off,n.extend(t,c);var v=t.Model=function(e,t){var r=e||{};t||(t={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(r=this.parse(r,t)||{}),r=n.defaults({},r,n.result(this,"defaults")),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(v.prototype,c,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!n.iteratee(e,this)(this.attributes)},set:function(e,t,r){if(null==e)return this;var i;if("object"==typeof e?(i=e,r=t):(i={})[e]=t,r||(r={}),!this._validate(i,r))return!1;var o=r.unset,s=r.silent,a=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=n.clone(this.attributes),this.changed={});var c=this.attributes,u=this.changed,h=this._previousAttributes;for(var d in i)t=i[d],n.isEqual(c[d],t)||a.push(d),n.isEqual(h[d],t)?delete u[d]:u[d]=t,o?delete c[d]:c[d]=t;if(this.id=this.get(this.idAttribute),!s){a.length&&(this._pending=r);for(var p=0;p<a.length;p++)this.trigger("change:"+a[p],this,c[a[p]],r)}if(l)return this;if(!s)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&n.clone(this.changed);var t=this._changing?this._previousAttributes:this.attributes,r={};for(var i in e){var o=e[i];n.isEqual(t[i],o)||(r[i]=o)}return!!n.size(r)&&r},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=n.extend({parse:!0},e);var t=this,r=e.success;return e.success=function(n){var i=e.parse?t.parse(n,e):n;if(!t.set(i,e))return!1;r&&r.call(e.context,t,n,e),t.trigger("sync",t,n,e)},B(this,e),this.sync("read",this,e)},save:function(e,t,r){var i;null==e||"object"==typeof e?(i=e,r=t):(i={})[e]=t;var o=(r=n.extend({validate:!0,parse:!0},r)).wait;if(i&&!o){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;var s=this,a=r.success,l=this.attributes;r.success=function(e){s.attributes=l;var t=r.parse?s.parse(e,r):e;if(o&&(t=n.extend({},i,t)),t&&!s.set(t,r))return!1;a&&a.call(r.context,s,e,r),s.trigger("sync",s,e,r)},B(this,r),i&&o&&(this.attributes=n.extend({},l,i));var c=this.isNew()?"create":r.patch?"patch":"update";"patch"!==c||r.attrs||(r.attrs=i);var u=this.sync(c,this,r);return this.attributes=l,u},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,i=e.wait,o=function(){t.stopListening(),t.trigger("destroy",t,t.collection,e)};e.success=function(n){i&&o(),r&&r.call(e.context,t,n,e),t.isNew()||t.trigger("sync",t,n,e)};var s=!1;return this.isNew()?n.defer(e.success):(B(this,e),s=this.sync("delete",this,e)),i||o(),s},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||R();if(this.isNew())return e;var t=this.get(this.idAttribute);return e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.defaults({validate:!0},e))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return!r||(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1)}}),s(v,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes");var y=t.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},b={add:!0,remove:!0,merge:!0},w={add:!0,remove:!1},x=function(e,t,n){n=Math.min(Math.max(n,0),e.length);for(var r=Array(e.length-n),i=t.length,o=0;o<r.length;o++)r[o]=e[o+n];for(o=0;o<i;o++)e[o+n]=t[o];for(o=0;o<r.length;o++)e[o+i+n]=r[o]};n.extend(y.prototype,c,{model:v,initialize:function(){},toJSON:function(e){return this.map((function(t){return t.toJSON(e)}))},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,w))},remove:function(e,t){t=n.extend({},t);var r=!n.isArray(e);e=r?[e]:n.clone(e);var i=this._removeModels(e,t);return!t.silent&&i&&this.trigger("update",this,t),r?i[0]:i},set:function(e,t){if(null!=e){(t=n.defaults({},t,b)).parse&&!this._isModel(e)&&(e=this.parse(e,t));var r=!n.isArray(e);e=r?[e]:e.slice();var i=t.at;null!=i&&(i=+i),i<0&&(i+=this.length+1);for(var o,s=[],a=[],l=[],c={},u=t.add,h=t.merge,d=t.remove,p=!1,f=this.comparator&&null==i&&!1!==t.sort,g=n.isString(this.comparator)?this.comparator:null,m=0;m<e.length;m++){o=e[m];var _=this.get(o);if(_){if(h&&o!==_){var v=this._isModel(o)?o.attributes:o;t.parse&&(v=_.parse(v,t)),_.set(v,t),f&&!p&&(p=_.hasChanged(g))}c[_.cid]||(c[_.cid]=!0,s.push(_)),e[m]=_}else u&&(o=e[m]=this._prepareModel(o,t))&&(a.push(o),this._addReference(o,t),c[o.cid]=!0,s.push(o))}if(d){for(m=0;m<this.length;m++)c[(o=this.models[m]).cid]||l.push(o);l.length&&this._removeModels(l,t)}var y=!1,w=!f&&u&&d;if(s.length&&w?(y=this.length!=s.length||n.some(this.models,(function(e,t){return e!==s[t]})),this.models.length=0,x(this.models,s,0),this.length=this.models.length):a.length&&(f&&(p=!0),x(this.models,a,null==i?this.length:i),this.length=this.models.length),p&&this.sort({silent:!0}),!t.silent){for(m=0;m<a.length;m++)null!=i&&(t.index=i+m),(o=a[m]).trigger("add",o,this,t);(p||y)&&this.trigger("sort",this,t),(a.length||l.length)&&this.trigger("update",this,t)}return r?e[0]:e}},reset:function(e,t){t=t?n.clone(t):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e)},slice:function(){return o.apply(this.models,arguments)},get:function(e){if(null!=e){var t=this.modelId(this._isModel(e)?e.attributes:e);return this._byId[e]||this._byId[t]||this._byId[e.cid]}},at:function(e){return e<0&&(e+=this.length),this.models[e]},where:function(e,t){return this[t?"find":"filter"](e)},findWhere:function(e){return this.where(e,!0)},sort:function(e){var t=this.comparator;if(!t)throw new Error("Cannot sort a set without a comparator");e||(e={});var r=t.length;return n.isFunction(t)&&(t=n.bind(t,this)),1===r||n.isString(t)?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return n.invoke(this.models,"get",e)},fetch:function(e){var t=(e=n.extend({parse:!0},e)).success,r=this;return e.success=function(n){var i=e.reset?"reset":"set";r[i](n,e),t&&t.call(e.context,r,n,e),r.trigger("sync",r,n,e)},B(this,e),this.sync("read",this,e)},create:function(e,t){var r=(t=t?n.clone(t):{}).wait;if(!(e=this._prepareModel(e,t)))return!1;r||this.add(e,t);var i=this,o=t.success;return t.success=function(e,t,n){r&&i.add(e,n),o&&o.call(n.context,e,t,n)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e){return e[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(this._isModel(e))return e.collection||(e.collection=this),e;(t=t?n.clone(t):{}).collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger("invalid",this,r.validationError,t),!1):r},_removeModels:function(e,t){for(var n=[],r=0;r<e.length;r++){var i=this.get(e[r]);if(i){var o=this.indexOf(i);this.models.splice(o,1),this.length--,t.silent||(t.index=o,i.trigger("remove",i,this,t)),n.push(i),this._removeReference(i,t)}}return!!n.length&&n},_isModel:function(e){return e instanceof v},_addReference:function(e,t){this._byId[e.cid]=e;var n=this.modelId(e.attributes);null!=n&&(this._byId[n]=e),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){delete this._byId[e.cid];var n=this.modelId(e.attributes);null!=n&&delete this._byId[n],this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if("add"!==e&&"remove"!==e||n===this){if("destroy"===e&&this.remove(t,r),"change"===e){var i=this.modelId(t.previousAttributes()),o=this.modelId(t.attributes);i!==o&&(null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=t))}this.trigger.apply(this,arguments)}}}),s(y,{forEach:3,each:3,map:3,collect:3,reduce:4,foldl:4,inject:4,reduceRight:4,foldr:4,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3},"models");var k=t.View=function(e){this.cid=n.uniqueId("view"),n.extend(this,n.pick(e,S)),this._ensureElement(),this.initialize.apply(this,arguments)},E=/^(\S+)\s*(.*)$/,S=["model","collection","el","id","attributes","className","tagName","events"];n.extend(k.prototype,c,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},_setElement:function(e){this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0]},delegateEvents:function(e){if(e||(e=n.result(this,"events")),!e)return this;for(var t in this.undelegateEvents(),e){var r=e[t];if(n.isFunction(r)||(r=this[r]),r){var i=t.match(E);this.delegate(i[1],i[2],n.bind(r,this))}}return this},delegate:function(e,t,n){return this.$el.on(e+".delegateEvents"+this.cid,t,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(e,t,n){return this.$el.off(e+".delegateEvents"+this.cid,t,n),this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(e)}},_setAttributes:function(e){this.$el.attr(e)}}),t.sync=function(e,r,i){var o=M[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var s={type:o,dataType:"json"};if(i.url||(s.url=n.result(r,"url")||R()),null!=i.data||!r||"create"!==e&&"update"!==e&&"patch"!==e||(s.contentType="application/json",s.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(s.contentType="application/x-www-form-urlencoded",s.data=s.data?{model:s.data}:{}),i.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){s.type="POST",i.emulateJSON&&(s.data._method=o);var a=i.beforeSend;i.beforeSend=function(e){if(e.setRequestHeader("X-HTTP-Method-Override",o),a)return a.apply(this,arguments)}}"GET"===s.type||i.emulateJSON||(s.processData=!1);var l=i.error;i.error=function(e,t,n){i.textStatus=t,i.errorThrown=n,l&&l.call(i.context,e,t,n)};var c=i.xhr=t.ajax(n.extend(s,i));return r.trigger("request",r,c,i),c};var M={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var C=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},j=/\((.*?)\)/g,A=/(\(\?)?:\w+/g,T=/\*\w+/g,P=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(C.prototype,c,{initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var o=this;return t.history.route(e,(function(n){var s=o._extractParameters(e,n);!1!==o.execute(i,s,r)&&(o.trigger.apply(o,["route:"+r].concat(s)),o.trigger("route",r,s),t.history.trigger("route",o,r,s))})),this},execute:function(e,t,n){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var e,t=n.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(P,"\\$&").replace(j,"(?:$1)?").replace(A,(function(e,t){return t?e:"([^/?]+)"})).replace(T,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,(function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null}))}});var O=t.History=function(){this.handlers=[],this.checkUrl=n.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},L=/^[#\/]|\s+$/g,I=/^\/+|\/+$/g,D=/#.*$/;O.started=!1,n.extend(O.prototype,c,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(e){return decodeURI(e.replace(/%25/g,"%2525"))},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(e=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),e.replace(L,"")},start:function(e){if(O.started)throw new Error("Backbone.history has already been started");if(O.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(I,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash="#"+this.fragment}var o=window.addEventListener||function(e,t){return attachEvent("on"+e,t)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=window.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._usePushState?e("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),O.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow)),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return!!this.matchRoot()&&(e=this.fragment=this.getFragment(e),n.some(this.handlers,(function(t){if(t.route.test(e))return t.callback(e),!0})))},navigate:function(e,t){if(!O.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||"");var n=this.root;""!==e&&"?"!==e.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+e;if(e=this.decodeFragment(e.replace(D,"")),this.fragment!==e){if(this.fragment=e,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;t.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),t.history=new O,v.extend=y.extend=C.extend=k.extend=O.extend=function(e,t){var r,i=this;r=e&&n.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,t);var o=function(){this.constructor=r};return o.prototype=i.prototype,r.prototype=new o,e&&n.extend(r.prototype,e),r.__super__=i.prototype,r};var R=function(){throw new Error('A "url" property or function must be specified')},B=function(e,t){var n=t.error;t.error=function(r){n&&n.call(t.context,e,r,t),e.trigger("error",e,r,t)}};return t}(s,n,e,t)}.apply(t,i))||(e.exports=o)}).call(this,n(17))},function(e,t,n){var r=n(222)("wks"),i=n(112),o=n(23).Symbol;e.exports=function(e){return r[e]||(r[e]=o&&o[e]||(o||i)("Symbol."+e))}},function(e,t,n){var r,i,o={},s=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),a=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e.call(this,n)),t[n]}}((function(e){return document.querySelector(e)})),l=null,c=0,u=[],h=n(232);function d(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=o[r.id];if(i){i.refs++;for(var s=0;s<i.parts.length;s++)i.parts[s](r.parts[s]);for(;s<r.parts.length;s++)i.parts.push(v(r.parts[s],t))}else{var a=[];for(s=0;s<r.parts.length;s++)a.push(v(r.parts[s],t));o[r.id]={id:r.id,refs:1,parts:a}}}}function p(e,t){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],s=t.base?o[0]+t.base:o[0],a={css:o[1],media:o[2],sourceMap:o[3]};r[s]?r[s].parts.push(a):n.push(r[s]={id:s,parts:[a]})}return n}function f(e,t){var n=a(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=u[u.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),u.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function g(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=u.indexOf(e);t>=0&&u.splice(t,1)}function m(e){var t=document.createElement("style");return e.attrs.type="text/css",_(t,e.attrs),f(e,t),t}function _(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function v(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var s=c++;n=l||(l=m(t)),r=w.bind(null,n,s,!1),i=w.bind(null,n,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",_(t,e.attrs),f(e,t),t}(t),r=k.bind(null,n,t),i=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(t),r=x.bind(null,n),i=function(){g(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=s()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return d(n,t),function(e){for(var r=[],i=0;i<n.length;i++){var s=n[i];(a=o[s.id]).refs--,r.push(a)}e&&d(p(e,t),t);for(i=0;i<r.length;i++){var a;if(0===(a=r[i]).refs){for(var l=0;l<a.parts.length;l++)a.parts[l]();delete o[a.id]}}}};var y,b=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function w(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(t,i);else{var o=document.createTextNode(i),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(o,s[t]):e.appendChild(o)}}function x(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function k(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=h(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var s=new Blob([r],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}},function(e,t,n){"use strict";var r=n(8),i=n(76),o=n(77),s=n(78),a=n(29);function l(e){a.call(this,"digest"),this._hash=e}r(l,a),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new l(s(e))}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){(function(t){e.exports=function(e,n){for(var r=Math.min(e.length,n.length),i=new t(r),o=0;o<r;++o)i[o]=e[o]^n[o];return i}}).call(this,n(24).Buffer)},function(e,t,n){"use strict";const r=n(8),i=n(85).Reporter,o=n(83).Buffer;function s(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return a.isEncoderBuffer(e)||(e=new a(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(s,i),t.DecoderBuffer=s,s.isDecoderBuffer=function(e){if(e instanceof s)return!0;return"object"==typeof e&&o.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(e){const t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const n=new s(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=a,a.isEncoderBuffer=function(e){if(e instanceof a)return!0;return"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},a.prototype.join=function(e,t){return e||(e=o.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(e,t),t+=n.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),s=n(6),a=function(){function e(e){this._fn=e}return Object.defineProperty(e.prototype,"isDisposed",{get:function(){return!this._fn},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){if(this._fn){var e=this._fn;this._fn=null,e()}},e}();t.DisposableDelegate=a;var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._disposed=new s.Signal(t),t}return i(t,e),Object.defineProperty(t.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.isDisposed||(e.prototype.dispose.call(this),this._disposed.emit(void 0),s.Signal.clearData(this))},t}(a);t.ObservableDisposableDelegate=l;var c=function(){function e(){this._isDisposed=!1,this._items=new Set}return Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this._items.forEach((function(e){e.dispose()})),this._items.clear())},e.prototype.contains=function(e){return this._items.has(e)},e.prototype.add=function(e){this._items.add(e)},e.prototype.remove=function(e){this._items.delete(e)},e.prototype.clear=function(){this._items.clear()},e}();t.DisposableSet=c,function(e){e.from=function(t){var n=new e;return o.each(t,(function(e){n.add(e)})),n}}(c=t.DisposableSet||(t.DisposableSet={})),t.DisposableSet=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._disposed=new s.Signal(t),t}return i(t,e),Object.defineProperty(t.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.isDisposed||(e.prototype.dispose.call(this),this._disposed.emit(void 0),s.Signal.clearData(this))},t}(c);t.ObservableDisposableSet=u,function(e){e.from=function(t){var n=new e;return o.each(t,(function(e){n.add(e)})),n}}(u=t.ObservableDisposableSet||(t.ObservableDisposableSet={})),t.ObservableDisposableSet=u},function(module,exports,__webpack_require__){"use strict";(function(global){var __extends=this&&this.__extends||(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),extendStatics,__assign=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(exports,"__esModule",{value:!0});var coreutils_1=__webpack_require__(18),FETCH,HEADERS,REQUEST,WEBSOCKET,ServerConnection,Private;if("undefined"==typeof window){var fetchMod=eval("require")("node-fetch");FETCH=global.fetch||fetchMod,REQUEST=global.Request||fetchMod.Request,HEADERS=global.Headers||fetchMod.Headers,WEBSOCKET=global.WebSocket||eval("require")("ws")}else FETCH=fetch,REQUEST=Request,HEADERS=Headers,WEBSOCKET=WebSocket;!function(e){e.makeSettings=function(e){return Private.makeSettings(e)},e.makeRequest=function(e,t,n){return Private.handleRequest(e,t,n)};var t=function(e){function t(t,n){var r=this;return n=n||"Invalid response: "+t.status+" "+t.statusText,(r=e.call(this,n)||this).response=t,r}return __extends(t,e),t}(Error);e.ResponseError=t;var n=function(e){function t(t){var n=e.call(this,t.message)||this;return n.stack=t.stack,n}return __extends(t,e),t}(TypeError);e.NetworkError=n,e.defaultSettings={baseUrl:coreutils_1.PageConfig.getBaseUrl(),pageUrl:coreutils_1.PageConfig.getOption("pageUrl"),wsUrl:coreutils_1.PageConfig.getWsUrl(),token:coreutils_1.PageConfig.getToken(),init:{cache:"no-store",credentials:"same-origin"},fetch:FETCH,Headers:HEADERS,Request:REQUEST,WebSocket:WEBSOCKET}}(ServerConnection=exports.ServerConnection||(exports.ServerConnection={})),function(e){e.makeSettings=function(e){return void 0===e&&(e={}),__assign({},ServerConnection.defaultSettings,e)},e.handleRequest=function(e,t,n){if(0!==e.indexOf(n.baseUrl))throw new Error("Can only be used for notebook server requests");"no-store"===(t.cache||n.init.cache)&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());var r,i,o=new n.Request(e,__assign({},n.init,t)),s=!1;if(n.token)s=!0,o.headers.append("Authorization","token "+n.token);else if("undefined"!=typeof document&&document.cookie){var a=(r="_xsrf",(i=document.cookie.match("\\b"+r+"=([^;]*)\\b"))?i[1]:void 0);void 0!==a&&(s=!0,o.headers.append("X-XSRFToken",a))}return!o.bodyUsed&&s&&o.headers.set("Content-Type","application/json"),n.fetch.call(null,o).catch((function(e){throw new ServerConnection.NetworkError(e)}))}}(Private||(Private={}))}).call(this,__webpack_require__(17))},function(e,t,n){var r=n(94),i=n(397),o=n(398),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1};t.BoxSizer=r,function(e){e.calc=function(e,t){var n=e.length;if(0===n)return t;for(var r=0,i=0,o=0,s=0,a=0,l=0;l<n;++l){var c=(_=e[l]).minSize,u=_.maxSize,h=_.sizeHint;_.done=!1,_.size=Math.max(c,Math.min(h,u)),o+=_.size,r+=c,i+=u,_.stretch>0&&(s+=_.stretch,a++)}if(t===o)return 0;if(t<=r){for(l=0;l<n;++l){(_=e[l]).size=_.minSize}return t-r}if(t>=i){for(l=0;l<n;++l){(_=e[l]).size=_.maxSize}return t-i}var d=n;if(t<o){for(var p=o-t;a>0&&p>.01;){var f=p,g=s;for(l=0;l<n;++l){if(!(_=e[l]).done&&0!==_.stretch){var m=_.stretch*f/g;_.size-m<=_.minSize?(p-=_.size-_.minSize,s-=_.stretch,_.size=_.minSize,_.done=!0,d--,a--):(p-=m,_.size-=m)}}}for(;d>0&&p>.01;)for(m=p/d,l=0;l<n;++l){(_=e[l]).done||(_.size-m<=_.minSize?(p-=_.size-_.minSize,_.size=_.minSize,_.done=!0,d--):(p-=m,_.size-=m))}}else{for(p=t-o;a>0&&p>.01;)for(f=p,g=s,l=0;l<n;++l){if(!(_=e[l]).done&&0!==_.stretch){m=_.stretch*f/g;_.size+m>=_.maxSize?(p-=_.maxSize-_.size,s-=_.stretch,_.size=_.maxSize,_.done=!0,d--,a--):(p-=m,_.size+=m)}}for(;d>0&&p>.01;)for(m=p/d,l=0;l<n;++l){var _;(_=e[l]).done||(_.size+m>=_.maxSize?(p-=_.maxSize-_.size,_.size=_.maxSize,_.done=!0,d--):(p-=m,_.size+=m))}}return 0},e.adjust=function(e,t,n){0!==e.length&&0!==n&&(n>0?function(e,t,n){for(var r=0,i=0;i<=t;++i){var o=e[i];r+=o.maxSize-o.size}for(var s=0,a=(i=t+1,e.length);i<a;++i){o=e[i];s+=o.size-o.minSize}var l=n=Math.min(n,r,s);for(i=t;i>=0&&l>0;--i){o=e[i];(u=o.maxSize-o.size)>=l?(o.sizeHint=o.size+l,l=0):(o.sizeHint=o.size+u,l-=u)}var c=n;for(i=t+1,a=e.length;i<a&&c>0;++i){var u;o=e[i];(u=o.size-o.minSize)>=c?(o.sizeHint=o.size-c,c=0):(o.sizeHint=o.size-u,c-=u)}}(e,t,n):function(e,t,n){for(var r=0,i=t+1,o=e.length;i<o;++i){var s=e[i];r+=s.maxSize-s.size}var a=0;for(i=0;i<=t;++i){s=e[i];a+=s.size-s.minSize}var l=n=Math.min(n,r,a);for(i=t+1,o=e.length;i<o&&l>0;++i){s=e[i];(u=s.maxSize-s.size)>=l?(s.sizeHint=s.size+l,l=0):(s.sizeHint=s.size+u,l-=u)}var c=n;for(i=t;i>=0&&c>0;--i){var u;s=e[i];(u=s.size-s.minSize)>=c?(s.sizeHint=s.size-c,c=0):(s.sizeHint=s.size-u,c-=u)}}(e,t,-n))}}(t.BoxEngine||(t.BoxEngine={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),s=n(10),a=n(30),l=n(15),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._widgets=[],t}return i(t,e),t.prototype.dispose=function(){for(;this._widgets.length>0;)this._widgets.pop().dispose();e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"widgets",{get:function(){return this._widgets},enumerable:!0,configurable:!0}),t.prototype.iter=function(){return o.iter(this._widgets)},t.prototype.addWidget=function(e){this.insertWidget(this._widgets.length,e)},t.prototype.insertWidget=function(e,t){t.parent=this.parent;var n=this._widgets.indexOf(t),r=Math.max(0,Math.min(e,this._widgets.length));if(-1===n)return o.ArrayExt.insert(this._widgets,r,t),void(this.parent&&this.attachWidget(r,t));r===this._widgets.length&&r--,n!==r&&(o.ArrayExt.move(this._widgets,n,r),this.parent&&this.moveWidget(n,r,t))},t.prototype.removeWidget=function(e){this.removeWidgetAt(this._widgets.indexOf(e))},t.prototype.removeWidgetAt=function(e){var t=o.ArrayExt.removeAt(this._widgets,e);t&&this.parent&&this.detachWidget(e,t)},t.prototype.init=function(){var t=this;e.prototype.init.call(this),o.each(this,(function(e,n){t.attachWidget(n,e)}))},t.prototype.attachWidget=function(e,t){var n=this.parent.node.children[e];this.parent.isAttached&&s.MessageLoop.sendMessage(t,l.Widget.Msg.BeforeAttach),this.parent.node.insertBefore(t.node,n),this.parent.isAttached&&s.MessageLoop.sendMessage(t,l.Widget.Msg.AfterAttach)},t.prototype.moveWidget=function(e,t,n){this.parent.isAttached&&s.MessageLoop.sendMessage(n,l.Widget.Msg.BeforeDetach),this.parent.node.removeChild(n.node),this.parent.isAttached&&s.MessageLoop.sendMessage(n,l.Widget.Msg.AfterDetach);var r=this.parent.node.children[t];this.parent.isAttached&&s.MessageLoop.sendMessage(n,l.Widget.Msg.BeforeAttach),this.parent.node.insertBefore(n.node,r),this.parent.isAttached&&s.MessageLoop.sendMessage(n,l.Widget.Msg.AfterAttach)},t.prototype.detachWidget=function(e,t){this.parent.isAttached&&s.MessageLoop.sendMessage(t,l.Widget.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&s.MessageLoop.sendMessage(t,l.Widget.Msg.AfterDetach)},t}(a.Layout);t.PanelLayout=c},function(e,t,n){var r,i,o;!function(s){"use strict";i=[n(11)],void 0===(o="function"==typeof(r=function(e){return e.ui=e.ui||{},e.ui.version="1.13.1"})?r.apply(t,i):r)||(e.exports=o)}()},function(e,t,n){var r=n(1),i=(n(0),n(68)),o=i.Interaction.extend({initialize:function(){this.setElement(document.createElementNS(r.ns.prefix.svg,"g")),this.d3el=r.select(this.el),i.Interaction.__super__.initialize.apply(this,arguments)},render:function(){this.parent=this.options.parent,this.width=this.parent.width-this.parent.margin.left-this.parent.margin.right,this.height=this.parent.height-this.parent.margin.top-this.parent.margin.bottom,this.mark_views_promise=this.populate_mark_views()},create_listeners:function(){this.parent.on("margin_updated",this.relayout,this),this.listenTo(this.model,"change:selected",this.selected_changed),this.listenTo(this.model,"change:marks",this.marks_changed),this.listenTo(this.model,"msg:custom",this.handle_custom_messages)},relayout:function(){this.height=this.parent.height-this.parent.margin.top-this.parent.margin.bottom,this.width=this.parent.width-this.parent.margin.left-this.parent.margin.right},populate_mark_views:function(){var e=this.parent,t=this,n=this.model.get("marks").map((function(e){return e.model_id}));return Promise.all(e.mark_views.views).then((function(r){var i=e.mark_views._models.map((function(e){return e.model_id})),o=n.map((function(e){return i.indexOf(e)}));t.mark_views=o.map((function(e){return r[e]}))}))},marks_changed:function(){var e=this;this.populate_mark_views().then((function(){e.selected_changed()}))},handle_custom_messages:function(e){"reset"===e.type&&this.reset()},reset:function(){},selected_changed:function(){}}),s=o.extend({create_scales:function(){if(this.scale&&this.scale.remove(),this.model.get("scale")){var e=this;return this.create_child_view(this.model.get("scale")).then((function(t){return e.scale=t,e.update_scale_domain(!0),e.set_range([e.scale]),e.scale.on("domain_changed",e.update_scale_domain,e),t}))}},update_scale_domain:function(){var e="vertical"==this.model.get("orientation")?"y":"x",t=this.parent.padded_range(e,this.scale.model),n=this.parent.range(e);this.scale.expand_domain(t,n)},set_range:function(e){for(var t="vertical"==this.model.get("orientation")?"y":"x",n=0;n<e.length;n++)e[n].set_range(this.parent.range(t))}}),a=o.extend({create_scales:function(){var e=this;this.x_scale&&this.x_scale.remove(),this.y_scale&&this.y_scale.remove();var t=[];return this.model.get("x_scale")&&t.push(this.create_child_view(this.model.get("x_scale")).then((function(t){return e.x_scale=t,e.update_xscale_domain(),e.set_x_range([e.x_scale]),e.x_scale.on("domain_changed",e.update_xscale_domain,e),t}))),this.model.get("y_scale")&&t.push(this.create_child_view(this.model.get("y_scale")).then((function(t){return e.y_scale=t,e.update_yscale_domain(),e.set_y_range([e.y_scale]),e.y_scale.on("domain_changed",e.update_yscale_domain,e),t}))),Promise.all(t)},set_x_range:function(e){for(var t=0;t<e.length;t++)e[t].set_range(this.parent.range("x"))},set_y_range:function(e){for(var t=0;t<e.length;t++)e[t].set_range(this.parent.range("y"))},update_xscale_domain:function(){var e=this.parent.padded_range("x",this.x_scale.model),t=this.parent.range("x");this.x_scale.expand_domain(e,t)},update_yscale_domain:function(){var e=this.parent.padded_range("y",this.y_scale.model),t=this.parent.range("y");this.y_scale.expand_domain(e,t)}});e.exports={BaseSelector:o,BaseXSelector:s,BaseXYSelector:a}},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),s=r[0],a=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),u=0,h=a>0?s-4:s;for(n=0;n<h;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(u(e,s,s+16383>a?a:s+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a<l;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),n(487),r(n(489)),r(n(190)),r(n(191)),r(n(492)),r(n(493)),r(n(189)),r(n(188))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),n(483),r(n(485)),r(n(494))},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(236),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(17))},function(e,t,n){var r=n(4).Buffer;function i(e){r.isBuffer(e)||(e=r.from(e));for(var t=e.length/4|0,n=new Array(t),i=0;i<t;i++)n[i]=e.readUInt32BE(4*i);return n}function o(e){for(;0<e.length;e++)e[0]=0}function s(e,t,n,r,i){for(var o,s,a,l,c=n[0],u=n[1],h=n[2],d=n[3],p=e[0]^t[0],f=e[1]^t[1],g=e[2]^t[2],m=e[3]^t[3],_=4,v=1;v<i;v++)o=c[p>>>24]^u[f>>>16&255]^h[g>>>8&255]^d[255&m]^t[_++],s=c[f>>>24]^u[g>>>16&255]^h[m>>>8&255]^d[255&p]^t[_++],a=c[g>>>24]^u[m>>>16&255]^h[p>>>8&255]^d[255&f]^t[_++],l=c[m>>>24]^u[p>>>16&255]^h[f>>>8&255]^d[255&g]^t[_++],p=o,f=s,g=a,m=l;return o=(r[p>>>24]<<24|r[f>>>16&255]<<16|r[g>>>8&255]<<8|r[255&m])^t[_++],s=(r[f>>>24]<<24|r[g>>>16&255]<<16|r[m>>>8&255]<<8|r[255&p])^t[_++],a=(r[g>>>24]<<24|r[m>>>16&255]<<16|r[p>>>8&255]<<8|r[255&f])^t[_++],l=(r[m>>>24]<<24|r[p>>>16&255]<<16|r[f>>>8&255]<<8|r[255&g])^t[_++],[o>>>=0,s>>>=0,a>>>=0,l>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,l=0;l<256;++l){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,n[s]=c,r[c]=s;var u=e[s],h=e[u],d=e[h],p=257*e[c]^16843008*c;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*d^65537*h^257*u^16843008*s,o[0][c]=p<<24|p>>>8,o[1][c]=p<<16|p>>>16,o[2][c]=p<<8|p>>>24,o[3][c]=p,0===s?s=a=1:(s=u^e[e[e[d^u]]],a^=e[e[a]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<r;o++){var s=i[o-1];o%t==0?(s=s<<8|s>>>24,s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t==4&&(s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s]),i[o]=i[o-t]^s}for(var c=[],u=0;u<r;u++){var h=r-u,d=i[h-(u%4?0:4)];c[u]=u<4||h<=4?d:l.INV_SUB_MIX[0][l.SBOX[d>>>24]]^l.INV_SUB_MIX[1][l.SBOX[d>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[d>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&d]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return s(e=i(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=r.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var n=s(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(n[0],0),o.writeUInt32BE(n[3],4),o.writeUInt32BE(n[2],8),o.writeUInt32BE(n[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},function(e,t,n){var r=n(4).Buffer,i=n(76);e.exports=function(e,t,n,o){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=n/8,a=r.alloc(s),l=r.alloc(o||0),c=r.alloc(0);s>0||o>0;){var u=new i;u.update(c),u.update(e),t&&u.update(t),c=u.digest();var h=0;if(s>0){var d=a.length-s;h=Math.min(s,c.length),c.copy(a,d,0,h),s-=h}if(h<c.length&&o>0){var p=l.length-o,f=Math.min(o,c.length-h);c.copy(l,p,h,h+f),o-=f}}return c.fill(0),{key:a,iv:l}}},function(e,t,n){var r=n(295),i=n(302),o=n(303),s=n(80),a=n(125),l=n(4).Buffer;function c(e){var t;"object"!=typeof e||l.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=l.from(e));var n,c,u=o(e,t),h=u.tag,d=u.data;switch(h){case"CERTIFICATE":c=r.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=r.PublicKey.decode(d,"der")),n=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=r.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":d=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,h=parseInt(o.split("-")[1],10)/8,d=a.pbkdf2Sync(t,n,r,h,"sha1"),p=s.createDecipheriv(o,d,c),f=[];return f.push(p.update(u)),f.push(p.final()),l.concat(f)}(d=r.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(n=(c=r.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:r.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=r.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=r.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+h)}}e.exports=c,c.signature=r.signature},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18);!function(e){function t(e,t,n,i){return void 0===t&&(t={}),void 0===n&&(n={}),void 0===i&&(i=[]),{header:{username:e.username||"",version:"5.2",session:e.session,msg_id:e.msgId||r.uuid(),msg_type:e.msgType},parent_header:{},channel:e.channel,content:t,metadata:n,buffers:i}}e.createMessage=t,e.createShellMessage=function(e,n,r,i){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=[]),t(e,n,r,i)},e.isStreamMsg=function(e){return"stream"===e.header.msg_type},e.isDisplayDataMsg=function(e){return"display_data"===e.header.msg_type},e.isExecuteInputMsg=function(e){return"execute_input"===e.header.msg_type},e.isExecuteResultMsg=function(e){return"execute_result"===e.header.msg_type},e.isErrorMsg=function(e){return"error"===e.header.msg_type},e.isStatusMsg=function(e){return"status"===e.header.msg_type},e.isClearOutputMsg=function(e){return"clear_output"===e.header.msg_type},e.isCommOpenMsg=function(e){return"comm_open"===e.header.msg_type},e.isCommCloseMsg=function(e){return"comm_close"===e.header.msg_type},e.isCommMsgMsg=function(e){return"comm_msg"===e.header.msg_type},e.isExecuteReplyMsg=function(e){return"execute_reply"===e.header.msg_type},e.isInputRequestMsg=function(e){return"input_request"===e.header.msg_type}}(t.KernelMessage||(t.KernelMessage={}))},function(e,t,n){var r=n(386),i=n(387),o=n(388),s=n(389),a=n(390);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},function(e,t,n){var r=n(165);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(35)(Object,"create");e.exports=r},function(e,t,n){var r=n(410);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(50),a=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.addClass("p-Panel"),n.layout=o.createLayout(t),n}return i(t,e),Object.defineProperty(t.prototype,"widgets",{get:function(){return this.layout.widgets},enumerable:!0,configurable:!0}),t.prototype.addWidget=function(e){this.layout.addWidget(e)},t.prototype.insertWidget=function(e,t){this.layout.insertWidget(e,t)},t}(n(15).Widget);t.Panel=a,function(e){e.createLayout=function(e){return e.layout||new s.PanelLayout}}(o||(o={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=function(e){this.type="text",this.content=e};t.VirtualText=i;var o,s=function(e,t,n){this.type="element",this.tag=e,this.attrs=t,this.children=n};function a(e){for(var t={},n=[],r=1,o=arguments.length;r<o;++r){var a=arguments[r];"string"==typeof a?n.push(new i(a)):a instanceof i||a instanceof s?n.push(a):a instanceof Array?l(n,a):1===r&&a&&"object"==typeof a&&(t=a)}return new s(e,t,n);function l(e,t){for(var n=0,r=t;n<r.length;n++){var o=r[n];"string"==typeof o?e.push(new i(o)):(o instanceof i||o instanceof s)&&e.push(o)}}}t.VirtualElement=s,t.h=a,function(e){e.a=e.bind(void 0,"a"),e.abbr=e.bind(void 0,"abbr"),e.address=e.bind(void 0,"address"),e.area=e.bind(void 0,"area"),e.article=e.bind(void 0,"article"),e.aside=e.bind(void 0,"aside"),e.audio=e.bind(void 0,"audio"),e.b=e.bind(void 0,"b"),e.bdi=e.bind(void 0,"bdi"),e.bdo=e.bind(void 0,"bdo"),e.blockquote=e.bind(void 0,"blockquote"),e.br=e.bind(void 0,"br"),e.button=e.bind(void 0,"button"),e.canvas=e.bind(void 0,"canvas"),e.caption=e.bind(void 0,"caption"),e.cite=e.bind(void 0,"cite"),e.code=e.bind(void 0,"code"),e.col=e.bind(void 0,"col"),e.colgroup=e.bind(void 0,"colgroup"),e.data=e.bind(void 0,"data"),e.datalist=e.bind(void 0,"datalist"),e.dd=e.bind(void 0,"dd"),e.del=e.bind(void 0,"del"),e.dfn=e.bind(void 0,"dfn"),e.div=e.bind(void 0,"div"),e.dl=e.bind(void 0,"dl"),e.dt=e.bind(void 0,"dt"),e.em=e.bind(void 0,"em"),e.embed=e.bind(void 0,"embed"),e.fieldset=e.bind(void 0,"fieldset"),e.figcaption=e.bind(void 0,"figcaption"),e.figure=e.bind(void 0,"figure"),e.footer=e.bind(void 0,"footer"),e.form=e.bind(void 0,"form"),e.h1=e.bind(void 0,"h1"),e.h2=e.bind(void 0,"h2"),e.h3=e.bind(void 0,"h3"),e.h4=e.bind(void 0,"h4"),e.h5=e.bind(void 0,"h5"),e.h6=e.bind(void 0,"h6"),e.header=e.bind(void 0,"header"),e.hr=e.bind(void 0,"hr"),e.i=e.bind(void 0,"i"),e.iframe=e.bind(void 0,"iframe"),e.img=e.bind(void 0,"img"),e.input=e.bind(void 0,"input"),e.ins=e.bind(void 0,"ins"),e.kbd=e.bind(void 0,"kbd"),e.label=e.bind(void 0,"label"),e.legend=e.bind(void 0,"legend"),e.li=e.bind(void 0,"li"),e.main=e.bind(void 0,"main"),e.map=e.bind(void 0,"map"),e.mark=e.bind(void 0,"mark"),e.meter=e.bind(void 0,"meter"),e.nav=e.bind(void 0,"nav"),e.noscript=e.bind(void 0,"noscript"),e.object=e.bind(void 0,"object"),e.ol=e.bind(void 0,"ol"),e.optgroup=e.bind(void 0,"optgroup"),e.option=e.bind(void 0,"option"),e.output=e.bind(void 0,"output"),e.p=e.bind(void 0,"p"),e.param=e.bind(void 0,"param"),e.pre=e.bind(void 0,"pre"),e.progress=e.bind(void 0,"progress"),e.q=e.bind(void 0,"q"),e.rp=e.bind(void 0,"rp"),e.rt=e.bind(void 0,"rt"),e.ruby=e.bind(void 0,"ruby"),e.s=e.bind(void 0,"s"),e.samp=e.bind(void 0,"samp"),e.section=e.bind(void 0,"section"),e.select=e.bind(void 0,"select"),e.small=e.bind(void 0,"small"),e.source=e.bind(void 0,"source"),e.span=e.bind(void 0,"span"),e.strong=e.bind(void 0,"strong"),e.sub=e.bind(void 0,"sub"),e.summary=e.bind(void 0,"summary"),e.sup=e.bind(void 0,"sup"),e.table=e.bind(void 0,"table"),e.tbody=e.bind(void 0,"tbody"),e.td=e.bind(void 0,"td"),e.textarea=e.bind(void 0,"textarea"),e.tfoot=e.bind(void 0,"tfoot"),e.th=e.bind(void 0,"th"),e.thead=e.bind(void 0,"thead"),e.time=e.bind(void 0,"time"),e.title=e.bind(void 0,"title"),e.tr=e.bind(void 0,"tr"),e.track=e.bind(void 0,"track"),e.u=e.bind(void 0,"u"),e.ul=e.bind(void 0,"ul"),e.var_=e.bind(void 0,"var"),e.video=e.bind(void 0,"video"),e.wbr=e.bind(void 0,"wbr")}(a=t.h||(t.h={})),function(e){e.realize=function(e){return o.createDOMNode(e)},e.render=function(e,t){var n=o.hostMap.get(t)||[],r=o.asContentArray(e);o.hostMap.set(t,r),o.updateContent(t,n,r)}}(t.VirtualDOM||(t.VirtualDOM={})),function(e){function t(e){if("text"===e.type)return document.createTextNode(e.content);var r=document.createElement(e.tag);!function(e,t){for(var r in t)r in n||("on"===r.substr(0,2)?e[r]=t[r]:e.setAttribute(r,t[r]));void 0!==t.className&&e.setAttribute("class",t.className);void 0!==t.htmlFor&&e.setAttribute("for",t.htmlFor);t.dataset&&function(e,t){for(var n in t)e.setAttribute("data-"+n,t[n])}(e,t.dataset);t.style&&function(e,t){var n,r=e.style;for(n in t)r[n]=t[n]}(e,t.style)}(r,e.attrs);for(var i=0,o=e.children.length;i<o;++i)r.appendChild(t(e.children[i]));return r}e.hostMap=new WeakMap,e.asContentArray=function(e){return e?e instanceof Array?e:[e]:[]},e.createDOMNode=t,e.updateContent=function e(n,o,s){if(o!==s){for(var a=function(e,t){for(var n=e.firstChild,r=Object.create(null),i=0,o=t;i<o.length;i++){var s=o[i];"element"===s.type&&s.attrs.key&&(r[s.attrs.key]={vNode:s,element:n}),n=n.nextSibling}return r}(n,o),l=o.slice(),c=n.firstChild,u=s.length,h=0;h<u;++h)if(h>=l.length)n.appendChild(t(s[h]));else{var d=l[h],p=s[h];if(d!==p)if("text"!==d.type||"text"!==p.type)if("text"!==d.type&&"text"!==p.type){var f=p.attrs.key;if(f&&f in a){var g=a[f];g.vNode!==d&&(r.ArrayExt.move(l,l.indexOf(g.vNode,h+1),h),n.insertBefore(g.element,c),d=g.vNode,c=g.element)}if(d!==p){var m=d.attrs.key;m&&m!==f?(r.ArrayExt.insert(l,h,p),n.insertBefore(t(p),c)):d.tag===p.tag?(i(c,d.attrs,p.attrs),e(c,d.children,p.children),c=c.nextSibling):(r.ArrayExt.insert(l,h,p),n.insertBefore(t(p),c))}else c=c.nextSibling}else r.ArrayExt.insert(l,h,p),n.insertBefore(t(p),c);else c.textContent=p.content,c=c.nextSibling;else c=c.nextSibling}for(h=l.length-u;h>0;--h)n.removeChild(n.lastChild)}};var n={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function i(e,t,r){if(t!==r){var i;for(i in t)i in n||i in r||("on"===i.substr(0,2)?e[i]=null:e.removeAttribute(i));for(i in r)i in n||t[i]===r[i]||("on"===i.substr(0,2)?e[i]=r[i]:e.setAttribute(i,r[i]));t.className!==r.className&&(void 0!==r.className?e.setAttribute("class",r.className):e.removeAttribute("class")),t.htmlFor!==r.htmlFor&&(void 0!==r.htmlFor?e.setAttribute("for",r.htmlFor):e.removeAttribute("for")),t.dataset!==r.dataset&&function(e,t,n){for(var r in t)r in n||e.removeAttribute("data-"+r);for(var i in n)t[i]!==n[i]&&e.setAttribute("data-"+i,n[i])}(e,t.dataset||{},r.dataset||{}),t.style!==r.style&&function(e,t,n){var r,i=e.style;for(r in t)r in n||(i[r]="");for(r in n)t[r]!==n[r]&&(i[r]=n[r])}(e,t.style||{},r.style||{})}}}(o||(o={}))},function(e,t,n){var r=n(9),i=n(1),o=n(0),s=r.WidgetView.extend({initialize:function(){this.setElement(document.createElementNS(i.ns.prefix.svg,"rect")),this.d3el=i.select(this.el),s.__super__.initialize.apply(this,arguments)},render:function(){this.parent=this.options.parent,this.d3el.attr("x",0).attr("y",0).attr("width",this.parent.width-this.parent.margin.left-this.parent.margin.right).attr("height",this.parent.height-this.parent.margin.top-this.parent.margin.bottom).attr("pointer-events","all").attr("visibility","hidden"),this.parent.on("margin_updated",this.relayout,this)},relayout:function(){this.d3el.attr("width",this.parent.width-this.parent.margin.left-this.parent.margin.right).attr("height",this.parent.height-this.parent.margin.top-this.parent.margin.bottom)},remove:function(){o.each(this.mark_views,(function(e){e.invert_range()})),this.d3el.remove(),s.__super__.remove.apply(this)}});e.exports={Interaction:s}},function(e,t,n){var r=n(9),i=(n(1),r.WidgetView.extend({render:function(){this.offset=0},create_event_listeners:function(){this.listenTo(this.model,"domain_changed",this.model_domain_changed,this),this.listenTo(this.model,"highlight_axis",this.highlight_axis,this),this.listenTo(this.model,"unhighlight_axis",this.unhighlight_axis,this)},set_range:function(e,t){this.scale.range(e)},compute_and_set_domain:function(e,t){this.model.compute_and_set_domain(e,t)},set_domain:function(e,t){this.model.set_domain(e,t)},model_domain_changed:function(){this.scale.domain(this.model.domain),this.trigger("domain_changed")},highlight_axis:function(){this.trigger("highlight_axis")},unhighlight_axis:function(){this.trigger("unhighlight_axis")},expand_domain:function(e,t){}}));e.exports={Scale:i}},function(e,t,n){n(1);var r=n(0),i=n(28),o="^"+n(21).version,s=i.BaseModel.extend({defaults:function(){return r.extend(i.BaseModel.prototype.defaults(),{_model_name:"ScaleModel",_view_name:"Scale",_model_module:"bqplot",_view_module:"bqplot",_model_module_version:o,_view_module_version:o,reverse:!1,allow_padding:!0})},initialize:function(){s.__super__.initialize.apply(this,arguments),this.domains={},this.domain=[],this.set_init_state(),this.set_listeners()},set_init_state:function(){this.type="base"},set_listeners:function(){},set_domain:function(e,t){this.domains[t]=e,this.update_domain()},del_domain:function(e,t){void 0!==this.domains[t]&&(delete this.domains[t],this.update_domain())}});e.exports={ScaleModel:s}},function(e,t,n){var r=n(1),i=n(0),o=n(70),s=o.ScaleModel.extend({defaults:function(){return i.extend(o.ScaleModel.prototype.defaults(),{_model_name:"LinearScaleModel",_view_name:"LinearScale",min:null,max:null,min_range:.6,mid_range:.8})},initialize:function(){s.__super__.initialize.apply(this,arguments)},set_init_state:function(){this.type="linear",this.global_min=Number.NEGATIVE_INFINITY,this.global_max=Number.POSITIVE_INFINITY},set_listeners:function(){this.on("change:reverse",this.reverse_changed,this),this.reverse_changed(),this.on_some_change(["min","max"],this.min_max_changed,this),this.min_max_changed(),this.on_some_change(["min_range","mid_range","stabilized"],this.update_domain,this)},min_max_changed:function(){this.min=this.get("min"),this.max=this.get("max"),this.min_from_data=null===this.min,this.max_from_data=null===this.max,this.update_domain()},reverse_changed:function(e,t,n){var r=void 0!==e&&e.previous("reverse");this.reverse=this.get("reverse");var i=(r+this.reverse)%2;this.domain.length>0&&1===i&&(this.domain.reverse(),this.trigger("domain_changed",this.domain))},update_domain:function(){var e=this,t=this.min_from_data?r.min(i.map(this.domains,(function(t){return t.length>0?t[0]:e.global_max}))):this.min,n=this.max_from_data?r.max(i.map(this.domains,(function(t){return t.length>1?t[1]:e.global_min}))):this.max,o=.5*(t+n),s=.5*(n-t)/this.get("mid_range");prev_domain=this.domain,min_index=this.reverse?1:0,prev_min=prev_domain[min_index],prev_max=prev_domain[1-min_index],prev_mid=.5*(prev_max+prev_min),min_width=.5*(prev_max-prev_min)*this.get("min_range");var a=this.get("stabilized");if(a?!(t>=prev_min&&t<=prev_mid-min_width&&n<=prev_max&&n>=prev_mid+min_width):t!==prev_min||n!==prev_max){var l=a?o-s:t,c=a?o+s:n;this.domain=this.reverse?[c,l]:[l,c],this.trigger("domain_changed",this.domain)}},compute_and_set_domain:function(e,t){if(0!==e.length){var n=e[0]instanceof Array?e:[e],i=r.min(n.map((function(e){return r.min(e)}))),o=r.max(n.map((function(e){return r.max(e)})));this.set_domain([i,o],t)}else this.set_domain([],t)}});e.exports={LinearScaleModel:s}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(482))},function(e,t,n){var r=n(23),i=n(109),o=n(31),s=n(111),a=n(113),l=function(e,t,n){var c,u,h,d,p=e&l.F,f=e&l.G,g=e&l.S,m=e&l.P,_=e&l.B,v=f?r:g?r[t]||(r[t]={}):(r[t]||{}).prototype,y=f?i:i[t]||(i[t]={}),b=y.prototype||(y.prototype={});for(c in f&&(n=t),n)h=((u=!p&&v&&c in v)?v:n)[c],d=_&&u?a(h,r):m&&"function"==typeof h?a(Function.call,h):h,v&&!u&&s(v,c,h),y[c]!=h&&o(y,c,d),m&&b[c]!=h&&(b[c]=h)};r.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,e.exports=l},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(8),i=n(119),o=n(4).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function l(e,t){return e<<t|e>>>32-t}function c(e,t,n,r,i,o,s){return l(e+(t&n|~t&r)+i+o|0,s)+t|0}function u(e,t,n,r,i,o,s){return l(e+(t&r|n&~r)+i+o|0,s)+t|0}function h(e,t,n,r,i,o,s){return l(e+(t^n^r)+i+o|0,s)+t|0}function d(e,t,n,r,i,o,s){return l(e+(n^(t|~r))+i+o|0,s)+t|0}r(a,i),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,r=this._b,i=this._c,o=this._d;n=c(n,r,i,o,e[0],3614090360,7),o=c(o,n,r,i,e[1],3905402710,12),i=c(i,o,n,r,e[2],606105819,17),r=c(r,i,o,n,e[3],3250441966,22),n=c(n,r,i,o,e[4],4118548399,7),o=c(o,n,r,i,e[5],1200080426,12),i=c(i,o,n,r,e[6],2821735955,17),r=c(r,i,o,n,e[7],4249261313,22),n=c(n,r,i,o,e[8],1770035416,7),o=c(o,n,r,i,e[9],2336552879,12),i=c(i,o,n,r,e[10],4294925233,17),r=c(r,i,o,n,e[11],2304563134,22),n=c(n,r,i,o,e[12],1804603682,7),o=c(o,n,r,i,e[13],4254626195,12),i=c(i,o,n,r,e[14],2792965006,17),n=u(n,r=c(r,i,o,n,e[15],1236535329,22),i,o,e[1],4129170786,5),o=u(o,n,r,i,e[6],3225465664,9),i=u(i,o,n,r,e[11],643717713,14),r=u(r,i,o,n,e[0],3921069994,20),n=u(n,r,i,o,e[5],3593408605,5),o=u(o,n,r,i,e[10],38016083,9),i=u(i,o,n,r,e[15],3634488961,14),r=u(r,i,o,n,e[4],3889429448,20),n=u(n,r,i,o,e[9],568446438,5),o=u(o,n,r,i,e[14],3275163606,9),i=u(i,o,n,r,e[3],4107603335,14),r=u(r,i,o,n,e[8],1163531501,20),n=u(n,r,i,o,e[13],2850285829,5),o=u(o,n,r,i,e[2],4243563512,9),i=u(i,o,n,r,e[7],1735328473,14),n=h(n,r=u(r,i,o,n,e[12],2368359562,20),i,o,e[5],4294588738,4),o=h(o,n,r,i,e[8],2272392833,11),i=h(i,o,n,r,e[11],1839030562,16),r=h(r,i,o,n,e[14],4259657740,23),n=h(n,r,i,o,e[1],2763975236,4),o=h(o,n,r,i,e[4],1272893353,11),i=h(i,o,n,r,e[7],4139469664,16),r=h(r,i,o,n,e[10],3200236656,23),n=h(n,r,i,o,e[13],681279174,4),o=h(o,n,r,i,e[0],3936430074,11),i=h(i,o,n,r,e[3],3572445317,16),r=h(r,i,o,n,e[6],76029189,23),n=h(n,r,i,o,e[9],3654602809,4),o=h(o,n,r,i,e[12],3873151461,11),i=h(i,o,n,r,e[15],530742520,16),n=d(n,r=h(r,i,o,n,e[2],3299628645,23),i,o,e[0],4096336452,6),o=d(o,n,r,i,e[7],1126891415,10),i=d(i,o,n,r,e[14],2878612391,15),r=d(r,i,o,n,e[5],4237533241,21),n=d(n,r,i,o,e[12],1700485571,6),o=d(o,n,r,i,e[3],2399980690,10),i=d(i,o,n,r,e[10],4293915773,15),r=d(r,i,o,n,e[1],2240044497,21),n=d(n,r,i,o,e[8],1873313359,6),o=d(o,n,r,i,e[15],4264355552,10),i=d(i,o,n,r,e[6],2734768916,15),r=d(r,i,o,n,e[13],1309151649,21),n=d(n,r,i,o,e[4],4149444226,6),o=d(o,n,r,i,e[11],3174756917,10),i=d(i,o,n,r,e[2],718787259,15),r=d(r,i,o,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},function(e,t,n){"use strict";var r=n(24).Buffer,i=n(8),o=n(119),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function p(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function f(e,t){return e<<t|e>>>32-t}function g(e,t,n,r,i,o,s,a){return f(e+(t^n^r)+o+s|0,a)+i|0}function m(e,t,n,r,i,o,s,a){return f(e+(t&n|~t&r)+o+s|0,a)+i|0}function _(e,t,n,r,i,o,s,a){return f(e+((t|~n)^r)+o+s|0,a)+i|0}function v(e,t,n,r,i,o,s,a){return f(e+(t&r|n&~r)+o+s|0,a)+i|0}function y(e,t,n,r,i,o,s,a){return f(e+(t^(n|~r))+o+s|0,a)+i|0}i(p,o),p.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,p=0|this._e,b=0|this._a,w=0|this._b,x=0|this._c,k=0|this._d,E=0|this._e,S=0;S<80;S+=1){var M,C;S<16?(M=g(n,r,i,o,p,e[a[S]],h[0],c[S]),C=y(b,w,x,k,E,e[l[S]],d[0],u[S])):S<32?(M=m(n,r,i,o,p,e[a[S]],h[1],c[S]),C=v(b,w,x,k,E,e[l[S]],d[1],u[S])):S<48?(M=_(n,r,i,o,p,e[a[S]],h[2],c[S]),C=_(b,w,x,k,E,e[l[S]],d[2],u[S])):S<64?(M=v(n,r,i,o,p,e[a[S]],h[3],c[S]),C=m(b,w,x,k,E,e[l[S]],d[3],u[S])):(M=y(n,r,i,o,p,e[a[S]],h[4],c[S]),C=g(b,w,x,k,E,e[l[S]],d[4],u[S])),n=p,p=o,o=f(i,10),i=r,r=M,b=E,E=k,k=f(x,10),x=w,w=C}var j=this._b+i+k|0;this._b=this._c+o+E|0,this._c=this._d+p+b|0,this._d=this._e+n+w|0,this._e=this._a+r+x|0,this._a=j},p.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.alloc?r.alloc(20):new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=p},function(e,t,n){(t=e.exports=function(e){e=e.toLowerCase();var n=t[e];if(!n)throw new Error(e+" is not supported (we accept pull requests)");return new n}).sha=n(262),t.sha1=n(263),t.sha224=n(264),t.sha256=n(120),t.sha384=n(265),t.sha512=n(121)},function(e,t,n){"use strict";var r=n(42);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<n;r++)this.buffer[this.bufferOff+r]=e[t+r];return this.bufferOff+=n,n},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,n=0,r=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(r*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,i,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,n=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(r*this.blockSize);r>0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},function(e,t,n){var r=n(278),i=n(286),o=n(134);t.createCipher=t.Cipher=r.createCipher,t.createCipheriv=t.Cipheriv=r.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},function(e,t,n){var r={ECB:n(279),CBC:n(280),CFB:n(281),CFB8:n(282),CFB1:n(283),OFB:n(284),CTR:n(132),GCM:n(132)},i=n(134);for(var o in i)i[o].module=r[i[o].mode];e.exports=i},function(e,t,n){(function(t){var r=n(7),i=n(32);function o(e){var t,n=e.modulus.byteLength();do{t=new r(i(n))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,n){var i=function(e){var t=o(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(n),s=n.modulus.byteLength(),a=new r(e).mul(i.blinder).umod(n.modulus),l=a.toRed(r.mont(n.prime1)),c=a.toRed(r.mont(n.prime2)),u=n.coefficient,h=n.prime1,d=n.prime2,p=l.redPow(n.exponent1).fromRed(),f=c.redPow(n.exponent2).fromRed(),g=p.isub(f).imul(u).umod(h).imul(d);return f.iadd(g).imul(i.unblinder).umod(n.modulus).toArrayLike(t,"be",s)}s.getr=o,e.exports=s}).call(this,n(24).Buffer)},function(e,t,n){"use strict";(function(t){var r,i=n(24),o=i.Buffer,s={};for(r in i)i.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(s[r]=i[r]);var a=s.Buffer={};for(r in o)o.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(a[r]=o[r]);if(s.Buffer.prototype=o.prototype,a.from&&a.from!==Uint8Array.from||(a.from=function(e,t,n){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return o(e,t,n)}),a.alloc||(a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=o(e);return t&&0!==t.length?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r}),!s.kStringMaxLength)try{s.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),e.exports=s}).call(this,n(26))},function(e,t,n){"use strict";const r=n(85).Reporter,i=n(44).EncoderBuffer,o=n(44).DecoderBuffer,s=n(42),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function c(e,t,n){const r={};this._baseState=r,r.name=n,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=c;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const e=this._baseState,t={};u.forEach((function(n){t[n]=e[n]}));const n=new this.constructor(t.parent);return n._baseState=t,n},c.prototype._wrap=function(){const e=this._baseState;l.forEach((function(t){this[t]=function(){const n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},c.prototype._init=function(e){const t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){const t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(s(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);const r=e[n];t[r]=n})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),a.forEach((function(e){c.prototype[e]=function(){const t=this._baseState,n=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(n),this}})),c.prototype.use=function(e){s(e);const t=this._baseState;return s(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){const t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){const t=this._baseState;return s(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){const t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){const t=this._baseState;return s(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){const n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));let r,i=n.default,s=!0,a=null;if(null!==n.key&&(a=e.enterKey(n.key)),n.optional){let r=null;if(null!==n.explicit?r=n.explicit:null!==n.implicit?r=n.implicit:null!==n.tag&&(r=n.tag),null!==r||n.any){if(s=this._peekTag(e,r,n.any),e.isError(s))return s}else{const r=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(r)}}if(n.obj&&s&&(r=e.enterObject()),s){if(null!==n.explicit){const t=this._decodeTag(e,n.explicit);if(e.isError(t))return t;e=t}const r=e.offset;if(null===n.use&&null===n.choice){let t;n.any&&(t=e.save());const r=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(r))return r;n.any?i=e.raw(t):e=r}if(t&&t.track&&null!==n.tag&&t.track(e.path(),r,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(e,t)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){const r=new o(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(r,t)}}return n.obj&&s&&(i=e.leaveObject(r)),null===n.key||null===i&&!0!==s?null!==a&&e.exitKey(a):e.leaveKey(a,n.key,i),i},c.prototype._decodeGeneric=function(e,t,n){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){const n=this._baseState;return n.useDecoder=this._use(e,t),s(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},c.prototype._decodeChoice=function(e,t){const n=this._baseState;let r=null,i=!1;return Object.keys(n.choice).some((function(o){const s=e.save(),a=n.choice[o];try{const n=a._decode(e,t);if(e.isError(n))return!1;r={type:o,value:n},i=!0}catch(t){return e.restore(s),!1}return!0}),this),i?r:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,n){const r=this._baseState;if(null!==r.default&&r.default===e)return;const i=this._encodeValue(e,t,n);return void 0===i||this._skipDefault(i,t,n)?void 0:i},c.prototype._encodeValue=function(e,t,n){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new r);let o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}let s=null,a=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)s=this._getUse(i.contains,n)._encode(e,t),a=!0;else if(i.children)s=i.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");const r=t.enterKey(n._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const i=n._encode(e[n._baseState.key],t,e);return t.leaveKey(r),i}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const n=this.clone();n._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(n){const r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)}),n))}else null!==i.use?o=this._getUse(i.use,n)._encode(e,t):(s=this._encodePrimitive(i.tag,e),a=!0);if(!i.any&&null===i.choice){const e=null!==i.implicit?i.implicit:i.tag,n=null===i.implicit?"universal":"context";null===e?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(e,a,n,s))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){const n=this._baseState,r=n.choice[e.type];return r||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){const n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},function(e,t,n){"use strict";const r=n(8);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.Reporter=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,n){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){const t=this._reporterState,n=t.obj;return t.obj=e,n},i.prototype.error=function(e){let t;const n=this._reporterState,r=e instanceof o;if(t=r?e:new o(n.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},i.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,n){"use strict";function r(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},function(e,t,n){"use strict";var r=n(326),i=n(89),o=n(34),s=n(149),a=n(333);function l(e,t,n){var r=this._refs[n];if("string"==typeof r){if(!this._refs[r])return l.call(this,e,t,r);r=this._refs[r]}if((r=r||this._schemas[n])instanceof s)return f(r.schema,this._opts.inlineRefs)?r.schema:r.validate||this._compile(r);var i,o,a,u=c.call(this,t,n);return u&&(i=u.schema,t=u.root,a=u.baseId),i instanceof s?o=i.validate||e.call(this,i.schema,t,void 0,a):void 0!==i&&(o=f(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,a)),o}function c(e,t){var n=r.parse(t,!1,!0),i=m(n),o=g(this._getId(e.schema));if(i!==o){var a=v(i),l=this._refs[a];if("string"==typeof l)return u.call(this,e,l,n);if(l instanceof s)l.validate||this._compile(l),e=l;else{if(!((l=this._schemas[a])instanceof s))return;if(l.validate||this._compile(l),a==v(t))return{schema:l,root:e,baseId:o};e=l}if(!e.schema)return;o=g(this._getId(e.schema))}return d.call(this,n,o,e.schema,e)}function u(e,t,n){var r=c.call(this,e,t);if(r){var i=r.schema,o=r.baseId;e=r.root;var s=this._getId(i);return s&&(o=y(o,s)),d.call(this,n,o,i,e)}}e.exports=l,l.normalizeId=v,l.fullPath=g,l.url=y,l.ids=function(e){var t=v(this._getId(e)),n={"":t},s={"":g(t,!1)},l={},c=this;return a(e,{allKeys:!0},(function(e,t,a,u,h,d,p){if(""!==t){var f=c._getId(e),g=n[u],m=s[u]+"/"+h;if(void 0!==p&&(m+="/"+("number"==typeof p?p:o.escapeFragment(p))),"string"==typeof f){f=g=v(g?r.resolve(g,f):f);var _=c._refs[f];if("string"==typeof _&&(_=c._refs[_]),_&&_.schema){if(!i(e,_.schema))throw new Error('id "'+f+'" resolves to more than one schema')}else if(f!=v(m))if("#"==f[0]){if(l[f]&&!i(e,l[f]))throw new Error('id "'+f+'" resolves to more than one schema');l[f]=e}else c._refs[f]=m}n[t]=g,s[t]=m}})),l},l.inlineRef=f,l.schema=c;var h=o.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function d(e,t,n,r){if(e.hash=e.hash||"","#/"==e.hash.slice(0,2)){for(var i=e.hash.split("/"),s=1;s<i.length;s++){var a=i[s];if(a){if(void 0===(n=n[a=o.unescapeFragment(a)]))break;var l;if(!h[a]&&((l=this._getId(n))&&(t=y(t,l)),n.$ref)){var u=y(t,n.$ref),d=c.call(this,r,u);d&&(n=d.schema,r=d.root,t=d.baseId)}}}return void 0!==n&&n!==r.schema?{schema:n,root:r,baseId:t}:void 0}}var p=o.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function f(e,t){return!1!==t&&(void 0===t||!0===t?function e(t){var n;if(Array.isArray(t)){for(var r=0;r<t.length;r++)if("object"==typeof(n=t[r])&&!e(n))return!1}else for(var i in t){if("$ref"==i)return!1;if("object"==typeof(n=t[i])&&!e(n))return!1}return!0}(e):t?function e(t){var n,r=0;if(Array.isArray(t)){for(var i=0;i<t.length;i++)if("object"==typeof(n=t[i])&&(r+=e(n)),r==1/0)return 1/0}else for(var o in t){if("$ref"==o)return 1/0;if(p[o])r++;else if("object"==typeof(n=t[o])&&(r+=e(n)+1),r==1/0)return 1/0}return r}(e)<=t:void 0)}function g(e,t){return!1!==t&&(e=v(e)),m(r.parse(e,!1,!0))}function m(e){var t=e.protocol||"//"==e.href.slice(0,2)?"//":"";return(e.protocol||"")+t+(e.host||"")+(e.path||"")+"#"}var _=/#\/?$/;function v(e){return e?e.replace(_,""):""}function y(e,t){return t=v(t),r.resolve(e,t)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports=function e(t,n){if(t===n)return!0;var r,i=Array.isArray(t),o=Array.isArray(n);if(i&&o){if(t.length!=n.length)return!1;for(r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1;return!0}if(i!=o)return!1;if(t&&n&&"object"==typeof t&&"object"==typeof n){var s=Object.keys(t);if(s.length!==Object.keys(n).length)return!1;var a=t instanceof Date,l=n instanceof Date;if(a&&l)return t.getTime()==n.getTime();if(a!=l)return!1;var c=t instanceof RegExp,u=n instanceof RegExp;if(c&&u)return t.toString()==n.toString();if(c!=u)return!1;for(r=0;r<s.length;r++)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=0;r<s.length;r++)if(!e(t[s[r]],n[s[r]]))return!1;return!0}return!1}},function(e,t,n){"use strict";var r=n(87);function i(e,t,n){this.message=n||i.message(e,t),this.missingRef=r.url(e,t),this.missingSchema=r.normalizeId(r.fullPath(this.missingRef))}function o(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}e.exports={Validation:o((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:o(i)},i.message=function(e,t){return"can't resolve reference "+t+" from id "+e}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(158)),r(n(374)),r(n(61))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(381);!function(e){e.isAvailable=function(){return r.DefaultTerminalSession.isAvailable()},e.startNew=function(e){return r.DefaultTerminalSession.startNew(e)},e.connectTo=function(e,t){return r.DefaultTerminalSession.connectTo(e,t)},e.listRunning=function(e){return r.DefaultTerminalSession.listRunning(e)},e.shutdown=function(e,t){return r.DefaultTerminalSession.shutdown(e,t)},e.shutdownAll=function(e){return r.DefaultTerminalSession.shutdownAll(e)}}(t.TerminalSession||(t.TerminalSession={}))},function(e,t,n){var r=n(35)(n(27),"Map");e.exports=r},function(e,t,n){var r=n(27).Symbol;e.exports=r},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(3),a=n(16),l=n(10),c=n(36),u=n(49),h=n(30),d=n(50),p=n(15),f=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n._fixed=0,n._spacing=4,n._dirty=!1,n._sizers=[],n._items=[],n._box=null,n._alignment="start",n._direction="top-to-bottom",void 0!==t.direction&&(n._direction=t.direction),void 0!==t.alignment&&(n._alignment=t.alignment),void 0!==t.spacing&&(n._spacing=o.clampSpacing(t.spacing)),n}return i(t,e),t.prototype.dispose=function(){s.each(this._items,(function(e){e.dispose()})),this._box=null,this._items.length=0,this._sizers.length=0,e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"direction",{get:function(){return this._direction},set:function(e){this._direction!==e&&(this._direction=e,this.parent&&(this.parent.dataset.direction=e,this.parent.fit()))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"alignment",{get:function(){return this._alignment},set:function(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){return this._spacing},set:function(e){e=o.clampSpacing(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,e.prototype.init.call(this)},t.prototype.attachWidget=function(e,t){s.ArrayExt.insert(this._items,e,new h.LayoutItem(t)),s.ArrayExt.insert(this._sizers,e,new u.BoxSizer),this.parent.isAttached&&l.MessageLoop.sendMessage(t,p.Widget.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&l.MessageLoop.sendMessage(t,p.Widget.Msg.AfterAttach),this.parent.fit()},t.prototype.moveWidget=function(e,t,n){s.ArrayExt.move(this._items,e,t),s.ArrayExt.move(this._sizers,e,t),this.parent.update()},t.prototype.detachWidget=function(e,t){var n=s.ArrayExt.removeAt(this._items,e);s.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&l.MessageLoop.sendMessage(t,p.Widget.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&l.MessageLoop.sendMessage(t,p.Widget.Msg.AfterDetach),n.dispose(),this.parent.fit()},t.prototype.onBeforeShow=function(t){e.prototype.onBeforeShow.call(this,t),this.parent.update()},t.prototype.onBeforeAttach=function(t){e.prototype.onBeforeAttach.call(this,t),this.parent.fit()},t.prototype.onChildShown=function(e){this.parent.fit()},t.prototype.onChildHidden=function(e){this.parent.fit()},t.prototype.onResize=function(e){this.parent.isVisible&&this._update(e.width,e.height)},t.prototype.onUpdateRequest=function(e){this.parent.isVisible&&this._update(-1,-1)},t.prototype.onFitRequest=function(e){this.parent.isAttached&&this._fit()},t.prototype._fit=function(){for(var e=0,n=0,r=this._items.length;n<r;++n)e+=+!this._items[n].isHidden;this._fixed=this._spacing*Math.max(0,e-1);var i=o.isHorizontal(this._direction),s=i?this._fixed:0,c=i?0:this._fixed;for(n=0,r=this._items.length;n<r;++n){var u=this._items[n],h=this._sizers[n];u.isHidden?(h.minSize=0,h.maxSize=0):(u.fit(),h.sizeHint=t.getSizeBasis(u.widget),h.stretch=t.getStretch(u.widget),i?(h.minSize=u.minWidth,h.maxSize=u.maxWidth,s+=u.minWidth,c=Math.max(c,u.minHeight)):(h.minSize=u.minHeight,h.maxSize=u.maxHeight,c+=u.minHeight,s=Math.max(s,u.minWidth)))}var d=this._box=a.ElementExt.boxSizing(this.parent.node);s+=d.horizontalSum,c+=d.verticalSum;var f=this.parent.node.style;f.minWidth=s+"px",f.minHeight=c+"px",this._dirty=!0,this.parent.parent&&l.MessageLoop.sendMessage(this.parent.parent,p.Widget.Msg.FitRequest),this._dirty&&l.MessageLoop.sendMessage(this.parent,p.Widget.Msg.UpdateRequest)},t.prototype._update=function(e,t){this._dirty=!1;for(var n=0,r=0,i=this._items.length;r<i;++r)n+=+!this._items[r].isHidden;if(0!==n){e<0&&(e=this.parent.node.offsetWidth),t<0&&(t=this.parent.node.offsetHeight),this._box||(this._box=a.ElementExt.boxSizing(this.parent.node));var o,s=this._box.paddingTop,l=this._box.paddingLeft,c=e-this._box.horizontalSum,h=t-this._box.verticalSum;switch(this._direction){case"left-to-right":o=u.BoxEngine.calc(this._sizers,Math.max(0,c-this._fixed));break;case"top-to-bottom":o=u.BoxEngine.calc(this._sizers,Math.max(0,h-this._fixed));break;case"right-to-left":o=u.BoxEngine.calc(this._sizers,Math.max(0,c-this._fixed)),l+=c;break;case"bottom-to-top":o=u.BoxEngine.calc(this._sizers,Math.max(0,h-this._fixed)),s+=h;break;default:throw"unreachable"}var d=0,p=0;if(o>0)switch(this._alignment){case"start":break;case"center":d=0,p=o/2;break;case"end":d=0,p=o;break;case"justify":d=o/n,p=0;break;default:throw"unreachable"}for(r=0,i=this._items.length;r<i;++r){var f=this._items[r];if(!f.isHidden){var g=this._sizers[r].size;switch(this._direction){case"left-to-right":f.update(l+p,s,g+d,h),l+=g+d+this._spacing;break;case"top-to-bottom":f.update(l,s+p,c,g+d),s+=g+d+this._spacing;break;case"right-to-left":f.update(l-p-g-d,s,g+d,h),l-=g+d+this._spacing;break;case"bottom-to-top":f.update(l,s-p-g-d,c,g+d),s-=g+d+this._spacing;break;default:throw"unreachable"}}}}},t}(d.PanelLayout);t.BoxLayout=f,function(e){e.getStretch=function(e){return o.stretchProperty.get(e)},e.setStretch=function(e,t){o.stretchProperty.set(e,t)},e.getSizeBasis=function(e){return o.sizeBasisProperty.get(e)},e.setSizeBasis=function(e,t){o.sizeBasisProperty.set(e,t)}}(f=t.BoxLayout||(t.BoxLayout={})),t.BoxLayout=f,function(e){function t(e){e.parent&&e.parent.layout instanceof f&&e.parent.fit()}e.stretchProperty=new c.AttachedProperty({name:"stretch",create:function(){return 0},coerce:function(e,t){return Math.max(0,Math.floor(t))},changed:t}),e.sizeBasisProperty=new c.AttachedProperty({name:"sizeBasis",create:function(){return 0},coerce:function(e,t){return Math.max(0,Math.floor(t))},changed:t}),e.isHorizontal=function(e){return"left-to-right"===e||"right-to-left"===e},e.clampSpacing=function(e){return Math.max(0,Math.floor(e))}}(o||(o={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=function(){function e(e){this._label="",this._caption="",this._mnemonic=-1,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new r.Signal(this),this.owner=e.owner,void 0!==e.label&&(this._label=e.label),void 0!==e.mnemonic&&(this._mnemonic=e.mnemonic),void 0!==e.icon&&(this._iconClass=e.icon),void 0!==e.iconClass&&(this._iconClass=e.iconClass),void 0!==e.iconLabel&&(this._iconLabel=e.iconLabel),void 0!==e.caption&&(this._caption=e.caption),void 0!==e.className&&(this._className=e.className),void 0!==e.closable&&(this._closable=e.closable),this._dataset=e.dataset||{}}return Object.defineProperty(e.prototype,"changed",{get:function(){return this._changed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(e){this._label!==e&&(this._label=e,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mnemonic",{get:function(){return this._mnemonic},set:function(e){this._mnemonic!==e&&(this._mnemonic=e,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"icon",{get:function(){return this.iconClass},set:function(e){this.iconClass=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iconClass",{get:function(){return this._iconClass},set:function(e){this._iconClass!==e&&(this._iconClass=e,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iconLabel",{get:function(){return this._iconLabel},set:function(e){this._iconLabel!==e&&(this._iconLabel=e,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"caption",{get:function(){return this._caption},set:function(e){this._caption!==e&&(this._caption=e,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{get:function(){return this._className},set:function(e){this._className!==e&&(this._className=e,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"closable",{get:function(){return this._closable},set:function(e){this._closable!==e&&(this._closable=e,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataset",{get:function(){return this._dataset},set:function(e){this._dataset!==e&&(this._dataset=e,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),e}();t.Title=i},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(3),a=n(16),l=n(7),c=n(10),u=n(6),h=n(67),d=n(97),p=n(15),f=function(e){function t(n){void 0===n&&(n={});var r=e.call(this,{node:o.createNode()})||this;return r._currentIndex=-1,r._titles=[],r._previousTitle=null,r._dragData=null,r._tabMoved=new u.Signal(r),r._currentChanged=new u.Signal(r),r._tabCloseRequested=new u.Signal(r),r._tabDetachRequested=new u.Signal(r),r._tabActivateRequested=new u.Signal(r),r.addClass("p-TabBar"),r.setFlag(p.Widget.Flag.DisallowLayout),r.tabsMovable=n.tabsMovable||!1,r.allowDeselect=n.allowDeselect||!1,r.insertBehavior=n.insertBehavior||"select-tab-if-needed",r.removeBehavior=n.removeBehavior||"select-tab-after",r.renderer=n.renderer||t.defaultRenderer,r._orientation=n.orientation||"horizontal",r.dataset.orientation=r._orientation,r}return i(t,e),t.prototype.dispose=function(){this._releaseMouse(),this._titles.length=0,this._previousTitle=null,e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"currentChanged",{get:function(){return this._currentChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabMoved",{get:function(){return this._tabMoved},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabActivateRequested",{get:function(){return this._tabActivateRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabCloseRequested",{get:function(){return this._tabCloseRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabDetachRequested",{get:function(){return this._tabDetachRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentTitle",{get:function(){return this._titles[this._currentIndex]||null},set:function(e){this.currentIndex=e?this._titles.indexOf(e):-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentIndex",{get:function(){return this._currentIndex},set:function(e){if((e<0||e>=this._titles.length)&&(e=-1),this._currentIndex!==e){var t=this._currentIndex,n=this._titles[t]||null,r=e,i=this._titles[r]||null;this._currentIndex=r,this._previousTitle=n,this.update(),this._currentChanged.emit({previousIndex:t,previousTitle:n,currentIndex:r,currentTitle:i})}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orientation",{get:function(){return this._orientation},set:function(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"titles",{get:function(){return this._titles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("p-TabBar-content")[0]},enumerable:!0,configurable:!0}),t.prototype.addTab=function(e){return this.insertTab(this._titles.length,e)},t.prototype.insertTab=function(e,t){this._releaseMouse();var n=o.asTitle(t),r=this._titles.indexOf(n),i=Math.max(0,Math.min(e,this._titles.length));return-1===r?(s.ArrayExt.insert(this._titles,i,n),n.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(i,n),n):(i===this._titles.length&&i--,r===i||(s.ArrayExt.move(this._titles,r,i),this.update(),this._adjustCurrentForMove(r,i)),n)},t.prototype.removeTab=function(e){this.removeTabAt(this._titles.indexOf(e))},t.prototype.removeTabAt=function(e){this._releaseMouse();var t=s.ArrayExt.removeAt(this._titles,e);t&&(t.changed.disconnect(this._onTitleChanged,this),t===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(e,t))},t.prototype.clearTabs=function(){if(0!==this._titles.length){this._releaseMouse();for(var e=0,t=this._titles;e<t.length;e++){t[e].changed.disconnect(this._onTitleChanged,this)}var n=this.currentIndex,r=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),-1!==n&&this._currentChanged.emit({previousIndex:n,previousTitle:r,currentIndex:-1,currentTitle:null})}},t.prototype.releaseMouse=function(){this._releaseMouse()},t.prototype.handleEvent=function(e){switch(e.type){case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseup":this._evtMouseUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}},t.prototype.onBeforeAttach=function(e){this.node.addEventListener("mousedown",this)},t.prototype.onAfterDetach=function(e){this.node.removeEventListener("mousedown",this),this._releaseMouse()},t.prototype.onUpdateRequest=function(e){for(var t=this._titles,n=this.renderer,r=this.currentTitle,i=new Array(t.length),o=0,s=t.length;o<s;++o){var a=t[o],l=a===r,c=l?s:s-o-1;i[o]=n.renderTab({title:a,current:l,zIndex:c})}h.VirtualDOM.render(i,this.contentNode)},t.prototype._evtKeyDown=function(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&this._releaseMouse()},t.prototype._evtMouseDown=function(e){if((0===e.button||1===e.button)&&!this._dragData){var t=this.contentNode.children,n=s.ArrayExt.findFirstIndex(t,(function(t){return a.ElementExt.hitTest(t,e.clientX,e.clientY)}));if(-1!==n&&(e.preventDefault(),e.stopPropagation(),this._dragData={tab:t[n],index:n,pressX:e.clientX,pressY:e.clientY,tabPos:-1,tabSize:-1,tabPressPos:-1,targetIndex:-1,tabLayout:null,contentRect:null,override:null,dragActive:!1,dragAborted:!1,detachRequested:!1},document.addEventListener("mouseup",this,!0),1!==e.button)){var r=t[n].querySelector(this.renderer.closeIconSelector);r&&r.contains(e.target)||(this.tabsMovable&&(document.addEventListener("mousemove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===n?this.currentIndex=-1:this.currentIndex=n,-1!==this.currentIndex&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}}},t.prototype._evtMouseMove=function(e){var t=this._dragData;if(t){e.preventDefault(),e.stopPropagation();var n=this.contentNode.children;if(t.dragActive||o.dragExceeded(t,e)){if(!t.dragActive){var r=t.tab.getBoundingClientRect();"horizontal"===this._orientation?(t.tabPos=t.tab.offsetLeft,t.tabSize=r.width,t.tabPressPos=t.pressX-r.left):(t.tabPos=t.tab.offsetTop,t.tabSize=r.height,t.tabPressPos=t.pressY-r.top),t.tabLayout=o.snapTabLayout(n,this._orientation),t.contentRect=this.contentNode.getBoundingClientRect(),t.override=l.Drag.overrideCursor("default"),t.tab.classList.add("p-mod-dragging"),this.addClass("p-mod-dragging"),t.dragActive=!0}if(!t.detachRequested&&o.detachExceeded(t,e)){t.detachRequested=!0;var i=t.index,s=e.clientX,a=e.clientY,c=n[i],u=this._titles[i];if(this._tabDetachRequested.emit({index:i,title:u,tab:c,clientX:s,clientY:a}),t.dragAborted)return}o.layoutTabs(n,t,e,this._orientation)}}},t.prototype._evtMouseUp=function(e){var t=this;if(0===e.button||1===e.button){var n=this._dragData;if(n){if(e.preventDefault(),e.stopPropagation(),document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("contextmenu",this,!0),!n.dragActive){this._dragData=null;var r=this.contentNode.children,i=s.ArrayExt.findFirstIndex(r,(function(t){return a.ElementExt.hitTest(t,e.clientX,e.clientY)}));if(i!==n.index)return;var l=this._titles[i];if(!l.closable)return;if(1===e.button)return void this._tabCloseRequested.emit({index:i,title:l});var u=r[i].querySelector(this.renderer.closeIconSelector);return u&&u.contains(e.target)?void this._tabCloseRequested.emit({index:i,title:l}):void 0}if(0===e.button){o.finalizeTabPosition(n,this._orientation),n.tab.classList.remove("p-mod-dragging");var h=o.parseTransitionDuration(n.tab);setTimeout((function(){if(!n.dragAborted){t._dragData=null,o.resetTabPositions(t.contentNode.children,t._orientation),n.override.dispose(),t.removeClass("p-mod-dragging");var e=n.index,r=n.targetIndex;-1!==r&&e!==r&&(s.ArrayExt.move(t._titles,e,r),t._adjustCurrentForMove(e,r),t._tabMoved.emit({fromIndex:e,toIndex:r,title:t._titles[r]}),c.MessageLoop.sendMessage(t,p.Widget.Msg.UpdateRequest))}}),h)}}}},t.prototype._releaseMouse=function(){var e=this._dragData;e&&(this._dragData=null,document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("contextmenu",this,!0),e.dragAborted=!0,e.dragActive&&(o.resetTabPositions(this.contentNode.children,this._orientation),e.override.dispose(),e.tab.classList.remove("p-mod-dragging"),this.removeClass("p-mod-dragging")))},t.prototype._adjustCurrentForInsert=function(e,t){var n=this.currentTitle,r=this._currentIndex,i=this.insertBehavior;if("select-tab"===i||"select-tab-if-needed"===i&&-1===r)return this._currentIndex=e,this._previousTitle=n,void this._currentChanged.emit({previousIndex:r,previousTitle:n,currentIndex:e,currentTitle:t});r>=e&&this._currentIndex++},t.prototype._adjustCurrentForMove=function(e,t){this._currentIndex===e?this._currentIndex=t:this._currentIndex<e&&this._currentIndex>=t?this._currentIndex++:this._currentIndex>e&&this._currentIndex<=t&&this._currentIndex--},t.prototype._adjustCurrentForRemove=function(e,t){var n=this._currentIndex,r=this.removeBehavior;if(n===e){if(0===this._titles.length)return this._currentIndex=-1,void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null});if("select-tab-after"===r)return this._currentIndex=Math.min(e,this._titles.length-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});if("select-tab-before"===r)return this._currentIndex=Math.max(0,e-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});if("select-previous-tab"===r)return this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(e,this._titles.length-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});this._currentIndex=-1,this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}else n>e&&this._currentIndex--},t.prototype._onTitleChanged=function(e){this.update()},t}(p.Widget);t.TabBar=f,function(e){var t=function(){function e(){this.closeIconSelector=".p-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap}return e.prototype.renderTab=function(e){var t=e.title.caption,n=this.createTabKey(e),r=this.createTabStyle(e),i=this.createTabClass(e),o=this.createTabDataset(e);return h.h.li({key:n,className:i,title:t,style:r,dataset:o},this.renderIcon(e),this.renderLabel(e),this.renderCloseIcon(e))},e.prototype.renderIcon=function(e){var t=this.createIconClass(e);return h.h.div({className:t},e.title.iconLabel)},e.prototype.renderLabel=function(e){return h.h.div({className:"p-TabBar-tabLabel"},e.title.label)},e.prototype.renderCloseIcon=function(e){return h.h.div({className:"p-TabBar-tabCloseIcon"})},e.prototype.createTabKey=function(e){var t=this._tabKeys.get(e.title);return void 0===t&&(t="tab-key-"+this._tabID++,this._tabKeys.set(e.title,t)),t},e.prototype.createTabStyle=function(e){return{zIndex:""+e.zIndex}},e.prototype.createTabClass=function(e){var t="p-TabBar-tab";return e.title.className&&(t+=" "+e.title.className),e.title.closable&&(t+=" p-mod-closable"),e.current&&(t+=" p-mod-current"),t},e.prototype.createTabDataset=function(e){return e.title.dataset},e.prototype.createIconClass=function(e){var t="p-TabBar-tabIcon",n=e.title.iconClass;return n?t+" "+n:t},e}();e.Renderer=t,e.defaultRenderer=new t}(f=t.TabBar||(t.TabBar={})),t.TabBar=f,function(e){e.DRAG_THRESHOLD=5,e.DETACH_THRESHOLD=20,e.createNode=function(){var e=document.createElement("div"),t=document.createElement("ul");return t.className="p-TabBar-content",e.appendChild(t),e},e.asTitle=function(e){return e instanceof d.Title?e:new d.Title(e)},e.parseTransitionDuration=function(e){var t=window.getComputedStyle(e);return 1e3*(parseFloat(t.transitionDuration)||0)},e.snapTabLayout=function(e,t){for(var n=new Array(e.length),r=0,i=e.length;r<i;++r){var o=e[r],s=window.getComputedStyle(o);n[r]="horizontal"===t?{pos:o.offsetLeft,size:o.offsetWidth,margin:parseFloat(s.marginLeft)||0}:{pos:o.offsetTop,size:o.offsetHeight,margin:parseFloat(s.marginTop)||0}}return n},e.dragExceeded=function(t,n){var r=Math.abs(n.clientX-t.pressX),i=Math.abs(n.clientY-t.pressY);return r>=e.DRAG_THRESHOLD||i>=e.DRAG_THRESHOLD},e.detachExceeded=function(t,n){var r=t.contentRect;return n.clientX<r.left-e.DETACH_THRESHOLD||n.clientX>=r.right+e.DETACH_THRESHOLD||n.clientY<r.top-e.DETACH_THRESHOLD||n.clientY>=r.bottom+e.DETACH_THRESHOLD},e.layoutTabs=function(e,t,n,r){var i,o,s,a;"horizontal"===r?(i=t.pressX,o=n.clientX-t.contentRect.left,s=n.clientX,a=t.contentRect.width):(i=t.pressY,o=n.clientY-t.contentRect.top,s=n.clientY,a=t.contentRect.height);for(var l=t.index,c=o-t.tabPressPos,u=c+t.tabSize,h=0,d=e.length;h<d;++h){var p=void 0,f=t.tabLayout[h],g=f.pos+(f.size>>1);if(h<t.index&&c<g)p=t.tabSize+t.tabLayout[h+1].margin+"px",l=Math.min(l,h);else if(h>t.index&&u>g)p=-t.tabSize-f.margin+"px",l=Math.max(l,h);else if(h===t.index){var m=s-i,_=a-(t.tabPos+t.tabSize);p=Math.max(-t.tabPos,Math.min(m,_))+"px"}else p="";"horizontal"===r?e[h].style.left=p:e[h].style.top=p}t.targetIndex=l},e.finalizeTabPosition=function(e,t){var n,r;if(n="horizontal"===t?e.contentRect.width:e.contentRect.height,e.targetIndex===e.index)r=0;else if(e.targetIndex>e.index){r=(i=e.tabLayout[e.targetIndex]).pos+i.size-e.tabSize-e.tabPos}else{var i;r=(i=e.tabLayout[e.targetIndex]).pos-e.tabPos}var o=n-(e.tabPos+e.tabSize),s=Math.max(-e.tabPos,Math.min(r,o));"horizontal"===t?e.tab.style.left=s+"px":e.tab.style.top=s+"px"},e.resetTabPositions=function(e,t){s.each(e,(function(e){"horizontal"===t?e.style.left="":e.style.top=""}))}}(o||(o={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JUPYTER_WIDGETS_VERSION="1.1.0",t.PROTOCOL_VERSION="2.0.0"},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(37),a=n(474),l=n(38),c=n(11),u=n(475),h=n(5),d=n(10),p=n(99);function f(e,t){if(Array.isArray(e)){var n=[];return e.forEach((function(e,r){n.push(f(e,t))})),Promise.all(n)}if(e instanceof Object){var r={};return Object.keys(e).forEach((function(n){r[n]=f(e[n],t)})),s.resolvePromisesDict(r)}return"string"==typeof e&&"IPY_MODEL_"===e.slice(0,10)?t.get_model(e.slice(10,e.length)):Promise.resolve(e)}t.unpack_models=f;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.defaults=function(){return{_model_module:"@jupyter-widgets/base",_model_name:"WidgetModel",_model_module_version:p.JUPYTER_WIDGETS_VERSION,_view_module:"@jupyter-widgets/base",_view_name:null,_view_module_version:p.JUPYTER_WIDGETS_VERSION,_view_count:null}},t.prototype.isNew=function(){return!1},t.prototype.initialize=function(t,n){e.prototype.initialize.call(this,t,n),this.widget_manager=n.widget_manager,this.model_id=n.model_id;var r=n.comm;this.views=Object.create(null),this.state_change=Promise.resolve(),this._closed=!1,this._state_lock=null,this._msg_buffer=null,this._msg_buffer_callbacks=null,this._pending_msgs=0,this._buffered_state_diff={},r?(this.comm=r,r.on_close(this._handle_comm_closed.bind(this)),r.on_msg(this._handle_comm_msg.bind(this)),this.comm_live=!0):this.comm_live=!1},Object.defineProperty(t.prototype,"comm_live",{get:function(){return this._comm_live},set:function(e){this._comm_live=e,this.trigger("comm_live_update")},enumerable:!0,configurable:!0}),t.prototype.send=function(e,t,n){if(void 0!==this.comm){var r={method:"custom",content:e};this.comm.send(r,t,{},n)}},t.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),!this._closed){this._closed=!0,this.comm&&!e&&this.comm.close(),this.stopListening(),this.trigger("destroy",this),this.comm&&delete this.comm;var n=Object.keys(this.views).map((function(e){return t.views[e].then((function(e){return e.remove()}))}));return delete this.views,Promise.all(n).then((function(){}))}},t.prototype._handle_comm_closed=function(e){this.trigger("comm:close"),this.close(!0)},t.prototype._handle_comm_msg=function(e){var t=this,n=e.content.data;switch(n.method){case"update":return this.state_change=this.state_change.then((function(){var r=n.state,i=n.buffer_paths||[],o=(e.buffers||[]).map((function(e){return e instanceof DataView?e:new DataView(e instanceof ArrayBuffer?e:e.buffer)}));return s.put_buffers(r,i,o),t.constructor._deserialize_state(r,t.widget_manager)})).then((function(e){t.set_state(e)})).catch(s.reject("Could not process update msg for model id: "+this.model_id,!0)),this.state_change;case"custom":return this.trigger("msg:custom",n.content,e.buffers),Promise.resolve()}},t.prototype.set_state=function(e){this._state_lock=e;try{this.set(e)}catch(e){console.error("Error setting state: "+e.message)}finally{this._state_lock=null}},t.prototype.get_state=function(e){var t=this.attributes;if(e){var n=this.defaults,r="function"==typeof n?n.call(this):n,i={};return Object.keys(t).forEach((function(e){s.isEqual(t[e],r[e])||(i[e]=t[e])})),i}return o({},t)},t.prototype._handle_status=function(e){void 0!==this.comm&&"idle"===e.content.execution_state&&(this._pending_msgs--,null!==this._msg_buffer&&this._pending_msgs<1&&(this.send_sync_message(this._msg_buffer,this._msg_buffer_callbacks),this._msg_buffer=null,this._msg_buffer_callbacks=null))},t.prototype.callbacks=function(e){return this.widget_manager.callbacks(e)},t.prototype.set=function(e,t,n){var r=a.set.call(this,e,t,n);if(void 0!==this._buffered_state_diff){var i=this.changedAttributes()||{};if(this._state_lock)for(var o=0,l=Object.keys(this._state_lock);o<l.length;o++){var c=l[o];i[c]===this._state_lock[c]&&delete i[c]}this._buffered_state_diff=s.assign(this._buffered_state_diff,i)}return r},t.prototype.sync=function(e,t,n){if(void 0===n&&(n={}),void 0===this.comm)throw"Syncing error: no comm channel defined";var r="patch"===e?n.attrs:t.get_state(n.drop_defaults);if(this._state_lock)for(var i=0,o=Object.keys(this._state_lock);i<o.length;i++){var a=o[i];r[a]===this._state_lock[a]&&delete r[a]}var l=this.serialize(r);if(Object.keys(l).length>0){var c=n.callbacks||this.callbacks();if(this._pending_msgs>=1){switch(e){case"patch":this._msg_buffer=s.assign(this._msg_buffer||{},l);break;case"update":case"create":this._msg_buffer=l;break;default:throw"unrecognized syncing method"}this._msg_buffer_callbacks=c}else this.send_sync_message(r,c)}},t.prototype.serialize=function(e){for(var t=this.constructor.serializers||{},n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];try{t[i]&&t[i].serialize?e[i]=t[i].serialize(e[i],this):e[i]=JSON.parse(JSON.stringify(e[i])),e[i]&&e[i].toJSON&&(e[i]=e[i].toJSON())}catch(e){throw console.error("Error serializing widget state attribute: ",i),e}}return e},t.prototype.send_sync_message=function(e,t){var n=this;void 0===t&&(t={});try{t.iopub=t.iopub||{};var r=t.iopub.status;t.iopub.status=function(e){n._handle_status(e),r&&r(e)};var i=s.remove_buffers(e);this.comm.send({method:"update",state:i.state,buffer_paths:i.buffer_paths},t,{},i.buffers),this._pending_msgs++}catch(e){console.error("Could not send widget sync message",e)}},t.prototype.save_changes=function(e){if(this.comm_live){var t={patch:!0};e&&(t.callbacks=e),this.save(this._buffered_state_diff,t),this._buffered_state_diff={}}},t.prototype.on_some_change=function(e,t,n){var r=this;this.on("change",(function(){e.some(r.hasChanged,r)&&t.apply(n,arguments)}),this)},t.prototype.toJSON=function(e){return"IPY_MODEL_"+this.model_id},t._deserialize_state=function(e,t){var n,r=this.serializers;if(r)for(var i in n={},e)r[i]&&r[i].deserialize?n[i]=r[i].deserialize(e[i],t):n[i]=e[i];else n=e;return s.resolvePromisesDict(n)},t}(l.Model);t.WidgetModel=g;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.defaults=function(){return s.assign(e.prototype.defaults.call(this),{_dom_classes:[]})},t.serializers=o({},g.serializers,{layout:{deserialize:f},style:{deserialize:f}}),t}(g);t.DOMWidgetModel=m;var _=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.prototype.initialize=function(e){var t=this;this.listenTo(this.model,"change",(function(){var e=Object.keys(t.model.changedAttributes()||{});"_view_count"===e[0]&&1===e.length||t.update()})),this.options=e.options,this.once("remove",(function(){"number"==typeof t.model.get("_view_count")&&(t.model.set("_view_count",t.model.get("_view_count")-1),t.model.save_changes())})),this.once("displayed",(function(){"number"==typeof t.model.get("_view_count")&&(t.model.set("_view_count",t.model.get("_view_count")+1),t.model.save_changes())})),this.displayed=new Promise((function(e,n){t.once("displayed",e)}))},t.prototype.update=function(e){},t.prototype.render=function(){},t.prototype.create_child_view=function(e,t){return void 0===t&&(t={}),t=o({parent:this},t),this.model.widget_manager.create_view(e,t).catch(s.reject("Could not create child view",!0))},t.prototype.callbacks=function(){return this.model.callbacks(this)},t.prototype.send=function(e,t){this.model.send(e,this.callbacks(),t)},t.prototype.touch=function(){this.model.save_changes(this.callbacks())},t.prototype.remove=function(){return e.prototype.remove.call(this),this.trigger("remove"),this},t}(u.NativeView);t.WidgetView=_;var v=function(e){function t(t){var n=this,r=t.view;return delete t.view,(n=e.call(this,t)||this)._view=r,n}return i(t,e),t.prototype.dispose=function(){this.isDisposed||(e.prototype.dispose.call(this),this._view&&this._view.remove(),this._view=null)},t.prototype.processMessage=function(t){e.prototype.processMessage.call(this,t),this._view.processPhosphorMessage(t)},t}(h.Widget);t.JupyterPhosphorWidget=v;var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.initialize=function(t){var n=this;e.prototype.initialize.call(this,t),this.listenTo(this.model,"change:_dom_classes",(function(e,t){var r=e.previous("_dom_classes");n.update_classes(r,t)})),this.layoutPromise=Promise.resolve(),this.listenTo(this.model,"change:layout",(function(e,t){n.setLayout(t,e.previous("layout"))})),this.stylePromise=Promise.resolve(),this.listenTo(this.model,"change:style",(function(e,t){n.setStyle(t,e.previous("style"))})),this.displayed.then((function(){n.update_classes([],n.model.get("_dom_classes")),n.setLayout(n.model.get("layout")),n.setStyle(n.model.get("style"))})),this._comm_live_update(),this.listenTo(this.model,"comm_live_update",(function(){n._comm_live_update()}))},t.prototype.setLayout=function(e,t){var n=this;e&&(this.layoutPromise=this.layoutPromise.then((function(t){return t&&(t.unlayout(),n.stopListening(t.model),t.remove()),n.create_child_view(e).then((function(e){return n.displayed.then((function(){return e.trigger("displayed"),n.listenTo(e.model,"change",(function(){d.MessageLoop.postMessage(n.pWidget,h.Widget.ResizeMessage.UnknownSize)})),d.MessageLoop.postMessage(n.pWidget,h.Widget.ResizeMessage.UnknownSize),e}))})).catch(s.reject("Could not add LayoutView to DOMWidgetView",!0))})))},t.prototype.setStyle=function(e,t){var n=this;e&&(this.stylePromise=this.stylePromise.then((function(t){return t&&(t.unstyle(),n.stopListening(t.model),t.remove()),n.create_child_view(e).then((function(e){return n.displayed.then((function(){return e.trigger("displayed"),e}))})).catch(s.reject("Could not add styleView to DOMWidgetView",!0))})))},t.prototype.update_classes=function(e,t,n){void 0===n&&(n=this.el),s.difference(e,t).map((function(e){n.classList?n.classList.remove(e):n.setAttribute("class",n.getAttribute("class").replace(e,""))})),s.difference(t,e).map((function(e){n.classList?n.classList.add(e):n.setAttribute("class",n.getAttribute("class").concat(" ",e))}))},t.prototype.update_mapped_classes=function(e,t,n){var r=this.model.previous(t),i=e[r]?e[r]:[],o=e[r=this.model.get(t)]?e[r]:[];this.update_classes(i,o,n||this.el)},t.prototype.set_mapped_classes=function(e,t,n){var r=this.model.get(t),i=e[r]?e[r]:[];this.update_classes([],i,n||this.el)},t.prototype._setElement=function(e){this.pWidget&&this.pWidget.dispose(),this.$el=e instanceof c?e:c(e),this.el=this.$el[0],this.pWidget=new v({node:e,view:this})},t.prototype.remove=function(){return this.pWidget&&this.pWidget.dispose(),e.prototype.remove.call(this)},t.prototype.processPhosphorMessage=function(e){switch(e.type){case"after-attach":this.trigger("displayed")}},t.prototype._comm_live_update=function(){this.model.comm_live?this.pWidget.removeClass("jupyter-widgets-disconnected"):this.pWidget.addClass("jupyter-widgets-disconnected")},t}(_);t.DOMWidgetView=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(6),o=function(){function e(e){if(void 0===e&&(e={}),this._map=new Map,this._changed=new i.Signal(this),this._isDisposed=!1,this._itemCmp=e.itemCmp||r.itemCmp,e.values)for(var t in e.values)this._map.set(t,e.values[t])}return Object.defineProperty(e.prototype,"type",{get:function(){return"Map"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"changed",{get:function(){return this._changed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.set=function(e,t){var n=this._map.get(e);if(void 0===t)throw Error("Cannot set an undefined value, use remove");var r=this._itemCmp;return void 0!==n&&r(n,t)||(this._map.set(e,t),this._changed.emit({type:n?"change":"add",key:e,oldValue:n,newValue:t})),n},e.prototype.get=function(e){return this._map.get(e)},e.prototype.has=function(e){return this._map.has(e)},e.prototype.keys=function(){var e=[];return this._map.forEach((function(t,n){e.push(n)})),e},e.prototype.values=function(){var e=[];return this._map.forEach((function(t,n){e.push(t)})),e},e.prototype.delete=function(e){var t=this._map.get(e);return this._map.delete(e),this._changed.emit({type:"remove",key:e,oldValue:t,newValue:void 0}),t},e.prototype.clear=function(){for(var e=this.keys(),t=0;t<e.length;t++)this.delete(e[t])},e.prototype.dispose=function(){this.isDisposed||(this._isDisposed=!0,i.Signal.clearData(this),this._map.clear())},e}();t.ObservableMap=o,function(e){e.itemCmp=function(e,t){return e===t}}(r||(r={}))},function(e,t,n){var r=n(1),i=(n(0),n(194)),o=(n(13),function(e){return r.max(Object.keys(e).map(Number))});e.exports={cycle_colors:function(e,t){var n=e.length;if(n>t)return e.slice(0,t);for(var r=[],i=Math.floor(t/n);i>0;i--)r=r.concat(e);return r.concat(e.slice(0,t%n))},cycle_colors_from_scheme:function(e,t){var n=i[e=e in i?e:"RdYlGn"],r=t.toString();if(2===t)return[n[3][0],n[3][2]];if(r in n)return n[r];r=o(n).toString();return this.cycle_colors(n[r],t)},get_linear_scale:function(e){e=e in i&&"qual"!==i[e].type?e:"RdYlGn";var t=i[e],n=t[o(t).toString()];return r.scale.linear().range(n)},get_ordinal_scale:function(e,t){var n=r.scale.ordinal();return n.range(this.cycle_colors_from_scheme(e,t)),n},get_linear_scale_range:function(e){return this.get_linear_scale(e).range()},get_ordinal_scale_range:function(e,t){return this.get_ordinal_scale(e,t).range()}}},function(e,t,n){var r=n(197);function i(e,t,n){if(0==t.length&&0==n.length)return!1;var r=!0;return t.sort((function(e,t){return e-t})),n.sort((function(e,t){return e-t})),0!=t.length&&(r=r&&t[0]<=e[0]&&e[0]<=t[1]),0!=n.length&&(r=r&&n[0]<=e[1]&&e[1]<=n[1]),r}function o(e,t){return 0==e.length||0==t.length?0!=e.length||0!=t.length:(e.sort((function(e,t){return e-t})),t.sort((function(e,t){return e-t})),e[0]<t[0]!=e[0]<t[1]||e[1]<t[0]!=e[1]<t[1]||t[0]<e[0]!=t[0]<e[1]||t[1]<e[0]!=t[1]<e[1])}e.exports={point_in_lasso:r.point_in_lasso,point_in_rectangle:i,rect_inter_rect:function(e,t,n,r){return o(e,n)&&o(t,r)},lasso_inter_rect:function(e,t,n){for(var r=0;r<n.length;r++)if(i(n[r],e,t))return!0;return!1}}},function(e,t,n){var r=n(1),i=n(69).Scale.extend({render:function(){this.scale=r.scale.linear(),this.model.domain.length>0&&this.scale.domain(this.model.domain),this.offset=0,this.create_event_listeners()},expand_domain:function(e,t){var n=this.scale.copy();n.clamp(!1),n.domain(this.model.domain),n.range(e),this.scale.domain(t.map((function(e){return n.invert(e)})))},invert:function(e){return this.scale.invert(e)},invert_range:function(e){var t=this;return e.map((function(e){return t.invert(e)}))}});e.exports={LinearScale:i}},function(e,t,n){var r=n(1),i=Math.PI,o=i/180,s=Math.sqrt(3),a=Math.tan(i/6),l=function(e){var t=Math.sqrt(e/i);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"},c=r.map({circle:l,cross:function(e,t){var n=Math.sqrt(e/5)/2;return"M"+-3*n+","+-n+"H"+-n+"V"+-3*n+"H"+n+"V"+-n+"H"+3*n+"V"+n+"H"+n+"V"+3*n+"H"+-n+"V"+n+"H"+-3*n+"Z"},diamond:function(e,t){var n=Math.sqrt(e/(2*a)),r=n*a;return"M0,"+-n+"L"+r+",0 0,"+n+" "+-r+",0Z"},square:function(e,t){var n=Math.sqrt(e)/2;return"M"+-n+","+-n+"L"+n+","+-n+" "+n+","+n+" "+-n+","+n+"Z"},"triangle-down":function(e,t){var n=Math.sqrt(e/s),r=n*s/2;return"M0,"+r+"L"+n+","+-r+" "+-n+","+-r+"Z"},"triangle-up":function(e,t){var n=Math.sqrt(e/s),r=n*s/2;return"M0,"+-r+"L"+n+","+r+" "+-n+","+r+"Z"},arrow:function(e,t){var n=60+-55*t,r=Math.tan(n*o),i=Math.sqrt(e/r),s=i*r/2;return"M0,"+-i+"L"+s+","+i+" "+-s+","+i+"Z"},ellipse:function(e,t){var n=Math.pow(10,t),r=Math.sqrt(e/(i*n)),o=r*n;return"M0,"+o+"A"+r+","+o+" 0 1,1 0,"+-o+"A"+r+","+o+" 0 1,1 0,"+o+"Z"},rectangle:function(e,t){var n=Math.pow(10,t),r=Math.sqrt(e/n)/2,i=r*n;return"M"+-r+","+-i+"L"+r+","+-i+" "+r+","+i+" "+-r+","+i+"Z"}});function u(){return 64}function h(){return"circle"}function d(){return.5}e.exports={symbol:function(){var e=h,t=u;function n(n,r){return(c.get(e.call(this,n,r))||l)(t.call(this,n,r),skew.call(this,n,r))}return skew=d,n.type=function(t){return arguments.length?(e=r.functor(t),n):e},n.size=function(e){return arguments.length?(t=r.functor(e),n):t},n.skew=function(e){return arguments.length?(skew=r.functor(e),n):skew},n},types:c.keys()}},function(e,t,n){var r=n(383);e.exports=function(e,t){return r(e,t)}},function(e,t,n){var r=n(47),i=n(449),o=n(48),s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},function(e,t,n){"use strict";n.r(t),n.d(t,"uuid",(function(){return g})),n.d(t,"WrappedError",(function(){return m})),n.d(t,"resolvePromisesDict",(function(){return _})),n.d(t,"reject",(function(){return ne})),n.d(t,"typeset",(function(){return re})),n.d(t,"escape_html",(function(){return ie})),n.d(t,"JUPYTER_CONTROLS_VERSION",(function(){return oe})),n.d(t,"DirectionalLinkModel",(function(){return be})),n.d(t,"LinkModel",(function(){return we})),n.d(t,"BoolModel",(function(){return ke})),n.d(t,"CheckboxModel",(function(){return Ee})),n.d(t,"CheckboxView",(function(){return Se})),n.d(t,"ToggleButtonModel",(function(){return Me})),n.d(t,"ToggleButtonView",(function(){return Ce})),n.d(t,"ValidModel",(function(){return je})),n.d(t,"ValidView",(function(){return Ae})),n.d(t,"ButtonStyleModel",(function(){return Pe})),n.d(t,"ButtonModel",(function(){return Oe})),n.d(t,"ButtonView",(function(){return Le})),n.d(t,"BoxModel",(function(){return Be})),n.d(t,"HBoxModel",(function(){return ze})),n.d(t,"VBoxModel",(function(){return Ne})),n.d(t,"BoxView",(function(){return Fe})),n.d(t,"HBoxView",(function(){return Ue})),n.d(t,"VBoxView",(function(){return qe})),n.d(t,"GridBoxView",(function(){return He})),n.d(t,"GridBoxModel",(function(){return We})),n.d(t,"ImageModel",(function(){return Ke})),n.d(t,"ImageView",(function(){return Ge})),n.d(t,"VideoModel",(function(){return Xe})),n.d(t,"VideoView",(function(){return Qe})),n.d(t,"AudioModel",(function(){return tt})),n.d(t,"AudioView",(function(){return nt})),n.d(t,"ColorPickerModel",(function(){return it})),n.d(t,"ColorPickerView",(function(){return ot})),n.d(t,"serialize_date",(function(){return ct})),n.d(t,"deserialize_date",(function(){return ut})),n.d(t,"DatePickerModel",(function(){return ht})),n.d(t,"DatePickerView",(function(){return dt})),n.d(t,"IntModel",(function(){return Ct})),n.d(t,"BoundedIntModel",(function(){return jt})),n.d(t,"SliderStyleModel",(function(){return At})),n.d(t,"IntSliderModel",(function(){return Tt})),n.d(t,"IntRangeSliderModel",(function(){return Pt})),n.d(t,"BaseIntSliderView",(function(){return Ot})),n.d(t,"IntRangeSliderView",(function(){return Lt})),n.d(t,"IntSliderView",(function(){return It})),n.d(t,"IntTextModel",(function(){return Dt})),n.d(t,"BoundedIntTextModel",(function(){return Rt})),n.d(t,"IntTextView",(function(){return Bt})),n.d(t,"ProgressStyleModel",(function(){return zt})),n.d(t,"IntProgressModel",(function(){return Nt})),n.d(t,"ProgressView",(function(){return Ft})),n.d(t,"PlayModel",(function(){return Ut})),n.d(t,"PlayView",(function(){return qt})),n.d(t,"FloatModel",(function(){return Wt})),n.d(t,"BoundedFloatModel",(function(){return Vt})),n.d(t,"FloatSliderModel",(function(){return $t})),n.d(t,"FloatLogSliderModel",(function(){return Kt})),n.d(t,"FloatRangeSliderModel",(function(){return Gt})),n.d(t,"FloatSliderView",(function(){return Yt})),n.d(t,"FloatLogSliderView",(function(){return Jt})),n.d(t,"FloatRangeSliderView",(function(){return Xt})),n.d(t,"FloatTextModel",(function(){return Qt})),n.d(t,"BoundedFloatTextModel",(function(){return Zt})),n.d(t,"FloatTextView",(function(){return en})),n.d(t,"FloatProgressModel",(function(){return tn})),n.d(t,"ControllerButtonModel",(function(){return on})),n.d(t,"ControllerButtonView",(function(){return sn})),n.d(t,"ControllerAxisModel",(function(){return an})),n.d(t,"ControllerAxisView",(function(){return ln})),n.d(t,"ControllerModel",(function(){return cn})),n.d(t,"ControllerView",(function(){return un})),n.d(t,"SelectionModel",(function(){return pn})),n.d(t,"DropdownModel",(function(){return fn})),n.d(t,"DropdownView",(function(){return gn})),n.d(t,"SelectModel",(function(){return mn})),n.d(t,"SelectView",(function(){return _n})),n.d(t,"RadioButtonsModel",(function(){return vn})),n.d(t,"RadioButtonsView",(function(){return yn})),n.d(t,"ToggleButtonsStyleModel",(function(){return bn})),n.d(t,"ToggleButtonsModel",(function(){return wn})),n.d(t,"ToggleButtonsView",(function(){return xn})),n.d(t,"SelectionSliderModel",(function(){return kn})),n.d(t,"SelectionSliderView",(function(){return En})),n.d(t,"MultipleSelectionModel",(function(){return Sn})),n.d(t,"SelectMultipleModel",(function(){return Mn})),n.d(t,"SelectMultipleView",(function(){return Cn})),n.d(t,"SelectionRangeSliderModel",(function(){return jn})),n.d(t,"SelectionRangeSliderView",(function(){return An})),n.d(t,"SelectionContainerModel",(function(){return Fn})),n.d(t,"AccordionModel",(function(){return Un})),n.d(t,"JupyterPhosphorAccordionWidget",(function(){return qn})),n.d(t,"AccordionView",(function(){return Hn})),n.d(t,"TabModel",(function(){return Wn})),n.d(t,"JupyterPhosphorTabPanelWidget",(function(){return Vn})),n.d(t,"TabView",(function(){return $n})),n.d(t,"StringModel",(function(){return Yn})),n.d(t,"HTMLModel",(function(){return Jn})),n.d(t,"HTMLView",(function(){return Xn})),n.d(t,"HTMLMathModel",(function(){return Qn})),n.d(t,"HTMLMathView",(function(){return Zn})),n.d(t,"LabelModel",(function(){return er})),n.d(t,"LabelView",(function(){return tr})),n.d(t,"TextareaModel",(function(){return nr})),n.d(t,"TextareaView",(function(){return rr})),n.d(t,"TextModel",(function(){return ir})),n.d(t,"TextView",(function(){return or})),n.d(t,"PasswordModel",(function(){return sr})),n.d(t,"PasswordView",(function(){return ar})),n.d(t,"ComboboxModel",(function(){return lr})),n.d(t,"ComboboxView",(function(){return cr})),n.d(t,"DescriptionStyleModel",(function(){return le})),n.d(t,"DescriptionModel",(function(){return ce})),n.d(t,"DescriptionView",(function(){return ue})),n.d(t,"LabeledDOMWidgetModel",(function(){return he})),n.d(t,"LabeledDOMWidgetView",(function(){return de})),n.d(t,"FileUploadModel",(function(){return dr})),n.d(t,"FileUploadView",(function(){return pr})),n.d(t,"version",(function(){return fr}));var r,i=n(53),o=n(12),s=n(106),a=n.n(s),l=n(107),c=n.n(l),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function d(e,t){return e.filter((function(e){return-1===t.indexOf(e)}))}function p(e,t){return a()(e,t)}var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function g(){return o.UUID.uuid4()}var m=function(e){function t(n,r){var i=e.call(this,n)||this;return console.warn("WrappedError has been deprecated!"),i.error_stack=r instanceof t?r.error_stack:[r],i.error_stack.push(i),i}return u(t,e),t}(Error);function _(e){var t=Object.keys(e),n=[];return t.forEach((function(t){n.push(e[t])})),Promise.all(n).then((function(e){for(var n={},r=0;r<t.length;r++)n[t[r]]=e[r];return n}))}function v(e,t){return function(n){throw t&&console.error(new Error(e)),n}}function y(e,t,n){for(var r=0;r<t.length;r++){for(var i=t[r],o=e,s=0;s<i.length-1;s++)o=o[i[s]];o[i[i.length-1]]=n[r]}}function b(e){var t=[],n=[];return{state:function e(r,i){if(r.toJSON&&(r=r.toJSON()),Array.isArray(r))for(var o=!1,s=0;s<r.length;s++){if(l=r[s])if(l instanceof ArrayBuffer||ArrayBuffer.isView(l))o||(r=r.slice(),o=!0),t.push(ArrayBuffer.isView(l)?l.buffer:l),n.push(i.concat([s])),r[s]=null;else(u=e(l,i.concat([s])))!==l&&(o||(r=r.slice(),o=!0),r[s]=u)}else if(c()(r))for(var a in r){var l,u;o=!1;if(r.hasOwnProperty(a))if(l=r[a])if(l instanceof ArrayBuffer||ArrayBuffer.isView(l))o||(r=h({},r),o=!0),t.push(ArrayBuffer.isView(l)?l.buffer:l),n.push(i.concat([a])),delete r[a];else(u=e(l,i.concat([a])))!==l&&(o||(r=h({},r),o=!0),r[a]=u)}return r}(e,[]),buffers:t,buffer_paths:n}}function w(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length;n+=2)t[n/2]=parseInt(e.slice(n,n+2),16);return t.buffer}function x(e){return Object(i.fromByteArray)(new Uint8Array(e))}function k(e){return Object(i.toByteArray)(e).buffer}var E=function(){return(E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},S=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,a)}l((r=r.apply(e,t||[])).next())}))},M=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},C="2.0.0".split(".",1)[0];!function(){function e(){this.comm_target_name="jupyter.widget",this._models=Object.create(null)}e.prototype.display_model=function(e,t,n){var r=this;return void 0===n&&(n={}),this.create_view(t,n).then((function(t){return r.display_view(e,t,n)})).catch(v("Could not create view",!0))},e.prototype.setViewOptions=function(e){return void 0===e&&(e={}),e},e.prototype.create_view=function(e,t){var n=this;void 0===t&&(t={});var r=e.state_change=e.state_change.then((function(){return n.loadClass(e.get("_view_name"),e.get("_view_module"),e.get("_view_module_version")).then((function(r){var i=new r({model:e,options:n.setViewOptions(t)});return i.listenTo(e,"destroy",i.remove),Promise.resolve(i.render()).then((function(){return i}))})).catch(v("Could not create a view for model id "+e.model_id,!0))})),i=g();return e.views[i]=r,r.then((function(e){e.once("remove",(function(){delete e.model.views[i]}),n)})),e.state_change},e.prototype.callbacks=function(e){return{}},e.prototype.get_model=function(e){return this._models[e]},e.prototype.handle_comm_open=function(e,t){var n=(t.metadata||{}).version||"";if(n.split(".",1)[0]!==C){var r="Wrong widget protocol version: received protocol version '"+n+"', but was expecting major version '"+C+"'";return console.error(r),Promise.reject(r)}var i=t.content.data,o=i.buffer_paths||[],s=(t.buffers||[]).map((function(e){return e instanceof DataView?e:new DataView(e instanceof ArrayBuffer?e:e.buffer)}));return y(i.state,o,s),this.new_model({model_name:i.state._model_name,model_module:i.state._model_module,model_module_version:i.state._model_module_version,comm:e},i.state).catch(v("Could not create a model.",!0))},e.prototype.new_widget=function(e,t){var n,r=this;if(void 0===t&&(t={}),void 0===e.view_name||void 0===e.view_module||void 0===e.view_module_version)return Promise.reject("new_widget(...) must be given view information in the options.");n=e.comm?Promise.resolve(e.comm):this._create_comm(this.comm_target_name,e.model_id,{state:{_model_module:e.model_module,_model_module_version:e.model_module_version,_model_name:e.model_name,_view_module:e.view_module,_view_module_version:e.view_module_version,_view_name:e.view_name}},{version:"2.0.0"});var i=E({},e);return n.then((function(e){return i.comm=e,r.new_model(i,t).then((function(e){return e.sync("create",e),e}))}),(function(){return i.model_id||(i.model_id=g()),r.new_model(i,t)}))},e.prototype.register_model=function(e,t){var n=this;this._models[e]=t,t.then((function(t){t.once("comm:close",(function(){delete n._models[e]}))}))},e.prototype.new_model=function(e,t){return void 0===t&&(t={}),S(this,void 0,void 0,(function(){var n,r;return M(this,(function(i){switch(i.label){case 0:if(e.model_id)n=e.model_id;else{if(!e.comm)throw new Error("Neither comm nor model_id provided in options object. At least one must exist.");n=e.model_id=e.comm.comm_id}return r=this._make_model(e,t),this.register_model(n,r),[4,r];case 1:return[2,i.sent()]}}))}))},e.prototype._make_model=function(e,t){return void 0===t&&(t={}),S(this,void 0,void 0,(function(){var n,r,i,o,s,a,l;return M(this,(function(c){switch(c.label){case 0:n=e.model_id,r=this.loadClass(e.model_name,e.model_module,e.model_module_version),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,r];case 2:return i=c.sent(),[3,4];case 3:throw o=c.sent(),console.error("Could not instantiate widget"),o;case 4:if(!i)throw new Error("Cannot find model module "+e.model_module+"@"+e.model_module_version+", "+e.model_name);return[4,i._deserialize_state(t,this)];case 5:return s=c.sent(),a={widget_manager:this,model_id:n,comm:e.comm},(l=new i(s,a)).name=e.model_name,l.module=e.model_module,[2,l]}}))}))},e.prototype.clear_state=function(){var e=this;return _(this._models).then((function(t){Object.keys(t).forEach((function(e){return t[e].close()})),e._models=Object.create(null)}))},e.prototype.get_state=function(e){var t=this;void 0===e&&(e={});var n=Object.keys(this._models).map((function(e){return t._models[e]}));return Promise.all(n).then((function(t){return function(e,t){void 0===t&&(t={});var n={};return e.forEach((function(e){var r=e.model_id,i=b(e.serialize(e.get_state(t.drop_defaults))),o=i.buffers.map((function(e,t){return{data:x(e),path:i.buffer_paths[t],encoding:"base64"}}));n[r]={model_name:e.name,model_module:e.module,model_module_version:e.get("_model_module_version"),state:i.state},o.length>0&&(n[r].buffers=o)})),{version_major:2,version_minor:0,state:n}}(t,e)}))},e.prototype.set_state=function(e){var t=this;if(!(e.version_major&&e.version_major<=2))throw"Unsupported widget state format";var n=e.state;return this._get_comm_info().then((function(e){return Promise.all(Object.keys(n).map((function(r){var i={base64:k,hex:w},o=n[r],s=o.state;if(o.buffers){var a=o.buffers.map((function(e){return e.path})),l=o.buffers.map((function(e){return new DataView(i[e.encoding](e.data))}));y(o.state,a,l)}if(t._models[r])return t._models[r].then((function(e){return e.constructor._deserialize_state(s||{},t).then((function(t){return e.set_state(t),e}))}));var c={model_id:r,model_name:o.model_name,model_module:o.model_module,model_module_version:o.model_module_version};return e.hasOwnProperty(r)?t._create_comm(t.comm_target_name,r).then((function(e){return c.comm=e,t.new_model(c)})):t.new_model(c,s)})))}))},e.prototype.disconnect=function(){var e=this;Object.keys(this._models).forEach((function(t){e._models[t].then((function(e){e.comm_live=!1}))}))},e.prototype.resolveUrl=function(e){return Promise.resolve(e)},e.prototype.filterExistingModelState=function(e){var t=this,n=e.state;return n=Object.keys(n).filter((function(e){return!t._models[e]})).reduce((function(e,t){return e[t]=n[t],e}),{}),E({},e,{state:n})}}();var j=function(){return(j=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function A(e,t,n){if(null==e)return this;var r;if("object"==typeof e?(r=e,n=t):(r={})[e]=t,n||(n={}),!this._validate(r,n))return!1;var i=n.unset,o=n.silent,s=[],a=this._changing;this._changing=!0,a||(this._previousAttributes=j({},this.attributes),this.changed={});var l=this.attributes,c=this.changed,u=this._previousAttributes;for(var h in r)t=r[h],p(l[h],t)||s.push(h),p(u[h],t)?delete c[h]:c[h]=t,i?delete l[h]:l[h]=t;if(this.id=this.get(this.idAttribute),!o){s.length&&(this._pending=n);for(var d=0;d<s.length;d++)this.trigger("change:"+s[d],this,l[s[d]],n)}if(a)return this;if(!o)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this}var T=n(38),P=n(11),O=n.n(P),L=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),I=Element.prototype,D=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.msMatchesSelector||I.oMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1},R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype._removeElement=function(){this.undelegateEvents(),this.el.parentNode&&this.el.parentNode.removeChild(this.el)},t.prototype._setElement=function(e){this.el=e},t.prototype._setAttributes=function(e){for(var t in e)t in this.el?this.el[t]=e[t]:this.el.setAttribute(t,e[t])},t.prototype.delegate=function(e,t,n){"string"!=typeof t&&(n=t,t=null),void 0===this._domEvents&&(this._domEvents=[]);var r=this.el,i=t?function(e){for(var i=e.target||e.srcElement;i&&i!==r;i=i.parentNode)if(D.call(i,t))return e.delegateTarget=i,n.handleEvent?n.handleEvent(e):n(e)}:n;return this.el.addEventListener(e,i,!1),this._domEvents.push({eventName:e,handler:i,listener:n,selector:t}),i},t.prototype.undelegate=function(e,t,n){if("function"==typeof t&&(n=t,t=null),this.el&&this._domEvents)for(var r=this._domEvents.slice(),i=r.length;i--;){var o=r[i];!(o.eventName!==e||n&&o.listener!==n||t&&o.selector!==t)&&(this.el.removeEventListener(o.eventName,o.handler,!1),this._domEvents.splice(i,1))}return this},t.prototype.undelegateEvents=function(){if(this.el&&this._domEvents){for(var e=this._domEvents.length,t=0;t<e;t++){var n=this._domEvents[t];this.el.removeEventListener(n.eventName,n.handler,!1)}this._domEvents.length=0}return this},t}(T.View),B=n(5),z=n(10),N=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),F=function(){return(F=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function U(e,t){if(Array.isArray(e)){var n=[];return e.forEach((function(e,r){n.push(U(e,t))})),Promise.all(n)}if(e instanceof Object){var r={};return Object.keys(e).forEach((function(n){r[n]=U(e[n],t)})),_(r)}return"string"==typeof e&&"IPY_MODEL_"===e.slice(0,10)?t.get_model(e.slice(10,e.length)):Promise.resolve(e)}var q,H=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),t.prototype.defaults=function(){return{_model_module:"@jupyter-widgets/base",_model_name:"WidgetModel",_model_module_version:"1.2.0",_view_module:"@jupyter-widgets/base",_view_name:null,_view_module_version:"1.2.0",_view_count:null}},t.prototype.isNew=function(){return!1},t.prototype.initialize=function(t,n){e.prototype.initialize.call(this,t,n),this.widget_manager=n.widget_manager,this.model_id=n.model_id;var r=n.comm;this.views=Object.create(null),this.state_change=Promise.resolve(),this._closed=!1,this._state_lock=null,this._msg_buffer=null,this._msg_buffer_callbacks=null,this._pending_msgs=0,this._buffered_state_diff={},r?(this.comm=r,r.on_close(this._handle_comm_closed.bind(this)),r.on_msg(this._handle_comm_msg.bind(this)),this.comm_live=!0):this.comm_live=!1},Object.defineProperty(t.prototype,"comm_live",{get:function(){return this._comm_live},set:function(e){this._comm_live=e,this.trigger("comm_live_update")},enumerable:!0,configurable:!0}),t.prototype.send=function(e,t,n){if(void 0!==this.comm){var r={method:"custom",content:e};this.comm.send(r,t,{},n)}},t.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),!this._closed){this._closed=!0,this.comm&&!e&&this.comm.close(),this.stopListening(),this.trigger("destroy",this),this.comm&&delete this.comm;var n=Object.keys(this.views).map((function(e){return t.views[e].then((function(e){return e.remove()}))}));return delete this.views,Promise.all(n).then((function(){}))}},t.prototype._handle_comm_closed=function(e){this.trigger("comm:close"),this.close(!0)},t.prototype._handle_comm_msg=function(e){var t=this,n=e.content.data;switch(n.method){case"update":return this.state_change=this.state_change.then((function(){var r=n.state;return y(r,n.buffer_paths||[],(e.buffers||[]).map((function(e){return e instanceof DataView?e:new DataView(e instanceof ArrayBuffer?e:e.buffer)}))),t.constructor._deserialize_state(r,t.widget_manager)})).then((function(e){t.set_state(e)})).catch(v("Could not process update msg for model id: "+this.model_id,!0)),this.state_change;case"custom":return this.trigger("msg:custom",n.content,e.buffers),Promise.resolve()}},t.prototype.set_state=function(e){this._state_lock=e;try{this.set(e)}catch(e){console.error("Error setting state: "+e.message)}finally{this._state_lock=null}},t.prototype.get_state=function(e){var t=this.attributes;if(e){var n=this.defaults,r="function"==typeof n?n.call(this):n,i={};return Object.keys(t).forEach((function(e){p(t[e],r[e])||(i[e]=t[e])})),i}return F({},t)},t.prototype._handle_status=function(e){void 0!==this.comm&&"idle"===e.content.execution_state&&(this._pending_msgs--,null!==this._msg_buffer&&this._pending_msgs<1&&(this.send_sync_message(this._msg_buffer,this._msg_buffer_callbacks),this._msg_buffer=null,this._msg_buffer_callbacks=null))},t.prototype.callbacks=function(e){return this.widget_manager.callbacks(e)},t.prototype.set=function(e,t,n){var r=A.call(this,e,t,n);if(void 0!==this._buffered_state_diff){var i=this.changedAttributes()||{};if(this._state_lock)for(var o=0,s=Object.keys(this._state_lock);o<s.length;o++){var a=s[o];i[a]===this._state_lock[a]&&delete i[a]}this._buffered_state_diff=f(this._buffered_state_diff,i)}return r},t.prototype.sync=function(e,t,n){if(void 0===n&&(n={}),void 0===this.comm)throw"Syncing error: no comm channel defined";var r="patch"===e?n.attrs:t.get_state(n.drop_defaults);if(this._state_lock)for(var i=0,o=Object.keys(this._state_lock);i<o.length;i++){var s=o[i];r[s]===this._state_lock[s]&&delete r[s]}var a=this.serialize(r);if(Object.keys(a).length>0){var l=n.callbacks||this.callbacks();if(this._pending_msgs>=1){switch(e){case"patch":this._msg_buffer=f(this._msg_buffer||{},a);break;case"update":case"create":this._msg_buffer=a;break;default:throw"unrecognized syncing method"}this._msg_buffer_callbacks=l}else this.send_sync_message(r,l)}},t.prototype.serialize=function(e){for(var t=this.constructor.serializers||{},n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];try{t[i]&&t[i].serialize?e[i]=t[i].serialize(e[i],this):e[i]=JSON.parse(JSON.stringify(e[i])),e[i]&&e[i].toJSON&&(e[i]=e[i].toJSON())}catch(e){throw console.error("Error serializing widget state attribute: ",i),e}}return e},t.prototype.send_sync_message=function(e,t){var n=this;void 0===t&&(t={});try{t.iopub=t.iopub||{};var r=t.iopub.status;t.iopub.status=function(e){n._handle_status(e),r&&r(e)};var i=b(e);this.comm.send({method:"update",state:i.state,buffer_paths:i.buffer_paths},t,{},i.buffers),this._pending_msgs++}catch(e){console.error("Could not send widget sync message",e)}},t.prototype.save_changes=function(e){if(this.comm_live){var t={patch:!0};e&&(t.callbacks=e),this.save(this._buffered_state_diff,t),this._buffered_state_diff={}}},t.prototype.on_some_change=function(e,t,n){var r=this;this.on("change",(function(){e.some(r.hasChanged,r)&&t.apply(n,arguments)}),this)},t.prototype.toJSON=function(e){return"IPY_MODEL_"+this.model_id},t._deserialize_state=function(e,t){var n,r=this.serializers;if(r)for(var i in n={},e)r[i]&&r[i].deserialize?n[i]=r[i].deserialize(e[i],t):n[i]=e[i];else n=e;return _(n)},t}(T.Model),W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),t.prototype.defaults=function(){return f(e.prototype.defaults.call(this),{_dom_classes:[]})},t.serializers=F({},H.serializers,{layout:{deserialize:U},style:{deserialize:U}}),t}(H),V=function(e){function t(t){return e.call(this,t)||this}return N(t,e),t.prototype.initialize=function(e){var t=this;this.listenTo(this.model,"change",(function(){var e=Object.keys(t.model.changedAttributes()||{});"_view_count"===e[0]&&1===e.length||t.update()})),this.options=e.options,this.once("remove",(function(){"number"==typeof t.model.get("_view_count")&&(t.model.set("_view_count",t.model.get("_view_count")-1),t.model.save_changes())})),this.once("displayed",(function(){"number"==typeof t.model.get("_view_count")&&(t.model.set("_view_count",t.model.get("_view_count")+1),t.model.save_changes())})),this.displayed=new Promise((function(e,n){t.once("displayed",e)}))},t.prototype.update=function(e){},t.prototype.render=function(){},t.prototype.create_child_view=function(e,t){return void 0===t&&(t={}),t=F({parent:this},t),this.model.widget_manager.create_view(e,t).catch(v("Could not create child view",!0))},t.prototype.callbacks=function(){return this.model.callbacks(this)},t.prototype.send=function(e,t){this.model.send(e,this.callbacks(),t)},t.prototype.touch=function(){this.model.save_changes(this.callbacks())},t.prototype.remove=function(){return e.prototype.remove.call(this),this.trigger("remove"),this},t}(R),$=function(e){function t(t){var n=this,r=t.view;return delete t.view,(n=e.call(this,t)||this)._view=r,n}return N(t,e),t.prototype.dispose=function(){this.isDisposed||(e.prototype.dispose.call(this),this._view&&this._view.remove(),this._view=null)},t.prototype.processMessage=function(t){e.prototype.processMessage.call(this,t),this._view.processPhosphorMessage(t)},t}(B.Widget),K=function(e){function t(t){var n=this,r=t.view;return delete t.view,(n=e.call(this,t)||this)._view=r,n}return N(t,e),t.prototype.processMessage=function(t){e.prototype.processMessage.call(this,t),this._view.processPhosphorMessage(t)},t.prototype.dispose=function(){this.isDisposed||(e.prototype.dispose.call(this),this._view&&this._view.remove(),this._view=null)},t}(B.Panel),G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),t.prototype.initialize=function(t){var n=this;e.prototype.initialize.call(this,t),this.listenTo(this.model,"change:_dom_classes",(function(e,t){var r=e.previous("_dom_classes");n.update_classes(r,t)})),this.layoutPromise=Promise.resolve(),this.listenTo(this.model,"change:layout",(function(e,t){n.setLayout(t,e.previous("layout"))})),this.stylePromise=Promise.resolve(),this.listenTo(this.model,"change:style",(function(e,t){n.setStyle(t,e.previous("style"))})),this.displayed.then((function(){n.update_classes([],n.model.get("_dom_classes")),n.setLayout(n.model.get("layout")),n.setStyle(n.model.get("style"))})),this._comm_live_update(),this.listenTo(this.model,"comm_live_update",(function(){n._comm_live_update()}))},t.prototype.setLayout=function(e,t){var n=this;e&&(this.layoutPromise=this.layoutPromise.then((function(t){return t&&(t.unlayout(),n.stopListening(t.model),t.remove()),n.create_child_view(e).then((function(e){return n.displayed.then((function(){return e.trigger("displayed"),n.listenTo(e.model,"change",(function(){z.MessageLoop.postMessage(n.pWidget,B.Widget.ResizeMessage.UnknownSize)})),z.MessageLoop.postMessage(n.pWidget,B.Widget.ResizeMessage.UnknownSize),e}))})).catch(v("Could not add LayoutView to DOMWidgetView",!0))})))},t.prototype.setStyle=function(e,t){var n=this;e&&(this.stylePromise=this.stylePromise.then((function(t){return t&&(t.unstyle(),n.stopListening(t.model),t.remove()),n.create_child_view(e).then((function(e){return n.displayed.then((function(){return e.trigger("displayed"),e}))})).catch(v("Could not add styleView to DOMWidgetView",!0))})))},t.prototype.update_classes=function(e,t,n){void 0===n&&(n=this.el),d(e,t).map((function(e){n.classList?n.classList.remove(e):n.setAttribute("class",n.getAttribute("class").replace(e,""))})),d(t,e).map((function(e){n.classList?n.classList.add(e):n.setAttribute("class",n.getAttribute("class").concat(" ",e))}))},t.prototype.update_mapped_classes=function(e,t,n){var r=this.model.previous(t),i=e[r]?e[r]:[],o=e[r=this.model.get(t)]?e[r]:[];this.update_classes(i,o,n||this.el)},t.prototype.set_mapped_classes=function(e,t,n){var r=this.model.get(t),i=e[r]?e[r]:[];this.update_classes([],i,n||this.el)},t.prototype._setElement=function(e){this.pWidget&&this.pWidget.dispose(),this.$el=e instanceof O.a?e:O()(e),this.el=this.$el[0],this.pWidget=new $({node:e,view:this})},t.prototype.remove=function(){return this.pWidget&&this.pWidget.dispose(),e.prototype.remove.call(this)},t.prototype.processPhosphorMessage=function(e){switch(e.type){case"after-attach":this.trigger("displayed")}},t.prototype._comm_live_update=function(){this.model.comm_live?this.pWidget.removeClass("jupyter-widgets-disconnected"):this.pWidget.addClass("jupyter-widgets-disconnected")},t}(V),Y=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),J={align_content:null,align_items:null,align_self:null,border:null,bottom:null,display:null,flex:null,flex_flow:null,height:null,justify_content:null,justify_items:null,left:null,margin:null,max_height:null,max_width:null,min_height:null,min_width:null,overflow:null,overflow_x:null,overflow_y:null,order:null,padding:null,right:null,top:null,visibility:null,width:null,object_fit:null,object_position:null,grid_auto_columns:null,grid_auto_flow:null,grid_auto_rows:null,grid_gap:null,grid_template_rows:null,grid_template_columns:null,grid_template_areas:null,grid_row:null,grid_column:null,grid_area:null},X=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Y(t,e),t.prototype.defaults=function(){return f(e.prototype.defaults.call(this),{_model_name:"LayoutModel",_view_name:"LayoutView"},J)}}(H),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Y(t,e),t.prototype.initialize=function(t){this._traitNames=[],e.prototype.initialize.call(this,t);for(var n=0,r=Object.keys(J);n<r.length;n++){var i=r[n];this.registerTrait(i)}},t.prototype.registerTrait=function(e){var t=this;if(this._traitNames.push(e),"overflow_x"===e||"overflow_y"===e)return this.listenTo(this.model,"change:"+e,(function(n,r){t.handleOverflowChange(e,r)})),void this.handleOverflowChange(e,this.model.get(e));this.listenTo(this.model,"change:"+e,(function(n,r){t.handleChange(e,r)})),this.handleChange(e,this.model.get(e))},t.prototype.css_name=function(e){return e.replace(/_/g,"-")},t.prototype.handleChange=function(e,t){var n=this.options.parent;n?null===t?n.el.style.removeProperty(this.css_name(e)):n.el.style[this.css_name(e)]=t:console.warn("Style not applied because a parent view does not exist")},t.prototype.handleOverflowChange=function(e,t){var n=this.options.parent;n?null===t?null===this.model.get("overflow")&&n.el.style.removeProperty(this.css_name(e)):n.el.style[this.css_name(e)]=t:console.warn("Style not applied because a parent view does not exist")},t.prototype.unlayout=function(){var e=this,t=this.options.parent;this._traitNames.forEach((function(n){t?t.el.style.removeProperty(e.css_name(n)):console.warn("Style not removed because a parent view does not exist")}),this)}}(V),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return X(t,e),t.prototype.defaults=function(){var t=this.constructor;return f(e.prototype.defaults.call(this),{_model_name:"StyleModel",_view_name:"StyleView"},Object.keys(t.styleProperties).reduce((function(e,n){return e[n]=t.styleProperties[n].default,e}),{}))},t.styleProperties={},t}(H),Z=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}X(t,e),t.prototype.initialize=function(t){this._traitNames=[],e.prototype.initialize.call(this,t);for(var n=this.model.constructor,r=0,i=Object.keys(n.styleProperties);r<i.length;r++){var o=i[r];this.registerTrait(o)}this.style()},t.prototype.registerTrait=function(e){var t=this;this._traitNames.push(e),this.listenTo(this.model,"change:"+e,(function(n,r){t.handleChange(e,r)}))},t.prototype.handleChange=function(e,t){var n=this.options.parent;if(n){var r=this.model.constructor.styleProperties,i=r[e].attribute,o=r[e].selector,s=o?n.el.querySelectorAll(o):[n.el];if(null===t)for(var a=0;a!==s.length;++a)s[a].style.removeProperty(i);else for(a=0;a!==s.length;++a)s[a].style[i]=t}else console.warn("Style not applied because a parent view does not exist")},t.prototype.style=function(){for(var e=0,t=this._traitNames;e<t.length;e++){var n=t[e];this.handleChange(n,this.model.get(n))}},t.prototype.unstyle=function(){var e=this.options.parent,t=this.model.constructor.styleProperties;this._traitNames.forEach((function(n){if(e)for(var r=t[n].attribute,i=t[n].selector,o=i?e.el.querySelectorAll(i):[e.el],s=0;s!==o.length;++s)o[s].style.removeProperty(r);else console.warn("Style not removed because a parent view does not exist")}),this)}}(V),function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,a)}l((r=r.apply(e,t||[])).next())}))}),ee=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};!function(e){!function(e){var t=function(){function e(e){this.targets=Object.create(null),this.comms=Object.create(null),this.kernel=null,this.jsServicesKernel=null,this.init_kernel(e)}return e.prototype.init_kernel=function(e){this.kernel=e,this.jsServicesKernel=e},e.prototype.new_comm=function(e,t,r,i,o,s){return Z(this,void 0,void 0,(function(){var a,l;return ee(this,(function(c){switch(c.label){case 0:return[4,Promise.resolve(this.jsServicesKernel.connectToComm(e,o))];case 1:return a=c.sent(),l=new n(a),this.register_comm(l),l.open(t,r,i,s),[2,l]}}))}))},e.prototype.register_target=function(e,t){var r=this,i=this.jsServicesKernel.registerCommTarget(e,(function(e,i){var o=new n(e);r.register_comm(o);try{return t(o,i)}catch(e){o.close(),console.error(e),console.error(new Error("Exception opening new comm"))}}));this.targets[e]=i},e.prototype.unregister_target=function(e,t){this.targets[e].dispose(),delete this.targets[e]},e.prototype.register_comm=function(e){return this.comms[e.comm_id]=Promise.resolve(e),e.kernel=this.kernel,e.comm_id},e}();e.CommManager=t;var n=function(){function e(e){this.jsServicesComm=null,this.kernel=null,this.jsServicesComm=e}return Object.defineProperty(e.prototype,"comm_id",{get:function(){return this.jsServicesComm.commId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target_name",{get:function(){return this.jsServicesComm.targetName},enumerable:!0,configurable:!0}),e.prototype.open=function(e,t,n,r){var i=this.jsServicesComm.open(e,n,r);return this._hookupCallbacks(i,t),i.msg.header.msg_id},e.prototype.send=function(e,t,n,r){var i=this.jsServicesComm.send(e,n,r);return this._hookupCallbacks(i,t),i.msg.header.msg_id},e.prototype.close=function(e,t,n,r){var i=this.jsServicesComm.close(e,n,r);return this._hookupCallbacks(i,t),i.msg.header.msg_id},e.prototype.on_msg=function(e){this.jsServicesComm.onMsg=e.bind(this)},e.prototype.on_close=function(e){this.jsServicesComm.onClose=e.bind(this)},e.prototype._hookupCallbacks=function(e,t){t&&(e.onReply=function(e){t.shell&&t.shell.reply&&t.shell.reply(e)},e.onStdin=function(e){t.input&&t.input(e)},e.onIOPub=function(e){if(t.iopub)if(t.iopub.status&&"status"===e.header.msg_type)t.iopub.status(e);else if(t.iopub.clear_output&&"clear_output"===e.header.msg_type)t.iopub.clear_output(e);else if(t.iopub.output)switch(e.header.msg_type){case"display_data":case"execute_result":case"stream":case"error":t.iopub.output(e)}})},e}();e.Comm=n}(e.services||(e.services={}))}(q||(q={}));var te=function(){function e(e,t,n){this.initialize(e,t,n)}return e.prototype.initialize=function(e,t,n){this._handler_context=n||this,this._models=[],this.views=[],this._create_view=e,this._remove_view=t||function(e){e.remove()}},e.prototype.update=function(e,t,n,r){var i=n||this._remove_view,o=t||this._create_view;r=r||this._handler_context;for(var s=0;s<e.length&&!(s>=this._models.length||e[s]!==this._models[s]);s++);for(var a=s,l=this.views.splice(a,this.views.length-a),c=0;c<l.length;c++)l[c].then((function(e){i.call(r,e)}));for(;s<e.length;s++)this.views.push(Promise.resolve(o.call(r,e[s],s)));return this._models=e.slice(),Promise.all(this.views)},e.prototype.remove=function(){var e=this;return Promise.all(this.views).then((function(t){t.forEach((function(t){return e._remove_view.call(e._handler_context,t)})),e.views=[],e._models=[]}))},e.prototype.dispose=function(){this.views=null,this._models=null},e}();new o.Token("jupyter.extensions.jupyterWidgetRegistry");function ne(e,t){return function(n){var r=new m(e,n);return t&&console.error(r),Promise.reject(r)}}function re(e,t){void 0!==t&&(e.textContent=t),void 0!==window.MathJax&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,e])}function ie(e){var t=document.createElement("div");return t.textContent=e,t.innerHTML}var oe="1.5.0",se=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ae=function(){return(ae=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return se(t,e),t.prototype.defaults=function(){return ae({},e.prototype.defaults.call(this),{_model_name:"DescriptionStyleModel",_model_module:"@jupyter-widgets/controls",_model_module_version:oe})},t.styleProperties={description_width:{selector:".widget-label",attribute:"width",default:null}},t}(Q),ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return se(t,e),t.prototype.defaults=function(){return ae({},e.prototype.defaults.call(this),{_model_name:"DescriptionModel",_view_name:"DescriptionView",_view_module:"@jupyter-widgets/controls",_model_module:"@jupyter-widgets/controls",_view_module_version:oe,_model_module_version:oe,description:"",description_tooltip:null})},t}(W),ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return se(t,e),t.prototype.render=function(){this.label=document.createElement("label"),this.el.appendChild(this.label),this.label.className="widget-label",this.label.style.display="none",this.listenTo(this.model,"change:description",this.updateDescription),this.listenTo(this.model,"change:description_tooltip",this.updateDescription),this.updateDescription()},t.prototype.typeset=function(e,t){this.displayed.then((function(){return re(e,t)}))},t.prototype.updateDescription=function(){var e=this.model.get("description"),t=this.model.get("description_tooltip");null===t&&(t=e),0===e.length?this.label.style.display="none":(this.label.innerHTML=e,this.typeset(this.label),this.label.style.display=""),this.label.title=t},t}(G),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return se(t,e),t}(ce),de=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return se(t,e),t}(ue),pe=n(0),fe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fe(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"CoreWidgetModel",_view_module:"@jupyter-widgets/controls",_model_module:"@jupyter-widgets/controls",_view_module_version:oe,_model_module_version:oe})},t}(H),me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fe(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"CoreDOMWidgetModel",_view_module:"@jupyter-widgets/controls",_model_module:"@jupyter-widgets/controls",_view_module_version:oe,_model_module_version:oe})},t}(W),_e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fe(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"CoreDescriptionModel",_view_module:"@jupyter-widgets/controls",_model_module:"@jupyter-widgets/controls",_view_module_version:oe,_model_module_version:oe})},t}(ce),ve=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ye=function(){return(ye=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ve(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{target:void 0,source:void 0,_model_name:"DirectionalLinkModel"})},t.prototype.initialize=function(t,n){e.prototype.initialize.call(this,t,n),this.on("change",this.updateBindings,this),this.updateBindings()},t.prototype.updateValue=function(e,t,n,r){if(!this._updating){this._updating=!0;try{n&&(n.set(r,e.get(t)),n.save_changes())}finally{this._updating=!1}}},t.prototype.updateBindings=function(){var e,t,n=this;this.cleanup(),e=this.get("source")||[null,null],this.sourceModel=e[0],this.sourceAttr=e[1],t=this.get("target")||[null,null],this.targetModel=t[0],this.targetAttr=t[1],this.sourceModel&&(this.listenTo(this.sourceModel,"change:"+this.sourceAttr,(function(){n.updateValue(n.sourceModel,n.sourceAttr,n.targetModel,n.targetAttr)})),this.updateValue(this.sourceModel,this.sourceAttr,this.targetModel,this.targetAttr),this.listenToOnce(this.sourceModel,"destroy",this.cleanup)),this.targetModel&&this.listenToOnce(this.targetModel,"destroy",this.cleanup)},t.prototype.cleanup=function(){this.sourceModel&&(this.stopListening(this.sourceModel,"change:"+this.sourceAttr,null),this.stopListening(this.sourceModel,"destroy",null)),this.targetModel&&this.stopListening(this.targetModel,"destroy",null)},t.serializers=ye({},ge.serializers,{target:{deserialize:U},source:{deserialize:U}}),t}(ge),we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ve(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"LinkModel"})},t.prototype.updateBindings=function(){var t=this;e.prototype.updateBindings.call(this),this.targetModel&&this.listenTo(this.targetModel,"change:"+this.targetAttr,(function(){t.updateValue(t.targetModel,t.targetAttr,t.sourceModel,t.sourceAttr)}))},t.prototype.cleanup=function(){e.prototype.cleanup.call(this),this.targetModel&&this.stopListening(this.targetModel,"change:"+this.targetAttr,null)},t}(be),xe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xe(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{value:!1,disabled:!1,_model_name:"BoolModel"})},t}(_e),Ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xe(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{indent:!0,_view_name:"CheckboxView",_model_name:"CheckboxModel"})},t}(_e),Se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xe(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-checkbox"),this.label.innerHTML="&#8203;",this.checkboxLabel=document.createElement("label"),this.checkboxLabel.classList.add("widget-label-basic"),this.el.appendChild(this.checkboxLabel),this.checkbox=document.createElement("input"),this.checkbox.setAttribute("type","checkbox"),this.checkboxLabel.appendChild(this.checkbox),this.descriptionSpan=document.createElement("span"),this.checkboxLabel.appendChild(this.descriptionSpan),this.listenTo(this.model,"change:indent",this.updateIndent),this.update(),this.updateDescription(),this.updateIndent()},t.prototype.updateDescription=function(){if(null!=this.checkboxLabel){var e=this.model.get("description");this.descriptionSpan.innerHTML=e,this.typeset(this.descriptionSpan),this.descriptionSpan.title=e,this.checkbox.title=e}},t.prototype.updateIndent=function(){var e=this.model.get("indent");this.label.style.display=e?"":"none"},t.prototype.events=function(){return{'click input[type="checkbox"]':"_handle_click"}},t.prototype._handle_click=function(){var e=this.model.get("value");this.model.set("value",!e,{updated_view:this}),this.touch()},t.prototype.update=function(t){return this.checkbox.checked=this.model.get("value"),void 0!==t&&t.updated_view==this||(this.checkbox.disabled=this.model.get("disabled")),e.prototype.update.call(this)},t}(ue),Me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xe(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_view_name:"ToggleButtonView",_model_name:"ToggleButtonModel",tooltip:"",icon:"",button_style:""})},t}(ke),Ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xe(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("jupyter-button"),this.el.classList.add("widget-toggle-button"),this.listenTo(this.model,"change:button_style",this.update_button_style),this.set_button_style(),this.update()},t.prototype.update_button_style=function(){this.update_mapped_classes(t.class_map,"button_style")},t.prototype.set_button_style=function(){this.set_mapped_classes(t.class_map,"button_style")},t.prototype.update=function(t){if(this.model.get("value")?this.el.classList.add("mod-active"):this.el.classList.remove("mod-active"),void 0===t||t.updated_view!==this){this.el.disabled=this.model.get("disabled"),this.el.setAttribute("title",this.model.get("tooltip"));var n=this.model.get("description"),r=this.model.get("icon");if(0===n.trim().length&&0===r.trim().length)this.el.innerHTML="&nbsp;";else{if(this.el.textContent="",r.trim().length){var i=document.createElement("i");this.el.appendChild(i),i.classList.add("fa"),i.classList.add("fa-"+r)}this.el.appendChild(document.createTextNode(n))}}return e.prototype.update.call(this)},t.prototype.events=function(){return{click:"_handle_click"}},t.prototype._handle_click=function(e){e.preventDefault();var t=this.model.get("value");this.model.set("value",!t,{updated_view:this}),this.touch()},Object.defineProperty(t.prototype,"tagName",{get:function(){return"button"},enumerable:!0,configurable:!0}),t.class_map={primary:["mod-primary"],success:["mod-success"],info:["mod-info"],warning:["mod-warning"],danger:["mod-danger"]},t}(G),je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xe(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{readout:"Invalid",_view_name:"ValidView",_model_name:"ValidModel"})},t}(ke),Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xe(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-valid"),this.el.classList.add("widget-inline-hbox");var t=document.createElement("i");this.el.appendChild(t),this.readout=document.createElement("span"),this.readout.classList.add("widget-valid-readout"),this.readout.classList.add("widget-readout"),this.el.appendChild(this.readout),this.update()},t.prototype.update=function(){this.el.classList.remove("mod-valid"),this.el.classList.remove("mod-invalid"),this.readout.textContent=this.model.get("readout"),this.model.get("value")?this.el.classList.add("mod-valid"):this.el.classList.add("mod-invalid")},t}(ue),Te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Te(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"ButtonStyleModel",_model_module:"@jupyter-widgets/controls",_model_module_version:oe})},t.styleProperties={button_color:{selector:"",attribute:"background-color",default:null},font_weight:{selector:"",attribute:"font-weight",default:""}},t}(Q),Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Te(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{description:"",tooltip:"",disabled:!1,icon:"",button_style:"",_view_name:"ButtonView",_model_name:"ButtonModel",style:null})},t}(me),Le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Te(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("jupyter-button"),this.el.classList.add("widget-button"),this.listenTo(this.model,"change:button_style",this.update_button_style),this.set_button_style(),this.update()},t.prototype.update=function(){this.el.disabled=this.model.get("disabled"),this.el.setAttribute("title",this.model.get("tooltip"));var t=this.model.get("description"),n=this.model.get("icon");if(t.length||n.length){if(this.el.textContent="",n.length){var r=document.createElement("i");r.classList.add("fa"),r.classList.add("fa-"+n),0===t.length&&r.classList.add("center"),this.el.appendChild(r)}this.el.appendChild(document.createTextNode(t))}return e.prototype.update.call(this)},t.prototype.update_button_style=function(){this.update_mapped_classes(t.class_map,"button_style")},t.prototype.set_button_style=function(){this.set_mapped_classes(t.class_map,"button_style")},t.prototype.events=function(){return{click:"_handle_click"}},t.prototype._handle_click=function(e){e.preventDefault(),this.send({event:"click"})},Object.defineProperty(t.prototype,"tagName",{get:function(){return"button"},enumerable:!0,configurable:!0}),t.class_map={primary:["mod-primary"],success:["mod-success"],info:["mod-info"],warning:["mod-warning"],danger:["mod-danger"]},t}(G),Ie=n(3),De=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Re=function(){return(Re=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_view_name:"BoxView",_model_name:"BoxModel",children:[],box_style:""})},t.serializers=Re({},me.serializers,{children:{deserialize:U}}),t}(me),ze=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_view_name:"HBoxView",_model_name:"HBoxModel"})},t}(Be),Ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_view_name:"VBoxView",_model_name:"VBoxModel"})},t}(Be),Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),t.prototype._createElement=function(e){return this.pWidget=new K({view:this}),this.pWidget.node},t.prototype._setElement=function(e){if(this.el||e!==this.pWidget.node)throw new Error("Cannot reset the DOM element.");this.el=this.pWidget.node,this.$el=O()(this.pWidget.node)},t.prototype.initialize=function(t){e.prototype.initialize.call(this,t),this.children_views=new te(this.add_child_model,null,this),this.listenTo(this.model,"change:children",this.update_children),this.listenTo(this.model,"change:box_style",this.update_box_style),this.pWidget.addClass("jupyter-widgets"),this.pWidget.addClass("widget-container"),this.pWidget.addClass("widget-box")},t.prototype.render=function(){e.prototype.render.call(this),this.update_children(),this.set_box_style()},t.prototype.update_children=function(){this.children_views.update(this.model.get("children")).then((function(e){e.forEach((function(e){z.MessageLoop.postMessage(e.pWidget,B.Widget.ResizeMessage.UnknownSize)}))}))},t.prototype.update_box_style=function(){this.update_mapped_classes(t.class_map,"box_style")},t.prototype.set_box_style=function(){this.set_mapped_classes(t.class_map,"box_style")},t.prototype.add_child_model=function(e){var t=this,n=new B.Widget;return this.pWidget.addWidget(n),this.create_child_view(e).then((function(e){var r=Ie.ArrayExt.firstIndexOf(t.pWidget.widgets,n);return t.pWidget.insertWidget(r,e.pWidget),n.dispose(),e})).catch(ne("Could not add child view to box",!0))},t.prototype.remove=function(){this.children_views=null,e.prototype.remove.call(this)},t.class_map={success:["alert","alert-success"],info:["alert","alert-info"],warning:["alert","alert-warning"],danger:["alert","alert-danger"]},t}(G),Ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),t.prototype.initialize=function(t){e.prototype.initialize.call(this,t),this.pWidget.addClass("widget-hbox")},t}(Fe),qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),t.prototype.initialize=function(t){e.prototype.initialize.call(this,t),this.pWidget.addClass("widget-vbox")},t}(Fe),He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),t.prototype.initialize=function(t){e.prototype.initialize.call(this,t),this.pWidget.addClass("widget-gridbox"),this.pWidget.removeClass("widget-box")},t}(Fe),We=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_view_name:"GridBoxView",_model_name:"GridBoxModel"})},t}(Be),Ve=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$e=function(){return($e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ve(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"ImageModel",_view_name:"ImageView",format:"png",width:"",height:"",value:new DataView(new ArrayBuffer(0))})},t.serializers=$e({},me.serializers,{value:{serialize:function(e){return new DataView(e.buffer.slice(0))}}}),t}(me),Ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ve(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.pWidget.addClass("jupyter-widgets"),this.pWidget.addClass("widget-image"),this.update()},t.prototype.update=function(){var t,n=this.model.get("format"),r=this.model.get("value");if("url"!==n){var i=new Blob([r],{type:"image/"+this.model.get("format")});t=URL.createObjectURL(i)}else t=new TextDecoder("utf-8").decode(r.buffer);var o=this.el.src;this.el.src=t,o&&"string"!=typeof o&&URL.revokeObjectURL(o);var s=this.model.get("width");void 0!==s&&s.length>0?this.el.setAttribute("width",s):this.el.removeAttribute("width");var a=this.model.get("height");return void 0!==a&&a.length>0?this.el.setAttribute("height",a):this.el.removeAttribute("height"),e.prototype.update.call(this)},t.prototype.remove=function(){this.el.src&&URL.revokeObjectURL(this.el.src),e.prototype.remove.call(this)},Object.defineProperty(t.prototype,"tagName",{get:function(){return"img"},enumerable:!0,configurable:!0}),t}(G),Ye=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Je=function(){return(Je=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ye(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"VideoModel",_view_name:"VideoView",format:"mp4",width:"",height:"",autoplay:!0,loop:!0,controls:!0,value:new DataView(new ArrayBuffer(0))})},t.serializers=Je({},me.serializers,{value:{serialize:function(e){return new DataView(e.buffer.slice(0))}}}),t}(me),Qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ye(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.pWidget.addClass("jupyter-widgets"),this.pWidget.addClass("widget-image"),this.update()},t.prototype.update=function(){var t,n=this.model.get("format"),r=this.model.get("value");if("url"!==n){var i=new Blob([r],{type:"video/"+this.model.get("format")});t=URL.createObjectURL(i)}else t=new TextDecoder("utf-8").decode(r.buffer);var o=this.el.src;this.el.src=t,o&&"string"!=typeof o&&URL.revokeObjectURL(o);var s=this.model.get("width");void 0!==s&&s.length>0?this.el.setAttribute("width",s):this.el.removeAttribute("width");var a=this.model.get("height");return void 0!==a&&a.length>0?this.el.setAttribute("height",a):this.el.removeAttribute("height"),this.el.loop=this.model.get("loop"),this.el.autoplay=this.model.get("autoplay"),this.el.controls=this.model.get("controls"),e.prototype.update.call(this)},t.prototype.remove=function(){this.el.src&&URL.revokeObjectURL(this.el.src),e.prototype.remove.call(this)},Object.defineProperty(t.prototype,"tagName",{get:function(){return"video"},enumerable:!0,configurable:!0}),t}(G),Ze=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),et=function(){return(et=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ze(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"AudioModel",_view_name:"AudioView",format:"mp3",autoplay:!0,loop:!0,controls:!0,value:new DataView(new ArrayBuffer(0))})},t.serializers=et({},me.serializers,{value:{serialize:function(e){return new DataView(e.buffer.slice(0))}}}),t}(me),nt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ze(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.pWidget.addClass("jupyter-widgets"),this.update()},t.prototype.update=function(){var t,n=this.model.get("format"),r=this.model.get("value");if("url"!==n){var i=new Blob([r],{type:"audio/"+this.model.get("format")});t=URL.createObjectURL(i)}else t=new TextDecoder("utf-8").decode(r.buffer);var o=this.el.src;return this.el.src=t,o&&"string"!=typeof o&&URL.revokeObjectURL(o),this.el.loop=this.model.get("loop"),this.el.autoplay=this.model.get("autoplay"),this.el.controls=this.model.get("controls"),e.prototype.update.call(this)},t.prototype.remove=function(){this.el.src&&URL.revokeObjectURL(this.el.src),e.prototype.remove.call(this)},Object.defineProperty(t.prototype,"tagName",{get:function(){return"audio"},enumerable:!0,configurable:!0}),t}(G),rt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),it=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{value:"black",concise:!1,_model_name:"ColorPickerModel",_view_name:"ColorPickerView"})},t}(_e),ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-colorpicker"),this._color_container=document.createElement("div"),this._color_container.className="widget-inline-hbox widget-colorpicker-input",this.el.appendChild(this._color_container),this._textbox=document.createElement("input"),this._textbox.setAttribute("type","text"),this._textbox.id=this.label.htmlFor=g(),this._color_container.appendChild(this._textbox),this._textbox.value=this.model.get("value"),this._colorpicker=document.createElement("input"),this._colorpicker.setAttribute("type","color"),this._color_container.appendChild(this._colorpicker),this.listenTo(this.model,"change:value",this._update_value),this.listenTo(this.model,"change:concise",this._update_concise),this._update_concise(),this._update_value(),this.update()},t.prototype.update=function(t){if(void 0===t||t.updated_view!=this){var n=this.model.get("disabled");this._textbox.disabled=n,this._colorpicker.disabled=n}return e.prototype.update.call(this)},t.prototype.events=function(){return this._picker_change,this._text_change,{'change [type="color"]':"_picker_change",'change [type="text"]':"_text_change"}},t.prototype._update_value=function(){var e,t,n=this.model.get("value");this._colorpicker.value=st[(e=n).toLowerCase()]||(7===(t=e).length?t:"#"+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)+t.charAt(3)+t.charAt(3)),this._textbox.value=n},t.prototype._update_concise=function(){this.model.get("concise")?(this.el.classList.add("concise"),this._textbox.style.display="none"):(this.el.classList.remove("concise"),this._textbox.style.display="")},t.prototype._picker_change=function(){this.model.set("value",this._colorpicker.value),this.touch()},t.prototype._text_change=function(){var e=this._validate_color(this._textbox.value,this.model.get("value"));this.model.set("value",e),this.touch()},t.prototype._validate_color=function(e,t){return e.match(/#[a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?$/)||st[e.toLowerCase()]?e:t},t}(ue),st={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgreen:"#90ee90",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var at=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lt=function(){return(lt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function ct(e){return null===e?null:{year:e.getUTCFullYear(),month:e.getUTCMonth(),date:e.getUTCDate()}}function ut(e){if(null===e)return null;var t=new Date;return t.setUTCFullYear(e.year,e.month,e.date),t.setUTCHours(0,0,0,0),t}var ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return at(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{value:null,_model_name:"DatePickerModel",_view_name:"DatePickerView"})},t.serializers=lt({},_e.serializers,{value:{serialize:ct,deserialize:ut}}),t}(_e),dt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return at(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-datepicker"),this._datepicker=document.createElement("input"),this._datepicker.setAttribute("type","date"),this._datepicker.id=this.label.htmlFor=g(),this.el.appendChild(this._datepicker),this.listenTo(this.model,"change:value",this._update_value),this._update_value(),this.update()},t.prototype.update=function(t){return void 0!==t&&t.updated_view===this||(this._datepicker.disabled=this.model.get("disabled")),e.prototype.update.call(this)},t.prototype.events=function(){return this._picker_change,this._picker_focusout,{'change [type="date"]':"_picker_change",'focusout [type="date"]':"_picker_focusout"}},t.prototype._update_value=function(){var e=this.model.get("value");this._datepicker.valueAsDate=e},t.prototype._picker_change=function(){this._datepicker.validity.badInput||(this.model.set("value",this._datepicker.valueAsDate),this.touch())},t.prototype._picker_focusout=function(){this._datepicker.validity.badInput&&(this.model.set("value",null),this.touch())},t}(ue);function pt(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}var ft=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function gt(e){if(!(t=ft.exec(e)))throw new Error("invalid format: "+e);var t;return new mt({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function mt(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}gt.prototype=mt.prototype,mt.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var _t,vt,yt,bt=function(e,t){var n=pt(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},wt={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return bt(100*e,t)},r:bt,s:function(e,t){var n=pt(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(_t=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+pt(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},xt=function(e){return e},kt=Array.prototype.map,Et=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];vt=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?xt:(t=kt.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],s=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(e.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[s=(s+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?xt:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(kt.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"-":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function h(e){var t=(e=gt(e)).fill,n=e.align,h=e.sign,d=e.symbol,p=e.zero,f=e.width,g=e.comma,m=e.precision,_=e.trim,v=e.type;"n"===v?(g=!0,v="g"):wt[v]||(void 0===m&&(m=12),_=!0,v="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var y="$"===d?i:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===d?o:/[%p]/.test(v)?l:"",w=wt[v],x=/[defgprs%]/.test(v);function k(e){var i,o,l,d=y,k=b;if("c"===v)k=w(e)+k,e="";else{var E=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),m),_&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),E&&0==+e&&"+"!==h&&(E=!1),d=(E?"("===h?h:c:"-"===h||"("===h?"":h)+d,k=("s"===v?Et[8+_t/3]:"")+k+(E&&"("===h?")":""),x)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){k=(46===l?s+e.slice(i+1):e.slice(i))+k,e=e.slice(0,i);break}}g&&!p&&(e=r(e,1/0));var S=d.length+e.length+k.length,M=S<f?new Array(f-S+1).join(t):"";switch(g&&p&&(e=r(M+e,M.length?f-k.length:1/0),M=""),n){case"<":e=d+e+k+M;break;case"=":e=d+M+e+k;break;case"^":e=M.slice(0,S=M.length>>1)+d+e+k+M.slice(S);break;default:e=M+d+e+k}return a(e)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),k.toString=function(){return e+""},k}return{format:h,formatPrefix:function(e,t){var n,r=h(((e=gt(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor((n=t,((n=pt(Math.abs(n)))?n[1]:NaN)/3)))),o=Math.pow(10,-i),s=Et[8+i/3];return function(e){return r(o*e)+s}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),yt=vt.format,vt.formatPrefix;n(468);var St=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mt=function(){return(Mt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Ct=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"IntModel",value:0})},t}(_e),jt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"BoundedIntModel",max:100,min:0})},t}(Ct),At=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.defaults=function(){return Mt({},e.prototype.defaults.call(this),{_model_name:"SliderStyleModel"})},t.styleProperties=Mt({},le.styleProperties,{handle_color:{selector:".ui-slider-handle",attribute:"background-color",default:null}}),t}(le),Tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"IntSliderModel",_view_name:"IntSliderView",step:1,orientation:"horizontal",readout:!0,readout_format:"d",continuous_update:!0,style:null,disabled:!1})},t.prototype.initialize=function(t,n){e.prototype.initialize.call(this,t,n),this.on("change:readout_format",this.update_readout_format,this),this.update_readout_format()},t.prototype.update_readout_format=function(){this.readout_formatter=yt(this.get("readout_format"))},t}(jt),Pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t}(Tt),Ot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._parse_value=parseInt,t}return St(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-slider"),this.el.classList.add("widget-hslider"),(this.$slider=O()("<div />")).slider({slide:this.handleSliderChange.bind(this),stop:this.handleSliderChanged.bind(this)}).addClass("slider"),this.slider_container=document.createElement("div"),this.slider_container.classList.add("slider-container"),this.slider_container.appendChild(this.$slider[0]),this.el.appendChild(this.slider_container),this.readout=document.createElement("div"),this.el.appendChild(this.readout),this.readout.classList.add("widget-readout"),this.readout.contentEditable="true",this.readout.style.display="none",this.update()},t.prototype.update=function(t){if(void 0===t||t.updated_view!==this){var n=this;n.$slider.slider({}),["step","disabled"].forEach((function(e){var t=n.model.get(e);void 0!==t&&n.$slider.slider("option",e,t)})),this.model.get("disabled")?this.readout.contentEditable="false":this.readout.contentEditable="true";var r=this.model.get("max"),i=this.model.get("min");i<=r&&(void 0!==r&&this.$slider.slider("option","max",r),void 0!==i&&this.$slider.slider("option","min",i));var o=this.model.get("orientation");this.$slider.slider("option","orientation",o),"vertical"===o?(this.el.classList.remove("widget-hslider"),this.el.classList.add("widget-vslider"),this.el.classList.remove("widget-inline-hbox"),this.el.classList.add("widget-inline-vbox")):(this.el.classList.remove("widget-vslider"),this.el.classList.add("widget-hslider"),this.el.classList.remove("widget-inline-vbox"),this.el.classList.add("widget-inline-hbox")),this.model.get("readout")?(this.readout.style.display="",this.displayed.then((function(){n.readout_overflow()?n.readout.classList.add("overflow"):n.readout.classList.remove("overflow")}))):this.readout.style.display="none"}return e.prototype.update.call(this)},t.prototype.readout_overflow=function(){return this.readout.scrollWidth>this.readout.clientWidth},t.prototype.events=function(){return{slide:"handleSliderChange",slidestop:"handleSliderChanged","blur [contentEditable=true]":"handleTextChange","keydown [contentEditable=true]":"handleKeyDown"}},t.prototype.handleKeyDown=function(e){13===e.keyCode&&(e.preventDefault(),this.handleTextChange())},t.prototype._validate_slide_value=function(e){return Math.floor(e)},t}(ue),Lt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._range_regex=/^\s*([+-]?\d+)\s*[-:–]\s*([+-]?\d+)/,t}return St(t,e),t.prototype.update=function(t){e.prototype.update.call(this,t),this.$slider.slider("option","range",!0);var n=this.model.get("value");this.$slider.slider("option","values",n.slice()),this.readout.textContent=this.valueToString(n),this.model.get("value")!==n&&(this.model.set("value",n,{updated_view:this}),this.touch())},t.prototype.valueToString=function(e){var t=this.model.readout_formatter;return e.map((function(e){return t(e)})).join(" – ")},t.prototype.stringToValue=function(e){var t=this._range_regex.exec(e);return t?[this._parse_value(t[1]),this._parse_value(t[2])]:null},t.prototype.handleTextChange=function(){var e=this.stringToValue(this.readout.textContent),t=this.model.get("min"),n=this.model.get("max");null===e||isNaN(e[0])||isNaN(e[1])||e[0]>e[1]?this.readout.textContent=this.valueToString(this.model.get("value")):(e=[Math.max(Math.min(e[0],n),t),Math.max(Math.min(e[1],n),t)])[0]!==this.model.get("value")[0]||e[1]!==this.model.get("value")[1]?(this.readout.textContent=this.valueToString(e),this.model.set("value",e,{updated_view:this}),this.touch()):this.readout.textContent=this.valueToString(this.model.get("value"))},t.prototype.handleSliderChange=function(e,t){var n=t.values.map(this._validate_slide_value);this.readout.textContent=this.valueToString(n),this.model.get("continuous_update")&&this.handleSliderChanged(e,t)},t.prototype.handleSliderChanged=function(e,t){var n=t.values.map(this._validate_slide_value);this.model.set("value",n,{updated_view:this}),this.touch()},t}(Ot),It=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.update=function(t){e.prototype.update.call(this,t);var n=this.model.get("min"),r=this.model.get("max"),i=this.model.get("value");i>r?i=r:i<n&&(i=n),this.$slider.slider("option","value",i),this.readout.textContent=this.valueToString(i),this.model.get("value")!==i&&(this.model.set("value",i,{updated_view:this}),this.touch())},t.prototype.valueToString=function(e){return(0,this.model.readout_formatter)(e)},t.prototype.stringToValue=function(e){return this._parse_value(e)},t.prototype.handleTextChange=function(){var e=this.stringToValue(this.readout.textContent),t=this.model.get("min"),n=this.model.get("max");isNaN(e)?this.readout.textContent=this.valueToString(this.model.get("value")):(e=Math.max(Math.min(e,n),t))!==this.model.get("value")?(this.readout.textContent=this.valueToString(e),this.model.set("value",e,{updated_view:this}),this.touch()):this.readout.textContent=this.valueToString(this.model.get("value"))},t.prototype.handleSliderChange=function(e,t){var n=this._validate_slide_value(t.value);this.readout.textContent=this.valueToString(n),this.model.get("continuous_update")&&this.handleSliderChanged(e,t)},t.prototype.handleSliderChanged=function(e,t){var n=this._validate_slide_value(t.value);this.model.set("value",n,{updated_view:this}),this.touch()},t}(Ot),Dt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"IntTextModel",_view_name:"IntTextView",disabled:!1,continuous_update:!1})},t}(Ct),Rt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"BoundedIntTextModel",_view_name:"IntTextView",disabled:!1,continuous_update:!1,step:1})},t}(jt),Bt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._parse_value=parseInt,t._default_step="1",t}return St(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-text"),this.textbox=document.createElement("input"),this.textbox.type="number",this.textbox.required=!0,this.textbox.id=this.label.htmlFor=g(),this.el.appendChild(this.textbox),this.update()},t.prototype.update=function(t){if(void 0===t||t.updated_view!==this){var n=this.model.get("value");this._parse_value(this.textbox.value)!==n&&(this.textbox.value=n.toString()),void 0!==this.model.get("min")&&(this.textbox.min=this.model.get("min")),void 0!==this.model.get("max")&&(this.textbox.max=this.model.get("max")),void 0!==this.model.get("step")&&null!==this.model.get("step")?this.textbox.step=this.model.get("step"):this.textbox.step=this._default_step,this.textbox.disabled=this.model.get("disabled")}return e.prototype.update.call(this)},t.prototype.events=function(){return{"keydown input":"handleKeyDown","keypress input":"handleKeypress","keyup input":"handleKeyUp","input input":"handleChanging","change input":"handleChanged"}},t.prototype.handleKeyDown=function(e){e.stopPropagation()},t.prototype.handleKeypress=function(e){/[e,.\s]/.test(String.fromCharCode(e.keyCode))&&e.preventDefault()},t.prototype.handleKeyUp=function(e){if(!e.altKey&&!e.ctrlKey){var t=e.target,n=t.value;if((n=n.replace(/[e,.\s]/g,"")).length>=1){var r=n.substr(1);n=n[0]+r.replace(/[+-]/g,"")}t.value!=n&&(e.preventDefault(),t.value=n)}},t.prototype.handleChanging=function(e){var t=e.target.value.trim();""===t||["-","-.",".","+.","+"].indexOf(t)>=0||this.model.get("continuous_update")&&this.handleChanged(e)},t.prototype.handleChanged=function(e){var t=e.target,n=this._parse_value(t.value);if(isNaN(n))t.value=this.model.get("value");else{var r=n;void 0!==this.model.get("max")&&(r=Math.min(this.model.get("max"),r)),void 0!==this.model.get("min")&&(r=Math.max(this.model.get("min"),r)),r!==n&&(t.value=r,n=r),n!==this.model.get("value")&&(this.model.set("value",n,{updated_view:this}),this.touch())}},t}(ue),zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.defaults=function(){return Mt({},e.prototype.defaults.call(this),{_model_name:"ProgressStyleModel"})},t.styleProperties=Mt({},le.styleProperties,{bar_color:{selector:".progress-bar",attribute:"background-color",default:null}}),t}(le),Nt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"IntProgressModel",_view_name:"ProgressView",orientation:"horizontal",bar_style:"",style:null})},t}(jt),Ft=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.initialize=function(t){e.prototype.initialize.call(this,t),this.listenTo(this.model,"change:bar_style",this.update_bar_style),this.pWidget.addClass("jupyter-widgets")},t.prototype.render=function(){e.prototype.render.call(this);var t="horizontal"===this.model.get("orientation")?"widget-hprogress":"widget-vprogress";this.el.classList.add(t),this.progress=document.createElement("div"),this.progress.classList.add("progress"),this.progress.style.position="relative",this.el.appendChild(this.progress),this.bar=document.createElement("div"),this.bar.classList.add("progress-bar"),this.bar.style.position="absolute",this.bar.style.bottom="0px",this.bar.style.left="0px",this.progress.appendChild(this.bar),this.update(),this.set_bar_style()},t.prototype.update=function(){var t=this.model.get("value"),n=this.model.get("max"),r=this.model.get("min"),i=100*(t-r)/(n-r);return"horizontal"===this.model.get("orientation")?(this.el.classList.remove("widget-inline-vbox"),this.el.classList.remove("widget-vprogress"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-hprogress"),this.bar.style.width=i+"%",this.bar.style.height="100%"):(this.el.classList.remove("widget-inline-hbox"),this.el.classList.remove("widget-hprogress"),this.el.classList.add("widget-inline-vbox"),this.el.classList.add("widget-vprogress"),this.bar.style.width="100%",this.bar.style.height=i+"%"),e.prototype.update.call(this)},t.prototype.update_bar_style=function(){this.update_mapped_classes(t.class_map,"bar_style",this.bar)},t.prototype.set_bar_style=function(){this.set_mapped_classes(t.class_map,"bar_style",this.bar)},t.class_map={success:["progress-bar-success"],info:["progress-bar-info"],warning:["progress-bar-warning"],danger:["progress-bar-danger"]},t}(ue),Ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"PlayModel",_view_name:"PlayView",_playing:!1,_repeat:!1,show_repeat:!0,interval:100,step:1,disabled:!1})},t.prototype.initialize=function(t,n){e.prototype.initialize.call(this,t,n)},t.prototype.loop=function(){if(this.get("_playing")){var e=this.get("value")+this.get("step");e<=this.get("max")?(this.set("value",e),this.schedule_next()):this.get("_repeat")?(this.set("value",this.get("min")),this.schedule_next()):this.set("_playing",!1),this.save_changes()}},t.prototype.schedule_next=function(){window.setTimeout(this.loop.bind(this),this.get("interval"))},t.prototype.stop=function(){this.set("_playing",!1),this.set("value",this.get("min")),this.save_changes()},t.prototype.pause=function(){this.set("_playing",!1),this.save_changes()},t.prototype.play=function(){this.set("_playing",!0),this.get("value")==this.get("max")?(this.set("value",this.get("min")),this.schedule_next(),this.save_changes()):this.loop()},t.prototype.repeat=function(){this.set("_repeat",!this.get("_repeat")),this.save_changes()},t}(jt),qt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-play"),this.playButton=document.createElement("button"),this.pauseButton=document.createElement("button"),this.stopButton=document.createElement("button"),this.repeatButton=document.createElement("button"),this.playButton.className="jupyter-button",this.pauseButton.className="jupyter-button",this.stopButton.className="jupyter-button",this.repeatButton.className="jupyter-button",this.el.appendChild(this.playButton),this.el.appendChild(this.pauseButton),this.el.appendChild(this.stopButton),this.el.appendChild(this.repeatButton);var t=document.createElement("i");t.className="fa fa-play",this.playButton.appendChild(t);var n=document.createElement("i");n.className="fa fa-pause",this.pauseButton.appendChild(n);var r=document.createElement("i");r.className="fa fa-stop",this.stopButton.appendChild(r);var i=document.createElement("i");i.className="fa fa-retweet",this.repeatButton.appendChild(i),this.playButton.onclick=this.model.play.bind(this.model),this.pauseButton.onclick=this.model.pause.bind(this.model),this.stopButton.onclick=this.model.stop.bind(this.model),this.repeatButton.onclick=this.model.repeat.bind(this.model),this.listenTo(this.model,"change:_playing",this.update_playing),this.listenTo(this.model,"change:_repeat",this.update_repeat),this.listenTo(this.model,"change:show_repeat",this.update_repeat),this.update_playing(),this.update_repeat(),this.update()},t.prototype.update=function(){var e=this.model.get("disabled");this.playButton.disabled=e,this.pauseButton.disabled=e,this.stopButton.disabled=e,this.repeatButton.disabled=e,this.update_playing()},t.prototype.update_playing=function(){var e=this.model.get("_playing"),t=this.model.get("disabled");e?(t||(this.pauseButton.disabled=!1),this.playButton.classList.add("mod-active")):(t||(this.pauseButton.disabled=!0),this.playButton.classList.remove("mod-active"))},t.prototype.update_repeat=function(){var e=this.model.get("_repeat");this.repeatButton.style.display=this.model.get("show_repeat")?this.playButton.style.display:"none",e?this.repeatButton.classList.add("mod-active"):this.repeatButton.classList.remove("mod-active")},t}(G),Ht=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"FloatModel",value:0})},t}(_e),Vt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"BoundedFloatModel",max:100,min:0})},t}(Wt),$t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"FloatSliderModel",_view_name:"FloatSliderView",step:1,orientation:"horizontal",_range:!1,readout:!0,readout_format:".2f",slider_color:null,continuous_update:!0,disabled:!1})},t.prototype.initialize=function(t,n){e.prototype.initialize.call(this,t,n),this.on("change:readout_format",this.update_readout_format,this),this.update_readout_format()},t.prototype.update_readout_format=function(){this.readout_formatter=yt(this.get("readout_format"))},t}(Vt),Kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"FloatLogSliderModel",_view_name:"FloatLogSliderView",step:.1,orientation:"horizontal",_range:!1,readout:!0,readout_format:".3g",slider_color:null,continuous_update:!0,disabled:!1,base:10,value:1,min:0,max:4})},t.prototype.initialize=function(t,n){e.prototype.initialize.call(this,t,n),this.on("change:readout_format",this.update_readout_format,this),this.update_readout_format()},t.prototype.update_readout_format=function(){this.readout_formatter=yt(this.get("readout_format"))},t}(Vt),Gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t}($t),Yt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._parse_value=parseFloat,t}return Ht(t,e),t.prototype._validate_slide_value=function(e){return e},t}(It),Jt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._parse_value=parseFloat,t}return Ht(t,e),t.prototype.update=function(t){e.prototype.update.call(this,t);var n=this.model.get("min"),r=this.model.get("max"),i=this.model.get("value"),o=this.model.get("base"),s=Math.log(i)/Math.log(o);s>r?s=r:s<n&&(s=n),this.$slider.slider("option","value",s),this.readout.textContent=this.valueToString(i),this.model.get("value")!==i&&(this.model.set("value",i,{updated_view:this}),this.touch())},t.prototype.valueToString=function(e){return(0,this.model.readout_formatter)(e)},t.prototype.stringToValue=function(e){return this._parse_value(e)},t.prototype.handleTextChange=function(){var e=this.stringToValue(this.readout.textContent),t=this.model.get("min"),n=this.model.get("max"),r=this.model.get("base");isNaN(e)?this.readout.textContent=this.valueToString(this.model.get("value")):(e=Math.max(Math.min(e,Math.pow(r,n)),Math.pow(r,t)))!==this.model.get("value")?(this.readout.textContent=this.valueToString(e),this.model.set("value",e,{updated_view:this}),this.touch()):this.readout.textContent=this.valueToString(this.model.get("value"))},t.prototype.handleSliderChange=function(e,t){var n=this.model.get("base"),r=Math.pow(n,this._validate_slide_value(t.value));this.readout.textContent=this.valueToString(r),this.model.get("continuous_update")&&this.handleSliderChanged(e,t)},t.prototype.handleSliderChanged=function(e,t){var n=this.model.get("base"),r=Math.pow(n,this._validate_slide_value(t.value));this.model.set("value",r,{updated_view:this}),this.touch()},t.prototype._validate_slide_value=function(e){return e},t}(Ot),Xt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._parse_value=parseFloat,t._range_regex=/^\s*([+-]?(?:\d*\.?\d+|\d+\.)(?:[eE][-:]?\d+)?)\s*[-:–]\s*([+-]?(?:\d*\.?\d+|\d+\.)(?:[eE][+-]?\d+)?)/,t}return Ht(t,e),t.prototype._validate_slide_value=function(e){return e},t}(Lt),Qt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"FloatTextModel",_view_name:"FloatTextView",disabled:!1,continuous_update:!1})},t}(Wt),Zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"BoundedFloatTextModel",_view_name:"FloatTextView",disabled:!1,continuous_update:!1,step:.1})},t}(Vt),en=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._parse_value=parseFloat,t._default_step="any",t}return Ht(t,e),t.prototype.handleKeypress=function(e){e.stopPropagation()},t.prototype.handleKeyUp=function(e){},t}(Bt),tn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"FloatProgressModel",_view_name:"ProgressView",orientation:"horizontal",bar_style:"",style:null})},t}(Vt),nn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rn=function(){return(rn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},on=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nn(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"ControllerButtonModel",_view_name:"ControllerButtonView",value:0,pressed:!1})},t}(me),sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nn(t,e),t.prototype.render=function(){this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-controller-button"),this.el.style.width="fit-content",this.support=document.createElement("div"),this.support.style.position="relative",this.support.style.margin="1px",this.support.style.width="16px",this.support.style.height="16px",this.support.style.border="1px solid black",this.support.style.background="lightgray",this.el.appendChild(this.support),this.bar=document.createElement("div"),this.bar.style.position="absolute",this.bar.style.width="100%",this.bar.style.bottom="0px",this.bar.style.background="gray",this.support.appendChild(this.bar),this.update(),this.label=document.createElement("div"),this.label.textContent=this.model.get("description"),this.label.style.textAlign="center",this.el.appendChild(this.label)},t.prototype.update=function(){this.bar.style.height=100*this.model.get("value")+"%"},t}(G),an=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nn(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"ControllerAxisModel",_view_name:"ControllerAxisView",value:0})},t}(me),ln=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nn(t,e),t.prototype.render=function(){this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-controller-axis"),this.el.style.width="16px",this.el.style.padding="4px",this.support=document.createElement("div"),this.support.style.position="relative",this.support.style.margin="1px",this.support.style.width="4px",this.support.style.height="64px",this.support.style.border="1px solid black",this.support.style.background="lightgray",this.bullet=document.createElement("div"),this.bullet.style.position="absolute",this.bullet.style.margin="-3px",this.bullet.style.boxSizing="unset",this.bullet.style.width="10px",this.bullet.style.height="10px",this.bullet.style.background="gray",this.label=document.createElement("div"),this.label.textContent=this.model.get("description"),this.label.style.textAlign="center",this.support.appendChild(this.bullet),this.el.appendChild(this.support),this.el.appendChild(this.label),this.update()},t.prototype.update=function(){this.bullet.style.top=50*(this.model.get("value")+1)+"%"},t}(G),cn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nn(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"ControllerModel",_view_name:"ControllerView",index:0,name:"",mapping:"",connected:!1,timestamp:0,buttons:[],axes:[]})},t.prototype.initialize=function(t,n){e.prototype.initialize.call(this,t,n),void 0===navigator.getGamepads?(this.readout="This browser does not support gamepads.",console.error(this.readout)):(this.readout="Connect gamepad and press any button.",this.get("connected")?this.update_loop():this.wait_loop())},t.prototype.wait_loop=function(){var e=this.get("index"),t=navigator.getGamepads()[e];if(t){var n=this;this.setup(t).then((function(e){n.set(e),n.save_changes(),window.requestAnimationFrame(n.update_loop.bind(n))}))}else window.requestAnimationFrame(this.wait_loop.bind(this))},t.prototype.setup=function(e){this.set({name:e.id,mapping:e.mapping,connected:e.connected,timestamp:e.timestamp});var t=this;return _({buttons:Promise.all(e.buttons.map((function(e,n){return t._create_button_model(n)}))),axes:Promise.all(e.axes.map((function(e,n){return t._create_axis_model(n)})))})},t.prototype.update_loop=function(){var e=this.get("index"),t=this.get("name"),n=navigator.getGamepads()[e];n&&e===n.index&&t===n.id?(this.set({timestamp:n.timestamp,connected:n.connected}),this.save_changes(),this.get("buttons").forEach((function(e,t){e.set({value:n.buttons[t].value,pressed:n.buttons[t].pressed}),e.save_changes()})),this.get("axes").forEach((function(e,t){e.set("value",n.axes[t]),e.save_changes()})),window.requestAnimationFrame(this.update_loop.bind(this))):this.reset_gamepad()},t.prototype.reset_gamepad=function(){this.get("buttons").forEach((function(e){e.close()})),this.get("axes").forEach((function(e){e.close()})),this.set({name:"",mapping:"",connected:!1,timestamp:0,buttons:[],axes:[]}),this.save_changes(),window.requestAnimationFrame(this.wait_loop.bind(this))},t.prototype._create_button_model=function(e){return this.widget_manager.new_widget({model_name:"ControllerButtonModel",model_module:"@jupyter-widgets/controls",model_module_version:this.get("_model_module_version"),view_name:"ControllerButtonView",view_module:"@jupyter-widgets/controls",view_module_version:this.get("_view_module_version")}).then((function(t){return t.set("description",e),t}))},t.prototype._create_axis_model=function(e){return this.widget_manager.new_widget({model_name:"ControllerAxisModel",model_module:"@jupyter-widgets/controls",model_module_version:this.get("_model_module_version"),view_name:"ControllerAxisView",view_module:"@jupyter-widgets/controls",view_module_version:this.get("_view_module_version")}).then((function(t){return t.set("description",e),t}))},t.serializers=rn({},me.serializers,{buttons:{deserialize:U},axes:{deserialize:U}}),t}(me),un=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nn(t,e),t.prototype._createElement=function(e){return this.pWidget=new K({view:this}),this.pWidget.node},t.prototype._setElement=function(e){if(this.el||e!==this.pWidget.node)throw new Error("Cannot reset the DOM element.");this.el=this.pWidget.node,this.$el=O()(this.pWidget.node)},t.prototype.initialize=function(t){e.prototype.initialize.call(this,t),this.button_views=new te(this.add_button,null,this),this.listenTo(this.model,"change:buttons",(function(e,t){this.button_views.update(t)})),this.axis_views=new te(this.add_axis,null,this),this.listenTo(this.model,"change:axes",(function(e,t){this.axis_views.update(t)})),this.listenTo(this.model,"change:name",this.update_label)},t.prototype.render=function(){this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-controller"),this.label=document.createElement("div"),this.el.appendChild(this.label),this.axis_box=new B.Panel,this.axis_box.node.style.display="flex",this.pWidget.addWidget(this.axis_box),this.button_box=new B.Panel,this.button_box.node.style.display="flex",this.pWidget.addWidget(this.button_box),this.button_views.update(this.model.get("buttons")),this.axis_views.update(this.model.get("axes")),this.update_label()},t.prototype.update_label=function(){this.label.textContent=this.model.get("name")||this.model.readout},t.prototype.add_button=function(e){var t=this,n=new B.Widget;return this.button_box.addWidget(n),this.create_child_view(e).then((function(e){var r=Ie.ArrayExt.firstIndexOf(t.button_box.widgets,n);return t.button_box.insertWidget(r,e.pWidget),n.dispose(),e})).catch(ne("Could not add child button view to controller",!0))},t.prototype.add_axis=function(e){var t=this,n=new B.Widget;return this.axis_box.addWidget(n),this.create_child_view(e).then((function(e){var r=Ie.ArrayExt.firstIndexOf(t.axis_box.widgets,n);return t.axis_box.insertWidget(r,e.pWidget),n.dispose(),e})).catch(ne("Could not add child axis view to controller",!0))},t.prototype.remove=function(){e.prototype.remove.call(this),this.button_views.remove(),this.axis_views.remove()},t}(G),hn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dn=function(){return(dn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},pn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.defaults=function(){return dn({},e.prototype.defaults.call(this),{_model_name:"SelectionModel",index:"",_options_labels:[],disabled:!1})},t}(_e),fn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.defaults=function(){return dn({},e.prototype.defaults.call(this),{_model_name:"DropdownModel",_view_name:"DropdownView",button_style:""})},t}(pn),gn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.initialize=function(t){var n=this;e.prototype.initialize.call(this,t),this.listenTo(this.model,"change:_options_labels",(function(){return n._updateOptions()}))},t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-dropdown"),this.listbox=document.createElement("select"),this.listbox.id=this.label.htmlFor=g(),this.el.appendChild(this.listbox),this._updateOptions(),this.update()},t.prototype.update=function(){this.listbox.disabled=this.model.get("disabled");var t=this.model.get("index");return this.listbox.selectedIndex=null===t?-1:t,e.prototype.update.call(this)},t.prototype._updateOptions=function(){this.listbox.textContent="";for(var e=this.model.get("_options_labels"),t=0;t<e.length;t++){var n=e[t],r=document.createElement("option");r.textContent=n.replace(/ /g," "),r.setAttribute("data-value",encodeURIComponent(n)),r.value=n,this.listbox.appendChild(r)}},t.prototype.events=function(){return{"change select":"_handle_change"}},t.prototype._handle_change=function(){this.model.set("index",-1===this.listbox.selectedIndex?null:this.listbox.selectedIndex),this.touch()},t}(ue),mn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.defaults=function(){return dn({},e.prototype.defaults.call(this),{_model_name:"SelectModel",_view_name:"SelectView",rows:5})},t}(pn),_n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.initialize=function(t){var n=this;e.prototype.initialize.call(this,t),this.listenTo(this.model,"change:_options_labels",(function(){return n._updateOptions()})),this.listenTo(this.model,"change:index",(function(e,t,r){return n.updateSelection(r)})),this.listbox=document.createElement("select")},t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-select"),this.listbox.id=this.label.htmlFor=g(),this.el.appendChild(this.listbox),this._updateOptions(),this.update(),this.updateSelection()},t.prototype.update=function(){e.prototype.update.call(this),this.listbox.disabled=this.model.get("disabled");var t=this.model.get("rows");null===t&&(t=""),this.listbox.setAttribute("size",t)},t.prototype.updateSelection=function(e){if(void 0===e&&(e={}),e.updated_view!==this){var t=this.model.get("index");this.listbox.selectedIndex=null===t?-1:t}},t.prototype._updateOptions=function(){this.listbox.textContent="";for(var e=this.model.get("_options_labels"),t=0;t<e.length;t++){var n=e[t],r=document.createElement("option");r.textContent=n.replace(/ /g," "),r.setAttribute("data-value",encodeURIComponent(n)),r.value=n,this.listbox.appendChild(r)}},t.prototype.events=function(){return{"change select":"_handle_change"}},t.prototype._handle_change=function(){this.model.set("index",this.listbox.selectedIndex,{updated_view:this}),this.touch()},t}(ue),vn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.defaults=function(){return dn({},e.prototype.defaults.call(this),{_model_name:"RadioButtonsModel",_view_name:"RadioButtonsView",tooltips:[],icons:[],button_style:""})},t}(pn),yn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-radio"),this.container=document.createElement("div"),this.el.appendChild(this.container),this.container.classList.add("widget-radio-box"),this.update()},t.prototype.update=function(t){var n=this,r=this.model.get("_options_labels"),i=pe.pluck(this.container.querySelectorAll('input[type="radio"]'),"value"),o=r.length!=i.length;if(!o)for(var s=0,a=r.length;s<a;++s)if(i[s]!==r[s]){o=!0;break}return!o||void 0!==t&&t.updated_view===this||(this.container.textContent="",r.forEach((function(e,t){var r=document.createElement("label");r.textContent=e,n.container.appendChild(r);var i=document.createElement("input");i.setAttribute("type","radio"),i.value=t.toString(),i.setAttribute("data-value",encodeURIComponent(e)),r.appendChild(i)}))),r.forEach((function(e,t){var r='input[data-value="'+encodeURIComponent(e)+'"]',i=n.container.querySelectorAll(r);if(i.length>0){var o=i[0];o.checked=n.model.get("index")===t,o.disabled=n.model.get("disabled")}})),setTimeout(this.adjustPadding,0,this),e.prototype.update.call(this,t)},t.prototype.adjustPadding=function(e){var t=window.getComputedStyle(e.el),n=parseInt(t.marginTop,10)+parseInt(t.marginBottom,10),r=e.label.offsetHeight+n,i=window.getComputedStyle(e.container),o=parseInt(i.marginBottom),s=(e.el.offsetHeight+n-o)%r,a=0==s?0:r-s;e.container.style.marginBottom=a+"px"},t.prototype.events=function(){return{'click input[type="radio"]':"_handle_click"}},t.prototype._handle_click=function(e){var t=e.target;this.model.set("index",parseInt(t.value),{updated_view:this}),this.touch()},t}(ue),bn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"ToggleButtonsStyleModel"})},t.styleProperties=dn({},le.styleProperties,{button_width:{selector:".widget-toggle-button",attribute:"width",default:null},font_weight:{selector:".widget-toggle-button",attribute:"font-weight",default:""}}),t}(le),wn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.defaults=function(){return dn({},e.prototype.defaults.call(this),{_model_name:"ToggleButtonsModel",_view_name:"ToggleButtonsView"})},t}(pn),xn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.initialize=function(t){this._css_state={},e.prototype.initialize.call(this,t),this.listenTo(this.model,"change:button_style",this.update_button_style)},t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-toggle-buttons"),this.buttongroup=document.createElement("div"),this.el.appendChild(this.buttongroup),this.update(),this.set_button_style()},t.prototype.update=function(n){for(var r=this,i=this.model.get("_options_labels"),o=this.model.get("icons")||[],s=this.model.previous("icons")||[],a=t.classMap[this.model.previous("button_style")]||"",l=r.model.get("tooltips")||[],c=this.model.get("disabled"),u=this.buttongroup.querySelectorAll("button"),h=pe.pluck(u,"value"),d=!1,p=0,f=i.length;p<f;++p)if(h[p]!==i[p]||o[p]!==s[p]){d=!0;break}return!d||void 0!==n&&n.updated_view===this||(this.buttongroup.textContent="",i.forEach((function(e,t){var n;n=0===e.trim().length&&(!o[t]||0===o[t].trim().length)?"&nbsp;":ie(e);var i=document.createElement("i"),s=document.createElement("button");o[t]&&(i.className="fa fa-"+o[t]),s.setAttribute("type","button"),s.className="widget-toggle-button jupyter-button",a&&s.classList.add(a),s.innerHTML=n,s.setAttribute("data-value",encodeURIComponent(e)),s.setAttribute("value",t.toString()),s.appendChild(i),s.disabled=c,l[t]&&s.setAttribute("title",l[t]),r.update_style_traits(s),r.buttongroup.appendChild(s)}))),i.forEach((function(e,t){var n='[data-value="'+encodeURIComponent(e)+'"]',i=r.buttongroup.querySelector(n);r.model.get("index")===t?i.classList.add("mod-active"):i.classList.remove("mod-active")})),this.stylePromise.then((function(e){e&&e.style()})),e.prototype.update.call(this,n)},t.prototype.update_style_traits=function(e){for(var t in this._css_state)if(this._css_state.hasOwnProperty(t))if("margin"===t)this.buttongroup.style[t]=this._css_state[t];else if("width"!==t)if(e)e.style[t]=this._css_state[t];else{var n=this.buttongroup.querySelectorAll("button");n.length&&(n[0].style[t]=this._css_state[t])}},t.prototype.update_button_style=function(){for(var e=this.buttongroup.querySelectorAll("button"),n=0;n<e.length;n++)this.update_mapped_classes(t.classMap,"button_style",e[n])},t.prototype.set_button_style=function(){for(var e=this.buttongroup.querySelectorAll("button"),n=0;n<e.length;n++)this.set_mapped_classes(t.classMap,"button_style",e[n])},t.prototype.events=function(){return{"click button":"_handle_click"}},t.prototype._handle_click=function(e){var t=e.target;this.model.set("index",parseInt(t.value,10),{updated_view:this}),this.touch(),this.send({event:"click"})},t}(ue);(xn||(xn={})).classMap={primary:["mod-primary"],success:["mod-success"],info:["mod-info"],warning:["mod-warning"],danger:["mod-danger"]};var kn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.defaults=function(){return dn({},e.prototype.defaults.call(this),{_model_name:"SelectionSliderModel",_view_name:"SelectionSliderView",orientation:"horizontal",readout:!0,continuous_update:!0})},t}(pn),En=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.render=function(){var t=this;e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-hslider"),this.el.classList.add("widget-slider"),(this.$slider=O()("<div />")).slider({slide:this.handleSliderChange.bind(this),stop:this.handleSliderChanged.bind(this)}).addClass("slider"),this.slider_container=document.createElement("div"),this.slider_container.classList.add("slider-container"),this.slider_container.appendChild(this.$slider[0]),this.el.appendChild(this.slider_container),this.readout=document.createElement("div"),this.el.appendChild(this.readout),this.readout.classList.add("widget-readout"),this.readout.style.display="none",this.listenTo(this.model,"change:slider_color",(function(e,n){t.$slider.find("a").css("background",n)})),this.$slider.find("a").css("background",this.model.get("slider_color")),this.update()},t.prototype.update=function(t){if(void 0===t||t.updated_view!==this){var n=this.model.get("_options_labels").length-1;this.$slider.slider("option","step",1),this.$slider.slider("option","max",n),this.$slider.slider("option","min",0);var r=this.model.get("orientation");this.$slider.slider("option","value",0),this.$slider.slider("option","orientation",r);var i=this.model.get("disabled");this.$slider.slider("option","disabled",i),this.readout.contentEditable=i?"false":"true","vertical"===r?(this.el.classList.remove("widget-hslider"),this.el.classList.remove("widget-inline-hbox"),this.el.classList.add("widget-vslider"),this.el.classList.add("widget-inline-vbox")):(this.el.classList.remove("widget-vslider"),this.el.classList.remove("widget-inline-vbox"),this.el.classList.add("widget-hslider"),this.el.classList.add("widget-inline-hbox"));var o=this.model.get("readout");this.readout.style.display=o?"":"none",this.updateSelection()}return e.prototype.update.call(this,t)},t.prototype.events=function(){return{slide:"handleSliderChange",slidestop:"handleSliderChanged"}},t.prototype.updateSelection=function(){var e=this.model.get("index");this.$slider.slider("option","value",e),this.updateReadout(e)},t.prototype.updateReadout=function(e){var t=this.model.get("_options_labels")[e];this.readout.textContent=t},t.prototype.handleSliderChange=function(e,t){this.updateReadout(t.value),this.model.get("continuous_update")&&this.handleSliderChanged(e,t)},t.prototype.handleSliderChanged=function(e,t){this.updateReadout(t.value),this.model.set("index",t.value,{updated_view:this}),this.touch()},t}(ue),Sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.defaults=function(){return dn({},e.prototype.defaults.call(this),{_model_name:"MultipleSelectionModel"})},t}(pn),Mn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.defaults=function(){return dn({},e.prototype.defaults.call(this),{_model_name:"SelectMultipleModel",_view_name:"SelectMultipleView",rows:null})},t}(Sn),Cn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.initialize=function(t){e.prototype.initialize.call(this,t),this.listbox.multiple=!0},t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("widget-select-multiple")},t.prototype.updateSelection=function(e){if(void 0===e&&(e={}),e.updated_view!==this){var t=this.model.get("index")||[],n=this.listbox.options;this.listbox.selectedIndex=-1,t.forEach((function(e){n[e].selected=!0}))}},t.prototype._handle_change=function(){var e=Array.prototype.map.call(this.listbox.selectedOptions||[],(function(e){return e.index}));this.model.set("index",e,{updated_view:this}),this.touch()},t}(_n),jn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.defaults=function(){return dn({},e.prototype.defaults.call(this),{_model_name:"SelectionSliderModel",_view_name:"SelectionSliderView",orientation:"horizontal",readout:!0,continuous_update:!0})},t}(Sn),An=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hn(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.$slider.slider("option","range",!0)},t.prototype.updateSelection=function(){var e=this.model.get("index");this.$slider.slider("option","values",e.slice()),this.updateReadout(e)},t.prototype.updateReadout=function(e){var t=this.model.get("_options_labels"),n=t[e[0]],r=t[e[1]];this.readout.textContent=n+"-"+r},t.prototype.handleSliderChange=function(e,t){this.updateReadout(t.values),this.model.get("continuous_update")&&this.handleSliderChanged(e,t)},t.prototype.handleSliderChanged=function(e,t){this.updateReadout(t.values),this.model.set("index",t.values.slice(),{updated_view:this}),this.touch()},t}(En),Tn=n(6),Pn=n(16),On=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ln=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._widgetRemoved=new Tn.Signal(t),t}return On(t,e),Object.defineProperty(t.prototype,"widgetRemoved",{get:function(){return this._widgetRemoved},enumerable:!0,configurable:!0}),t.prototype.onChildRemoved=function(e){this._widgetRemoved.emit(e.child)},t}(B.Panel),In=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;n._currentChanged=new Tn.Signal(n),n.addClass("p-TabPanel"),n.tabBar=new B.TabBar(t),n.tabBar.addClass("p-TabPanel-tabBar"),n.tabContents=new Ln,n.tabContents.addClass("p-TabPanel-tabContents"),n.tabBar.tabMoved.connect(n._onTabMoved,n),n.tabBar.currentChanged.connect(n._onCurrentChanged,n),n.tabBar.tabCloseRequested.connect(n._onTabCloseRequested,n),n.tabBar.tabActivateRequested.connect(n._onTabActivateRequested,n),n.tabContents.widgetRemoved.connect(n._onWidgetRemoved,n);var r=new B.PanelLayout;return r.addWidget(n.tabBar),r.addWidget(n.tabContents),n.layout=r,n}return On(t,e),Object.defineProperty(t.prototype,"currentChanged",{get:function(){return this._currentChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentIndex",{get:function(){var e=this.tabBar.currentIndex;return-1===e?null:e},set:function(e){this.tabBar.currentIndex=null===e?-1:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentWidget",{get:function(){var e=this.tabBar.currentTitle;return e?e.owner:null},set:function(e){this.tabBar.currentTitle=e?e.title:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabsMovable",{get:function(){return this.tabBar.tabsMovable},set:function(e){this.tabBar.tabsMovable=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"widgets",{get:function(){return this.tabContents.widgets},enumerable:!0,configurable:!0}),t.prototype.addWidget=function(e){this.insertWidget(this.widgets.length,e)},t.prototype.insertWidget=function(e,t){t!==this.currentWidget&&t.hide(),this.tabContents.insertWidget(e,t),this.tabBar.insertTab(e,t.title)},t.prototype._onCurrentChanged=function(e,t){var n=t.previousIndex,r=t.previousTitle,i=t.currentIndex,o=t.currentTitle,s=r?r.owner:null,a=o?o.owner:null;s&&s.hide(),a&&a.show(),this._currentChanged.emit({previousIndex:n,previousWidget:s,currentIndex:i,currentWidget:a}),(Pn.Platform.IS_EDGE||Pn.Platform.IS_IE)&&z.MessageLoop.flush()},t.prototype._onTabActivateRequested=function(e,t){t.title.owner.activate()},t.prototype._onTabCloseRequested=function(e,t){t.title.owner.close()},t.prototype._onTabMoved=function(e,t){this.tabContents.insertWidget(t.toIndex,t.title.owner)},t.prototype._onWidgetRemoved=function(e,t){this.tabBar.removeTab(t.title)},t}(B.Widget),Dn=function(){function e(e,t){void 0===t&&(t={}),this._array=null,this._value=null,this._previousValue=null,this._selectionChanged=new Tn.Signal(this),this._array=e,this._insertBehavior=t.insertBehavior||"select-item-if-needed",this._removeBehavior=t.removeBehavior||"select-item-after"}return Object.defineProperty(e.prototype,"selectionChanged",{get:function(){return this._selectionChanged},enumerable:!0,configurable:!0}),e.prototype.adjustSelectionForSet=function(e){var t=this.index,n=this.value;if(e===t){this._updateSelectedValue();var r=this.value;this._previousValue=null,n!==r&&this._selectionChanged.emit({previousIndex:t,previousValue:n,currentIndex:t,currentValue:r})}},Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this.index=null===e?null:Ie.ArrayExt.firstIndexOf(this._array,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"index",{get:function(){return this._index},set:function(e){var t;if(null!==e?((t=Math.floor(e))<0||t>=this._array.length)&&(t=null):t=null,this._index!==t){var n=this._index,r=this._value;this._index=t,this._updateSelectedValue(),this._previousValue=r,this._selectionChanged.emit({previousIndex:n,previousValue:r,currentIndex:t,currentValue:this._value})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"insertBehavior",{get:function(){return this._insertBehavior},set:function(e){this._insertBehavior=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removeBehavior",{get:function(){return this._removeBehavior},set:function(e){this._removeBehavior=e},enumerable:!0,configurable:!0}),e.prototype.adjustSelectionForInsert=function(e,t){var n=this._value,r=this._index,i=this._insertBehavior;if("select-item"===i||"select-item-if-needed"===i&&null===r)return this._index=e,this._value=t,this._previousValue=n,void this._selectionChanged.emit({previousIndex:r,previousValue:n,currentIndex:e,currentValue:t});r>=e&&this._index++},e.prototype.adjustSelectionForMove=function(e,t){this._index===e?this._index=t:this._index<e&&this._index>=t?this._index++:this._index>e&&this._index<=t&&this._index--},e.prototype.clearSelection=function(){var e=this._index,t=this._value;this._index=null,this._value=null,this._previousValue=null,null!==e&&this._selectionChanged.emit({previousIndex:e,previousValue:t,currentIndex:this._index,currentValue:this._value})},e.prototype.adjustSelectionForRemove=function(e,t){var n=this._index,r=this._removeBehavior;if(n===e){if(0===this._array.length)return this._index=null,this._value=null,this._previousValue=null,void this._selectionChanged.emit({previousIndex:e,previousValue:t,currentIndex:this._index,currentValue:this._value});if("select-item-after"===r)return this._index=Math.min(e,this._array.length-1),this._updateSelectedValue(),this._previousValue=null,void this._selectionChanged.emit({previousIndex:e,previousValue:t,currentIndex:this._index,currentValue:this._value});if("select-item-before"===r)return this._index=Math.max(0,e-1),this._updateSelectedValue(),this._previousValue=null,void this._selectionChanged.emit({previousIndex:e,previousValue:t,currentIndex:this._index,currentValue:this._value});if("select-previous-item"===r)return this._previousValue?this.value=this._previousValue:(this._index=Math.min(e,this._array.length-1),this._updateSelectedValue()),this._previousValue=null,void this._selectionChanged.emit({previousIndex:e,previousValue:t,currentIndex:this._index,currentValue:this.value});this._index=null,this._value=null,this._previousValue=null,this._selectionChanged.emit({previousIndex:e,previousValue:t,currentIndex:this._index,currentValue:this._value})}else n>e&&this._index--},e.prototype._updateSelectedValue=function(){var e=this._index;this._value=null!==e?this._array[e]:null},e}(),Rn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bn=function(e){function t(t){var n=e.call(this,t)||this;n._collapseChanged=new Tn.Signal(n),n.addClass("p-Collapse"),n._header=new B.Widget,n._header.addClass("p-Collapse-header"),n._header.node.addEventListener("click",n),n._content=new B.Panel,n._content.addClass("p-Collapse-contents");var r=new B.PanelLayout;return n.layout=r,r.addWidget(n._header),r.addWidget(n._content),t.widget&&(n.widget=t.widget),n.collapsed=!1,n}return Rn(t,e),t.prototype.dispose=function(){this.isDisposed||(e.prototype.dispose.call(this),this._header=null,this._widget=null,this._content=null)},Object.defineProperty(t.prototype,"widget",{get:function(){return this._widget},set:function(e){var t=this._widget;t&&(t.disposed.disconnect(this._onChildDisposed,this),t.title.changed.disconnect(this._onTitleChanged,this),t.parent=null),this._widget=e,e.disposed.connect(this._onChildDisposed,this),e.title.changed.connect(this._onTitleChanged,this),this._onTitleChanged(e.title),this._content.addWidget(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"collapsed",{get:function(){return this._collapsed},set:function(e){e!==this._collapsed&&(e?this._collapse():this._uncollapse())},enumerable:!0,configurable:!0}),t.prototype.toggle=function(){this.collapsed=!this.collapsed},Object.defineProperty(t.prototype,"collapseChanged",{get:function(){return this._collapseChanged},enumerable:!0,configurable:!0}),t.prototype._collapse=function(){this._collapsed=!0,this._content&&this._content.hide(),this.removeClass("p-Collapse-open"),this._collapseChanged.emit(void 0)},t.prototype._uncollapse=function(){this._collapsed=!1,this._content&&this._content.show(),this.addClass("p-Collapse-open"),this._collapseChanged.emit(void 0)},t.prototype.handleEvent=function(e){switch(e.type){case"click":this._evtClick(e)}},t.prototype._evtClick=function(e){this.toggle()},t.prototype._onTitleChanged=function(e){this._header.node.textContent=this._widget.title.label},t.prototype._onChildDisposed=function(e){this.dispose()},t}(B.Widget),zn=function(e){function t(t){var n=e.call(this,t)||this;return n._selection=new Dn(n.widgets),n._selection.selectionChanged.connect(n._onSelectionChanged,n),n.addClass("p-Accordion"),n}return Rn(t,e),Object.defineProperty(t.prototype,"collapseWidgets",{get:function(){return this.layout.widgets},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selection",{get:function(){return this._selection},enumerable:!0,configurable:!0}),t.prototype.indexOf=function(e){return Ie.ArrayExt.findFirstIndex(this.collapseWidgets,(function(t){return t.widget===e}))},t.prototype.addWidget=function(t){var n=this._wrapWidget(t);return n.collapsed=!0,e.prototype.addWidget.call(this,n),this._selection.adjustSelectionForInsert(this.widgets.length-1,n),n},t.prototype.insertWidget=function(t,n){var r=this._wrapWidget(n);r.collapsed=!0,e.prototype.insertWidget.call(this,t,r),this._selection.adjustSelectionForInsert(t,r)},t.prototype.removeWidget=function(e){var t=this.indexOf(e);if(t>=0){var n=this.collapseWidgets[t];e.parent=null,n.dispose(),this._selection.adjustSelectionForRemove(t,null)}},t.prototype._wrapWidget=function(e){var t=new Bn({widget:e});return t.addClass("p-Accordion-child"),t.collapseChanged.connect(this._onCollapseChange,this),t},t.prototype._onCollapseChange=function(e){e.collapsed?this._selection.value===e&&e.collapsed&&(this._selection.value=null):this._selection.value=e},t.prototype._onSelectionChanged=function(e,t){var n=t.previousValue,r=t.currentValue;n&&(n.collapsed=!0,n.removeClass("p-Accordion-child-active")),r&&(r.collapsed=!1,r.addClass("p-Accordion-child-active"))},t}(B.Panel),Nn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Nn(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"SelectionContainerModel",selected_index:0,_titles:{}})},t}(Be),Un=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Nn(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"AccordionModel",_view_name:"AccordionView"})},t}(Fn),qn=function(e){function t(t){var n=this,r=t.view;return delete t.view,(n=e.call(this,t)||this)._view=r,n}return Nn(t,e),t.prototype.processMessage=function(t){e.prototype.processMessage.call(this,t),this._view.processPhosphorMessage(t)},t.prototype.dispose=function(){this.isDisposed||(e.prototype.dispose.call(this),this._view&&this._view.remove(),this._view=null)},t}(zn),Hn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Nn(t,e),t.prototype._createElement=function(e){return this.pWidget=new qn({view:this}),this.pWidget.node},t.prototype._setElement=function(e){if(this.el||e!==this.pWidget.node)throw new Error("Cannot reset the DOM element.");this.el=this.pWidget.node,this.$el=O()(this.pWidget.node)},t.prototype.initialize=function(t){var n=this;e.prototype.initialize.call(this,t),this.children_views=new te(this.add_child_view,this.remove_child_view,this),this.listenTo(this.model,"change:children",(function(){return n.updateChildren()})),this.listenTo(this.model,"change:selected_index",(function(){return n.update_selected_index()})),this.listenTo(this.model,"change:_titles",(function(){return n.update_titles()}))},t.prototype.render=function(){var t=this;e.prototype.render.call(this);var n=this.pWidget;n.addClass("jupyter-widgets"),n.addClass("widget-accordion"),n.addClass("widget-container"),n.selection.selectionChanged.connect((function(e){t.updatingChildren||(t.model.set("selected_index",n.selection.index),t.touch())})),this.children_views.update(this.model.get("children")),this.update_titles(),this.update_selected_index()},t.prototype.updateChildren=function(){this.updatingChildren=!0,this.pWidget.selection.index=null,this.children_views.update(this.model.get("children")),this.update_selected_index(),this.updatingChildren=!1},t.prototype.update_titles=function(){for(var e=this.pWidget.collapseWidgets,t=this.model.get("_titles"),n=0;n<e.length;n++)void 0!==t[n]&&(e[n].widget.title.label=t[n])},t.prototype.update_selected_index=function(){this.pWidget.selection.index=this.model.get("selected_index")},t.prototype.remove_child_view=function(e){this.pWidget.removeWidget(e.pWidget),e.remove()},t.prototype.add_child_view=function(e,t){var n=this.pWidget,r=new B.Widget;return r.title.label=this.model.get("_titles")[t]||"",n.addWidget(r),this.create_child_view(e).then((function(e){var t=e.pWidget;return t.title.label=r.title.label,n.collapseWidgets[n.indexOf(r)].widget=t,r.dispose(),e})).catch(ne("Could not add child view to box",!0))},t.prototype.remove=function(){this.children_views=null,e.prototype.remove.call(this)},t}(G),Wn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Nn(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"TabModel",_view_name:"TabView"})},t}(Fn),Vn=function(e){function t(t){var n=this,r=t.view;return delete t.view,(n=e.call(this,t)||this)._view=r,z.MessageLoop.installMessageHook(n.tabContents,(function(e,t){return n._view.processPhosphorMessage(t),!0})),n}return Nn(t,e),t.prototype.dispose=function(){this.isDisposed||(e.prototype.dispose.call(this),this._view&&this._view.remove(),this._view=null)},t}(In),$n=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.updatingTabs=!1,t}return Nn(t,e),t.prototype._createElement=function(e){return this.pWidget=new Vn({view:this}),this.pWidget.node},t.prototype._setElement=function(e){if(this.el||e!==this.pWidget.node)throw new Error("Cannot reset the DOM element.");this.el=this.pWidget.node,this.$el=O()(this.pWidget.node)},t.prototype.initialize=function(t){var n=this;e.prototype.initialize.call(this,t),this.childrenViews=new te(this.addChildView,(function(e){e.remove()}),this),this.listenTo(this.model,"change:children",(function(){return n.updateTabs()})),this.listenTo(this.model,"change:_titles",(function(){return n.updateTitles()}))},t.prototype.render=function(){e.prototype.render.call(this);var t=this.pWidget;t.addClass("jupyter-widgets"),t.addClass("widget-container"),t.addClass("widget-tab"),t.tabsMovable=!0,t.tabBar.insertBehavior="none",t.tabBar.currentChanged.connect(this._onTabChanged,this),t.tabBar.tabMoved.connect(this._onTabMoved,this),t.tabBar.addClass("widget-tab-bar"),t.tabContents.addClass("widget-tab-contents"),t.tabBar.tabsMovable=!1,this.updateTabs(),this.update()},t.prototype.updateTabs=function(){this.updatingTabs=!0,this.pWidget.currentIndex=null,this.childrenViews.update(this.model.get("children")),this.pWidget.currentIndex=this.model.get("selected_index"),this.updatingTabs=!1},t.prototype.addChildView=function(e,t){var n=this.model.get("_titles")[t]||"",r=this.pWidget,i=new B.Widget;return i.title.label=n,r.addWidget(i),this.create_child_view(e).then((function(e){var t=e.pWidget;t.title.label=i.title.label,t.title.closable=!1;var n=Ie.ArrayExt.firstIndexOf(r.widgets,i);return r.insertWidget(n+1,t),i.dispose(),e})).catch(ne("Could not add child view to box",!0))},t.prototype.update=function(){return this.updateSelectedIndex(),e.prototype.update.call(this)},t.prototype.updateTitles=function(){var e=this.model.get("_titles")||{};Object(Ie.each)(this.pWidget.widgets,(function(t,n){t.title.label=e[n]||""}))},t.prototype.updateSelectedIndex=function(){this.pWidget.currentIndex=this.model.get("selected_index")},t.prototype.remove=function(){this.childrenViews=null,e.prototype.remove.call(this)},t.prototype._onTabChanged=function(e,t){if(!this.updatingTabs){var n=t.currentIndex;this.model.set("selected_index",-1===n?null:n),this.touch()}},t.prototype._onTabMoved=function(e,t){var n=this.model.get("children").slice();Ie.ArrayExt.move(n,t.fromIndex,t.toIndex),this.model.set("children",n),this.touch()},t}(G),Kn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gn=function(){return(Gn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Yn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{value:"",disabled:!1,placeholder:"​",_model_name:"StringModel"})},t}(_e),Jn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_view_name:"HTMLView",_model_name:"HTMLModel"})},t}(Yn),Xn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-html"),this.content=document.createElement("div"),this.content.classList.add("widget-html-content"),this.el.appendChild(this.content),this.update()},t.prototype.update=function(){return this.content.innerHTML=this.model.get("value"),e.prototype.update.call(this)},t}(ue),Qn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_view_name:"HTMLMathView",_model_name:"HTMLMathModel"})},t}(Yn),Zn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-htmlmath"),this.content=document.createElement("div"),this.content.classList.add("widget-htmlmath-content"),this.el.appendChild(this.content),this.update()},t.prototype.update=function(){return this.content.innerHTML=this.model.get("value"),this.typeset(this.content),e.prototype.update.call(this)},t}(ue),er=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_view_name:"LabelView",_model_name:"LabelModel"})},t}(Yn),tr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-label"),this.update()},t.prototype.update=function(){return this.typeset(this.el,this.model.get("value")),e.prototype.update.call(this)},t}(ue),nr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_view_name:"TextareaView",_model_name:"TextareaModel",rows:null,continuous_update:!0})},t}(Yn),rr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t.prototype.render=function(){var t=this;e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-textarea"),this.textbox=document.createElement("textarea"),this.textbox.setAttribute("rows","5"),this.textbox.id=this.label.htmlFor=g(),this.el.appendChild(this.textbox),this.update(),this.listenTo(this.model,"change:placeholder",(function(e,n,r){t.update_placeholder(n)})),this.update_placeholder()},t.prototype.update_placeholder=function(e){e=e||this.model.get("placeholder"),this.textbox.setAttribute("placeholder",e.toString())},t.prototype.update=function(t){if(void 0===t||t.updated_view!=this){this.textbox.value=this.model.get("value");var n=this.model.get("rows");null===n&&(n=""),this.textbox.setAttribute("rows",n),this.textbox.disabled=this.model.get("disabled")}return e.prototype.update.call(this)},t.prototype.events=function(){return{"keydown input":"handleKeyDown","keypress input":"handleKeypress","input textarea":"handleChanging","change textarea":"handleChanged"}},t.prototype.handleKeyDown=function(e){e.stopPropagation()},t.prototype.handleKeypress=function(e){e.stopPropagation()},t.prototype.handleChanging=function(e){this.model.get("continuous_update")&&this.handleChanged(e)},t.prototype.handleChanged=function(e){var t=e.target;this.model.set("value",t.value,{updated_view:this}),this.touch()},t}(ue),ir=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_view_name:"TextView",_model_name:"TextModel",continuous_update:!0})},t}(Yn),or=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputType="text",t}return Kn(t,e),t.prototype.render=function(){var t=this;e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-inline-hbox"),this.el.classList.add("widget-text"),this.textbox=document.createElement("input"),this.textbox.setAttribute("type",this.inputType),this.textbox.id=this.label.htmlFor=g(),this.el.appendChild(this.textbox),this.update(),this.listenTo(this.model,"change:placeholder",(function(e,n,r){t.update_placeholder(n)})),this.listenTo(this.model,"change:description_tooltip",this.update_title),this.listenTo(this.model,"change:description",this.update_title),this.update_placeholder(),this.update_title()},t.prototype.update_placeholder=function(e){this.textbox.setAttribute("placeholder",e||this.model.get("placeholder"))},t.prototype.update_title=function(){var e=this.model.get("description_tooltip");e?0===this.model.get("description").length&&this.textbox.setAttribute("title",e):this.textbox.removeAttribute("title")},t.prototype.update=function(t){return void 0!==t&&t.updated_view===this||(this.textbox.value!==this.model.get("value")&&(this.textbox.value=this.model.get("value")),this.textbox.disabled=this.model.get("disabled")),e.prototype.update.call(this)},t.prototype.events=function(){return{"keydown input":"handleKeyDown","keypress input":"handleKeypress","input input":"handleChanging","change input":"handleChanged"}},t.prototype.handleKeyDown=function(e){e.stopPropagation()},t.prototype.handleKeypress=function(e){e.stopPropagation(),13===e.keyCode&&this.send({event:"submit"})},t.prototype.handleChanging=function(e){this.model.get("continuous_update")&&this.handleChanged(e)},t.prototype.handleChanged=function(e){var t=e.target;this.model.set("value",t.value,{updated_view:this}),this.touch()},t}(ue),sr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_view_name:"PasswordView",_model_name:"PasswordModel"})},t}(ir),ar=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputType="password",t}return Kn(t,e),t}(or),lr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t.prototype.defaults=function(){return Gn({},e.prototype.defaults.call(this),{_model_name:"ComboboxModel",_view_name:"ComboboxView",options:[],ensure_options:!1})},t}(ir),cr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isInitialRender=!0,t}return Kn(t,e),t.prototype.render=function(){this.datalist=document.createElement("datalist"),this.datalist.id=g(),e.prototype.render.call(this),this.textbox.setAttribute("list",this.datalist.id),this.el.appendChild(this.datalist)},t.prototype.update=function(t){if(e.prototype.update.call(this,t),this.datalist){var n=this.isValid(this.model.get("value"));if(this.highlightValidState(n),!(void 0!==t&&t.updated_view||!this.model.hasChanged("options")&&!this.isInitialRender)){this.isInitialRender=!1;var r=this.model.get("options").map((function(e){return'<option value="'+e+'"></option>'}));this.datalist.innerHTML=r.join("\n")}}},t.prototype.isValid=function(e){if(!0===this.model.get("ensure_option")&&-1===this.model.get("options").indexOf(e))return!1;return!0},t.prototype.handleChanging=function(t){var n=t.target,r=this.isValid(n.value);this.highlightValidState(r),r&&e.prototype.handleChanging.call(this,t)},t.prototype.handleChanged=function(t){var n=t.target,r=this.isValid(n.value);this.highlightValidState(r),r&&e.prototype.handleChanged.call(this,t)},t.prototype.highlightValidState=function(e){this.textbox.classList.toggle("jpwidgets-invalidComboValue",!e)},t}(or),ur=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hr=function(){return(hr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},dr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ur(t,e),t.prototype.defaults=function(){return pe.extend(e.prototype.defaults.call(this),{_model_name:"FileUploadModel",_view_name:"FileUploadView",_counter:0,accept:"",description:"Upload",tooltip:"",disabled:!1,icon:"upload",button_style:"",multiple:!1,metadata:[],data:[],error:"",style:null})},t.serializers=hr({},me.serializers,{data:{serialize:function(e){return e.slice()}}}),t}(me),pr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ur(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return"button"},enumerable:!0,configurable:!0}),t.prototype.render=function(){var t=this;e.prototype.render.call(this),this.el.classList.add("jupyter-widgets"),this.el.classList.add("widget-upload"),this.el.classList.add("jupyter-button"),this.fileInput=document.createElement("input"),this.fileInput.type="file",this.fileInput.style.display="none",this.el.appendChild(this.fileInput),this.el.addEventListener("click",(function(){t.fileInput.click()})),this.fileInput.addEventListener("click",(function(){t.fileInput.value=""})),this.fileInput.addEventListener("change",(function(){var e=[];Array.from(t.fileInput.files).forEach((function(n){e.push(new Promise((function(e,r){var i={name:n.name,type:n.type,size:n.size,lastModified:n.lastModified};t.fileReader=new FileReader,t.fileReader.onload=function(t){var n=t.target.result;e({buffer:n,metadata:i,error:""})},t.fileReader.onerror=function(){r()},t.fileReader.onabort=t.fileReader.onerror,t.fileReader.readAsArrayBuffer(n)})))})),Promise.all(e).then((function(e){var n=[],r=[];e.forEach((function(e){n.push(e.metadata),r.push(e.buffer)}));var i=t.model.get("_counter");t.model.set({_counter:i+e.length,metadata:n,data:r,error:""}),t.touch()})).catch((function(e){console.error("error in file upload: %o",e),t.model.set({error:e}),t.touch()}))})),this.listenTo(this.model,"change:button_style",this.update_button_style),this.set_button_style(),this.update()},t.prototype.update=function(){this.el.disabled=this.model.get("disabled"),this.el.setAttribute("title",this.model.get("tooltip"));var t=this.model.get("description")+" ("+this.model.get("_counter")+")",n=this.model.get("icon");if(t.length||n.length){if(this.el.textContent="",n.length){var r=document.createElement("i");r.classList.add("fa"),r.classList.add("fa-"+n),0===t.length&&r.classList.add("center"),this.el.appendChild(r)}this.el.appendChild(document.createTextNode(t))}return this.fileInput.accept=this.model.get("accept"),this.fileInput.multiple=this.model.get("multiple"),e.prototype.update.call(this)},t.prototype.update_button_style=function(){this.update_mapped_classes(t.class_map,"button_style",this.el)},t.prototype.set_button_style=function(){this.set_mapped_classes(t.class_map,"button_style",this.el)},t.class_map={primary:["mod-primary"],success:["mod-success"],info:["mod-info"],warning:["mod-warning"],danger:["mod-danger"]},t}(G),fr=n(472).version},function(e,t){var n=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(23),i=n(31),o=n(112)("src"),s=Function.toString,a=(""+s).split("toString");n(109).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){"function"==typeof n&&(n.hasOwnProperty(o)||i(n,o,e[t]?""+e[t]:a.join(String(t))),n.hasOwnProperty("name")||i(n,"name",t)),e===r?e[t]=n:(s||delete e[t],i(e,t,n))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[o]||s.call(this)}))},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(114);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(56).setDesc,i=n(116),o=n(39)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){var t;e.getRandomValues=(t="undefined"!=typeof window&&(window.crypto||window.msCrypto)||n(259)||null)&&"function"==typeof t.getRandomValues?function(e){return t.getRandomValues(e)}:t&&"function"==typeof t.randomFillSync?function(e){return t.randomFillSync(e)}:t&&"function"==typeof t.randomBytes?function(e){for(var n=t.randomBytes(e.length),r=0,i=n.length;r<i;++r)e[r]=n[r]}:function(e){for(var t=0,n=0,r=e.length;n<r;++n)n%4==0&&(t=4294967295*Math.random()>>>0),e[n]=255&t,t>>>=8}}(t.Random||(t.Random={}))},function(e,t,n){"use strict";var r=n(4).Buffer,i=n(7).Transform;function o(e){i.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(8)(o,i),o.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var n=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)n[o++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)n[this._blockOffset++]=e[i++];for(var s=0,a=8*e.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,n){var r=n(8),i=n(33),o=n(4).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function l(){this.init(),this._w=a,i.call(this,64,56)}function c(e,t,n){return n^e&(t^n)}function u(e,t,n){return e&t|n&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(l,i),l.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},l.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,l=0|this._e,f=0|this._f,g=0|this._g,m=0|this._h,_=0;_<16;++_)n[_]=e.readInt32BE(4*_);for(;_<64;++_)n[_]=0|(((t=n[_-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[_-7]+p(n[_-15])+n[_-16];for(var v=0;v<64;++v){var y=m+d(l)+c(l,f,g)+s[v]+n[v]|0,b=h(r)+u(r,i,o)|0;m=g,g=f,f=l,l=a+y|0,a=o,o=i,i=r,r=y+b|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0,this._f=f+this._f|0,this._g=g+this._g|0,this._h=m+this._h|0},l.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=l},function(e,t,n){var r=n(8),i=n(33),o=n(4).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function l(){this.init(),this._w=a,i.call(this,128,112)}function c(e,t,n){return n^e&(t^n)}function u(e,t,n){return e&t|n&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function f(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function _(e,t){return e>>>0<t>>>0?1:0}r(l,i),l.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},l.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,l=0|this._fh,v=0|this._gh,y=0|this._hh,b=0|this._al,w=0|this._bl,x=0|this._cl,k=0|this._dl,E=0|this._el,S=0|this._fl,M=0|this._gl,C=0|this._hl,j=0;j<32;j+=2)t[j]=e.readInt32BE(4*j),t[j+1]=e.readInt32BE(4*j+4);for(;j<160;j+=2){var A=t[j-30],T=t[j-30+1],P=p(A,T),O=f(T,A),L=g(A=t[j-4],T=t[j-4+1]),I=m(T,A),D=t[j-14],R=t[j-14+1],B=t[j-32],z=t[j-32+1],N=O+R|0,F=P+D+_(N,O)|0;F=(F=F+L+_(N=N+I|0,I)|0)+B+_(N=N+z|0,z)|0,t[j]=F,t[j+1]=N}for(var U=0;U<160;U+=2){F=t[U],N=t[U+1];var q=u(n,r,i),H=u(b,w,x),W=h(n,b),V=h(b,n),$=d(a,E),K=d(E,a),G=s[U],Y=s[U+1],J=c(a,l,v),X=c(E,S,M),Q=C+K|0,Z=y+$+_(Q,C)|0;Z=(Z=(Z=Z+J+_(Q=Q+X|0,X)|0)+G+_(Q=Q+Y|0,Y)|0)+F+_(Q=Q+N|0,N)|0;var ee=V+H|0,te=W+q+_(ee,V)|0;y=v,C=M,v=l,M=S,l=a,S=E,a=o+Z+_(E=k+Q|0,k)|0,o=i,k=x,i=r,x=w,r=n,w=b,n=Z+te+_(b=Q+ee|0,Q)|0}this._al=this._al+b|0,this._bl=this._bl+w|0,this._cl=this._cl+x|0,this._dl=this._dl+k|0,this._el=this._el+E|0,this._fl=this._fl+S|0,this._gl=this._gl+M|0,this._hl=this._hl+C|0,this._ah=this._ah+n+_(this._al,b)|0,this._bh=this._bh+r+_(this._bl,w)|0,this._ch=this._ch+i+_(this._cl,x)|0,this._dh=this._dh+o+_(this._dl,k)|0,this._eh=this._eh+a+_(this._el,E)|0,this._fh=this._fh+l+_(this._fl,S)|0,this._gh=this._gh+v+_(this._gl,M)|0,this._hh=this._hh+y+_(this._hl,C)|0},l.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=l},function(e,t,n){"use strict";var r=n(8),i=n(270),o=n(29),s=n(4).Buffer,a=n(123),l=n(77),c=n(78),u=s.alloc(128);function h(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var n="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>n)?t=("rmd160"===e?new l:c(e)).update(t).digest():t.length<n&&(t=s.concat([t,u],n));for(var r=this._ipad=s.allocUnsafe(n),i=this._opad=s.allocUnsafe(n),a=0;a<n;a++)r[a]=54^t[a],i[a]=92^t[a];this._hash="rmd160"===e?new l:c(e),this._hash.update(r)}r(h,o),h.prototype._update=function(e){this._hash.update(e)},h.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new l:c(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new h("rmd160",t):"md5"===e?new i(a,t):new h(e,t)}},function(e,t,n){var r=n(76);e.exports=function(e){return(new r).update(e).digest()}},function(e){e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},function(e,t,n){t.pbkdf2=n(272),t.pbkdf2Sync=n(128)},function(e,t){var n=Math.pow(2,30)-1;e.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>n||t!=t)throw new TypeError("Bad key length")}},function(e,t,n){(function(t,n){var r;if(t.process&&t.process.browser)r="utf-8";else if(t.process&&t.process.version){r=parseInt(n.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";e.exports=r}).call(this,n(17),n(26))},function(e,t,n){var r=n(123),i=n(77),o=n(78),s=n(4).Buffer,a=n(126),l=n(127),c=n(129),u=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(e,t,n){var a=function(e){function t(t){return o(e).update(t).digest()}return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?r:t}(e),l="sha512"===e||"sha384"===e?128:64;t.length>l?t=a(t):t.length<l&&(t=s.concat([t,u],l));for(var c=s.allocUnsafe(l+h[e]),d=s.allocUnsafe(l+h[e]),p=0;p<l;p++)c[p]=54^t[p],d[p]=92^t[p];var f=s.allocUnsafe(l+n+4);c.copy(f,0,0,l),this.ipad1=f,this.ipad2=c,this.opad=d,this.alg=e,this.blocksize=l,this.hash=a,this.size=h[e]}d.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,n,r,i){a(n,r);var o=new d(i=i||"sha1",e=c(e,l,"Password"),(t=c(t,l,"Salt")).length),u=s.allocUnsafe(r),p=s.allocUnsafe(t.length+4);t.copy(p,0,0,t.length);for(var f=0,g=h[i],m=Math.ceil(r/g),_=1;_<=m;_++){p.writeUInt32BE(_,t.length);for(var v=o.run(p,o.ipad1),y=v,b=1;b<n;b++){y=o.run(y,o.ipad2);for(var w=0;w<g;w++)v[w]^=y[w]}v.copy(u,f),f+=g}return u}},function(e,t,n){var r=n(4).Buffer;e.exports=function(e,t,n){if(r.isBuffer(e))return e;if("string"==typeof e)return r.from(e,t);if(ArrayBuffer.isView(e))return r.from(e.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")}},function(e,t,n){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,r){for(var i=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1}n[r+0]=i>>>0,n[r+1]=o>>>0},t.rip=function(e,t,n,r){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=t>>>a+s&1,i<<=1,i|=e>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=t>>>a+s&1,o<<=1,o|=e>>>a+s&1;n[r+0]=i>>>0,n[r+1]=o>>>0},t.pc1=function(e,t,n,r){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1}for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;n[r+0]=i>>>0,n[r+1]=o>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,i){for(var o=0,s=0,a=r.length>>>1,l=0;l<a;l++)o<<=1,o|=e>>>r[l]&1;for(l=a;l<r.length;l++)s<<=1,s|=t>>>r[l]&1;n[i+0]=o>>>0,n[i+1]=s>>>0},t.expand=function(e,t,n){var r=0,i=0;r=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var n=0,r=0;r<4;r++){n<<=4,n|=i[64*r+(e>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=i[256+64*r+(t>>>18-6*r&63)]}return n>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,n=0;n<o.length;n++)t<<=1,t|=e>>>o[n]&1;return t>>>0},t.padSplit=function(e,t,n){for(var r=e.toString(2);r.length<t;)r="0"+r;for(var i=[],o=0;o<t;o+=n)i.push(r.slice(o,o+n));return i.join(" ")}},function(e,t,n){"use strict";var r=n(42),i=n(8),o=n(130),s=n(79);function a(){this.tmp=new Array(2),this.keys=null}function l(e){s.call(this,e);var t=new a;this._desState=t,this.deriveKeys(t,e.key)}i(l,s),e.exports=l,l.create=function(e){return new l(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];l.prototype.deriveKeys=function(e,t){e.keys=new Array(32),r.equal(t.length,this.blockSize,"Invalid key length");var n=o.readUInt32BE(t,0),i=o.readUInt32BE(t,4);o.pc1(n,i,e.tmp,0),n=e.tmp[0],i=e.tmp[1];for(var s=0;s<e.keys.length;s+=2){var a=c[s>>>1];n=o.r28shl(n,a),i=o.r28shl(i,a),o.pc2(n,i,e.keys,s)}},l.prototype._update=function(e,t,n,r){var i=this._desState,s=o.readUInt32BE(e,t),a=o.readUInt32BE(e,t+4);o.ip(s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,a,i.tmp,0):this._decrypt(i,s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],o.writeUInt32BE(n,s,r),o.writeUInt32BE(n,a,r+4)},l.prototype._pad=function(e,t){for(var n=e.length-t,r=t;r<e.length;r++)e[r]=n;return!0},l.prototype._unpad=function(e){for(var t=e[e.length-1],n=e.length-t;n<e.length;n++)r.equal(e[n],t);return e.slice(0,e.length-t)},l.prototype._encrypt=function(e,t,n,r,i){for(var s=t,a=n,l=0;l<e.keys.length;l+=2){var c=e.keys[l],u=e.keys[l+1];o.expand(a,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var h=o.substitute(c,u),d=a;a=(s^o.permute(h))>>>0,s=d}o.rip(a,s,r,i)},l.prototype._decrypt=function(e,t,n,r,i){for(var s=n,a=t,l=e.keys.length-2;l>=0;l-=2){var c=e.keys[l],u=e.keys[l+1];o.expand(s,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var h=o.substitute(c,u),d=s;s=(a^o.permute(h))>>>0,a=d}o.rip(s,a,r,i)}},function(e,t,n){var r=n(43),i=n(4).Buffer,o=n(133);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var n=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*n)]);for(var a=0;a<n;a++){var l=s(e),c=o+16*a;e._cache.writeUInt32BE(l[0],c+0),e._cache.writeUInt32BE(l[1],c+4),e._cache.writeUInt32BE(l[2],c+8),e._cache.writeUInt32BE(l[3],c+12)}var u=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),r(t,u)}},function(e,t){e.exports=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}},function(e){e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},function(e,t,n){var r=n(58),i=n(4).Buffer,o=n(29),s=n(8),a=n(285),l=n(43),c=n(133);function u(e,t,n,s){o.call(this);var l=i.alloc(4,0);this._cipher=new r.AES(t);var u=this._cipher.encryptBlock(l);this._ghash=new a(u),n=function(e,t,n){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var r=new a(n),o=t.length,s=o%16;r.update(t),s&&(s=16-s,r.update(i.alloc(s,0))),r.update(i.alloc(8,0));var l=8*o,u=i.alloc(8);u.writeUIntBE(l,0,8),r.update(u),e._finID=r.state;var h=i.from(e._finID);return c(h),h}(this,n,u),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(u,o),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),i=0;i<r;++i)n+=e[i]^t[i];return n}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},u.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},u.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},u.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=u},function(e,t,n){var r=n(58),i=n(4).Buffer,o=n(29);function s(e,t,n,s){o.call(this),this._cipher=new r.AES(t),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=e}n(8)(s,o),s.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},e.exports=s},function(e,t,n){var r=n(32);e.exports=v,v.simpleSieve=m,v.fermatTest=_;var i=n(7),o=new i(24),s=new(n(138)),a=new i(1),l=new i(2),c=new i(5),u=(new i(16),new i(8),new i(10)),h=new i(3),d=(new i(7),new i(11)),p=new i(4),f=(new i(12),null);function g(){if(null!==f)return f;var e=[];e[0]=2;for(var t=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),i=0;i<t&&e[i]<=r&&n%e[i]!=0;i++);t!==i&&e[i]<=r||(e[t++]=n)}return f=e,e}function m(e){for(var t=g(),n=0;n<t.length;n++)if(0===e.modn(t[n]))return 0===e.cmpn(t[n]);return!0}function _(e){var t=i.mont(e);return 0===l.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function v(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var n,f;for(t=new i(t);;){for(n=new i(r(Math.ceil(e/8)));n.bitLength()>e;)n.ishrn(1);if(n.isEven()&&n.iadd(a),n.testn(1)||n.iadd(l),t.cmp(l)){if(!t.cmp(c))for(;n.mod(u).cmp(h);)n.iadd(p)}else for(;n.mod(o).cmp(d);)n.iadd(p);if(m(f=n.shrn(1))&&m(n)&&_(f)&&_(n)&&s.test(f)&&s.test(n))return n}}},function(e,t,n){var r=n(7),i=n(289);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},o.prototype.test=function(e,t,n){var i=e.bitLength(),o=r.mont(e),s=new r(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var a=e.subn(1),l=0;!a.testn(l);l++);for(var c=e.shrn(l),u=a.toRed(o);t>0;t--){var h=this._randrange(new r(2),a);n&&n(h);var d=h.toRed(o).redPow(c);if(0!==d.cmp(s)&&0!==d.cmp(u)){for(var p=1;p<l;p++){if(0===(d=d.redSqr()).cmp(s))return!1;if(0===d.cmp(u))break}if(p===l)return!1}}return!0},o.prototype.getDivisor=function(e,t){var n=e.bitLength(),i=r.mont(e),o=new r(1).toRed(i);t||(t=Math.max(1,n/48|0));for(var s=e.subn(1),a=0;!s.testn(a);a++);for(var l=e.shrn(a),c=s.toRed(i);t>0;t--){var u=this._randrange(new r(2),s),h=e.gcd(u);if(0!==h.cmpn(1))return h;var d=u.toRed(i).redPow(l);if(0!==d.cmp(o)&&0!==d.cmp(c)){for(var p=1;p<a;p++){if(0===(d=d.redSqr()).cmp(o))return d.fromRed().subn(1).gcd(e);if(0===d.cmp(c))break}if(p===a)return(d=d.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},function(e,t,n){"use strict";const r=t;r.bignum=n(7),r.define=n(296).define,r.base=n(299),r.constants=n(300),r.decoders=n(142),r.encoders=n(140)},function(e,t,n){"use strict";const r=t;r.der=n(141),r.pem=n(297)},function(e,t,n){"use strict";const r=n(8),i=n(83).Buffer,o=n(84),s=n(86);function a(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){o.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=a,a.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},r(l,o),l.prototype._encodeComposite=function(e,t,n,r){const o=function(e,t,n,r){let i;"seqof"===e?e="seq":"setof"===e&&(e="set");if(s.tagByName.hasOwnProperty(e))i=s.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);i=e}if(i>=31)return r.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=s.tagClassByName[n||"universal"]<<6,i}(e,t,n,this.reporter);if(r.length<128){const e=i.alloc(2);return e[0]=o,e[1]=r.length,this._createEncoderBuffer([e,r])}let a=1;for(let e=r.length;e>=256;e>>=8)a++;const l=i.alloc(2+a);l[0]=o,l[1]=128|a;for(let e=1+a,t=r.length;t>0;e--,t>>=8)l[e]=255&t;return this._createEncoderBuffer([l,r])},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=i.alloc(2*e.length);for(let n=0;n<e.length;n++)t.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},l.prototype._encodeObjid=function(e,t,n){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let r=0;for(let t=0;t<e.length;t++){let n=e[t];for(r++;n>=128;n>>=7)r++}const o=i.alloc(r);let s=o.length-1;for(let t=e.length-1;t>=0;t--){let n=e[t];for(o[s--]=127&n;(n>>=7)>0;)o[s--]=128|127&n}return this._createEncoderBuffer(o)},l.prototype._encodeTime=function(e,t){let n;const r=new Date(e);return"gentime"===t?n=[c(r.getUTCFullYear()),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[c(r.getUTCFullYear()%100),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=i.from(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const n=i.alloc(t);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let t=e;t>=256;t>>=8)n++;const r=new Array(n);for(let t=r.length-1;t>=0;t--)r[t]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(i.from(r))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},l.prototype._skipDefault=function(e,t,n){const r=this._baseState;let i;if(null===r.default)return!1;const o=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,n).join()),o.length!==r.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==r.defaultBuffer[i])return!1;return!0}},function(e,t,n){"use strict";const r=t;r.der=n(143),r.pem=n(298)},function(e,t,n){"use strict";const r=n(8),i=n(7),o=n(44).DecoderBuffer,s=n(84),a=n(86);function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){s.call(this,"der",e)}function u(e,t){let n=e.readUInt8(t);if(e.isError(n))return n;const r=a.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){let r=n;for(n=0;128==(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;n<<=7,n|=127&r}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:a.tag[n]}}function h(e,t,n){let r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;const i=127&r;if(i>4)return e.error("length octect is too long");r=0;for(let t=0;t<i;t++){r<<=8;const t=e.readUInt8(n);if(e.isError(t))return t;r|=t}return r}e.exports=l,l.prototype.decode=function(e,t){return o.isDecoderBuffer(e)||(e=new o(e,t)),this.tree._decode(e,t)},r(c,s),c.prototype._peekTag=function(e,t,n){if(e.isEmpty())return!1;const r=e.save(),i=u(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(r),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||n)},c.prototype._decodeTag=function(e,t,n){const r=u(e,'Failed to decode tag of "'+t+'"');if(e.isError(r))return r;let i=h(e,r.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!n&&r.tag!==t&&r.tagStr!==t&&r.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(r.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');const o=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(i=e.offset-o.offset,e.restore(o),e.skip(i,'Failed to match body of: "'+t+'"'))},c.prototype._skipUntilEnd=function(e,t){for(;;){const n=u(e,t);if(e.isError(n))return n;const r=h(e,n.primitive,t);if(e.isError(r))return r;let i;if(i=n.primitive||null!==r?e.skip(r):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===n.tagStr)break}},c.prototype._decodeList=function(e,t,n,r){const i=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const o=n.decode(e,"der",r);if(e.isError(o)&&t)break;i.push(o)}return i},c.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let n="";for(let e=0;e<t.length/2;e++)n+=String.fromCharCode(t.readUInt16BE(2*e));return n}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},c.prototype._decodeObjid=function(e,t,n){let r;const i=[];let o=0,s=0;for(;!e.isEmpty();)s=e.readUInt8(),o<<=7,o|=127&s,0==(128&s)&&(i.push(o),o=0);128&s&&i.push(o);const a=i[0]/40|0,l=i[0]%40;if(r=n?i:[a,l].concat(i.slice(1)),t){let e=t[r.join(" ")];void 0===e&&(e=t[r.join(".")]),void 0!==e&&(r=e)}return r},c.prototype._decodeTime=function(e,t){const n=e.raw().toString();let r,i,o,s,a,l;if("gentime"===t)r=0|n.slice(0,4),i=0|n.slice(4,6),o=0|n.slice(6,8),s=0|n.slice(8,10),a=0|n.slice(10,12),l=0|n.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");r=0|n.slice(0,2),i=0|n.slice(2,4),o=0|n.slice(4,6),s=0|n.slice(6,8),a=0|n.slice(8,10),l=0|n.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,i-1,o,s,a,l,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){const n=e.raw();let r=new i(n);return t&&(r=t[r.toString(10)]||r),r},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},function(e){e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},function(e,t,n){var r=n(41),i=n(4).Buffer;function o(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var n,s=i.alloc(0),a=0;s.length<t;)n=o(a++),s=i.concat([s,r("sha1").update(e).update(n).digest()]);return s.slice(0,t)}},function(e,t){e.exports=function(e,t){for(var n=e.length,r=-1;++r<n;)e[r]^=t[r];return e}},function(e,t,n){var r=n(7),i=n(4).Buffer;e.exports=function(e,t){return i.from(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray())}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(314);!function(e){function t(e){if("undefined"!=typeof document){var t=document.createElement("a");return t.href=e,t}return r(e)}function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=[].slice.call(e,0).join("/");return n=(n=(n=(n=n.replace(/:\//g,"://")).replace(/([^:\s])\/+/g,"$1/")).replace(/\/(\?|&|#[^!])/g,"$1")).replace(/(\?.+)\?/g,"$1&")}e.parse=t,e.join=n,e.encodeParts=function(e){return n.apply(void 0,e.split("/").map(encodeURIComponent))},e.objectToQueryString=function(e){var t=Object.keys(e);return t.length?"?"+t.map((function(t){var n=encodeURIComponent(String(e[t]));return t+(n?"="+n:"")})).join("&"):""},e.queryStringToObject=function(e){return e.replace(/^\?/,"").split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1];return e[r]=decodeURIComponent(i||""),e}),{})},e.isLocal=function(e){var n=t(e).protocol;return 0!==e.toLowerCase().indexOf(n)&&0!==e.indexOf("//")}}(t.URLExt||(t.URLExt={}))},function(e,t,n){"use strict";var r=n(34);e.exports=function(e){r.copy(e,this)}},function(e,t,n){var r="undefined"!=typeof JSON?JSON:n(334);e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n=t.space||"";"number"==typeof n&&(n=Array(n+1).join(" "));var s,a="boolean"==typeof t.cycles&&t.cycles,l=t.replacer||function(e,t){return t},c=t.cmp&&(s=t.cmp,function(e){return function(t,n){var r={key:t,value:e[t]},i={key:n,value:e[n]};return s(r,i)}}),u=[];return function e(t,s,h,d){var p=n?"\n"+new Array(d+1).join(n):"",f=n?": ":":";if(h&&h.toJSON&&"function"==typeof h.toJSON&&(h=h.toJSON()),void 0!==(h=l.call(t,s,h))){if("object"!=typeof h||null===h)return r.stringify(h);if(i(h)){for(var g=[],m=0;m<h.length;m++){var _=e(h,m,h[m],d+1)||r.stringify(null);g.push(p+n+_)}return"["+g.join(",")+p+"]"}if(-1!==u.indexOf(h)){if(a)return r.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}u.push(h);var v=o(h).sort(c&&c(h));for(g=[],m=0;m<v.length;m++){var y=e(h,s=v[m],h[s],d+1);if(y){var b=r.stringify(s)+f+y;g.push(p+n+b)}}return u.splice(u.indexOf(h),1),"{"+g.join(",")+p+"}"}}({"":e},"",e,0)};var i=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},o=Object.keys||function(e){var t=Object.prototype.hasOwnProperty||function(){return!0},n=[];for(var r in e)t.call(e,r)&&n.push(r);return n}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r="",i=!0===e.schema.$async,o=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),s=e.self._getId(e.schema);if(e.isTop){if(i){e.async=!0;var a="es7"==e.opts.async;e.yieldAwait=a?"await":"yield"}r+=" var validate = ",i?a?r+=" (async function ":("*"!=e.opts.async&&(r+="co.wrap"),r+="(function* "):r+=" (function ",r+=" (data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",s&&(e.opts.sourceCode||e.opts.processCode)&&(r+=" /*# sourceURL="+s+" */ ")}if("boolean"==typeof e.schema||!o&&!e.schema.$ref){var l=e.level,c=e.dataLevel,u=e.schema["false schema"],h=e.schemaPath+e.util.getProperty("false schema"),d=e.errSchemaPath+"/false schema",p=!e.opts.allErrors,f="data"+(c||""),g="valid"+l;if(!1===e.schema){e.isTop?p=!0:r+=" var "+g+" = false; ",(Y=Y||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'boolean schema is false' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ";var m=r;r=Y.pop(),!e.compositeRule&&p?e.async?r+=" throw new ValidationError(["+m+"]); ":r+=" validate.errors = ["+m+"]; return false; ":r+=" var err = "+m+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?r+=i?" return data; ":" validate.errors = null; return true; ":r+=" var "+g+" = true; ";return e.isTop&&(r+=" }); return validate; "),r}if(e.isTop){var _=e.isTop;l=e.level=0,c=e.dataLevel=0,f="data";e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[void 0],r+=" var vErrors = null; ",r+=" var errors = 0;     ",r+=" if (rootData === undefined) rootData = data; "}else{l=e.level,f="data"+((c=e.dataLevel)||"");if(s&&(e.baseId=e.resolve.url(e.baseId,s)),i&&!e.async)throw new Error("async schema in sync schema");r+=" var errs_"+l+" = errors;"}g="valid"+l,p=!e.opts.allErrors;var v="",y="",b=e.schema.type,w=Array.isArray(b);if(w&&1==b.length&&(b=b[0],w=!1),e.schema.$ref&&o){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(o=!1,console.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(b){if(e.opts.coerceTypes)var x=e.util.coerceToTypes(e.opts.coerceTypes,b);var k=e.RULES.types[b];if(x||w||!0===k||k&&!J(k)){h=e.schemaPath+".type",d=e.errSchemaPath+"/type",h=e.schemaPath+".type",d=e.errSchemaPath+"/type";var E=w?"checkDataTypes":"checkDataType";if(r+=" if ("+e.util[E](b,f,!0)+") { ",x){var S="dataType"+l,M="coerced"+l;r+=" var "+S+" = typeof "+f+"; ","array"==e.opts.coerceTypes&&(r+=" if ("+S+" == 'object' && Array.isArray("+f+")) "+S+" = 'array'; "),r+=" var "+M+" = undefined; ";var C="",j=x;if(j)for(var A,T=-1,P=j.length-1;T<P;)A=j[T+=1],T&&(r+=" if ("+M+" === undefined) { ",C+="}"),"array"==e.opts.coerceTypes&&"array"!=A&&(r+=" if ("+S+" == 'array' && "+f+".length == 1) { "+M+" = "+f+" = "+f+"[0]; "+S+" = typeof "+f+";  } "),"string"==A?r+=" if ("+S+" == 'number' || "+S+" == 'boolean') "+M+" = '' + "+f+"; else if ("+f+" === null) "+M+" = ''; ":"number"==A||"integer"==A?(r+=" if ("+S+" == 'boolean' || "+f+" === null || ("+S+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==A&&(r+=" && !("+f+" % 1)"),r+=")) "+M+" = +"+f+"; "):"boolean"==A?r+=" if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+M+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+M+" = true; ":"null"==A?r+=" if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+M+" = null; ":"array"==e.opts.coerceTypes&&"array"==A&&(r+=" if ("+S+" == 'string' || "+S+" == 'number' || "+S+" == 'boolean' || "+f+" == null) "+M+" = ["+f+"]; ");r+=" "+C+" if ("+M+" === undefined) {   ",(Y=Y||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { type: '",r+=w?""+b.join(","):""+b,r+="' } ",!1!==e.opts.messages&&(r+=" , message: 'should be ",r+=w?""+b.join(","):""+b,r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ";m=r;r=Y.pop(),!e.compositeRule&&p?e.async?r+=" throw new ValidationError(["+m+"]); ":r+=" validate.errors = ["+m+"]; return false; ":r+=" var err = "+m+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else {  ";var O=c?"data"+(c-1||""):"parentData";r+=" "+f+" = "+M+"; ",c||(r+="if ("+O+" !== undefined)"),r+=" "+O+"["+(c?e.dataPathArr[c]:"parentDataProperty")+"] = "+M+"; } "}else{(Y=Y||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { type: '",r+=w?""+b.join(","):""+b,r+="' } ",!1!==e.opts.messages&&(r+=" , message: 'should be ",r+=w?""+b.join(","):""+b,r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ";m=r;r=Y.pop(),!e.compositeRule&&p?e.async?r+=" throw new ValidationError(["+m+"]); ":r+=" validate.errors = ["+m+"]; return false; ":r+=" var err = "+m+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}r+=" } "}}if(e.schema.$ref&&!o)r+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",p&&(r+=" } if (errors === ",r+=_?"0":"errs_"+l,r+=") { ",y+="}");else{e.opts.v5&&e.schema.patternGroups&&console.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.');var L=e.RULES;if(L)for(var I=-1,D=L.length-1;I<D;)if(J(k=L[I+=1])){if(k.type&&(r+=" if ("+e.util.checkDataType(k.type,f)+") { "),e.opts.useDefaults&&!e.compositeRule)if("object"==k.type&&e.schema.properties){u=e.schema.properties;var R=Object.keys(u);if(R)for(var B,z=-1,N=R.length-1;z<N;){if(void 0!==(U=u[B=R[z+=1]]).default)r+="  if ("+(H=f+e.util.getProperty(B))+" === undefined) "+H+" = ","shared"==e.opts.useDefaults?r+=" "+e.useDefault(U.default)+" ":r+=" "+JSON.stringify(U.default)+" ",r+="; "}}else if("array"==k.type&&Array.isArray(e.schema.items)){var F=e.schema.items;if(F){T=-1;for(var U,q=F.length-1;T<q;){var H;if(void 0!==(U=F[T+=1]).default)r+="  if ("+(H=f+"["+T+"]")+" === undefined) "+H+" = ","shared"==e.opts.useDefaults?r+=" "+e.useDefault(U.default)+" ":r+=" "+JSON.stringify(U.default)+" ",r+="; "}}}var W=k.rules;if(W)for(var V,$=-1,K=W.length-1;$<K;)if(X(V=W[$+=1])){var G=V.code(e,V.keyword,k.type);G&&(r+=" "+G+" ",p&&(v+="}"))}if(p&&(r+=" "+v+" ",v=""),k.type&&(r+=" } ",b&&b===k.type&&!x)){r+=" else { ";var Y;h=e.schemaPath+".type",d=e.errSchemaPath+"/type";(Y=Y||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { type: '",r+=w?""+b.join(","):""+b,r+="' } ",!1!==e.opts.messages&&(r+=" , message: 'should be ",r+=w?""+b.join(","):""+b,r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ";m=r;r=Y.pop(),!e.compositeRule&&p?e.async?r+=" throw new ValidationError(["+m+"]); ":r+=" validate.errors = ["+m+"]; return false; ":r+=" var err = "+m+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } "}p&&(r+=" if (errors === ",r+=_?"0":"errs_"+l,r+=") { ",y+="}")}}function J(e){for(var t=e.rules,n=0;n<t.length;n++)if(X(t[n]))return!0}function X(t){return void 0!==e.schema[t.keyword]||t.implements&&function(t){for(var n=t.implements,r=0;r<n.length;r++)if(void 0!==e.schema[n[r]])return!0}(t)}return p&&(r+=" "+y+" "),_?(i?(r+=" if (errors === 0) return data;           ",r+=" else throw new ValidationError(vErrors); "):(r+=" validate.errors = vErrors; ",r+=" return errors === 0;       "),r+=" }); return validate;"):r+=" var "+g+" = errors === errs_"+l+";",r=e.util.cleanUpCode(r),_&&(r=e.util.finalCleanUpCode(r,i)),r}},function(e,t){var n=Array.prototype.slice;function r(e){var t=this,r=n.call(arguments,1);return new Promise((function(n,o){if("function"==typeof e&&(e=e.apply(t,r)),!e||"function"!=typeof e.next)return n(e);function s(t){var n;try{n=e.next(t)}catch(e){return o(e)}c(n)}function a(t){var n;try{n=e.throw(t)}catch(e){return o(e)}c(n)}function c(e){if(e.done)return n(e.value);var r=i.call(t,e.value);return r&&l(r)?r.then(s,a):a(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(e.value)+'"'))}s()}))}function i(e){return e?l(e)?e:function(e){var t=e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName||c(t.prototype))}(e)||c(e)?r.call(this,e):"function"==typeof e?o.call(this,e):Array.isArray(e)?s.call(this,e):Object==e.constructor?a.call(this,e):e:e}function o(e){var t=this;return new Promise((function(r,i){e.call(t,(function(e,t){if(e)return i(e);arguments.length>2&&(t=n.call(arguments,1)),r(t)}))}))}function s(e){return Promise.all(e.map(i,this))}function a(e){for(var t=new e.constructor,n=Object.keys(e),r=[],o=0;o<n.length;o++){var s=n[o],a=i.call(this,e[s]);a&&l(a)?c(a,s):t[s]=e[s]}return Promise.all(r).then((function(){return t}));function c(e,n){t[n]=void 0,r.push(e.then((function(e){t[n]=e})))}}function l(e){return"function"==typeof e.then}function c(e){return"function"==typeof e.next&&"function"==typeof e.throw}e.exports=r.default=r.co=r,r.wrap=function(e){return t.__generatorFunction__=e,t;function t(){return r.call(this,e.apply(this,arguments))}}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",r="schema"+o):r=a;var p="maximum"==t,f=p?"exclusiveMaximum":"exclusiveMinimum",g=e.schema[f],m=p?"<":">",_=p?">":"<",v=void 0;if(e.opts.$data&&g&&g.$data){var y=e.util.getData(g.$data,s,e.dataPathArr),b="exclusive"+o,w="exclType"+o,x="exclIsNumber"+o,k="' + "+(M="op"+o)+" + '";i+=" var schemaExcl"+o+" = "+y+"; ",i+=" var "+b+"; var "+w+" = typeof "+(y="schemaExcl"+o)+"; if ("+w+" != 'boolean' && "+w+" != 'undefined' && "+w+" != 'number') { ";var E;v=f;(E=E||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(v||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+f+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var S=i;i=E.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+w+" == 'number' ? ( ("+b+" = "+r+" === undefined || "+y+" "+m+"= "+r+") ? "+h+" "+_+"= "+y+" : "+h+" "+_+" "+r+" ) : ( ("+b+" = "+y+" === true) ? "+h+" "+_+"= "+r+" : "+h+" "+_+" "+r+" ) || "+h+" !== "+h+") { var op"+o+" = "+b+" ? '"+m+"' : '"+m+"=';"}else{k=m;if((x="number"==typeof g)&&d){var M="'"+k+"'";i+=" if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" ( "+r+" === undefined || "+g+" "+m+"= "+r+" ? "+h+" "+_+"= "+g+" : "+h+" "+_+" "+r+" ) || "+h+" !== "+h+") { "}else{x&&void 0===a?(b=!0,v=f,c=e.errSchemaPath+"/"+f,r=g,_+="="):(x&&(r=Math[p?"min":"max"](g,a)),g===(!x||r)?(b=!0,v=f,c=e.errSchemaPath+"/"+f,_+="="):(b=!1,k+="="));M="'"+k+"'";i+=" if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+h+" "+_+" "+r+" || "+h+" !== "+h+") { "}}v=v||t,(E=E||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(v||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+M+", limit: "+r+", exclusive: "+b+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+k+" ",i+=d?"' + "+r:r+"'"),e.opts.verbose&&(i+=" , schema:  ",i+=d?"validate.schema"+l:""+a,i+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";S=i;return i=E.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",u&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",r="schema"+o):r=a,i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+h+".length "+("maxItems"==t?">":"<")+" "+r+") { ";var p=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"less",i+=" than ",i+=d?"' + "+r+" + '":""+a,i+=" items' "),e.opts.verbose&&(i+=" , schema:  ",i+=d?"validate.schema"+l:""+a,i+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var g=i;return i=f.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",r="schema"+o):r=a;var p="maxLength"==t?">":"<";i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),!1===e.opts.unicode?i+=" "+h+".length ":i+=" ucs2length("+h+") ",i+=" "+p+" "+r+") { ";var f=t,g=g||[];g.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(f||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=d?"' + "+r+" + '":""+a,i+=" characters' "),e.opts.verbose&&(i+=" , schema:  ",i+=d?"validate.schema"+l:""+a,i+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var m=i;return i=g.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",r="schema"+o):r=a,i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" Object.keys("+h+").length "+("maxProperties"==t?">":"<")+" "+r+") { ";var p=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"less",i+=" than ",i+=d?"' + "+r+" + '":""+a,i+=" properties' "),e.opts.verbose&&(i+=" , schema:  ",i+=d?"validate.schema"+l:""+a,i+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var g=i;return i=f.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),o=n(3),s=n(6),a=n(14),l=n(369);!function(e){e.validateContentsModel=function(e){l.validateContentsModel(e)},e.validateCheckpointModel=function(e){l.validateCheckpointModel(e)}}(t.Contents||(t.Contents={}));var c=function(){function e(e){void 0===e&&(e={}),this._isDisposed=!1,this._additionalDrives=new Map,this._fileChanged=new s.Signal(this);var t=this.serverSettings=e.serverSettings||a.ServerConnection.makeSettings();this._defaultDrive=e.defaultDrive||new h({serverSettings:t}),this._defaultDrive.fileChanged.connect(this._onFileChanged,this)}return Object.defineProperty(e.prototype,"fileChanged",{get:function(){return this._fileChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(this._isDisposed=!0,s.Signal.clearData(this))},e.prototype.addDrive=function(e){this._additionalDrives.set(e.name,e),e.fileChanged.connect(this._onFileChanged,this)},e.prototype.getModelDBFactory=function(e){var t=this._driveForPath(e)[0];return t&&t.modelDBFactory||null},e.prototype.localPath=function(e){var t=e.split("/"),n=t[0].split(":");return 1!==n.length&&this._additionalDrives.has(n[0])?i.PathExt.join.apply(i.PathExt,[n.slice(1).join(":")].concat(t.slice(1))):i.PathExt.removeSlash(e)},e.prototype.driveName=function(e){var t=e.split("/")[0].split(":");return 1===t.length?"":this._additionalDrives.has(t[0])?t[0]:""},e.prototype.get=function(e,t){var n=this,i=this._driveForPath(e),s=i[0],a=i[1];return s.get(a,t).then((function(e){var t=[];return"directory"===e.type&&e.content?(o.each(e.content,(function(e){t.push(r({},e,{path:n._toGlobalPath(s,e.path)}))})),r({},e,{path:n._toGlobalPath(s,a),content:t})):r({},e,{path:n._toGlobalPath(s,a)})}))},e.prototype.getDownloadUrl=function(e){var t=this._driveForPath(e),n=t[0],r=t[1];return n.getDownloadUrl(r)},e.prototype.newUntitled=function(e){if(void 0===e&&(e={}),e.path){var t=u.normalize(e.path),n=this._driveForPath(t),o=n[0],s=n[1];return o.newUntitled(r({},e,{path:s})).then((function(e){return r({},e,{path:i.PathExt.join(t,e.name)})}))}return this._defaultDrive.newUntitled(e)},e.prototype.delete=function(e){var t=this._driveForPath(e),n=t[0],r=t[1];return n.delete(r)},e.prototype.rename=function(e,t){var n=this,i=this._driveForPath(e),o=i[0],s=i[1],a=this._driveForPath(t),l=a[0],c=a[1];if(o!==l)throw Error("ContentsManager: renaming files must occur within a Drive");return o.rename(s,c).then((function(e){return r({},e,{path:n._toGlobalPath(o,c)})}))},e.prototype.save=function(e,t){void 0===t&&(t={});var n=u.normalize(e),i=this._driveForPath(e),o=i[0],s=i[1];return o.save(s,r({},t,{path:s})).then((function(e){return r({},e,{path:n})}))},e.prototype.copy=function(e,t){var n=this,i=this._driveForPath(e),o=i[0],s=i[1],a=this._driveForPath(t),l=a[0],c=a[1];if(o===l)return o.copy(s,c).then((function(e){return r({},e,{path:n._toGlobalPath(o,e.path)})}));throw Error("Copying files between drives is not currently implemented")},e.prototype.createCheckpoint=function(e){var t=this._driveForPath(e),n=t[0],r=t[1];return n.createCheckpoint(r)},e.prototype.listCheckpoints=function(e){var t=this._driveForPath(e),n=t[0],r=t[1];return n.listCheckpoints(r)},e.prototype.restoreCheckpoint=function(e,t){var n=this._driveForPath(e),r=n[0],i=n[1];return r.restoreCheckpoint(i,t)},e.prototype.deleteCheckpoint=function(e,t){var n=this._driveForPath(e),r=n[0],i=n[1];return r.deleteCheckpoint(i,t)},e.prototype._toGlobalPath=function(e,t){return e===this._defaultDrive?i.PathExt.removeSlash(t):e.name+":"+i.PathExt.removeSlash(t)},e.prototype._driveForPath=function(e){var t=this.driveName(e),n=this.localPath(e);return t?[this._additionalDrives.get(t),n]:[this._defaultDrive,n]},e.prototype._onFileChanged=function(e,t){if(e===this._defaultDrive)this._fileChanged.emit(t);else{var n=null,i=null;t.newValue&&t.newValue.path&&(n=r({},t.newValue,{path:this._toGlobalPath(e,t.newValue.path)})),t.oldValue&&t.oldValue.path&&(i=r({},t.oldValue,{path:this._toGlobalPath(e,t.oldValue.path)})),this._fileChanged.emit({type:t.type,newValue:n,oldValue:i})}},e}();t.ContentsManager=c;var u,h=function(){function e(e){void 0===e&&(e={}),this._isDisposed=!1,this._fileChanged=new s.Signal(this),this.name=e.name||"Default",this._apiEndpoint=e.apiEndpoint||"api/contents",this.serverSettings=e.serverSettings||a.ServerConnection.makeSettings()}return Object.defineProperty(e.prototype,"fileChanged",{get:function(){return this._fileChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(this._isDisposed=!0,s.Signal.clearData(this))},e.prototype.get=function(e,t){var n=this._getUrl(e);if(t){"notebook"===t.type&&delete t.format;var o=t.content?"1":"0",s=r({},t,{content:o});n+=i.URLExt.objectToQueryString(s)}var c=this.serverSettings;return a.ServerConnection.makeRequest(n,{},c).then((function(e){if(200!==e.status)throw new a.ServerConnection.ResponseError(e);return e.json()})).then((function(e){return l.validateContentsModel(e),e}))},e.prototype.getDownloadUrl=function(e){var t=this.serverSettings.baseUrl;return Promise.resolve(i.URLExt.join(t,"files",i.URLExt.encodeParts(e)))},e.prototype.newUntitled=function(e){var t=this;void 0===e&&(e={});var n="{}";e&&(e.ext&&(e.ext=u.normalizeExtension(e.ext)),n=JSON.stringify(e));var r=this.serverSettings,i=this._getUrl(e.path||""),o={method:"POST",body:n};return a.ServerConnection.makeRequest(i,o,r).then((function(e){if(201!==e.status)throw new a.ServerConnection.ResponseError(e);return e.json()})).then((function(e){return l.validateContentsModel(e),t._fileChanged.emit({type:"new",oldValue:null,newValue:e}),e}))},e.prototype.delete=function(e){var t=this,n=this._getUrl(e),r=this.serverSettings;return a.ServerConnection.makeRequest(n,{method:"DELETE"},r).then((function(n){if(400===n.status)return n.json().then((function(e){throw new a.ServerConnection.ResponseError(n,e.message)}));if(204!==n.status)throw new a.ServerConnection.ResponseError(n);t._fileChanged.emit({type:"delete",oldValue:{path:e},newValue:null})}))},e.prototype.rename=function(e,t){var n=this,r=this.serverSettings,i=this._getUrl(e),o={method:"PATCH",body:JSON.stringify({path:t})};return a.ServerConnection.makeRequest(i,o,r).then((function(e){if(200!==e.status)throw new a.ServerConnection.ResponseError(e);return e.json()})).then((function(t){return l.validateContentsModel(t),n._fileChanged.emit({type:"rename",oldValue:{path:e},newValue:t}),t}))},e.prototype.save=function(e,t){var n=this;void 0===t&&(t={});var r=this.serverSettings,i=this._getUrl(e),o={method:"PUT",body:JSON.stringify(t)};return a.ServerConnection.makeRequest(i,o,r).then((function(e){if(200!==e.status&&201!==e.status)throw new a.ServerConnection.ResponseError(e);return e.json()})).then((function(e){return l.validateContentsModel(e),n._fileChanged.emit({type:"save",oldValue:null,newValue:e}),e}))},e.prototype.copy=function(e,t){var n=this,r=this.serverSettings,i=this._getUrl(t),o={method:"POST",body:JSON.stringify({copy_from:e})};return a.ServerConnection.makeRequest(i,o,r).then((function(e){if(201!==e.status)throw new a.ServerConnection.ResponseError(e);return e.json()})).then((function(e){return l.validateContentsModel(e),n._fileChanged.emit({type:"new",oldValue:null,newValue:e}),e}))},e.prototype.createCheckpoint=function(e){var t=this._getUrl(e,"checkpoints");return a.ServerConnection.makeRequest(t,{method:"POST"},this.serverSettings).then((function(e){if(201!==e.status)throw new a.ServerConnection.ResponseError(e);return e.json()})).then((function(e){return l.validateCheckpointModel(e),e}))},e.prototype.listCheckpoints=function(e){var t=this._getUrl(e,"checkpoints");return a.ServerConnection.makeRequest(t,{},this.serverSettings).then((function(e){if(200!==e.status)throw new a.ServerConnection.ResponseError(e);return e.json()})).then((function(e){if(!Array.isArray(e))throw new Error("Invalid Checkpoint list");for(var t=0;t<e.length;t++)l.validateCheckpointModel(e[t]);return e}))},e.prototype.restoreCheckpoint=function(e,t){var n=this._getUrl(e,"checkpoints",t);return a.ServerConnection.makeRequest(n,{method:"POST"},this.serverSettings).then((function(e){if(204!==e.status)throw new a.ServerConnection.ResponseError(e)}))},e.prototype.deleteCheckpoint=function(e,t){var n=this._getUrl(e,"checkpoints",t);return a.ServerConnection.makeRequest(n,{method:"DELETE"},this.serverSettings).then((function(e){if(204!==e.status)throw new a.ServerConnection.ResponseError(e)}))},e.prototype._getUrl=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.map((function(e){return i.URLExt.encodeParts(e)})),r=this.serverSettings.baseUrl;return i.URLExt.join.apply(i.URLExt,[r,this._apiEndpoint].concat(n))},e}();t.Drive=h,function(e){e.normalizeExtension=function(e){return e.length>0&&0!==e.indexOf(".")&&(e="."+e),e},e.normalize=function(e){var t=e.split(":");return 1===t.length?i.PathExt.normalize(e):t[0]+":"+i.PathExt.normalize(t.slice(1).join(":"))}}(u||(u={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(370);!function(e){e.findById=function(e,t){return r.DefaultKernel.findById(e,t)},e.getSpecs=function(e){return r.DefaultKernel.getSpecs(e)},e.listRunning=function(e){return r.DefaultKernel.listRunning(e)},e.startNew=function(e){return void 0===e&&(e={}),r.DefaultKernel.startNew(e)},e.connectTo=function(e,t){return r.DefaultKernel.connectTo(e,t)},e.shutdown=function(e,t){return r.DefaultKernel.shutdown(e,t)},e.shutdownAll=function(e){return r.DefaultKernel.shutdownAll(e)}}(t.Kernel||(t.Kernel={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=["username","version","session","msg_id","msg_type"],i={stream:{name:"string",text:"string"},display_data:{data:"object",metadata:"object"},execute_input:{code:"string",execution_count:"number"},execute_result:{execution_count:"number",data:"object",metadata:"object"},error:{ename:"string",evalue:"string",traceback:"object"},status:{execution_state:"string"},clear_output:{wait:"boolean"},comm_open:{comm_id:"string",target_name:"string",data:"object"},comm_msg:{comm_id:"string",data:"object"},comm_close:{comm_id:"string"},shutdown_reply:{restart:"boolean"}};function o(e,t,n){if(!e.hasOwnProperty(t))throw Error("Missing property '"+t+"'");if(void 0!==n){var r=!0,i=e[t];switch(n){case"array":r=Array.isArray(i);break;case"object":r=void 0!==i;break;default:r=typeof i===n}if(!r)throw new Error("Property '"+t+"' is not of type '"+n)}}function s(e){var t=e.spec;if(!t)throw new Error("Invalid kernel spec");return o(e,"name","string"),o(e,"resources","object"),o(t,"language","string"),o(t,"display_name","string"),o(t,"argv","array"),{name:e.name,resources:e.resources,language:t.language,display_name:t.display_name,argv:t.argv}}t.validateMessage=function(e){o(e,"metadata","object"),o(e,"content","object"),o(e,"channel","string"),function(e){for(var t=0;t<r.length;t++)o(e,r[t],"string")}(e.header),"iopub"===e.channel&&function(e){if("iopub"===e.channel){var t=i[e.header.msg_type];if(void 0===t)return;for(var n=Object.keys(t),r=e.content,s=0;s<n.length;s++)o(r,n[s],t[n[s]])}}(e)},t.validateModel=function(e){o(e,"name","string"),o(e,"id","string")},t.validateSpecModel=s,t.validateSpecModels=function(e){if(!e.hasOwnProperty("kernelspecs"))throw new Error("No kernelspecs found");for(var t=Object.keys(e.kernelspecs),n=Object.create(null),r=e.default,i=0;i<t.length;i++){var o=e.kernelspecs[t[i]];try{n[t[i]]=s(o)}catch(e){console.warn("Removing errant kernel spec: "+t[i])}}if(!(t=Object.keys(n)).length)throw new Error("No valid kernelspecs found");return r&&"string"==typeof r&&r in n||(r=t[0],console.warn("Default kernel not found, using '"+t[0]+"'")),{default:r,kernelspecs:n}}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(377)),r(n(161))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(378);!function(e){e.listRunning=function(e){return r.DefaultSession.listRunning(e)},e.startNew=function(e){return r.DefaultSession.startNew(e)},e.findById=function(e,t){return r.DefaultSession.findById(e,t)},e.findByPath=function(e,t){return r.DefaultSession.findByPath(e,t)},e.connectTo=function(e,t){return r.DefaultSession.connectTo(e,t)},e.shutdown=function(e,t){return r.DefaultSession.shutdown(e,t)},e.shutdownAll=function(e){return r.DefaultSession.shutdownAll(e)}}(t.Session||(t.Session={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(18),o=n(46),s=function(){function e(e){void 0===e&&(e={}),this.serverSettings=e.serverSettings||o.ServerConnection.makeSettings()}return e.prototype.fetch=function(e){var t=this.serverSettings,n=t.baseUrl+t.pageUrl,i=r.url(n,e);return o.ServerConnection.makeRequest(i,{},t).then((function(e){if(200!==e.status)throw new o.ServerConnection.ResponseError(e);return e.json()}))},e.prototype.save=function(e,t){var n=this.serverSettings,i=n.baseUrl+n.pageUrl,s=r.url(i,e),a={body:t,method:"PUT"};return o.ServerConnection.makeRequest(s,a,n).then((function(e){if(204!==e.status)throw new o.ServerConnection.ResponseError(e)}))},e}();t.SettingManager=s,function(e){e.url=function(e,t){return i.URLExt.join(e,"api/settings",t)}}(r||(r={}))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(380)),r(n(92))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(18),o=n(46),s=function(){function e(e){void 0===e&&(e={}),this.serverSettings=e.serverSettings||o.ServerConnection.makeSettings()}return e.prototype.fetch=function(e){var t=this.serverSettings,n=t.baseUrl+t.pageUrl,i=r.url(n,e);return o.ServerConnection.makeRequest(i,{},t).then((function(e){if(200!==e.status)throw new o.ServerConnection.ResponseError(e);return e.json()}))},e.prototype.save=function(e,t){var n=this.serverSettings,i=n.baseUrl+n.pageUrl,s=r.url(i,e),a={body:JSON.stringify(t),method:"PUT"};return o.ServerConnection.makeRequest(s,a,n).then((function(e){if(204!==e.status)throw new o.ServerConnection.ResponseError(e)}))},e}();t.WorkspaceManager=s,function(e){e.url=function(e,t){return i.URLExt.join(e,"api/workspaces",t)}}(r||(r={}))},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(47),i=n(168);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(17))},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(402),i=n(409),o=n(411),s=n(412),a=n(413);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},function(e,t,n){var r=n(414),i=n(417),o=n(418);e.exports=function(e,t,n,s,a,l){var c=1&n,u=e.length,h=t.length;if(u!=h&&!(c&&h>u))return!1;var d=l.get(e),p=l.get(t);if(d&&p)return d==t&&p==e;var f=-1,g=!0,m=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f<u;){var _=e[f],v=t[f];if(s)var y=c?s(v,_,f,t,e,l):s(_,v,f,e,t,l);if(void 0!==y){if(y)continue;g=!1;break}if(m){if(!i(t,(function(e,t){if(!o(m,t)&&(_===e||a(_,e,n,s,l)))return m.push(t)}))){g=!1;break}}else if(_!==v&&!a(_,v,n,s,l)){g=!1;break}}return l.delete(e),l.delete(t),g}},function(e,t,n){(function(e){var r=n(27),i=n(435),o=t&&!t.nodeType&&t,s=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||i;e.exports=l}).call(this,n(88)(e))},function(e,t,n){var r=n(437),i=n(438),o=n(439),s=o&&o.isTypedArray,a=s?i(s):r;e.exports=a},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s,a=n(3),l=n(7),c=n(12),u=n(16),h=n(177),d=n(10),p=n(6),f=n(67),g=n(15),m=function(e){function t(n){var r=e.call(this,{node:s.createNode()})||this;return r._childIndex=-1,r._activeIndex=-1,r._openTimerID=0,r._closeTimerID=0,r._items=[],r._childMenu=null,r._parentMenu=null,r._aboutToClose=new p.Signal(r),r._menuRequested=new p.Signal(r),r.addClass("p-Menu"),r.setFlag(g.Widget.Flag.DisallowLayout),r.commands=n.commands,r.renderer=n.renderer||t.defaultRenderer,r}return i(t,e),t.prototype.dispose=function(){this.close(),this._items.length=0,e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"aboutToClose",{get:function(){return this._aboutToClose},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"menuRequested",{get:function(){return this._menuRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentMenu",{get:function(){return this._parentMenu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"childMenu",{get:function(){return this._childMenu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rootMenu",{get:function(){for(var e=this;e._parentMenu;)e=e._parentMenu;return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leafMenu",{get:function(){for(var e=this;e._childMenu;)e=e._childMenu;return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("p-Menu-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeItem",{get:function(){return this._items[this._activeIndex]||null},set:function(e){this.activeIndex=e?this._items.indexOf(e):-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(e){(e<0||e>=this._items.length)&&(e=-1),-1===e||s.canActivate(this._items[e])||(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),t.prototype.activateNextItem=function(){var e=this._items.length,t=this._activeIndex,n=t<e-1?t+1:0,r=0===n?e-1:n-1;this.activeIndex=a.ArrayExt.findFirstIndex(this._items,s.canActivate,n,r)},t.prototype.activatePreviousItem=function(){var e=this._items.length,t=this._activeIndex,n=t<=0?e-1:t-1,r=n===e-1?0:n+1;this.activeIndex=a.ArrayExt.findLastIndex(this._items,s.canActivate,n,r)},t.prototype.triggerActiveItem=function(){if(this.isAttached){var e=this.activeItem;if(e)if(this._cancelOpenTimer(),this._cancelCloseTimer(),"submenu"!==e.type){this.rootMenu.close();var t=e.command,n=e.args;this.commands.isEnabled(t,n)?this.commands.execute(t,n):console.log("Command '"+t+"' is disabled.")}else this._openChildMenu(!0)}},t.prototype.addItem=function(e){return this.insertItem(this._items.length,e)},t.prototype.insertItem=function(e,t){this.isAttached&&this.close(),this.activeIndex=-1;var n=Math.max(0,Math.min(e,this._items.length)),r=s.createItem(this,t);return a.ArrayExt.insert(this._items,n,r),this.update(),r},t.prototype.removeItem=function(e){this.removeItemAt(this._items.indexOf(e))},t.prototype.removeItemAt=function(e){this.isAttached&&this.close(),this.activeIndex=-1,a.ArrayExt.removeAt(this._items,e)&&this.update()},t.prototype.clearItems=function(){this.isAttached&&this.close(),this.activeIndex=-1,0!==this._items.length&&(this._items.length=0,this.update())},t.prototype.open=function(e,t,n){if(void 0===n&&(n={}),!this.isAttached){var r=n.forceX||!1,i=n.forceY||!1;s.openRootMenu(this,e,t,r,i),this.activate()}},t.prototype.handleEvent=function(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mouseup":this._evtMouseUp(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseenter":this._evtMouseEnter(e);break;case"mouseleave":this._evtMouseLeave(e);break;case"mousedown":this._evtMouseDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}},t.prototype.onBeforeAttach=function(e){this.node.addEventListener("keydown",this),this.node.addEventListener("mouseup",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("mouseenter",this),this.node.addEventListener("mouseleave",this),this.node.addEventListener("contextmenu",this),document.addEventListener("mousedown",this,!0)},t.prototype.onAfterDetach=function(e){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mouseup",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("mouseenter",this),this.node.removeEventListener("mouseleave",this),this.node.removeEventListener("contextmenu",this),document.removeEventListener("mousedown",this,!0)},t.prototype.onActivateRequest=function(e){this.isAttached&&this.node.focus()},t.prototype.onUpdateRequest=function(e){for(var t=this._items,n=this.renderer,r=this._activeIndex,i=s.computeCollapsed(t),o=new Array(t.length),a=0,l=t.length;a<l;++a){var c=t[a],u=a===r,h=i[a];o[a]=n.renderItem({item:c,active:u,collapsed:h})}f.VirtualDOM.render(o,this.contentNode)},t.prototype.onCloseRequest=function(t){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;var n=this._childMenu;n&&(this._childIndex=-1,this._childMenu=null,n._parentMenu=null,n.close());var r=this._parentMenu;r&&(this._parentMenu=null,r._childIndex=-1,r._childMenu=null,r.activate()),this.isAttached&&this._aboutToClose.emit(void 0),e.prototype.onCloseRequest.call(this,t)},t.prototype._evtKeyDown=function(e){e.preventDefault(),e.stopPropagation();var t=e.keyCode;if(13!==t)if(27!==t)if(37!==t)if(38!==t)if(39!==t)if(40!==t){var n=h.getKeyboardLayout().keyForKeydownEvent(e);if(n){var r=this._activeIndex+1,i=s.findMnemonic(this._items,n,r);-1===i.index||i.multiple?-1!==i.index?this.activeIndex=i.index:-1!==i.auto&&(this.activeIndex=i.auto):(this.activeIndex=i.index,this.triggerActiveItem())}}else this.activateNextItem();else{var o=this.activeItem;o&&"submenu"===o.type?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next")}else this.activatePreviousItem();else this._parentMenu?this.close():this._menuRequested.emit("previous");else this.close();else this.triggerActiveItem()},t.prototype._evtMouseUp=function(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this.triggerActiveItem())},t.prototype._evtMouseMove=function(e){var t=a.ArrayExt.findFirstIndex(this.contentNode.children,(function(t){return u.ElementExt.hitTest(t,e.clientX,e.clientY)}));if(t!==this._activeIndex){if(this.activeIndex=t,(t=this.activeIndex)===this._childIndex)return this._cancelOpenTimer(),void this._cancelCloseTimer();-1!==this._childIndex&&this._startCloseTimer(),this._cancelOpenTimer();var n=this.activeItem;n&&"submenu"===n.type&&n.submenu&&this._startOpenTimer()}},t.prototype._evtMouseEnter=function(e){for(var t=this._parentMenu;t;t=t._parentMenu)t._cancelOpenTimer(),t._cancelCloseTimer(),t.activeIndex=t._childIndex},t.prototype._evtMouseLeave=function(e){if(this._cancelOpenTimer(),this._childMenu){var t=e.clientX,n=e.clientY;u.ElementExt.hitTest(this._childMenu.node,t,n)?this._cancelCloseTimer():(this.activeIndex=-1,this._startCloseTimer())}else this.activeIndex=-1},t.prototype._evtMouseDown=function(e){this._parentMenu||(s.hitTestMenus(this,e.clientX,e.clientY)?(e.preventDefault(),e.stopPropagation()):this.close())},t.prototype._openChildMenu=function(e){void 0===e&&(e=!1);var t=this.activeItem;if(t&&"submenu"===t.type&&t.submenu){var n=t.submenu;if(n!==this._childMenu){this._closeChildMenu(),this._childMenu=n,this._childIndex=this._activeIndex,n._parentMenu=this,d.MessageLoop.sendMessage(this,g.Widget.Msg.UpdateRequest);var r=this.contentNode.children[this._activeIndex];s.openSubmenu(n,r),e&&(n.activeIndex=-1,n.activateNextItem()),n.activate()}}else this._closeChildMenu()},t.prototype._closeChildMenu=function(){this._childMenu&&this._childMenu.close()},t.prototype._startOpenTimer=function(){var e=this;0===this._openTimerID&&(this._openTimerID=window.setTimeout((function(){e._openTimerID=0,e._openChildMenu()}),s.TIMER_DELAY))},t.prototype._startCloseTimer=function(){var e=this;0===this._closeTimerID&&(this._closeTimerID=window.setTimeout((function(){e._closeTimerID=0,e._closeChildMenu()}),s.TIMER_DELAY))},t.prototype._cancelOpenTimer=function(){0!==this._openTimerID&&(clearTimeout(this._openTimerID),this._openTimerID=0)},t.prototype._cancelCloseTimer=function(){0!==this._closeTimerID&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)},t}(g.Widget);t.Menu=m,function(e){var t=function(){function e(){}return e.prototype.renderItem=function(e){var t=this.createItemClass(e),n=this.createItemDataset(e);return f.h.li({className:t,dataset:n},this.renderIcon(e),this.renderLabel(e),this.renderShortcut(e),this.renderSubmenu(e))},e.prototype.renderIcon=function(e){var t=this.createIconClass(e);return f.h.div({className:t},e.item.iconLabel)},e.prototype.renderLabel=function(e){var t=this.formatLabel(e);return f.h.div({className:"p-Menu-itemLabel"},t)},e.prototype.renderShortcut=function(e){var t=this.formatShortcut(e);return f.h.div({className:"p-Menu-itemShortcut"},t)},e.prototype.renderSubmenu=function(e){return f.h.div({className:"p-Menu-itemSubmenuIcon"})},e.prototype.createItemClass=function(e){var t="p-Menu-item";e.item.isEnabled||(t+=" p-mod-disabled"),e.item.isToggled&&(t+=" p-mod-toggled"),e.item.isVisible||(t+=" p-mod-hidden"),e.active&&(t+=" p-mod-active"),e.collapsed&&(t+=" p-mod-collapsed");var n=e.item.className;return n&&(t+=" "+n),t},e.prototype.createItemDataset=function(e){var t=e.item,n=t.type,r=t.command,i=t.dataset;return o({},i,"command"===n?{type:n,command:r}:{type:n})},e.prototype.createIconClass=function(e){var t="p-Menu-itemIcon",n=e.item.iconClass;return n?t+" "+n:t},e.prototype.formatLabel=function(e){var t=e.item,n=t.label,r=t.mnemonic;if(r<0||r>=n.length)return n;var i=n.slice(0,r),o=n.slice(r+1),s=n[r];return[i,f.h.span({className:"p-Menu-itemMnemonic"},s),o]},e.prototype.formatShortcut=function(e){var t=e.item.keyBinding;return t?t.keys.map(l.CommandRegistry.formatKeystroke).join(", "):null},e}();e.Renderer=t,e.defaultRenderer=new t}(m=t.Menu||(t.Menu={})),t.Menu=m,function(e){function t(e){return"separator"!==e.type&&e.isEnabled&&e.isVisible}e.TIMER_DELAY=300,e.SUBMENU_OVERLAP=3,e.createNode=function(){var e=document.createElement("div"),t=document.createElement("ul");return t.className="p-Menu-content",e.appendChild(t),e.tabIndex=-1,e},e.canActivate=t,e.createItem=function(e,t){return new n(e.commands,t)},e.hitTestMenus=function(e,t,n){for(var r=e;r;r=r.childMenu)if(u.ElementExt.hitTest(r.node,t,n))return!0;return!1},e.computeCollapsed=function(e){var t=new Array(e.length);a.ArrayExt.fill(t,!1);for(var n=0,r=e.length;n<r;++n){if((s=e[n]).isVisible){if("separator"!==s.type)break;t[n]=!0}}for(var i=r-1;i>=0;--i){if((s=e[i]).isVisible){if("separator"!==s.type)break;t[i]=!0}}for(var o=!1;++n<i;){var s;(s=e[n]).isVisible&&("separator"!==s.type?o=!1:o?t[n]=!0:o=!0)}return t},e.openRootMenu=function(e,t,n,r,i){d.MessageLoop.sendMessage(e,g.Widget.Msg.UpdateRequest);var o=window.pageXOffset,s=window.pageYOffset,a=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=l-(i?n:0),u=e.node,h=u.style;h.top="",h.left="",h.width="",h.height="",h.visibility="hidden",h.maxHeight=c+"px",g.Widget.attach(e,document.body);var p=u.getBoundingClientRect(),f=p.width,m=p.height;!r&&t+f>o+a&&(t=o+a-f),!i&&n+m>s+l&&(n>s+l?n=s+l-m:n-=m),h.top=Math.max(0,n)+"px",h.left=Math.max(0,t)+"px",h.visibility=""},e.openSubmenu=function(t,n){d.MessageLoop.sendMessage(t,g.Widget.Msg.UpdateRequest);var r=window.pageXOffset,i=window.pageYOffset,o=document.documentElement.clientWidth,s=document.documentElement.clientHeight,a=s,l=t.node,c=l.style;c.top="",c.left="",c.width="",c.height="",c.visibility="hidden",c.maxHeight=a+"px",g.Widget.attach(t,document.body);var h=l.getBoundingClientRect(),p=h.width,f=h.height,m=u.ElementExt.boxSizing(t.node),_=n.getBoundingClientRect(),v=_.right-e.SUBMENU_OVERLAP;v+p>r+o&&(v=_.left+e.SUBMENU_OVERLAP-p);var y=_.top-m.borderTop-m.paddingTop;y+f>i+s&&(y=_.bottom+m.borderBottom+m.paddingBottom-f),c.top=Math.max(0,y)+"px",c.left=Math.max(0,v)+"px",c.visibility=""},e.findMnemonic=function(e,n,r){for(var i=-1,o=-1,s=!1,a=n.toUpperCase(),l=0,c=e.length;l<c;++l){var u=(l+r)%c,h=e[u];if(t(h)){var d=h.label;if(0!==d.length){var p=h.mnemonic;p>=0&&p<d.length?d[p].toUpperCase()===a&&(-1===i?i=u:s=!0):-1===o&&d[0].toUpperCase()===a&&(o=u)}}}return{index:i,multiple:s,auto:o}};var n=function(){function e(e,t){this._commands=e,this.type=t.type||"command",this.command=t.command||"",this.args=t.args||c.JSONExt.emptyObject,this.submenu=t.submenu||null}return Object.defineProperty(e.prototype,"label",{get:function(){return"command"===this.type?this._commands.label(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.label:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mnemonic",{get:function(){return"command"===this.type?this._commands.mnemonic(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.mnemonic:-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"icon",{get:function(){return this.iconClass},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iconClass",{get:function(){return"command"===this.type?this._commands.iconClass(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.iconClass:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iconLabel",{get:function(){return"command"===this.type?this._commands.iconLabel(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.iconLabel:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"caption",{get:function(){return"command"===this.type?this._commands.caption(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.caption:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{get:function(){return"command"===this.type?this._commands.className(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.className:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataset",{get:function(){return"command"===this.type?this._commands.dataset(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.dataset:{}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return"command"===this.type?this._commands.isEnabled(this.command,this.args):"submenu"!==this.type||null!==this.submenu},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isToggled",{get:function(){return"command"===this.type&&this._commands.isToggled(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isVisible",{get:function(){return"command"===this.type?this._commands.isVisible(this.command,this.args):"submenu"!==this.type||null!==this.submenu},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keyBinding",{get:function(){if("command"===this.type){var e=this.command,t=this.args;return a.ArrayExt.findLastValue(this._commands.keyBindings,(function(n){return n.command===e&&c.JSONExt.deepEqual(n.args,t)}))||null}return null},enumerable:!0,configurable:!0}),e}()}(s||(s={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getKeyboardLayout=function(){return r.keyboardLayout},t.setKeyboardLayout=function(e){r.keyboardLayout=e};var r,i=function(){function e(t,n){this.name=t,this._codes=n,this._keys=e.extractKeys(n)}return e.prototype.keys=function(){return Object.keys(this._keys)},e.prototype.isValidKey=function(e){return e in this._keys},e.prototype.keyForKeydownEvent=function(e){return this._codes[e.keyCode]||""},e}();t.KeycodeLayout=i,function(e){e.extractKeys=function(e){var t=Object.create(null);for(var n in e)t[e[n]]=!0;return t}}(i=t.KeycodeLayout||(t.KeycodeLayout={})),t.KeycodeLayout=i,t.EN_US=new i("en-us",{8:"Backspace",9:"Tab",13:"Enter",19:"Pause",27:"Escape",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",93:"ContextMenu",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}),function(e){e.keyboardLayout=t.EN_US}(r||(r={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(3),a=n(16),l=n(10),c=n(49),u=n(30),h=n(15),d=function(e){function t(t){var n=e.call(this)||this;return n._spacing=4,n._dirty=!1,n._root=null,n._box=null,n._items=new Map,n.renderer=t.renderer,void 0!==t.spacing&&(n._spacing=o.clampSpacing(t.spacing)),n}return i(t,e),t.prototype.dispose=function(){var t=this.iter();this._items.forEach((function(e){e.dispose()})),this._box=null,this._root=null,this._items.clear(),s.each(t,(function(e){e.dispose()})),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"spacing",{get:function(){return this._spacing},set:function(e){e=o.clampSpacing(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return null===this._root},enumerable:!0,configurable:!0}),t.prototype.iter=function(){return this._root?this._root.iterAllWidgets():s.empty()},t.prototype.widgets=function(){return this._root?this._root.iterUserWidgets():s.empty()},t.prototype.selectedWidgets=function(){return this._root?this._root.iterSelectedWidgets():s.empty()},t.prototype.tabBars=function(){return this._root?this._root.iterTabBars():s.empty()},t.prototype.handles=function(){return this._root?this._root.iterHandles():s.empty()},t.prototype.moveHandle=function(e,t,n){if(this._root&&!e.classList.contains("p-mod-hidden")){var r,i=this._root.findSplitNode(e);if(i)0!==(r="horizontal"===i.node.orientation?t-e.offsetLeft:n-e.offsetTop)&&(i.node.holdSizes(),c.BoxEngine.adjust(i.node.sizers,i.index,r),this.parent&&this.parent.update())}},t.prototype.saveLayout=function(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}},t.prototype.restoreLayout=function(e){var t,n=this,r=new Set;t=e.main?o.normalizeAreaConfig(e.main,r):null;var i=this.widgets(),a=this.tabBars(),l=this.handles();this._root=null,s.each(i,(function(e){r.has(e)||(e.parent=null)})),s.each(a,(function(e){e.dispose()})),s.each(l,(function(e){e.parentNode&&e.parentNode.removeChild(e)})),r.forEach((function(e){e.parent=n.parent})),this._root=t?o.realizeAreaConfig(t,{createTabBar:function(){return n._createTabBar()},createHandle:function(){return n._createHandle()}}):null,this.parent&&(r.forEach((function(e){n.attachWidget(e)})),this.parent.fit())},t.prototype.addWidget=function(e,t){void 0===t&&(t={});var n=t.ref||null,r=t.mode||"tab-after",i=null;if(this._root&&n&&(i=this._root.findTabNode(n)),n&&!i)throw new Error("Reference widget is not in the layout.");switch(e.parent=this.parent,r){case"tab-after":this._insertTab(e,n,i,!0);break;case"tab-before":this._insertTab(e,n,i,!1);break;case"split-top":this._insertSplit(e,n,i,"vertical",!1);break;case"split-left":this._insertSplit(e,n,i,"horizontal",!1);break;case"split-right":this._insertSplit(e,n,i,"horizontal",!0);break;case"split-bottom":this._insertSplit(e,n,i,"vertical",!0)}this.parent&&(this.attachWidget(e),this.parent.fit())},t.prototype.removeWidget=function(e){this._removeWidget(e),this.parent&&(this.detachWidget(e),this.parent.fit())},t.prototype.hitTestTabAreas=function(e,t){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=a.ElementExt.boxSizing(this.parent.node));var n=this.parent.node.getBoundingClientRect(),r=e-n.left-this._box.borderLeft,i=t-n.top-this._box.borderTop,o=this._root.hitTestTabNodes(r,i);if(!o)return null;var s=o.tabBar,l=o.top,c=o.left,u=o.width,h=o.height,d=this._box.borderLeft+this._box.borderRight,p=this._box.borderTop+this._box.borderBottom;return{tabBar:s,x:r,y:i,top:l,left:c,right:n.width-d-(c+u),bottom:n.height-p-(l+h),width:u,height:h}},t.prototype.init=function(){var t=this;e.prototype.init.call(this),s.each(this,(function(e){t.attachWidget(e)})),s.each(this.handles(),(function(e){t.parent.node.appendChild(e)})),this.parent.fit()},t.prototype.attachWidget=function(e){this.parent.node!==e.node.parentNode&&(this._items.set(e,new u.LayoutItem(e)),this.parent.isAttached&&l.MessageLoop.sendMessage(e,h.Widget.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&l.MessageLoop.sendMessage(e,h.Widget.Msg.AfterAttach))},t.prototype.detachWidget=function(e){if(this.parent.node===e.node.parentNode){this.parent.isAttached&&l.MessageLoop.sendMessage(e,h.Widget.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&l.MessageLoop.sendMessage(e,h.Widget.Msg.AfterDetach);var t=this._items.get(e);t&&(this._items.delete(e),t.dispose())}},t.prototype.onBeforeShow=function(t){e.prototype.onBeforeShow.call(this,t),this.parent.update()},t.prototype.onBeforeAttach=function(t){e.prototype.onBeforeAttach.call(this,t),this.parent.fit()},t.prototype.onChildShown=function(e){this.parent.fit()},t.prototype.onChildHidden=function(e){this.parent.fit()},t.prototype.onResize=function(e){this.parent.isVisible&&this._update(e.width,e.height)},t.prototype.onUpdateRequest=function(e){this.parent.isVisible&&this._update(-1,-1)},t.prototype.onFitRequest=function(e){this.parent.isAttached&&this._fit()},t.prototype._removeWidget=function(e){if(this._root){var t=this._root.findTabNode(e);if(t)if(t.tabBar.titles.length>1)t.tabBar.removeTab(e.title);else if(t.tabBar.dispose(),this._root!==t){this._root.holdAllSizes();var n=t.parent;t.parent=null;var r=s.ArrayExt.removeFirstOf(n.children,t),i=s.ArrayExt.removeAt(n.handles,r);if(s.ArrayExt.removeAt(n.sizers,r),i.parentNode&&i.parentNode.removeChild(i),n.children.length>1)n.syncHandles();else{var a=n.parent;n.parent=null;var l=n.children[0],c=n.handles[0];if(n.children.length=0,n.handles.length=0,n.sizers.length=0,c.parentNode&&c.parentNode.removeChild(c),this._root===n)return l.parent=null,void(this._root=l);var u=a,h=u.children.indexOf(n);if(l instanceof o.TabLayoutNode)return l.parent=u,void(u.children[h]=l);var d=s.ArrayExt.removeAt(u.handles,h);s.ArrayExt.removeAt(u.children,h),s.ArrayExt.removeAt(u.sizers,h),d.parentNode&&d.parentNode.removeChild(d);for(var p=0,f=l.children.length;p<f;++p){var g=l.children[p],m=l.handles[p],_=l.sizers[p];s.ArrayExt.insert(u.children,h+p,g),s.ArrayExt.insert(u.handles,h+p,m),s.ArrayExt.insert(u.sizers,h+p,_),g.parent=u}l.children.length=0,l.handles.length=0,l.sizers.length=0,l.parent=null,u.syncHandles()}}else this._root=null}},t.prototype._insertTab=function(e,t,n,r){if(e!==t){if(!this._root){var i=new o.TabLayoutNode(this._createTabBar());return i.tabBar.addTab(e.title),void(this._root=i)}var s;n||(n=this._root.findFirstTabNode()),-1===n.tabBar.titles.indexOf(e.title)&&(this._removeWidget(e),e.hide()),s=t?n.tabBar.titles.indexOf(t.title):n.tabBar.currentIndex,n.tabBar.insertTab(s+(r?1:0),e.title)}},t.prototype._insertSplit=function(e,t,n,r,i){if(e!==t||!n||1!==n.tabBar.titles.length){this._removeWidget(e);var a=new o.TabLayoutNode(this._createTabBar());if(a.tabBar.addTab(e.title),this._root){if(!n||!n.parent){var l=this._splitRoot(r),c=i?l.children.length:0;l.normalizeSizes();var u=o.createSizer(n?1:o.GOLDEN_RATIO);return s.ArrayExt.insert(l.children,c,a),s.ArrayExt.insert(l.sizers,c,u),s.ArrayExt.insert(l.handles,c,this._createHandle()),a.parent=l,l.normalizeSizes(),void l.syncHandles()}var h=n.parent;if(h.orientation===r){var d=h.children.indexOf(n);h.normalizeSizes();var p=h.sizers[d].sizeHint/=2,f=d+(i?1:0);return s.ArrayExt.insert(h.children,f,a),s.ArrayExt.insert(h.sizers,f,o.createSizer(p)),s.ArrayExt.insert(h.handles,f,this._createHandle()),a.parent=h,void h.syncHandles()}var g=s.ArrayExt.removeFirstOf(h.children,n),m=new o.SplitLayoutNode(r);m.normalized=!0,m.children.push(n),m.sizers.push(o.createSizer(.5)),m.handles.push(this._createHandle()),n.parent=m;var _=i?1:0;s.ArrayExt.insert(m.children,_,a),s.ArrayExt.insert(m.sizers,_,o.createSizer(.5)),s.ArrayExt.insert(m.handles,_,this._createHandle()),a.parent=m,m.syncHandles(),s.ArrayExt.insert(h.children,g,m),m.parent=h}else this._root=a}},t.prototype._splitRoot=function(e){var t=this._root;if(t instanceof o.SplitLayoutNode&&t.orientation===e)return t;var n=this._root=new o.SplitLayoutNode(e);return t&&(n.children.push(t),n.sizers.push(o.createSizer(0)),n.handles.push(this._createHandle()),t.parent=n),n},t.prototype._fit=function(){var e=0,t=0;if(this._root){var n=this._root.fit(this._spacing,this._items);e=n.minWidth,t=n.minHeight}var r=this._box=a.ElementExt.boxSizing(this.parent.node);e+=r.horizontalSum,t+=r.verticalSum;var i=this.parent.node.style;i.minWidth=e+"px",i.minHeight=t+"px",this._dirty=!0,this.parent.parent&&l.MessageLoop.sendMessage(this.parent.parent,h.Widget.Msg.FitRequest),this._dirty&&l.MessageLoop.sendMessage(this.parent,h.Widget.Msg.UpdateRequest)},t.prototype._update=function(e,t){if(this._dirty=!1,this._root){e<0&&(e=this.parent.node.offsetWidth),t<0&&(t=this.parent.node.offsetHeight),this._box||(this._box=a.ElementExt.boxSizing(this.parent.node));var n=this._box.paddingTop,r=this._box.paddingLeft,i=e-this._box.horizontalSum,o=t-this._box.verticalSum;this._root.update(n,r,i,o,this._spacing,this._items)}},t.prototype._createTabBar=function(){var e=this.renderer.createTabBar();return e.orientation="horizontal",this.parent&&(e.parent=this.parent,this.attachWidget(e)),e},t.prototype._createHandle=function(){var e=this.renderer.createHandle(),t=e.style;return t.position="absolute",t.top="0",t.left="0",t.width="0",t.height="0",this.parent&&this.parent.node.appendChild(e),e},t}(u.Layout);t.DockLayout=d,function(e){function t(e){var t=new c.BoxSizer;return t.sizeHint=e,t.size=e,t}function n(e,t){return"tab-area"===e.type?function(e,t){if(0===e.widgets.length)return null;var n=[];if(s.each(e.widgets,(function(e){t.has(e)||(t.add(e),n.push(e))})),0===n.length)return null;var r=e.currentIndex;-1!==r&&(r<0||r>=n.length)&&(r=0);return{type:"tab-area",widgets:n,currentIndex:r}}(e,t):function(e,t){for(var r=e.orientation,i=[],o=[],s=0,a=e.children.length;s<a;++s){var l=n(e.children[s],t);l&&("tab-area"===l.type||l.orientation!==r?(i.push(l),o.push(Math.abs(e.sizes[s]||0))):(i.push.apply(i,l.children),o.push.apply(o,l.sizes)))}if(0===i.length)return null;if(1===i.length)return i[0];return{type:"split-area",orientation:r,children:i,sizes:o}}(e,t)}function r(e,n){return"tab-area"===e.type?function(e,t){var n=t.createTabBar();return s.each(e.widgets,(function(e){e.hide(),n.addTab(e.title)})),n.currentIndex=e.currentIndex,new i(n)}(e,n):function(e,n){var i=new o(e.orientation);return s.each(e.children,(function(o,s){var a=r(o,n),l=t(e.sizes[s]),c=n.createHandle();i.children.push(a),i.handles.push(c),i.sizers.push(l),a.parent=i})),i.syncHandles(),i.normalizeSizes(),i}(e,n)}e.GOLDEN_RATIO=.618,e.clampSpacing=function(e){return Math.max(0,Math.floor(e))},e.createSizer=t,e.normalizeAreaConfig=n,e.realizeAreaConfig=r;var i=function(){function e(e){this.parent=null,this._top=0,this._left=0,this._width=0,this._height=0;var t=new c.BoxSizer,n=new c.BoxSizer;t.stretch=0,n.stretch=1,this.tabBar=e,this.sizers=[t,n]}return Object.defineProperty(e.prototype,"top",{get:function(){return this._top},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return this._left},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.iterAllWidgets=function(){return s.chain(s.once(this.tabBar),this.iterUserWidgets())},e.prototype.iterUserWidgets=function(){return s.map(this.tabBar.titles,(function(e){return e.owner}))},e.prototype.iterSelectedWidgets=function(){var e=this.tabBar.currentTitle;return e?s.once(e.owner):s.empty()},e.prototype.iterTabBars=function(){return s.once(this.tabBar)},e.prototype.iterHandles=function(){return s.empty()},e.prototype.findTabNode=function(e){return-1!==this.tabBar.titles.indexOf(e.title)?this:null},e.prototype.findSplitNode=function(e){return null},e.prototype.findFirstTabNode=function(){return this},e.prototype.hitTestTabNodes=function(e,t){return e<this._left||e>=this._left+this._width||t<this._top||t>=this._top+this._height?null:this},e.prototype.createConfig=function(){return{type:"tab-area",widgets:this.tabBar.titles.map((function(e){return e.owner})),currentIndex:this.tabBar.currentIndex}},e.prototype.holdAllSizes=function(){},e.prototype.fit=function(e,t){var n=0,r=0,i=t.get(this.tabBar),o=this.tabBar.currentTitle,s=o?t.get(o.owner):void 0,a=this.sizers,l=a[0],c=a[1];return i&&i.fit(),s&&s.fit(),i&&!i.isHidden?(n=Math.max(n,i.minWidth),r+=i.minHeight,l.minSize=i.minHeight,l.maxSize=i.maxHeight):(l.minSize=0,l.maxSize=0),s&&!s.isHidden?(n=Math.max(n,s.minWidth),r+=s.minHeight,c.minSize=s.minHeight,c.maxSize=1/0):(c.minSize=0,c.maxSize=1/0),{minWidth:n,minHeight:r,maxWidth:1/0,maxHeight:1/0}},e.prototype.update=function(e,t,n,r,i,o){this._top=t,this._left=e,this._width=n,this._height=r;var s=o.get(this.tabBar),a=this.tabBar.currentTitle,l=a?o.get(a.owner):void 0;if(c.BoxEngine.calc(this.sizers,r),s&&!s.isHidden){var u=this.sizers[0].size;s.update(e,t,n,u),t+=u}if(l&&!l.isHidden){u=this.sizers[1].size;l.update(e,t,n,u)}},e}();e.TabLayoutNode=i;var o=function(){function e(e){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=e}return e.prototype.iterAllWidgets=function(){var e=s.map(this.children,(function(e){return e.iterAllWidgets()}));return new s.ChainIterator(e)},e.prototype.iterUserWidgets=function(){var e=s.map(this.children,(function(e){return e.iterUserWidgets()}));return new s.ChainIterator(e)},e.prototype.iterSelectedWidgets=function(){var e=s.map(this.children,(function(e){return e.iterSelectedWidgets()}));return new s.ChainIterator(e)},e.prototype.iterTabBars=function(){var e=s.map(this.children,(function(e){return e.iterTabBars()}));return new s.ChainIterator(e)},e.prototype.iterHandles=function(){var e=s.map(this.children,(function(e){return e.iterHandles()}));return s.chain(this.handles,new s.ChainIterator(e))},e.prototype.findTabNode=function(e){for(var t=0,n=this.children.length;t<n;++t){var r=this.children[t].findTabNode(e);if(r)return r}return null},e.prototype.findSplitNode=function(e){var t=this.handles.indexOf(e);if(-1!==t)return{index:t,node:this};for(var n=0,r=this.children.length;n<r;++n){var i=this.children[n].findSplitNode(e);if(i)return i}return null},e.prototype.findFirstTabNode=function(){return 0===this.children.length?null:this.children[0].findFirstTabNode()},e.prototype.hitTestTabNodes=function(e,t){for(var n=0,r=this.children.length;n<r;++n){var i=this.children[n].hitTestTabNodes(e,t);if(i)return i}return null},e.prototype.createConfig=function(){var e=this.orientation,t=this.createNormalizedSizes();return{type:"split-area",orientation:e,children:this.children.map((function(e){return e.createConfig()})),sizes:t}},e.prototype.syncHandles=function(){var e=this;s.each(this.handles,(function(t,n){t.setAttribute("data-orientation",e.orientation),n===e.handles.length-1?t.classList.add("p-mod-hidden"):t.classList.remove("p-mod-hidden")}))},e.prototype.holdSizes=function(){s.each(this.sizers,(function(e){e.sizeHint=e.size}))},e.prototype.holdAllSizes=function(){s.each(this.children,(function(e){return e.holdAllSizes()})),this.holdSizes()},e.prototype.normalizeSizes=function(){var e=this.sizers.length;if(0!==e){this.holdSizes();var t=s.reduce(this.sizers,(function(e,t){return e+t.sizeHint}),0);0===t?s.each(this.sizers,(function(t){t.size=t.sizeHint=1/e})):s.each(this.sizers,(function(e){e.size=e.sizeHint/=t})),this.normalized=!0}},e.prototype.createNormalizedSizes=function(){var e=this.sizers.length;if(0===e)return[];var t=this.sizers.map((function(e){return e.size})),n=s.reduce(t,(function(e,t){return e+t}),0);return 0===n?s.each(t,(function(n,r){t[r]=1/e})):s.each(t,(function(e,r){t[r]=e/n})),t},e.prototype.fit=function(e,t){for(var n="horizontal"===this.orientation,r=Math.max(0,this.children.length-1)*e,i=n?r:0,o=n?0:r,s=0,a=this.children.length;s<a;++s){var l=this.children[s].fit(e,t);n?(o=Math.max(o,l.minHeight),i+=l.minWidth,this.sizers[s].minSize=l.minWidth):(i=Math.max(i,l.minWidth),o+=l.minHeight,this.sizers[s].minSize=l.minHeight)}return{minWidth:i,minHeight:o,maxWidth:1/0,maxHeight:1/0}},e.prototype.update=function(e,t,n,r,i,o){var a="horizontal"===this.orientation,l=Math.max(0,this.children.length-1)*i,u=Math.max(0,(a?n:r)-l);this.normalized&&(s.each(this.sizers,(function(e){e.sizeHint*=u})),this.normalized=!1),c.BoxEngine.calc(this.sizers,u);for(var h=0,d=this.children.length;h<d;++h){var p=this.children[h],f=this.sizers[h].size,g=this.handles[h].style;a?(p.update(e,t,f,r,i,o),e+=f,g.top=t+"px",g.left=e+"px",g.width=i+"px",g.height=r+"px",e+=i):(p.update(e,t,n,f,i,o),t+=f,g.top=t+"px",g.left=e+"px",g.width=n+"px",g.height=i+"px",t+=i)}},e}();e.SplitLayoutNode=o}(o||(o={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(3),a=n(16),l=n(10),c=n(36),u=n(49),h=n(30),d=n(50),p=n(15),f=function(e){function t(t){var n=e.call(this)||this;return n._fixed=0,n._spacing=4,n._dirty=!1,n._hasNormedSizes=!1,n._sizers=[],n._items=[],n._handles=[],n._box=null,n._alignment="start",n._orientation="horizontal",n.renderer=t.renderer,void 0!==t.orientation&&(n._orientation=t.orientation),void 0!==t.alignment&&(n._alignment=t.alignment),void 0!==t.spacing&&(n._spacing=o.clampSpacing(t.spacing)),n}return i(t,e),t.prototype.dispose=function(){s.each(this._items,(function(e){e.dispose()})),this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"orientation",{get:function(){return this._orientation},set:function(e){this._orientation!==e&&(this._orientation=e,this.parent&&(this.parent.dataset.orientation=e,this.parent.fit()))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"alignment",{get:function(){return this._alignment},set:function(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){return this._spacing},set:function(e){e=o.clampSpacing(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"handles",{get:function(){return this._handles},enumerable:!0,configurable:!0}),t.prototype.relativeSizes=function(){return o.normalize(this._sizers.map((function(e){return e.size})))},t.prototype.setRelativeSizes=function(e){for(var t=this._sizers.length,n=e.slice(0,t);n.length<t;)n.push(0);for(var r=o.normalize(n),i=0;i<t;++i){var s=this._sizers[i];s.sizeHint=r[i],s.size=r[i]}this._hasNormedSizes=!0,this.parent&&this.parent.update()},t.prototype.moveHandle=function(e,t){var n,r=this._handles[e];if(r&&!r.classList.contains("p-mod-hidden")&&0!==(n="horizontal"===this._orientation?t-r.offsetLeft:t-r.offsetTop)){for(var i=0,o=this._sizers;i<o.length;i++){var s=o[i];s.size>0&&(s.sizeHint=s.size)}u.BoxEngine.adjust(this._sizers,e,n),this.parent&&this.parent.update()}},t.prototype.init=function(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,e.prototype.init.call(this)},t.prototype.attachWidget=function(e,t){var n=new h.LayoutItem(t),r=o.createHandle(this.renderer),i=o.averageSize(this._sizers),a=o.createSizer(i);s.ArrayExt.insert(this._items,e,n),s.ArrayExt.insert(this._sizers,e,a),s.ArrayExt.insert(this._handles,e,r),this.parent.isAttached&&l.MessageLoop.sendMessage(t,p.Widget.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.node.appendChild(r),this.parent.isAttached&&l.MessageLoop.sendMessage(t,p.Widget.Msg.AfterAttach),this.parent.fit()},t.prototype.moveWidget=function(e,t,n){s.ArrayExt.move(this._items,e,t),s.ArrayExt.move(this._sizers,e,t),s.ArrayExt.move(this._handles,e,t),this.parent.fit()},t.prototype.detachWidget=function(e,t){var n=s.ArrayExt.removeAt(this._items,e),r=s.ArrayExt.removeAt(this._handles,e);s.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&l.MessageLoop.sendMessage(t,p.Widget.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.node.removeChild(r),this.parent.isAttached&&l.MessageLoop.sendMessage(t,p.Widget.Msg.AfterDetach),n.dispose(),this.parent.fit()},t.prototype.onBeforeShow=function(t){e.prototype.onBeforeShow.call(this,t),this.parent.update()},t.prototype.onBeforeAttach=function(t){e.prototype.onBeforeAttach.call(this,t),this.parent.fit()},t.prototype.onChildShown=function(e){this.parent.fit()},t.prototype.onChildHidden=function(e){this.parent.fit()},t.prototype.onResize=function(e){this.parent.isVisible&&this._update(e.width,e.height)},t.prototype.onUpdateRequest=function(e){this.parent.isVisible&&this._update(-1,-1)},t.prototype.onFitRequest=function(e){this.parent.isAttached&&this._fit()},t.prototype._fit=function(){for(var e=0,n=-1,r=0,i=this._items.length;r<i;++r)this._items[r].isHidden?this._handles[r].classList.add("p-mod-hidden"):(this._handles[r].classList.remove("p-mod-hidden"),n=r,e++);-1!==n&&this._handles[n].classList.add("p-mod-hidden"),this._fixed=this._spacing*Math.max(0,e-1);var o="horizontal"===this._orientation,s=o?this._fixed:0,c=o?0:this._fixed;for(r=0,i=this._items.length;r<i;++r){var u=this._items[r],h=this._sizers[r];h.size>0&&(h.sizeHint=h.size),u.isHidden?(h.minSize=0,h.maxSize=0):(u.fit(),h.stretch=t.getStretch(u.widget),o?(h.minSize=u.minWidth,h.maxSize=u.maxWidth,s+=u.minWidth,c=Math.max(c,u.minHeight)):(h.minSize=u.minHeight,h.maxSize=u.maxHeight,c+=u.minHeight,s=Math.max(s,u.minWidth)))}var d=this._box=a.ElementExt.boxSizing(this.parent.node);s+=d.horizontalSum,c+=d.verticalSum;var f=this.parent.node.style;f.minWidth=s+"px",f.minHeight=c+"px",this._dirty=!0,this.parent.parent&&l.MessageLoop.sendMessage(this.parent.parent,p.Widget.Msg.FitRequest),this._dirty&&l.MessageLoop.sendMessage(this.parent,p.Widget.Msg.UpdateRequest)},t.prototype._update=function(e,t){this._dirty=!1;for(var n=0,r=0,i=this._items.length;r<i;++r)n+=+!this._items[r].isHidden;if(0!==n){e<0&&(e=this.parent.node.offsetWidth),t<0&&(t=this.parent.node.offsetHeight),this._box||(this._box=a.ElementExt.boxSizing(this.parent.node));var o,s=this._box.paddingTop,l=this._box.paddingLeft,c=e-this._box.horizontalSum,h=t-this._box.verticalSum,d="horizontal"===this._orientation;if(o=d?Math.max(0,c-this._fixed):Math.max(0,h-this._fixed),this._hasNormedSizes){for(var p=0,f=this._sizers;p<f.length;p++){f[p].sizeHint*=o}this._hasNormedSizes=!1}var g=u.BoxEngine.calc(this._sizers,o),m=0,_=0;if(g>0)switch(this._alignment){case"start":break;case"center":m=0,_=g/2;break;case"end":m=0,_=g;break;case"justify":m=g/n,_=0;break;default:throw"unreachable"}for(r=0,i=this._items.length;r<i;++r){var v=this._items[r];if(!v.isHidden){var y=this._sizers[r].size,b=this._handles[r].style;d?(v.update(l+_,s,y+m,h),l+=y+m,b.top=s+"px",b.left=l+_+"px",b.width=this._spacing+"px",b.height=h+"px",l+=this._spacing):(v.update(l,s+_,c,y+m),s+=y+m,b.top=s+_+"px",b.left=l+"px",b.width=c+"px",b.height=this._spacing+"px",s+=this._spacing)}}}},t}(d.PanelLayout);t.SplitLayout=f,function(e){e.getStretch=function(e){return o.stretchProperty.get(e)},e.setStretch=function(e,t){o.stretchProperty.set(e,t)}}(f=t.SplitLayout||(t.SplitLayout={})),t.SplitLayout=f,function(e){e.stretchProperty=new c.AttachedProperty({name:"stretch",create:function(){return 0},coerce:function(e,t){return Math.max(0,Math.floor(t))},changed:function(e){e.parent&&e.parent.layout instanceof f&&e.parent.fit()}}),e.createSizer=function(e){var t=new u.BoxSizer;return t.sizeHint=Math.floor(e),t},e.createHandle=function(e){var t=e.createHandle();return t.style.position="absolute",t},e.clampSpacing=function(e){return Math.max(0,Math.floor(e))},e.averageSize=function(e){return e.reduce((function(e,t){return e+t.size}),0)/e.length||0},e.normalize=function(e){var t=e.length;if(0===t)return[];var n=e.reduce((function(e,t){return e+Math.abs(t)}),0);return 0===n?e.map((function(e){return 1/t})):e.map((function(e){return e/n}))}}(o||(o={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),s=n(16),a=n(10),l=n(30),c=n(50),u=n(15),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._dirty=!1,t._items=[],t._box=null,t}return i(t,e),t.prototype.dispose=function(){o.each(this._items,(function(e){e.dispose()})),this._box=null,this._items.length=0,e.prototype.dispose.call(this)},t.prototype.attachWidget=function(e,t){o.ArrayExt.insert(this._items,e,new l.LayoutItem(t)),this.parent.isAttached&&a.MessageLoop.sendMessage(t,u.Widget.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&a.MessageLoop.sendMessage(t,u.Widget.Msg.AfterAttach),this.parent.fit()},t.prototype.moveWidget=function(e,t,n){o.ArrayExt.move(this._items,e,t),this.parent.update()},t.prototype.detachWidget=function(e,t){var n=o.ArrayExt.removeAt(this._items,e);this.parent.isAttached&&a.MessageLoop.sendMessage(t,u.Widget.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&a.MessageLoop.sendMessage(t,u.Widget.Msg.AfterDetach),n.widget.node.style.zIndex="",n.dispose(),this.parent.fit()},t.prototype.onBeforeShow=function(t){e.prototype.onBeforeShow.call(this,t),this.parent.update()},t.prototype.onBeforeAttach=function(t){e.prototype.onBeforeAttach.call(this,t),this.parent.fit()},t.prototype.onChildShown=function(e){this.parent.fit()},t.prototype.onChildHidden=function(e){this.parent.fit()},t.prototype.onResize=function(e){this.parent.isVisible&&this._update(e.width,e.height)},t.prototype.onUpdateRequest=function(e){this.parent.isVisible&&this._update(-1,-1)},t.prototype.onFitRequest=function(e){this.parent.isAttached&&this._fit()},t.prototype._fit=function(){for(var e=0,t=0,n=0,r=this._items.length;n<r;++n){var i=this._items[n];i.isHidden||(i.fit(),e=Math.max(e,i.minWidth),t=Math.max(t,i.minHeight))}var o=this._box=s.ElementExt.boxSizing(this.parent.node);e+=o.horizontalSum,t+=o.verticalSum;var l=this.parent.node.style;l.minWidth=e+"px",l.minHeight=t+"px",this._dirty=!0,this.parent.parent&&a.MessageLoop.sendMessage(this.parent.parent,u.Widget.Msg.FitRequest),this._dirty&&a.MessageLoop.sendMessage(this.parent,u.Widget.Msg.UpdateRequest)},t.prototype._update=function(e,t){this._dirty=!1;for(var n=0,r=0,i=this._items.length;r<i;++r)n+=+!this._items[r].isHidden;if(0!==n){e<0&&(e=this.parent.node.offsetWidth),t<0&&(t=this.parent.node.offsetHeight),this._box||(this._box=s.ElementExt.boxSizing(this.parent.node));var o=this._box.paddingTop,a=this._box.paddingLeft,l=e-this._box.horizontalSum,c=t-this._box.verticalSum;for(r=0,i=this._items.length;r<i;++r){var u=this._items[r];u.isHidden||(u.widget.node.style.zIndex=""+r,u.update(a,o,l,c))}}},t}(c.PanelLayout);t.StackedLayout=h},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(6),a=n(66),l=n(180),c=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,{layout:o.createLayout(t)})||this;return n._widgetRemoved=new s.Signal(n),n.addClass("p-StackedPanel"),n}return i(t,e),Object.defineProperty(t.prototype,"widgetRemoved",{get:function(){return this._widgetRemoved},enumerable:!0,configurable:!0}),t.prototype.onChildAdded=function(e){e.child.addClass("p-StackedPanel-child")},t.prototype.onChildRemoved=function(e){e.child.removeClass("p-StackedPanel-child"),this._widgetRemoved.emit(e.child)},t}(a.Panel);t.StackedPanel=c,function(e){e.createLayout=function(e){return e.layout||new l.StackedLayout}}(o||(o={}))},function(e,t,n){var r,i,o;
/*!
 * jQuery UI Widget 1.13.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */!function(s){"use strict";i=[n(11),n(51)],void 0===(o="function"==typeof(r=function(e){var t=0,n=Array.prototype.hasOwnProperty,r=Array.prototype.slice;return e.cleanData=function(t){return function(n){var r,i,o;for(o=0;null!=(i=n[o]);o++)(r=e._data(i,"events"))&&r.remove&&e(i).triggerHandler("remove");t(n)}}(e.cleanData),e.widget=function(t,n,r){var i,o,s,a={},l=t.split(".")[0],c=l+"-"+(t=t.split(".")[1]);return r||(r=n,n=e.Widget),Array.isArray(r)&&(r=e.extend.apply(null,[{}].concat(r))),e.expr.pseudos[c.toLowerCase()]=function(t){return!!e.data(t,c)},e[l]=e[l]||{},i=e[l][t],o=e[l][t]=function(e,t){if(!this||!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)},e.extend(o,i,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),(s=new n).options=e.widget.extend({},s.options),e.each(r,(function(e,t){a[e]="function"==typeof t?function(){function r(){return n.prototype[e].apply(this,arguments)}function i(t){return n.prototype[e].apply(this,t)}return function(){var e,n=this._super,o=this._superApply;return this._super=r,this._superApply=i,e=t.apply(this,arguments),this._super=n,this._superApply=o,e}}():t})),o.prototype=e.widget.extend(s,{widgetEventPrefix:i&&s.widgetEventPrefix||t},a,{constructor:o,namespace:l,widgetName:t,widgetFullName:c}),i?(e.each(i._childConstructors,(function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,o,n._proto)})),delete i._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,o,s=r.call(arguments,1),a=0,l=s.length;a<l;a++)for(i in s[a])o=s[a][i],n.call(s[a],i)&&void 0!==o&&(e.isPlainObject(o)?t[i]=e.isPlainObject(t[i])?e.widget.extend({},t[i],o):e.widget.extend({},o):t[i]=o);return t},e.widget.bridge=function(t,n){var i=n.prototype.widgetFullName||t;e.fn[t]=function(o){var s="string"==typeof o,a=r.call(arguments,1),l=this;return s?this.length||"instance"!==o?this.each((function(){var n,r=e.data(this,i);return"instance"===o?(l=r,!1):r?"function"!=typeof r[o]||"_"===o.charAt(0)?e.error("no such method '"+o+"' for "+t+" widget instance"):(n=r[o].apply(r,a))!==r&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0:e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+o+"'")})):l=void 0:(a.length&&(o=e.widget.extend.apply(null,[o].concat(a))),this.each((function(){var t=e.data(this,i);t?(t.option(o||{}),t._init&&t._init()):e.data(this,i,new n(o,this))}))),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(n,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=t++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},r!==this&&(e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),n),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,(function(e,n){t._removeClass(n,e)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var r,i,o,s=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(s={},r=t.split("."),t=r.shift(),r.length){for(i=s[t]=e.widget.extend({},this.options[t]),o=0;o<r.length-1;o++)i[r[o]]=i[r[o]]||{},i=i[r[o]];if(t=r.pop(),1===arguments.length)return void 0===i[t]?null:i[t];i[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=n}return this._setOptions(s),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var n,r,i;for(n in t)i=this.classesElementLookup[n],t[n]!==this.options.classes[n]&&i&&i.length&&(r=e(i.get()),this._removeClass(i,n),r.addClass(this._classes({element:r,keys:n,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){var n=[],r=this;function i(){var n=[];t.element.each((function(t,i){e.map(r.classesElementLookup,(function(e){return e})).some((function(e){return e.is(i)}))||n.push(i)})),r._on(e(n),{remove:"_untrackClassesElement"})}function o(o,s){var a,l;for(l=0;l<o.length;l++)a=r.classesElementLookup[o[l]]||e(),t.add?(i(),a=e(e.uniqueSort(a.get().concat(t.element.get())))):a=e(a.not(t.element).get()),r.classesElementLookup[o[l]]=a,n.push(o[l]),s&&t.classes[o[l]]&&n.push(t.classes[o[l]])}return(t=e.extend({element:this.element,classes:this.options.classes||{}},t)).keys&&o(t.keys.match(/\S+/g)||[],!0),t.extra&&o(t.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(t){var n=this;e.each(n.classesElementLookup,(function(r,i){-1!==e.inArray(t.target,i)&&(n.classesElementLookup[r]=e(i.not(t.target).get()))})),this._off(e(t.target))},_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,r){r="boolean"==typeof r?r:n;var i="string"==typeof e||null===e,o={extra:i?t:n,keys:i?e:t,element:i?this.element:e,add:r};return o.element.toggleClass(this._classes(o),r),this},_on:function(t,n,r){var i,o=this;"boolean"!=typeof t&&(r=n,n=t,t=!1),r?(n=i=e(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),e.each(r,(function(r,s){function a(){if(t||!0!==o.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof s?o[s]:s).apply(o,arguments)}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||e.guid++);var l=r.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+o.eventNamespace,u=l[2];u?i.on(c,u,a):n.on(c,a)}))},_off:function(t,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(n),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){var n=this;return setTimeout((function(){return("string"==typeof e?n[e]:e).apply(n,arguments)}),t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,n,r){var i,o,s=this.options[t];if(r=r||{},(n=e.Event(n)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(i in o)i in n||(n[i]=o[i]);return this.element.trigger(n,r),!("function"==typeof s&&!1===s.apply(this.element[0],[n].concat(r))||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},(function(t,n){e.Widget.prototype["_"+t]=function(r,i,o){var s;"string"==typeof i&&(i={effect:i});var a=i?!0===i||"number"==typeof i?n:i.effect||n:t;"number"==typeof(i=i||{})?i={duration:i}:!0===i&&(i={}),s=!e.isEmptyObject(i),i.complete=o,i.delay&&r.delay(i.delay),s&&e.effects&&e.effects.effect[a]?r[t](i):a!==t&&r[a]?r[a](i.duration,i.easing,o):r.queue((function(n){e(this)[t](),o&&o.call(r[0]),n()}))}})),e.widget})?r.apply(t,i):r)||(e.exports=o)}()},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(486)),r(n(184)),r(n(187)),r(n(101)),r(n(185)),r(n(186))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),s=n(10),a=function(e){function t(t){return void 0===t&&(t={}),e.call(this,{itemCmp:o.JSONExt.deepEqual,values:t.values})||this}return i(t,e),t.prototype.toJSON=function(){for(var e=Object.create(null),t=0,n=this.keys();t<n.length;t++){var r=n[t],i=this.get(r);void 0!==i&&(e[r]=o.JSONExt.deepCopy(i))}return e},t}(n(101).ObservableMap);t.ObservableJSON=a,function(e){var t=function(e){function t(t){var n=e.call(this,"jsonvalue-changed")||this;return n.args=t,n}return i(t,e),t}(s.Message);e.ChangeMessage=t}(a=t.ObservableJSON||(t.ObservableJSON={})),t.ObservableJSON=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=function(){function e(e){void 0===e&&(e=""),this._text="",this._isDisposed=!1,this._changed=new r.Signal(this),this._text=e}return Object.defineProperty(e.prototype,"type",{get:function(){return"String"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"changed",{get:function(){return this._changed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(e){e.length===this._text.length&&e===this._text||(this._text=e,this._changed.emit({type:"set",start:0,end:e.length,value:e}))},enumerable:!0,configurable:!0}),e.prototype.insert=function(e,t){this._text=this._text.slice(0,e)+t+this._text.slice(e),this._changed.emit({type:"insert",start:e,end:e+t.length,value:t})},e.prototype.remove=function(e,t){var n=this._text.slice(e,t);this._text=this._text.slice(0,e)+this._text.slice(t),this._changed.emit({type:"remove",start:e,end:t,value:n})},e.prototype.clear=function(){this.text=""},Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,r.Signal.clearData(this),this.clear())},e}();t.ObservableString=i},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),s=function(e){function t(t){var n=e.call(this)||this;return n._inCompound=!1,n._isUndoable=!0,n._madeCompoundChange=!1,n._index=-1,n._stack=[],n._serializer=t,n.changed.connect(n._onListChanged,n),n}return i(t,e),Object.defineProperty(t.prototype,"canRedo",{get:function(){return this._index<this._stack.length-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"canUndo",{get:function(){return this._index>=0},enumerable:!0,configurable:!0}),t.prototype.beginCompoundOperation=function(e){this._inCompound=!0,this._isUndoable=!1!==e,this._madeCompoundChange=!1},t.prototype.endCompoundOperation=function(){this._inCompound=!1,this._isUndoable=!0,this._madeCompoundChange&&this._index++},t.prototype.undo=function(){if(this.canUndo){var e=this._stack[this._index];this._isUndoable=!1;for(var t=0,n=e.reverse();t<n.length;t++){var r=n[t];this._undoChange(r)}this._isUndoable=!0,this._index--}},t.prototype.redo=function(){if(this.canRedo){this._index++;var e=this._stack[this._index];this._isUndoable=!1;for(var t=0,n=e;t<n.length;t++){var r=n[t];this._redoChange(r)}this._isUndoable=!0}},t.prototype.clearUndo=function(){this._index=-1,this._stack=[]},t.prototype._onListChanged=function(e,t){if(!this.isDisposed&&this._isUndoable){this._inCompound&&this._madeCompoundChange||(this._stack=this._stack.slice(0,this._index+1));var n=this._copyChange(t);this._stack[this._index+1]?this._stack[this._index+1].push(n):this._stack.push([n]),this._inCompound?this._madeCompoundChange=!0:this._index++}},t.prototype._undoChange=function(e){var t=this,n=0,r=this._serializer;switch(e.type){case"add":o.each(e.newValues,(function(){t.remove(e.newIndex)}));break;case"set":n=e.oldIndex,o.each(e.oldValues,(function(e){t.set(n++,r.fromJSON(e))}));break;case"remove":n=e.oldIndex,o.each(e.oldValues,(function(e){t.insert(n++,r.fromJSON(e))}));break;case"move":this.move(e.newIndex,e.oldIndex);break;default:return}},t.prototype._redoChange=function(e){var t=this,n=0,r=this._serializer;switch(e.type){case"add":n=e.newIndex,o.each(e.newValues,(function(e){t.insert(n++,r.fromJSON(e))}));break;case"set":n=e.newIndex,o.each(e.newValues,(function(n){t.set(e.newIndex++,r.fromJSON(n))}));break;case"remove":o.each(e.oldValues,(function(){t.remove(e.oldIndex)}));break;case"move":this.move(e.oldIndex,e.newIndex);break;default:return}},t.prototype._copyChange=function(e){var t=this,n=[];o.each(e.oldValues,(function(e){n.push(t._serializer.toJSON(e))}));var r=[];return o.each(e.newValues,(function(e){r.push(t._serializer.toJSON(e))})),{type:e.type,oldIndex:e.oldIndex,newIndex:e.newIndex,oldValues:n,newValues:r}},t}(n(187).ObservableList);t.ObservableUndoableList=s,function(e){var t=function(){function e(){}return e.prototype.toJSON=function(e){return e},e.prototype.fromJSON=function(e){return e},e}();e.IdentitySerializer=t}(s=t.ObservableUndoableList||(t.ObservableUndoableList={})),t.ObservableUndoableList=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(3),o=n(6),s=function(){function e(e){void 0===e&&(e={});var t=this;this._array=[],this._isDisposed=!1,this._changed=new o.Signal(this),void 0!==e.values&&i.each(e.values,(function(e){t._array.push(e)})),this._itemCmp=e.itemCmp||r.itemCmp}return Object.defineProperty(e.prototype,"type",{get:function(){return"List"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"changed",{get:function(){return this._changed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._array.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,o.Signal.clearData(this),this.clear())},e.prototype.iter=function(){return new i.ArrayIterator(this._array)},e.prototype.get=function(e){return this._array[e]},e.prototype.set=function(e,t){var n=this._array[e];if(void 0===t)throw new Error("Cannot set an undefined item");(0,this._itemCmp)(n,t)||(this._array[e]=t,this._changed.emit({type:"set",oldIndex:e,newIndex:e,oldValues:[n],newValues:[t]}))},e.prototype.push=function(e){var t=this._array.push(e);return this._changed.emit({type:"add",oldIndex:-1,newIndex:this.length-1,oldValues:[],newValues:[e]}),t},e.prototype.insert=function(e,t){i.ArrayExt.insert(this._array,e,t),this._changed.emit({type:"add",oldIndex:-1,newIndex:e,oldValues:[],newValues:[t]})},e.prototype.removeValue=function(e){var t=this._itemCmp,n=i.ArrayExt.findFirstIndex(this._array,(function(n){return t(n,e)}));return this.remove(n),n},e.prototype.remove=function(e){var t=i.ArrayExt.removeAt(this._array,e);if(void 0!==t)return this._changed.emit({type:"remove",oldIndex:e,newIndex:-1,newValues:[],oldValues:[t]}),t},e.prototype.clear=function(){var e=this._array.slice();this._array.length=0,this._changed.emit({type:"remove",oldIndex:0,newIndex:0,newValues:[],oldValues:e})},e.prototype.move=function(e,t){if(!(this.length<=1||e===t)){var n=[this._array[e]];i.ArrayExt.move(this._array,e,t),this._changed.emit({type:"move",oldIndex:e,newIndex:t,oldValues:n,newValues:n})}},e.prototype.pushAll=function(e){var t=this,n=this.length;return i.each(e,(function(e){t._array.push(e)})),this._changed.emit({type:"add",oldIndex:-1,newIndex:n,oldValues:[],newValues:i.toArray(e)}),this.length},e.prototype.insertAll=function(e,t){var n=this,r=e;i.each(t,(function(t){i.ArrayExt.insert(n._array,e++,t)})),this._changed.emit({type:"add",oldIndex:-1,newIndex:r,oldValues:[],newValues:i.toArray(t)})},e.prototype.removeRange=function(e,t){for(var n=this._array.slice(e,t),r=e;r<t;r++)i.ArrayExt.removeAt(this._array,e);return this._changed.emit({type:"remove",oldIndex:e,newIndex:-1,oldValues:n,newValues:[]}),this.length},e}();t.ObservableList=s,function(e){e.itemCmp=function(e,t){return e===t}}(r||(r={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),s=n(189),a=function(e){function t(t){var n=e.call(this)||this;return n.mimeType=t.mimeType,n.sanitizer=t.sanitizer,n.resolver=t.resolver,n.linkHandler=t.linkHandler,n.latexTypesetter=t.latexTypesetter,n.node.dataset.mimeType=n.mimeType,n}return i(t,e),t.prototype.renderModel=function(e){return this.toggleClass("jp-mod-trusted",e.trusted),this.render(e)},t}(o.Widget);t.RenderedCommon=a;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.addClass("jp-RenderedHTMLCommon"),n}return i(t,e),t}(a);t.RenderedHTMLCommon=l;var c=function(e){function t(t){var n=e.call(this,t)||this;return n.addClass("jp-RenderedHTML"),n}return i(t,e),t.prototype.render=function(e){return s.renderHTML({host:this.node,source:String(e.data[this.mimeType]),trusted:e.trusted,resolver:this.resolver,sanitizer:this.sanitizer,linkHandler:this.linkHandler,shouldTypeset:this.isAttached,latexTypesetter:this.latexTypesetter})},t.prototype.onAfterAttach=function(e){this.latexTypesetter&&this.latexTypesetter.typeset(this.node)},t}(l);t.RenderedHTML=c;var u=function(e){function t(t){var n=e.call(this,t)||this;return n.addClass("jp-RenderedLatex"),n}return i(t,e),t.prototype.render=function(e){return s.renderLatex({host:this.node,source:String(e.data[this.mimeType]),shouldTypeset:this.isAttached,latexTypesetter:this.latexTypesetter})},t.prototype.onAfterAttach=function(e){this.latexTypesetter&&this.latexTypesetter.typeset(this.node)},t}(a);t.RenderedLatex=u;var h=function(e){function t(t){var n=e.call(this,t)||this;return n.addClass("jp-RenderedImage"),n}return i(t,e),t.prototype.render=function(e){var t=e.metadata[this.mimeType];return s.renderImage({host:this.node,mimeType:this.mimeType,source:String(e.data[this.mimeType]),width:t&&t.width,height:t&&t.height,unconfined:t&&t.unconfined})},t}(a);t.RenderedImage=h;var d=function(e){function t(t){var n=e.call(this,t)||this;return n.addClass("jp-RenderedMarkdown"),n}return i(t,e),t.prototype.render=function(e){return s.renderMarkdown({host:this.node,source:String(e.data[this.mimeType]),trusted:e.trusted,resolver:this.resolver,sanitizer:this.sanitizer,linkHandler:this.linkHandler,shouldTypeset:this.isAttached,latexTypesetter:this.latexTypesetter})},t.prototype.onAfterAttach=function(e){this.latexTypesetter&&this.latexTypesetter.typeset(this.node)},t}(l);t.RenderedMarkdown=d;var p=function(e){function t(t){var n=e.call(this,t)||this;return n.addClass("jp-RenderedSVG"),n}return i(t,e),t.prototype.render=function(e){var t=e.metadata[this.mimeType];return s.renderSVG({host:this.node,source:String(e.data[this.mimeType]),trusted:e.trusted,resolver:this.resolver,linkHandler:this.linkHandler,shouldTypeset:this.isAttached,unconfined:t&&t.unconfined,latexTypesetter:this.latexTypesetter})},t.prototype.onAfterAttach=function(e){this.latexTypesetter&&this.latexTypesetter.typeset(this.node)},t}(a);t.RenderedSVG=p;var f=function(e){function t(t){var n=e.call(this,t)||this;return n.addClass("jp-RenderedText"),n}return i(t,e),t.prototype.render=function(e){return s.renderText({host:this.node,source:String(e.data[this.mimeType])})},t}(a);t.RenderedText=f;var g=function(e){function t(t){var n=e.call(this,t)||this;return n.addClass("jp-RenderedJavaScript"),n}return i(t,e),t.prototype.render=function(e){return s.renderText({host:this.node,source:"JavaScript output is disabled in JupyterLab"})},t}(a);t.RenderedJavaScript=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(490),o=n(491),s=n(7),a=n(18),l=n(190);t.renderHTML=function(e){var t=e.host,n=e.source,i=e.trusted,o=e.sanitizer,s=e.resolver,a=e.linkHandler,l=e.shouldTypeset,c=e.latexTypesetter;return n?(i||(n=o.sanitize(n)),t.innerHTML=n,t.getElementsByTagName("script").length>0&&console.warn("JupyterLab does not execute inline JavaScript in HTML output"),r.handleDefaults(t),(s?r.handleUrls(t,s,a):Promise.resolve(void 0)).then((function(){l&&c&&c.typeset(t)}))):(t.textContent="",Promise.resolve(void 0))},t.renderImage=function(e){var t=e.host,n=e.mimeType,r=e.source,i=e.width,o=e.height,s=e.unconfined;t.textContent="";var a=document.createElement("img");return a.src="data:"+n+";base64,"+r,"number"==typeof o&&(a.height=o),"number"==typeof i&&(a.width=i),!0===s&&a.classList.add("jp-mod-unconfined"),t.appendChild(a),Promise.resolve(void 0)},t.renderLatex=function(e){var t=e.host,n=e.source,r=e.shouldTypeset,i=e.latexTypesetter;return t.textContent=n,r&&i&&i.typeset(t),Promise.resolve(void 0)},t.renderMarkdown=function(e){var t=e.host,n=e.source,i=e.trusted,o=e.sanitizer,s=e.resolver,a=e.linkHandler,c=e.latexTypesetter,u=e.shouldTypeset;if(!n)return t.textContent="",Promise.resolve(void 0);var h=l.removeMath(n);return r.renderMarked(h.text).then((function(e){return e=l.replaceMath(e,h.math),i||(e=o.sanitize(e)),t.innerHTML=e,t.getElementsByTagName("script").length>0&&console.warn("JupyterLab does not execute inline JavaScript in HTML output"),r.handleDefaults(t),r.headerAnchors(t),s?r.handleUrls(t,s,a):Promise.resolve(void 0)})).then((function(){u&&c&&c.typeset(t)}))},t.renderSVG=function(e){var t=e.host,n=e.source,i=e.trusted,o=e.resolver,s=e.linkHandler,a=e.shouldTypeset,l=e.latexTypesetter,c=e.unconfined;return n?i?(t.innerHTML=n,!0===c&&t.classList.add("jp-mod-unconfined"),(o?r.handleUrls(t,o,s):Promise.resolve(void 0)).then((function(){a&&l&&l.typeset(t)}))):(t.textContent="Cannot display an untrusted SVG. Maybe you need to run the cell?",Promise.resolve(void 0)):(t.textContent="",Promise.resolve(void 0))},t.renderText=function(e){var t=e.host,n=e.source,r=i.escape_for_html(n),o=i.ansi_to_html(r,{use_classes:!0});return t.innerHTML="<pre>"+o+"</pre>",Promise.resolve(void 0)},function(e){function t(e,t,n){var r=e.getAttribute(t);return r&&"data:"!==a.URLExt.parse(r).protocol?(e.setAttribute(t,""),n.resolveUrl(r).then((function(e){return n.getDownloadUrl(e)})).then((function(n){e.setAttribute(t,n)})).catch((function(n){e.setAttribute(t,"")}))):Promise.resolve(void 0)}function n(e,t,n){var r=e.getAttribute("href");if(!r||-1!==r.indexOf("://")&&0===r.indexOf("//"))return Promise.resolve(void 0);var i=e.hash;if(i){if(i===r)return e.target="_self",Promise.resolve(void 0);r=r.replace(i,"")}return t.resolveUrl(r).then((function(r){return n&&a.URLExt.isLocal(r)&&n.handleLink(e,r),t.getDownloadUrl(r)})).then((function(t){e.href=t+i})).catch((function(t){e.href=""}))}e.renderMarked=function(e){return function(){if(r)return;r=!0,o.setOptions({gfm:!0,sanitize:!1,tables:!0,langPrefix:"cm-s-"+s.CodeMirrorEditor.defaultConfig.theme+" language-",highlight:function(e,t,n){var r=function(e,t){return n&&n(e,t),t};return t?(s.Mode.ensure(t).then((function(n){var i=document.createElement("div");if(!n)return console.log("No CodeMirror mode: "+t),r(null,e);try{return s.Mode.run(e,n.mime,i),r(null,i.innerHTML)}catch(n){return console.log("Failed to highlight "+t+" code",n),r(n,e)}})).catch((function(n){return console.log("No CodeMirror mode: "+t),console.log("Require CodeMirror mode error: "+n),r(null,e)})),e):r(null,e)}})}(),new Promise((function(t,n){o(e,(function(e,r){e?n(e):t(r)}))}))},e.handleDefaults=function(e){for(var t=e.getElementsByTagName("a"),n=0;n<t.length;n++){var r=t[n].href;a.URLExt.isLocal(r)?t[n].target="_self":t[n].target="_blank"}var i=e.getElementsByTagName("img");for(n=0;n<i.length;n++)i[n].alt||(i[n].alt="Image")},e.handleUrls=function(e,r,i){for(var o=[],s=e.querySelectorAll("*[src]"),a=0;a<s.length;a++)o.push(t(s[a],"src",r));var l=e.getElementsByTagName("a");for(a=0;a<l.length;a++)o.push(n(l[a],r,i));var c=e.getElementsByTagName("link");for(a=0;a<c.length;a++)o.push(t(c[a],"href",r));return Promise.all(o).then((function(){}))},e.headerAnchors=function(e){for(var t=0,n=["h1","h2","h3","h4","h5","h6"];t<n.length;t++)for(var r=n[t],i=e.getElementsByTagName(r),o=0;o<i.length;o++){var s=i[o];s.id=s.innerHTML.replace(/ /g,"-");var a=document.createElement("a");a.target="_self",a.textContent="¶",a.href="#"+s.id,a.classList.add("jp-InternalAnchorLink"),s.appendChild(a)}};var r=!1}(r||(r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=/(\$\$?|\\(?:begin|end)\{[a-z]*\*?\}|\\[{}$]|[{}]|(?:\n\s*)+|@@\d+@@|\\\\(?:\(|\)|\[|\]))/i;function i(e,t,n,r,i){var o=i.slice(e,t+1).join("").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");for(navigator&&"Microsoft Internet Explorer"===navigator.appName&&(o=o.replace(/(%[^\n]*)\n/g,"$1<br/>\n"));t>e;)i[t]="",t--;return i[e]="@@"+r.length+"@@",n&&(o=n(o)),r.push(o),i}t.removeMath=function(e){var t,n=[],o=null,s=null,a=null,l=0;/`/.test(e)?(e=e.replace(/~/g,"~T").replace(/(^|[^\\])(`+)([^\n]*?[^`\n])\2(?!`)/gm,(function(e){return e.replace(/\$/g,"~D")})),t=function(e){return e.replace(/~([TD])/g,(function(e,t){return"T"===t?"~":"$"}))}):t=function(e){return e};for(var c=e.replace(/\r\n?/g,"\n").split(r),u=1,h=c.length;u<h;u+=2){var d=c[u];"@"===d.charAt(0)?(c[u]="@@"+n.length+"@@",n.push(d)):null!==o?d===s?l?a=u:(c=i(o,u,t,n,c),o=null,s=null,a=null):d.match(/\n.*\n/)?(null!==a&&(c=i(o,u=a,t,n,c)),o=null,s=null,a=null,l=0):"{"===d?l++:"}"===d&&l&&l--:"$"===d||"$$"===d?(o=u,s=d,l=0):"\\\\("===d||"\\\\["===d?(o=u,s="("===d.slice(-1)?"\\\\)":"\\\\]",l=0):"begin"===d.substr(1,5)&&(o=u,s="\\end"+d.substr(6),l=0)}return null!==o&&null!==a&&(c=i(o,a,t,n,c),o=null,s=null,a=null),{text:t(c.join("")),math:n}},t.replaceMath=function(e,t){return e.replace(/@@(\d+)@@/g,(function(e,n){var r=t[n];return"\\\\("===r.substr(0,3)&&"\\\\)"===r.substr(r.length-3)?r="\\("+r.substring(3,r.length-3)+"\\)":"\\\\["===r.substr(0,3)&&"\\\\]"===r.substr(r.length-3)&&(r="\\["+r.substring(3,r.length-3)+"\\]"),r}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e){void 0===e&&(e={}),this.trusted=!!e.trusted,this._data=e.data||{},this._metadata=e.metadata||{},this._callback=e.callback||r.noOp}return Object.defineProperty(e.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this._metadata},enumerable:!0,configurable:!0}),e.prototype.setData=function(e){this._data=e.data||this._data,this._metadata=e.metadata||this._metadata,this._callback(e)},e}();t.MimeModel=i,function(e){e.noOp=function(){}}(r||(r={}))},function(e,t,n){var r=n(9),i=n(1),o=n(0),s=n(13);Math.log10=Math.log10||function(e){return Math.log(e)/Math.LN10};var a=["em","ex","px"],l=r.WidgetView.extend({initialize:function(){this.setElement(document.createElementNS(i.ns.prefix.svg,"g")),this.d3el=i.select(this.el),l.__super__.initialize.apply(this,arguments)},render:function(){this.d3el.style("display",this.model.get("visible")?"inline":"none"),this.parent=this.options.parent,this.margin=this.parent.margin,this.height=this.parent.height-(this.margin.top+this.margin.bottom),this.width=this.parent.width-(this.margin.left+this.margin.right);var e=this.set_scale_promise(this.model.get("scale")),t=this.get_offset_promise(),n=this;Promise.all([e,t]).then((function(){n.create_listeners(),n.tick_format=n.generate_tick_formatter(),n.set_scales_range(),n.append_axis()}))},create_listeners:function(){this.listenTo(this.model,"change:scale",(function(e,t){this.update_scale(e.previous("scale"),t),this.axis.scale(this.axis_scale.scale),this.rescale_axis()}),this),this.listenTo(this.model,"change:tick_values",this.set_tick_values,this),this.listenTo(this.model,"change:tick_format",this.tickformat_changed,this),this.listenTo(this.model,"change:num_ticks",this.set_tick_values,this),this.listenTo(this.model,"change:tick_rotate",this.apply_tick_styling,this),this.listenTo(this.model,"change:tick_style",this.apply_tick_styling,this),this.model.on_some_change(["label","label_color"],this.update_label,this),this.listenTo(this.model,"change:color",this.update_color,this),this.model.on_some_change(["grid_color","grid_lines"],this.update_grid_lines,this),this.listenTo(this.model,"change:label_location",this.update_label_location,this),this.listenTo(this.model,"change:label_offset",this.update_label_offset,this),this.listenTo(this.model,"change:visible",this.update_visibility,this),this.model.on_some_change(["side","orientation"],this.update_display,this),this.listenTo(this.model,"change:offset",this.update_offset,this),this.parent.on("margin_updated",this.parent_margin_updated,this)},update_offset:function(){var e=this.get_offset_promise(),t=this;e.then((function(){t.set_scales_range(),t.update_offset_scale_domain(),t.g_axisline.attr("transform",t.get_axis_transform()),t.update_grid_lines()}))},update_display:function(){var e=this.model.get("side");"vertical"===this.model.get("orientation")?this.axis.orient("right"===e?"right":"left"):this.axis.orient("top"===e?"top":"bottom"),this.rescale_axis()},set_tick_values:function(e){var t=this.model.get_typed_field("tick_values"),n=[],r=this.model.get("num_ticks");if(null!=t&&t.length>0)this.axis.tickValues(this.get_ticks_from_array_or_length(t));else if(null!=r)this.axis.tickValues(this.get_ticks_from_array_or_length());else if("ordinal"===this.axis_scale.model.type)this.axis.tickValues(this.axis_scale.scale.domain());else if("log"===this.axis_scale.model.type){var i,o,s=this.axis_scale.scale.ticks(),a=Math.abs(Math.log10(this.axis_scale.scale.domain()[1]/this.axis_scale.scale.domain()[0]));if(a<2)this.axis.tickValues(s);else if(a<7){for(n=[],i=0;i<s.length;i++)o=Math.abs(Math.log10(s[i])%1),(Math.abs(o)<.001||Math.abs(o-1)<.001||Math.abs(o-.30103)<.001||Math.abs(o-.69897)<.001)&&n.push(s[i]);this.axis.tickValues(n)}else{n=[];var l=Math.round(a/10);for(i=0;i<s.length;i++)o=Math.abs(Math.log10(s[i])%l),(Math.abs(o)<.001||Math.abs(o-l)<.001)&&n.push(s[i]);this.axis.tickValues(n)}}else this.axis.tickValues(this.axis_scale.scale.ticks());null!==this.model.get("tick_format")&&void 0!==this.model.get("tick_format")||"ordinal"!==this.axis_scale.type&&(this.tick_format=this.guess_tick_format(this.axis.tickValues())),this.axis.tickFormat(this.tick_format),this.g_axisline&&(this.g_axisline.transition("set_tick_values").duration(!0===e?this.parent.model.get("animation_duration"):0).call(this.axis),this.apply_tick_styling())},tickformat_changed:function(){this.tick_format=this.generate_tick_formatter(),this.axis.tickFormat(this.tick_format),this.g_axisline&&this.g_axisline.call(this.axis),this.apply_tick_styling()},apply_tick_styling:function(){this.g_axisline.selectAll(".tick text").style(this.model.get("tick_style")).attr("transform",this.get_tick_transforms())},get_tick_transforms:function(){return`rotate(${this.model.get("tick_rotate")})`},update_scales:function(){this.update_scale_domain(),this.update_offset_scale_domain()},update_scale_domain:function(){var e="vertical"===this.model.get("orientation"),t=e?this.parent.padded_range("y",this.axis_scale.model):this.parent.padded_range("x",this.axis_scale.model),n=e?this.parent.range("y"):this.parent.range("x");this.axis_scale.expand_domain(t,n),this.axis.scale(this.axis_scale.scale)},update_offset_scale_domain:function(){var e="vertical"===this.model.get("orientation");if(this.offset_scale){var t=e?this.parent.padded_range("x",this.offset_scale.model):this.parent.padded_range("y",this.offset_scale.model),n=e?this.parent.range("x"):this.parent.range("y");this.offset_scale.expand_domain(t,n)}},generate_tick_formatter:function(){if("date"===this.axis_scale.model.type||"date_color_linear"===this.axis_scale.model.type)return this.model.get("tick_format")?i.time.format(this.model.get("tick_format")):this.guess_tick_format();if("ordinal"===this.axis_scale.model.type){var e=this.model.get("tick_format");return e?s.is_valid_time_format(e)?i.time.format(e):i.format(e):function(e){return e}}return this.model.get("tick_format")?i.format(this.model.get("tick_format")):this.guess_tick_format()},set_scales_range:function(){var e="vertical"===this.model.get("orientation");this.axis_scale.set_range(e?[this.height,0]:[0,this.width]),this.offset_scale&&this.offset_scale.set_range(e?[0,this.width]:[this.height,0])},create_axis:function(){var e="vertical"===this.model.get("orientation"),t=this.model.get("side");this.axis=e?i.svg.axis().scale(this.axis_scale.scale).orient("right"===t?"right":"left"):i.svg.axis().scale(this.axis_scale.scale).orient("top"===t?"top":"bottom")},append_axis:function(){this.create_axis(),this.update_scales(),this.g_axisline=this.d3el.append("g").attr("class","axis").attr("transform",this.get_axis_transform()).call(this.axis),this.g_axisline.append("text").attr("class","axislabel").attr(this.get_label_attributes()).style(this.get_text_styling()).text(this.model.get("label")),this.set_tick_values(),this.update_grid_lines(),this.update_color(),this.apply_tick_styling(),this.update_label()},get_offset_promise:function(){var e=this,t=Promise.resolve(),n=this.model.get("offset"),r="vertical"===this.model.get("orientation");return void 0!==n.value&&null!==n.value?(void 0===n.scale?this.offset_scale=r?this.parent.scale_x:this.parent.scale_y:t=this.create_child_view(n.scale).then((function(t){e.offset_scale=t,"ordinal"!==e.offset_scale.model.type&&e.offset_scale.scale.clamp(!0),e.offset_scale.on("domain_changed",(function(){this.update_offset_scale_domain(),this.g_axisline.attr("transform",this.get_axis_transform()),this.update_grid_lines()}),e)})),this.offset_value=n.value):this.offset_scale=this.offset_value=void 0,t},highlight:function(){this.g_axisline.classed("axisbold",!0)},unhighlight:function(){this.g_axisline.classed("axisbold",!1)},get_basic_transform:function(){var e="vertical"===this.model.get("orientation"),t=this.model.get("side");return e?"right"===t?this.width:0:"top"===t?0:this.height},get_axis_transform:function(){return"vertical"===this.model.get("orientation")?"translate("+this.process_offset()+", 0)":"translate(0, "+this.process_offset()+")"},process_offset:function(){if(void 0===this.offset_scale||null===this.offset_scale)return this.get_basic_transform();var e=this.offset_scale.scale(this.offset_value);return e=void 0===e?this.get_basic_transform():e,this.offset_scale.offset+e},get_label_attributes:function(){var e=0,t=this.model.get("label_location"),n=this.calculate_label_offset(),r="vertical"===this.model.get("orientation"),i=this.model.get("side");return r?("start"===t?e=-this.height:"middle"===t&&(e=-this.height/2),"right"===i?{transform:"rotate(-90)",x:e,y:n,dy:"1ex",dx:"0em"}:{transform:"rotate(-90)",x:e,y:n,dy:"0em",dx:"0em"}):("middle"===t?e=this.width/2:"end"===t&&(e=this.width),"top"===i?{x:e,y:n,dy:"0.75ex",dx:"0em",transform:""}:{x:e,y:n,dy:"0.25ex",dx:"0em",transform:""})},get_text_styling:function(){var e=this.model.get("label_location");return"start"===e?{"text-anchor":"start"}:"end"===e?{"text-anchor":"end"}:{"text-anchor":"middle"}},update_label:function(){this.g_axisline.select("text.axislabel").text(this.model.get("label")),this.d3el.selectAll(".axislabel").selectAll("text"),""!==this.model.get("label_color")&&null!==this.model.get("label_color")&&(this.g_axisline.select("text.axislabel").style("fill",this.model.get("label_color")),this.d3el.selectAll(".axislabel").selectAll("text").style("fill",this.model.get("label_color")))},update_label_location:function(){this.g_axisline.select("text.axislabel").attr(this.get_label_attributes()).style(this.get_text_styling())},update_label_offset:function(e,t){this.label_offset=this.calculate_label_offset(),this.g_axisline.select("text.axislabel").attr("y",this.label_offset)},calculate_label_offset:function(){var e=this.model.get("label_offset"),t="vertical"===this.model.get("orientation"),n=this.model.get("side");e||(e=t?"4ex":"2em");for(var r=-1,i=0;i<a.length&&-1===r;i++)r=e.indexOf(a[i]);if(-1===r)return e;if("top"===n||"left"===n){var o=-1*parseInt(e.substring(0,r));e=o+e.substring(r)}return e},update_grid_lines:function(e){var t=this.model.get("grid_lines"),n=this.model.get("side"),r=this.model.get("orientation"),i="vertical"!==r,o=!0===e?this.parent.model.get("animation_duration"):0,s="vertical"===r?-this.width:-this.height,a=0;if(this.offset_scale){var l=this.offset_scale.scale(this.offset_value);"bottom"===n||"right"==n?(s=-l,a=i?this.height-l:this.width-l):(s+=l,a=-l)}"none"!==t?this.axis.innerTickSize(s).outerTickSize(6):this.axis.tickSize(6),this.g_axisline.selectAll(".tick").classed("short","none"===t),this.g_axisline.transition("update_grid_lines").duration(o).call(this.axis).selectAll(".tick line").attr(i?"y1":"x1",this.offset_scale&&"none"!==t?a:null).style("stroke-dasharray","dashed"===t?"5, 5":null),this.apply_tick_styling(),this.model.get("grid_color")&&this.g_axisline.selectAll(".tick line").style("stroke",this.model.get("grid_color"))},update_color:function(){this.model.get("color")&&(this.d3el.selectAll(".tick").selectAll("text").style("fill",this.model.get("color")),this.d3el.selectAll(".domain").style("stroke",this.model.get("color")))},redraw_axisline:function(){this.update_scales();this.set_tick_values(!0),this.update_grid_lines(!0)},rescale_axis:function(){this.set_scales_range(),this.update_axis_domain(),this.update_scales(),this.g_axisline.attr("transform",this.get_axis_transform()),this.g_axisline.call(this.axis),this.g_axisline.select("text.axislabel").attr(this.get_label_attributes()).style(this.get_text_styling()),this.set_tick_values(),this.update_grid_lines(),this.apply_tick_styling()},update_axis_domain:function(){var e=this.vertical?this.parent.padded_range("y",this.axis_scale.model):this.parent.padded_range("x",this.axis_scale.model),t=this.vertical?this.parent.range("y"):this.parent.range("x");this.axis_scale.expand_domain(e,t),this.axis.scale(this.axis_scale.scale)},parent_margin_updated:function(){this.margin=this.parent.margin,this.width=this.parent.width-this.margin.left-this.margin.right,this.height=this.parent.height-this.margin.top-this.margin.bottom,this.rescale_axis()},update_visibility:function(e,t){this.d3el.style("display",t?"inline":"none")},get_ticks_from_array_or_length:function(e){var t,n,r=this.model.get("num_ticks");if("ordinal"===this.axis_scale.model.type&&(e=this.axis_scale.scale.domain()),null!=r&&r<2)return[];if(e)return null==r||null==r||e.length<=r?e:(t=Math.floor(e.length/(r-1)),o.range(0,e.length,t).map((function(t){return e[t]})));var i=this.axis_scale.scale.domain(),s=this.axis_scale.scale.domain().length-1;return t=(i[s]-i[0])/(r-1),"date"===this.axis_scale.model.type||"date_color_linear"===this.axis_scale.model.type?(i[0]=i[0].getTime(),i[s]=i[s].getTime(),n=i[s]+.5*t,o.range(i[0],n,t).map((function(e){return new Date(e)}))):(n=i[s]+.5*t,o.range(i[0],n,t))},set_scale_promise:function(e){var t=this;return this.axis_scale&&this.axis_scale.remove(),this.create_child_view(e).then((function(e){t.displayed.then((function(){e.trigger("displayed")})),t.axis_scale=e,t.axis_scale.on("domain_changed",t.redraw_axisline,t),t.axis_scale.on("highlight_axis",t.highlight,t),t.axis_scale.on("unhighlight_axis",t.unhighlight,t)}))},update_scale:function(e,t){this.axis_scale.off(),this.set_scale_promise(t)},_get_digits:function(e){return 0===e?1:Math.floor(Math.log10(Math.abs(e)))+1},_replace_trailing_zeros:function(e){var t=e.search("e");return-1!=t?e.substring(0,t).replace(/(\.[0-9]*?)0+$/gi,"$1").replace(/\.$/,"")+e.substring(t):e.replace(/(\.[0-9]*?)0+$/gi,"$1").replace(/\.$/,"")},get_format_func:function(e){if(0===e)return function(e){return i.format("d")(Math.round(e))};var t=-1==e?"":"."+e,n=this;return function(e){var r=i.format(t+"g")(e);if(r.replace(/-|\.|e/gi,"").length<6)return n._replace_trailing_zeros(r);if(""===t){var o=i.format(t+"e")(e);return o.length>=7&&(o=i.format(".6e")(e)),n._replace_trailing_zeros(o)}return n._replace_trailing_zeros(i.format(t+"e")(e))}},_linear_scale_precision:function(e){e=null==e?this.axis_scale.scale.ticks():e;var t=Math.abs(e[1]-e[0]),n=Math.max(Math.abs(e[0]),Math.abs(e[e.length-1])),r=this._get_digits(n),i=this._get_digits(t),o=Math.abs(r-i);return r>=0&&i>0?r<=6?0:Math.min(o,6)+1:i<=0?Math.min(Math.abs(i)+r,6)+1:void 0},linear_sc_format:function(e){return this.get_format_func(this._linear_scale_precision(e))},date_sc_format:function(e){e=null==e?this.axis_scale.scale.ticks():e;var t=Math.abs(e[1]-e[0]),n=1e3;return 0===Math.floor(t/n)?[[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return!0}]]:0===Math.floor(t/(n*=60))?[[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return!0}]]:0===Math.floor(t/(n*=60))?[["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return!0}]]:0===Math.floor(t/(n*=24))?[["%I %p",function(e){return e.getHours()}],["%b %d",function(e){return!0}]]:0===Math.floor(t/(n*=27))?[["%b %d",function(e){return 1!==e.getDate()}],["%b %Y",function(e){return!0}]]:0===Math.floor(t/(n*=12))?[["%b %d",function(e){return 1!==e.getDate()}],["%b %Y",function(){return!0}]]:[["%b %d",function(e){return 1!==e.getDate()}],["%b %Y",function(e){return e.getMonth()}],["%Y",function(){return!0}]]},log_sc_format:function(e){return this.get_format_func(this._log_sc_precision(e))},_log_sc_precision:function(e){return e=null==e?this.axis_scale.scale.ticks():e,Math.abs(Math.log10(e[1]/e[0]))>=.301?-1:3},guess_tick_format:function(e){return"linear"==this.axis_scale.model.type||"color_linear"==this.axis_scale.model.type?this.linear_sc_format(e):"date"==this.axis_scale.model.type||"date_color_linear"==this.axis_scale.model.type?i.time.format.multi(this.date_sc_format(e)):"log"==this.axis_scale.model.type?this.log_sc_format(e):void 0}});e.exports={Axis:l}},function(e,t,n){var r=n(1),i=n(0),o=n(69).Scale.extend({render:function(){this.scale=r.scale.ordinal(),this.scale.domain(this.model.domain),this.offset=0,this.create_event_listeners()},set_range:function(e,t){t=void 0===t?0:t,this.scale.rangeBands(e,t,t/2),this.offset=0===this.scale.domain().length?0:this.scale.rangeBand()/2},expand_domain:function(e,t){var n=this.scale.copy();n.rangeBands(e);var r=n.range().length>0?Math.abs((t[1]-e[1])/n.rangeBand()):0;this.scale.rangeBands(t,0,r)},invert:function(e){var t=this,n=this.scale.domain(),i=n.map((function(e){return t.scale(e)+t.scale.rangeBand()/2})).map((function(t){return Math.abs(e-t)}));return n[i.indexOf(r.min(i))]},invert_range:function(e){var t=this,n=this.scale.domain(),r=n.map((function(e){return t.scale(e)+t.scale.rangeBand()/2}));return i.range(r.length).filter((function(t){return r[t]>=e[0]&&r[t]<=e[1]})).map((function(e){return n[e]}))}});e.exports={OrdinalScale:o}},function(e,t){e.exports={Spectral:{3:["rgb(252,141,89)","rgb(255,255,191)","rgb(153,213,148)"],4:["rgb(215,25,28)","rgb(253,174,97)","rgb(171,221,164)","rgb(43,131,186)"],5:["rgb(215,25,28)","rgb(253,174,97)","rgb(255,255,191)","rgb(171,221,164)","rgb(43,131,186)"],6:["rgb(213,62,79)","rgb(252,141,89)","rgb(254,224,139)","rgb(230,245,152)","rgb(153,213,148)","rgb(50,136,189)"],7:["rgb(213,62,79)","rgb(252,141,89)","rgb(254,224,139)","rgb(255,255,191)","rgb(230,245,152)","rgb(153,213,148)","rgb(50,136,189)"],8:["rgb(213,62,79)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(230,245,152)","rgb(171,221,164)","rgb(102,194,165)","rgb(50,136,189)"],9:["rgb(213,62,79)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(255,255,191)","rgb(230,245,152)","rgb(171,221,164)","rgb(102,194,165)","rgb(50,136,189)"],10:["rgb(158,1,66)","rgb(213,62,79)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(230,245,152)","rgb(171,221,164)","rgb(102,194,165)","rgb(50,136,189)","rgb(94,79,162)"],11:["rgb(158,1,66)","rgb(213,62,79)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(255,255,191)","rgb(230,245,152)","rgb(171,221,164)","rgb(102,194,165)","rgb(50,136,189)","rgb(94,79,162)"],type:"div"},RdYlGn:{3:["rgb(252,141,89)","rgb(255,255,191)","rgb(145,207,96)"],4:["rgb(215,25,28)","rgb(253,174,97)","rgb(166,217,106)","rgb(26,150,65)"],5:["rgb(215,25,28)","rgb(253,174,97)","rgb(255,255,191)","rgb(166,217,106)","rgb(26,150,65)"],6:["rgb(215,48,39)","rgb(252,141,89)","rgb(254,224,139)","rgb(217,239,139)","rgb(145,207,96)","rgb(26,152,80)"],7:["rgb(215,48,39)","rgb(252,141,89)","rgb(254,224,139)","rgb(255,255,191)","rgb(217,239,139)","rgb(145,207,96)","rgb(26,152,80)"],8:["rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(217,239,139)","rgb(166,217,106)","rgb(102,189,99)","rgb(26,152,80)"],9:["rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(255,255,191)","rgb(217,239,139)","rgb(166,217,106)","rgb(102,189,99)","rgb(26,152,80)"],10:["rgb(165,0,38)","rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(217,239,139)","rgb(166,217,106)","rgb(102,189,99)","rgb(26,152,80)","rgb(0,104,55)"],11:["rgb(165,0,38)","rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(255,255,191)","rgb(217,239,139)","rgb(166,217,106)","rgb(102,189,99)","rgb(26,152,80)","rgb(0,104,55)"],type:"div"},RdBu:{3:["rgb(239,138,98)","rgb(247,247,247)","rgb(103,169,207)"],4:["rgb(202,0,32)","rgb(244,165,130)","rgb(146,197,222)","rgb(5,113,176)"],5:["rgb(202,0,32)","rgb(244,165,130)","rgb(247,247,247)","rgb(146,197,222)","rgb(5,113,176)"],6:["rgb(178,24,43)","rgb(239,138,98)","rgb(253,219,199)","rgb(209,229,240)","rgb(103,169,207)","rgb(33,102,172)"],7:["rgb(178,24,43)","rgb(239,138,98)","rgb(253,219,199)","rgb(247,247,247)","rgb(209,229,240)","rgb(103,169,207)","rgb(33,102,172)"],8:["rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(209,229,240)","rgb(146,197,222)","rgb(67,147,195)","rgb(33,102,172)"],9:["rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(247,247,247)","rgb(209,229,240)","rgb(146,197,222)","rgb(67,147,195)","rgb(33,102,172)"],10:["rgb(103,0,31)","rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(209,229,240)","rgb(146,197,222)","rgb(67,147,195)","rgb(33,102,172)","rgb(5,48,97)"],11:["rgb(103,0,31)","rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(247,247,247)","rgb(209,229,240)","rgb(146,197,222)","rgb(67,147,195)","rgb(33,102,172)","rgb(5,48,97)"],type:"div"},PiYG:{3:["rgb(233,163,201)","rgb(247,247,247)","rgb(161,215,106)"],4:["rgb(208,28,139)","rgb(241,182,218)","rgb(184,225,134)","rgb(77,172,38)"],5:["rgb(208,28,139)","rgb(241,182,218)","rgb(247,247,247)","rgb(184,225,134)","rgb(77,172,38)"],6:["rgb(197,27,125)","rgb(233,163,201)","rgb(253,224,239)","rgb(230,245,208)","rgb(161,215,106)","rgb(77,146,33)"],7:["rgb(197,27,125)","rgb(233,163,201)","rgb(253,224,239)","rgb(247,247,247)","rgb(230,245,208)","rgb(161,215,106)","rgb(77,146,33)"],8:["rgb(197,27,125)","rgb(222,119,174)","rgb(241,182,218)","rgb(253,224,239)","rgb(230,245,208)","rgb(184,225,134)","rgb(127,188,65)","rgb(77,146,33)"],9:["rgb(197,27,125)","rgb(222,119,174)","rgb(241,182,218)","rgb(253,224,239)","rgb(247,247,247)","rgb(230,245,208)","rgb(184,225,134)","rgb(127,188,65)","rgb(77,146,33)"],10:["rgb(142,1,82)","rgb(197,27,125)","rgb(222,119,174)","rgb(241,182,218)","rgb(253,224,239)","rgb(230,245,208)","rgb(184,225,134)","rgb(127,188,65)","rgb(77,146,33)","rgb(39,100,25)"],11:["rgb(142,1,82)","rgb(197,27,125)","rgb(222,119,174)","rgb(241,182,218)","rgb(253,224,239)","rgb(247,247,247)","rgb(230,245,208)","rgb(184,225,134)","rgb(127,188,65)","rgb(77,146,33)","rgb(39,100,25)"],type:"div"},PRGn:{3:["rgb(175,141,195)","rgb(247,247,247)","rgb(127,191,123)"],4:["rgb(123,50,148)","rgb(194,165,207)","rgb(166,219,160)","rgb(0,136,55)"],5:["rgb(123,50,148)","rgb(194,165,207)","rgb(247,247,247)","rgb(166,219,160)","rgb(0,136,55)"],6:["rgb(118,42,131)","rgb(175,141,195)","rgb(231,212,232)","rgb(217,240,211)","rgb(127,191,123)","rgb(27,120,55)"],7:["rgb(118,42,131)","rgb(175,141,195)","rgb(231,212,232)","rgb(247,247,247)","rgb(217,240,211)","rgb(127,191,123)","rgb(27,120,55)"],8:["rgb(118,42,131)","rgb(153,112,171)","rgb(194,165,207)","rgb(231,212,232)","rgb(217,240,211)","rgb(166,219,160)","rgb(90,174,97)","rgb(27,120,55)"],9:["rgb(118,42,131)","rgb(153,112,171)","rgb(194,165,207)","rgb(231,212,232)","rgb(247,247,247)","rgb(217,240,211)","rgb(166,219,160)","rgb(90,174,97)","rgb(27,120,55)"],10:["rgb(64,0,75)","rgb(118,42,131)","rgb(153,112,171)","rgb(194,165,207)","rgb(231,212,232)","rgb(217,240,211)","rgb(166,219,160)","rgb(90,174,97)","rgb(27,120,55)","rgb(0,68,27)"],11:["rgb(64,0,75)","rgb(118,42,131)","rgb(153,112,171)","rgb(194,165,207)","rgb(231,212,232)","rgb(247,247,247)","rgb(217,240,211)","rgb(166,219,160)","rgb(90,174,97)","rgb(27,120,55)","rgb(0,68,27)"],type:"div"},RdYlBu:{3:["rgb(252,141,89)","rgb(255,255,191)","rgb(145,191,219)"],4:["rgb(215,25,28)","rgb(253,174,97)","rgb(171,217,233)","rgb(44,123,182)"],5:["rgb(215,25,28)","rgb(253,174,97)","rgb(255,255,191)","rgb(171,217,233)","rgb(44,123,182)"],6:["rgb(215,48,39)","rgb(252,141,89)","rgb(254,224,144)","rgb(224,243,248)","rgb(145,191,219)","rgb(69,117,180)"],7:["rgb(215,48,39)","rgb(252,141,89)","rgb(254,224,144)","rgb(255,255,191)","rgb(224,243,248)","rgb(145,191,219)","rgb(69,117,180)"],8:["rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,144)","rgb(224,243,248)","rgb(171,217,233)","rgb(116,173,209)","rgb(69,117,180)"],9:["rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,144)","rgb(255,255,191)","rgb(224,243,248)","rgb(171,217,233)","rgb(116,173,209)","rgb(69,117,180)"],10:["rgb(165,0,38)","rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,144)","rgb(224,243,248)","rgb(171,217,233)","rgb(116,173,209)","rgb(69,117,180)","rgb(49,54,149)"],11:["rgb(165,0,38)","rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,144)","rgb(255,255,191)","rgb(224,243,248)","rgb(171,217,233)","rgb(116,173,209)","rgb(69,117,180)","rgb(49,54,149)"],type:"div"},BrBG:{3:["rgb(216,179,101)","rgb(245,245,245)","rgb(90,180,172)"],4:["rgb(166,97,26)","rgb(223,194,125)","rgb(128,205,193)","rgb(1,133,113)"],5:["rgb(166,97,26)","rgb(223,194,125)","rgb(245,245,245)","rgb(128,205,193)","rgb(1,133,113)"],6:["rgb(140,81,10)","rgb(216,179,101)","rgb(246,232,195)","rgb(199,234,229)","rgb(90,180,172)","rgb(1,102,94)"],7:["rgb(140,81,10)","rgb(216,179,101)","rgb(246,232,195)","rgb(245,245,245)","rgb(199,234,229)","rgb(90,180,172)","rgb(1,102,94)"],8:["rgb(140,81,10)","rgb(191,129,45)","rgb(223,194,125)","rgb(246,232,195)","rgb(199,234,229)","rgb(128,205,193)","rgb(53,151,143)","rgb(1,102,94)"],9:["rgb(140,81,10)","rgb(191,129,45)","rgb(223,194,125)","rgb(246,232,195)","rgb(245,245,245)","rgb(199,234,229)","rgb(128,205,193)","rgb(53,151,143)","rgb(1,102,94)"],10:["rgb(84,48,5)","rgb(140,81,10)","rgb(191,129,45)","rgb(223,194,125)","rgb(246,232,195)","rgb(199,234,229)","rgb(128,205,193)","rgb(53,151,143)","rgb(1,102,94)","rgb(0,60,48)"],11:["rgb(84,48,5)","rgb(140,81,10)","rgb(191,129,45)","rgb(223,194,125)","rgb(246,232,195)","rgb(245,245,245)","rgb(199,234,229)","rgb(128,205,193)","rgb(53,151,143)","rgb(1,102,94)","rgb(0,60,48)"],type:"div"},RdGy:{3:["rgb(239,138,98)","rgb(255,255,255)","rgb(153,153,153)"],4:["rgb(202,0,32)","rgb(244,165,130)","rgb(186,186,186)","rgb(64,64,64)"],5:["rgb(202,0,32)","rgb(244,165,130)","rgb(255,255,255)","rgb(186,186,186)","rgb(64,64,64)"],6:["rgb(178,24,43)","rgb(239,138,98)","rgb(253,219,199)","rgb(224,224,224)","rgb(153,153,153)","rgb(77,77,77)"],7:["rgb(178,24,43)","rgb(239,138,98)","rgb(253,219,199)","rgb(255,255,255)","rgb(224,224,224)","rgb(153,153,153)","rgb(77,77,77)"],8:["rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(224,224,224)","rgb(186,186,186)","rgb(135,135,135)","rgb(77,77,77)"],9:["rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(255,255,255)","rgb(224,224,224)","rgb(186,186,186)","rgb(135,135,135)","rgb(77,77,77)"],10:["rgb(103,0,31)","rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(224,224,224)","rgb(186,186,186)","rgb(135,135,135)","rgb(77,77,77)","rgb(26,26,26)"],11:["rgb(103,0,31)","rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(255,255,255)","rgb(224,224,224)","rgb(186,186,186)","rgb(135,135,135)","rgb(77,77,77)","rgb(26,26,26)"],type:"div"},PuOr:{3:["rgb(241,163,64)","rgb(247,247,247)","rgb(153,142,195)"],4:["rgb(230,97,1)","rgb(253,184,99)","rgb(178,171,210)","rgb(94,60,153)"],5:["rgb(230,97,1)","rgb(253,184,99)","rgb(247,247,247)","rgb(178,171,210)","rgb(94,60,153)"],6:["rgb(179,88,6)","rgb(241,163,64)","rgb(254,224,182)","rgb(216,218,235)","rgb(153,142,195)","rgb(84,39,136)"],7:["rgb(179,88,6)","rgb(241,163,64)","rgb(254,224,182)","rgb(247,247,247)","rgb(216,218,235)","rgb(153,142,195)","rgb(84,39,136)"],8:["rgb(179,88,6)","rgb(224,130,20)","rgb(253,184,99)","rgb(254,224,182)","rgb(216,218,235)","rgb(178,171,210)","rgb(128,115,172)","rgb(84,39,136)"],9:["rgb(179,88,6)","rgb(224,130,20)","rgb(253,184,99)","rgb(254,224,182)","rgb(247,247,247)","rgb(216,218,235)","rgb(178,171,210)","rgb(128,115,172)","rgb(84,39,136)"],10:["rgb(127,59,8)","rgb(179,88,6)","rgb(224,130,20)","rgb(253,184,99)","rgb(254,224,182)","rgb(216,218,235)","rgb(178,171,210)","rgb(128,115,172)","rgb(84,39,136)","rgb(45,0,75)"],11:["rgb(127,59,8)","rgb(179,88,6)","rgb(224,130,20)","rgb(253,184,99)","rgb(254,224,182)","rgb(247,247,247)","rgb(216,218,235)","rgb(178,171,210)","rgb(128,115,172)","rgb(84,39,136)","rgb(45,0,75)"],type:"div"},Set2:{3:["rgb(102,194,165)","rgb(252,141,98)","rgb(141,160,203)"],4:["rgb(102,194,165)","rgb(252,141,98)","rgb(141,160,203)","rgb(231,138,195)"],5:["rgb(102,194,165)","rgb(252,141,98)","rgb(141,160,203)","rgb(231,138,195)","rgb(166,216,84)"],6:["rgb(102,194,165)","rgb(252,141,98)","rgb(141,160,203)","rgb(231,138,195)","rgb(166,216,84)","rgb(255,217,47)"],7:["rgb(102,194,165)","rgb(252,141,98)","rgb(141,160,203)","rgb(231,138,195)","rgb(166,216,84)","rgb(255,217,47)","rgb(229,196,148)"],8:["rgb(102,194,165)","rgb(252,141,98)","rgb(141,160,203)","rgb(231,138,195)","rgb(166,216,84)","rgb(255,217,47)","rgb(229,196,148)","rgb(179,179,179)"],type:"qual"},Accent:{3:["rgb(127,201,127)","rgb(190,174,212)","rgb(253,192,134)"],4:["rgb(127,201,127)","rgb(190,174,212)","rgb(253,192,134)","rgb(255,255,153)"],5:["rgb(127,201,127)","rgb(190,174,212)","rgb(253,192,134)","rgb(255,255,153)","rgb(56,108,176)"],6:["rgb(127,201,127)","rgb(190,174,212)","rgb(253,192,134)","rgb(255,255,153)","rgb(56,108,176)","rgb(240,2,127)"],7:["rgb(127,201,127)","rgb(190,174,212)","rgb(253,192,134)","rgb(255,255,153)","rgb(56,108,176)","rgb(240,2,127)","rgb(191,91,23)"],8:["rgb(127,201,127)","rgb(190,174,212)","rgb(253,192,134)","rgb(255,255,153)","rgb(56,108,176)","rgb(240,2,127)","rgb(191,91,23)","rgb(102,102,102)"],type:"qual"},Set1:{3:["rgb(228,26,28)","rgb(55,126,184)","rgb(77,175,74)"],4:["rgb(228,26,28)","rgb(55,126,184)","rgb(77,175,74)","rgb(152,78,163)"],5:["rgb(228,26,28)","rgb(55,126,184)","rgb(77,175,74)","rgb(152,78,163)","rgb(255,127,0)"],6:["rgb(228,26,28)","rgb(55,126,184)","rgb(77,175,74)","rgb(152,78,163)","rgb(255,127,0)","rgb(255,255,51)"],7:["rgb(228,26,28)","rgb(55,126,184)","rgb(77,175,74)","rgb(152,78,163)","rgb(255,127,0)","rgb(255,255,51)","rgb(166,86,40)"],8:["rgb(228,26,28)","rgb(55,126,184)","rgb(77,175,74)","rgb(152,78,163)","rgb(255,127,0)","rgb(255,255,51)","rgb(166,86,40)","rgb(247,129,191)"],9:["rgb(228,26,28)","rgb(55,126,184)","rgb(77,175,74)","rgb(152,78,163)","rgb(255,127,0)","rgb(255,255,51)","rgb(166,86,40)","rgb(247,129,191)","rgb(153,153,153)"],type:"qual"},Set3:{3:["rgb(141,211,199)","rgb(255,255,179)","rgb(190,186,218)"],4:["rgb(141,211,199)","rgb(255,255,179)","rgb(190,186,218)","rgb(251,128,114)"],5:["rgb(141,211,199)","rgb(255,255,179)","rgb(190,186,218)","rgb(251,128,114)","rgb(128,177,211)"],6:["rgb(141,211,199)","rgb(255,255,179)","rgb(190,186,218)","rgb(251,128,114)","rgb(128,177,211)","rgb(253,180,98)"],7:["rgb(141,211,199)","rgb(255,255,179)","rgb(190,186,218)","rgb(251,128,114)","rgb(128,177,211)","rgb(253,180,98)","rgb(179,222,105)"],8:["rgb(141,211,199)","rgb(255,255,179)","rgb(190,186,218)","rgb(251,128,114)","rgb(128,177,211)","rgb(253,180,98)","rgb(179,222,105)","rgb(252,205,229)"],9:["rgb(141,211,199)","rgb(255,255,179)","rgb(190,186,218)","rgb(251,128,114)","rgb(128,177,211)","rgb(253,180,98)","rgb(179,222,105)","rgb(252,205,229)","rgb(217,217,217)"],10:["rgb(141,211,199)","rgb(255,255,179)","rgb(190,186,218)","rgb(251,128,114)","rgb(128,177,211)","rgb(253,180,98)","rgb(179,222,105)","rgb(252,205,229)","rgb(217,217,217)","rgb(188,128,189)"],11:["rgb(141,211,199)","rgb(255,255,179)","rgb(190,186,218)","rgb(251,128,114)","rgb(128,177,211)","rgb(253,180,98)","rgb(179,222,105)","rgb(252,205,229)","rgb(217,217,217)","rgb(188,128,189)","rgb(204,235,197)"],12:["rgb(141,211,199)","rgb(255,255,179)","rgb(190,186,218)","rgb(251,128,114)","rgb(128,177,211)","rgb(253,180,98)","rgb(179,222,105)","rgb(252,205,229)","rgb(217,217,217)","rgb(188,128,189)","rgb(204,235,197)","rgb(255,237,111)"],type:"qual"},Dark2:{3:["rgb(27,158,119)","rgb(217,95,2)","rgb(117,112,179)"],4:["rgb(27,158,119)","rgb(217,95,2)","rgb(117,112,179)","rgb(231,41,138)"],5:["rgb(27,158,119)","rgb(217,95,2)","rgb(117,112,179)","rgb(231,41,138)","rgb(102,166,30)"],6:["rgb(27,158,119)","rgb(217,95,2)","rgb(117,112,179)","rgb(231,41,138)","rgb(102,166,30)","rgb(230,171,2)"],7:["rgb(27,158,119)","rgb(217,95,2)","rgb(117,112,179)","rgb(231,41,138)","rgb(102,166,30)","rgb(230,171,2)","rgb(166,118,29)"],8:["rgb(27,158,119)","rgb(217,95,2)","rgb(117,112,179)","rgb(231,41,138)","rgb(102,166,30)","rgb(230,171,2)","rgb(166,118,29)","rgb(102,102,102)"],type:"qual"},Paired:{3:["rgb(166,206,227)","rgb(31,120,180)","rgb(178,223,138)"],4:["rgb(166,206,227)","rgb(31,120,180)","rgb(178,223,138)","rgb(51,160,44)"],5:["rgb(166,206,227)","rgb(31,120,180)","rgb(178,223,138)","rgb(51,160,44)","rgb(251,154,153)"],6:["rgb(166,206,227)","rgb(31,120,180)","rgb(178,223,138)","rgb(51,160,44)","rgb(251,154,153)","rgb(227,26,28)"],7:["rgb(166,206,227)","rgb(31,120,180)","rgb(178,223,138)","rgb(51,160,44)","rgb(251,154,153)","rgb(227,26,28)","rgb(253,191,111)"],8:["rgb(166,206,227)","rgb(31,120,180)","rgb(178,223,138)","rgb(51,160,44)","rgb(251,154,153)","rgb(227,26,28)","rgb(253,191,111)","rgb(255,127,0)"],9:["rgb(166,206,227)","rgb(31,120,180)","rgb(178,223,138)","rgb(51,160,44)","rgb(251,154,153)","rgb(227,26,28)","rgb(253,191,111)","rgb(255,127,0)","rgb(202,178,214)"],10:["rgb(166,206,227)","rgb(31,120,180)","rgb(178,223,138)","rgb(51,160,44)","rgb(251,154,153)","rgb(227,26,28)","rgb(253,191,111)","rgb(255,127,0)","rgb(202,178,214)","rgb(106,61,154)"],11:["rgb(166,206,227)","rgb(31,120,180)","rgb(178,223,138)","rgb(51,160,44)","rgb(251,154,153)","rgb(227,26,28)","rgb(253,191,111)","rgb(255,127,0)","rgb(202,178,214)","rgb(106,61,154)","rgb(255,255,153)"],12:["rgb(166,206,227)","rgb(31,120,180)","rgb(178,223,138)","rgb(51,160,44)","rgb(251,154,153)","rgb(227,26,28)","rgb(253,191,111)","rgb(255,127,0)","rgb(202,178,214)","rgb(106,61,154)","rgb(255,255,153)","rgb(177,89,40)"],type:"qual"},Pastel2:{3:["rgb(179,226,205)","rgb(253,205,172)","rgb(203,213,232)"],4:["rgb(179,226,205)","rgb(253,205,172)","rgb(203,213,232)","rgb(244,202,228)"],5:["rgb(179,226,205)","rgb(253,205,172)","rgb(203,213,232)","rgb(244,202,228)","rgb(230,245,201)"],6:["rgb(179,226,205)","rgb(253,205,172)","rgb(203,213,232)","rgb(244,202,228)","rgb(230,245,201)","rgb(255,242,174)"],7:["rgb(179,226,205)","rgb(253,205,172)","rgb(203,213,232)","rgb(244,202,228)","rgb(230,245,201)","rgb(255,242,174)","rgb(241,226,204)"],8:["rgb(179,226,205)","rgb(253,205,172)","rgb(203,213,232)","rgb(244,202,228)","rgb(230,245,201)","rgb(255,242,174)","rgb(241,226,204)","rgb(204,204,204)"],type:"qual"},Pastel1:{3:["rgb(251,180,174)","rgb(179,205,227)","rgb(204,235,197)"],4:["rgb(251,180,174)","rgb(179,205,227)","rgb(204,235,197)","rgb(222,203,228)"],5:["rgb(251,180,174)","rgb(179,205,227)","rgb(204,235,197)","rgb(222,203,228)","rgb(254,217,166)"],6:["rgb(251,180,174)","rgb(179,205,227)","rgb(204,235,197)","rgb(222,203,228)","rgb(254,217,166)","rgb(255,255,204)"],7:["rgb(251,180,174)","rgb(179,205,227)","rgb(204,235,197)","rgb(222,203,228)","rgb(254,217,166)","rgb(255,255,204)","rgb(229,216,189)"],8:["rgb(251,180,174)","rgb(179,205,227)","rgb(204,235,197)","rgb(222,203,228)","rgb(254,217,166)","rgb(255,255,204)","rgb(229,216,189)","rgb(253,218,236)"],9:["rgb(251,180,174)","rgb(179,205,227)","rgb(204,235,197)","rgb(222,203,228)","rgb(254,217,166)","rgb(255,255,204)","rgb(229,216,189)","rgb(253,218,236)","rgb(242,242,242)"],type:"qual"},OrRd:{3:["rgb(254,232,200)","rgb(253,187,132)","rgb(227,74,51)"],4:["rgb(254,240,217)","rgb(253,204,138)","rgb(252,141,89)","rgb(215,48,31)"],5:["rgb(254,240,217)","rgb(253,204,138)","rgb(252,141,89)","rgb(227,74,51)","rgb(179,0,0)"],6:["rgb(254,240,217)","rgb(253,212,158)","rgb(253,187,132)","rgb(252,141,89)","rgb(227,74,51)","rgb(179,0,0)"],7:["rgb(254,240,217)","rgb(253,212,158)","rgb(253,187,132)","rgb(252,141,89)","rgb(239,101,72)","rgb(215,48,31)","rgb(153,0,0)"],8:["rgb(255,247,236)","rgb(254,232,200)","rgb(253,212,158)","rgb(253,187,132)","rgb(252,141,89)","rgb(239,101,72)","rgb(215,48,31)","rgb(153,0,0)"],9:["rgb(255,247,236)","rgb(254,232,200)","rgb(253,212,158)","rgb(253,187,132)","rgb(252,141,89)","rgb(239,101,72)","rgb(215,48,31)","rgb(179,0,0)","rgb(127,0,0)"],type:"seq"},PuBu:{3:["rgb(236,231,242)","rgb(166,189,219)","rgb(43,140,190)"],4:["rgb(241,238,246)","rgb(189,201,225)","rgb(116,169,207)","rgb(5,112,176)"],5:["rgb(241,238,246)","rgb(189,201,225)","rgb(116,169,207)","rgb(43,140,190)","rgb(4,90,141)"],6:["rgb(241,238,246)","rgb(208,209,230)","rgb(166,189,219)","rgb(116,169,207)","rgb(43,140,190)","rgb(4,90,141)"],7:["rgb(241,238,246)","rgb(208,209,230)","rgb(166,189,219)","rgb(116,169,207)","rgb(54,144,192)","rgb(5,112,176)","rgb(3,78,123)"],8:["rgb(255,247,251)","rgb(236,231,242)","rgb(208,209,230)","rgb(166,189,219)","rgb(116,169,207)","rgb(54,144,192)","rgb(5,112,176)","rgb(3,78,123)"],9:["rgb(255,247,251)","rgb(236,231,242)","rgb(208,209,230)","rgb(166,189,219)","rgb(116,169,207)","rgb(54,144,192)","rgb(5,112,176)","rgb(4,90,141)","rgb(2,56,88)"],type:"seq"},BuPu:{3:["rgb(224,236,244)","rgb(158,188,218)","rgb(136,86,167)"],4:["rgb(237,248,251)","rgb(179,205,227)","rgb(140,150,198)","rgb(136,65,157)"],5:["rgb(237,248,251)","rgb(179,205,227)","rgb(140,150,198)","rgb(136,86,167)","rgb(129,15,124)"],6:["rgb(237,248,251)","rgb(191,211,230)","rgb(158,188,218)","rgb(140,150,198)","rgb(136,86,167)","rgb(129,15,124)"],7:["rgb(237,248,251)","rgb(191,211,230)","rgb(158,188,218)","rgb(140,150,198)","rgb(140,107,177)","rgb(136,65,157)","rgb(110,1,107)"],8:["rgb(247,252,253)","rgb(224,236,244)","rgb(191,211,230)","rgb(158,188,218)","rgb(140,150,198)","rgb(140,107,177)","rgb(136,65,157)","rgb(110,1,107)"],9:["rgb(247,252,253)","rgb(224,236,244)","rgb(191,211,230)","rgb(158,188,218)","rgb(140,150,198)","rgb(140,107,177)","rgb(136,65,157)","rgb(129,15,124)","rgb(77,0,75)"],type:"seq"},Oranges:{3:["rgb(254,230,206)","rgb(253,174,107)","rgb(230,85,13)"],4:["rgb(254,237,222)","rgb(253,190,133)","rgb(253,141,60)","rgb(217,71,1)"],5:["rgb(254,237,222)","rgb(253,190,133)","rgb(253,141,60)","rgb(230,85,13)","rgb(166,54,3)"],6:["rgb(254,237,222)","rgb(253,208,162)","rgb(253,174,107)","rgb(253,141,60)","rgb(230,85,13)","rgb(166,54,3)"],7:["rgb(254,237,222)","rgb(253,208,162)","rgb(253,174,107)","rgb(253,141,60)","rgb(241,105,19)","rgb(217,72,1)","rgb(140,45,4)"],8:["rgb(255,245,235)","rgb(254,230,206)","rgb(253,208,162)","rgb(253,174,107)","rgb(253,141,60)","rgb(241,105,19)","rgb(217,72,1)","rgb(140,45,4)"],9:["rgb(255,245,235)","rgb(254,230,206)","rgb(253,208,162)","rgb(253,174,107)","rgb(253,141,60)","rgb(241,105,19)","rgb(217,72,1)","rgb(166,54,3)","rgb(127,39,4)"],type:"seq"},BuGn:{3:["rgb(229,245,249)","rgb(153,216,201)","rgb(44,162,95)"],4:["rgb(237,248,251)","rgb(178,226,226)","rgb(102,194,164)","rgb(35,139,69)"],5:["rgb(237,248,251)","rgb(178,226,226)","rgb(102,194,164)","rgb(44,162,95)","rgb(0,109,44)"],6:["rgb(237,248,251)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(44,162,95)","rgb(0,109,44)"],7:["rgb(237,248,251)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(65,174,118)","rgb(35,139,69)","rgb(0,88,36)"],8:["rgb(247,252,253)","rgb(229,245,249)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(65,174,118)","rgb(35,139,69)","rgb(0,88,36)"],9:["rgb(247,252,253)","rgb(229,245,249)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(65,174,118)","rgb(35,139,69)","rgb(0,109,44)","rgb(0,68,27)"],type:"seq"},YlOrBr:{3:["rgb(255,247,188)","rgb(254,196,79)","rgb(217,95,14)"],4:["rgb(255,255,212)","rgb(254,217,142)","rgb(254,153,41)","rgb(204,76,2)"],5:["rgb(255,255,212)","rgb(254,217,142)","rgb(254,153,41)","rgb(217,95,14)","rgb(153,52,4)"],6:["rgb(255,255,212)","rgb(254,227,145)","rgb(254,196,79)","rgb(254,153,41)","rgb(217,95,14)","rgb(153,52,4)"],7:["rgb(255,255,212)","rgb(254,227,145)","rgb(254,196,79)","rgb(254,153,41)","rgb(236,112,20)","rgb(204,76,2)","rgb(140,45,4)"],8:["rgb(255,255,229)","rgb(255,247,188)","rgb(254,227,145)","rgb(254,196,79)","rgb(254,153,41)","rgb(236,112,20)","rgb(204,76,2)","rgb(140,45,4)"],9:["rgb(255,255,229)","rgb(255,247,188)","rgb(254,227,145)","rgb(254,196,79)","rgb(254,153,41)","rgb(236,112,20)","rgb(204,76,2)","rgb(153,52,4)","rgb(102,37,6)"],type:"seq"},YlGn:{3:["rgb(247,252,185)","rgb(173,221,142)","rgb(49,163,84)"],4:["rgb(255,255,204)","rgb(194,230,153)","rgb(120,198,121)","rgb(35,132,67)"],5:["rgb(255,255,204)","rgb(194,230,153)","rgb(120,198,121)","rgb(49,163,84)","rgb(0,104,55)"],6:["rgb(255,255,204)","rgb(217,240,163)","rgb(173,221,142)","rgb(120,198,121)","rgb(49,163,84)","rgb(0,104,55)"],7:["rgb(255,255,204)","rgb(217,240,163)","rgb(173,221,142)","rgb(120,198,121)","rgb(65,171,93)","rgb(35,132,67)","rgb(0,90,50)"],8:["rgb(255,255,229)","rgb(247,252,185)","rgb(217,240,163)","rgb(173,221,142)","rgb(120,198,121)","rgb(65,171,93)","rgb(35,132,67)","rgb(0,90,50)"],9:["rgb(255,255,229)","rgb(247,252,185)","rgb(217,240,163)","rgb(173,221,142)","rgb(120,198,121)","rgb(65,171,93)","rgb(35,132,67)","rgb(0,104,55)","rgb(0,69,41)"],type:"seq"},Reds:{3:["rgb(254,224,210)","rgb(252,146,114)","rgb(222,45,38)"],4:["rgb(254,229,217)","rgb(252,174,145)","rgb(251,106,74)","rgb(203,24,29)"],5:["rgb(254,229,217)","rgb(252,174,145)","rgb(251,106,74)","rgb(222,45,38)","rgb(165,15,21)"],6:["rgb(254,229,217)","rgb(252,187,161)","rgb(252,146,114)","rgb(251,106,74)","rgb(222,45,38)","rgb(165,15,21)"],7:["rgb(254,229,217)","rgb(252,187,161)","rgb(252,146,114)","rgb(251,106,74)","rgb(239,59,44)","rgb(203,24,29)","rgb(153,0,13)"],8:["rgb(255,245,240)","rgb(254,224,210)","rgb(252,187,161)","rgb(252,146,114)","rgb(251,106,74)","rgb(239,59,44)","rgb(203,24,29)","rgb(153,0,13)"],9:["rgb(255,245,240)","rgb(254,224,210)","rgb(252,187,161)","rgb(252,146,114)","rgb(251,106,74)","rgb(239,59,44)","rgb(203,24,29)","rgb(165,15,21)","rgb(103,0,13)"],type:"seq"},RdPu:{3:["rgb(253,224,221)","rgb(250,159,181)","rgb(197,27,138)"],4:["rgb(254,235,226)","rgb(251,180,185)","rgb(247,104,161)","rgb(174,1,126)"],5:["rgb(254,235,226)","rgb(251,180,185)","rgb(247,104,161)","rgb(197,27,138)","rgb(122,1,119)"],6:["rgb(254,235,226)","rgb(252,197,192)","rgb(250,159,181)","rgb(247,104,161)","rgb(197,27,138)","rgb(122,1,119)"],7:["rgb(254,235,226)","rgb(252,197,192)","rgb(250,159,181)","rgb(247,104,161)","rgb(221,52,151)","rgb(174,1,126)","rgb(122,1,119)"],8:["rgb(255,247,243)","rgb(253,224,221)","rgb(252,197,192)","rgb(250,159,181)","rgb(247,104,161)","rgb(221,52,151)","rgb(174,1,126)","rgb(122,1,119)"],9:["rgb(255,247,243)","rgb(253,224,221)","rgb(252,197,192)","rgb(250,159,181)","rgb(247,104,161)","rgb(221,52,151)","rgb(174,1,126)","rgb(122,1,119)","rgb(73,0,106)"],type:"seq"},Greens:{3:["rgb(229,245,224)","rgb(161,217,155)","rgb(49,163,84)"],4:["rgb(237,248,233)","rgb(186,228,179)","rgb(116,196,118)","rgb(35,139,69)"],5:["rgb(237,248,233)","rgb(186,228,179)","rgb(116,196,118)","rgb(49,163,84)","rgb(0,109,44)"],6:["rgb(237,248,233)","rgb(199,233,192)","rgb(161,217,155)","rgb(116,196,118)","rgb(49,163,84)","rgb(0,109,44)"],7:["rgb(237,248,233)","rgb(199,233,192)","rgb(161,217,155)","rgb(116,196,118)","rgb(65,171,93)","rgb(35,139,69)","rgb(0,90,50)"],8:["rgb(247,252,245)","rgb(229,245,224)","rgb(199,233,192)","rgb(161,217,155)","rgb(116,196,118)","rgb(65,171,93)","rgb(35,139,69)","rgb(0,90,50)"],9:["rgb(247,252,245)","rgb(229,245,224)","rgb(199,233,192)","rgb(161,217,155)","rgb(116,196,118)","rgb(65,171,93)","rgb(35,139,69)","rgb(0,109,44)","rgb(0,68,27)"],type:"seq"},YlGnBu:{3:["rgb(237,248,177)","rgb(127,205,187)","rgb(44,127,184)"],4:["rgb(255,255,204)","rgb(161,218,180)","rgb(65,182,196)","rgb(34,94,168)"],5:["rgb(255,255,204)","rgb(161,218,180)","rgb(65,182,196)","rgb(44,127,184)","rgb(37,52,148)"],6:["rgb(255,255,204)","rgb(199,233,180)","rgb(127,205,187)","rgb(65,182,196)","rgb(44,127,184)","rgb(37,52,148)"],7:["rgb(255,255,204)","rgb(199,233,180)","rgb(127,205,187)","rgb(65,182,196)","rgb(29,145,192)","rgb(34,94,168)","rgb(12,44,132)"],8:["rgb(255,255,217)","rgb(237,248,177)","rgb(199,233,180)","rgb(127,205,187)","rgb(65,182,196)","rgb(29,145,192)","rgb(34,94,168)","rgb(12,44,132)"],9:["rgb(255,255,217)","rgb(237,248,177)","rgb(199,233,180)","rgb(127,205,187)","rgb(65,182,196)","rgb(29,145,192)","rgb(34,94,168)","rgb(37,52,148)","rgb(8,29,88)"],type:"seq"},Purples:{3:["rgb(239,237,245)","rgb(188,189,220)","rgb(117,107,177)"],4:["rgb(242,240,247)","rgb(203,201,226)","rgb(158,154,200)","rgb(106,81,163)"],5:["rgb(242,240,247)","rgb(203,201,226)","rgb(158,154,200)","rgb(117,107,177)","rgb(84,39,143)"],6:["rgb(242,240,247)","rgb(218,218,235)","rgb(188,189,220)","rgb(158,154,200)","rgb(117,107,177)","rgb(84,39,143)"],7:["rgb(242,240,247)","rgb(218,218,235)","rgb(188,189,220)","rgb(158,154,200)","rgb(128,125,186)","rgb(106,81,163)","rgb(74,20,134)"],8:["rgb(252,251,253)","rgb(239,237,245)","rgb(218,218,235)","rgb(188,189,220)","rgb(158,154,200)","rgb(128,125,186)","rgb(106,81,163)","rgb(74,20,134)"],9:["rgb(252,251,253)","rgb(239,237,245)","rgb(218,218,235)","rgb(188,189,220)","rgb(158,154,200)","rgb(128,125,186)","rgb(106,81,163)","rgb(84,39,143)","rgb(63,0,125)"],type:"seq"},GnBu:{3:["rgb(224,243,219)","rgb(168,221,181)","rgb(67,162,202)"],4:["rgb(240,249,232)","rgb(186,228,188)","rgb(123,204,196)","rgb(43,140,190)"],5:["rgb(240,249,232)","rgb(186,228,188)","rgb(123,204,196)","rgb(67,162,202)","rgb(8,104,172)"],6:["rgb(240,249,232)","rgb(204,235,197)","rgb(168,221,181)","rgb(123,204,196)","rgb(67,162,202)","rgb(8,104,172)"],7:["rgb(240,249,232)","rgb(204,235,197)","rgb(168,221,181)","rgb(123,204,196)","rgb(78,179,211)","rgb(43,140,190)","rgb(8,88,158)"],8:["rgb(247,252,240)","rgb(224,243,219)","rgb(204,235,197)","rgb(168,221,181)","rgb(123,204,196)","rgb(78,179,211)","rgb(43,140,190)","rgb(8,88,158)"],9:["rgb(247,252,240)","rgb(224,243,219)","rgb(204,235,197)","rgb(168,221,181)","rgb(123,204,196)","rgb(78,179,211)","rgb(43,140,190)","rgb(8,104,172)","rgb(8,64,129)"],type:"seq"},Greys:{3:["rgb(240,240,240)","rgb(189,189,189)","rgb(99,99,99)"],4:["rgb(247,247,247)","rgb(204,204,204)","rgb(150,150,150)","rgb(82,82,82)"],5:["rgb(247,247,247)","rgb(204,204,204)","rgb(150,150,150)","rgb(99,99,99)","rgb(37,37,37)"],6:["rgb(247,247,247)","rgb(217,217,217)","rgb(189,189,189)","rgb(150,150,150)","rgb(99,99,99)","rgb(37,37,37)"],7:["rgb(247,247,247)","rgb(217,217,217)","rgb(189,189,189)","rgb(150,150,150)","rgb(115,115,115)","rgb(82,82,82)","rgb(37,37,37)"],8:["rgb(255,255,255)","rgb(240,240,240)","rgb(217,217,217)","rgb(189,189,189)","rgb(150,150,150)","rgb(115,115,115)","rgb(82,82,82)","rgb(37,37,37)"],9:["rgb(255,255,255)","rgb(240,240,240)","rgb(217,217,217)","rgb(189,189,189)","rgb(150,150,150)","rgb(115,115,115)","rgb(82,82,82)","rgb(37,37,37)","rgb(0,0,0)"],type:"seq"},YlOrRd:{3:["rgb(255,237,160)","rgb(254,178,76)","rgb(240,59,32)"],4:["rgb(255,255,178)","rgb(254,204,92)","rgb(253,141,60)","rgb(227,26,28)"],5:["rgb(255,255,178)","rgb(254,204,92)","rgb(253,141,60)","rgb(240,59,32)","rgb(189,0,38)"],6:["rgb(255,255,178)","rgb(254,217,118)","rgb(254,178,76)","rgb(253,141,60)","rgb(240,59,32)","rgb(189,0,38)"],7:["rgb(255,255,178)","rgb(254,217,118)","rgb(254,178,76)","rgb(253,141,60)","rgb(252,78,42)","rgb(227,26,28)","rgb(177,0,38)"],8:["rgb(255,255,204)","rgb(255,237,160)","rgb(254,217,118)","rgb(254,178,76)","rgb(253,141,60)","rgb(252,78,42)","rgb(227,26,28)","rgb(177,0,38)"],type:"seq"},PuRd:{3:["rgb(231,225,239)","rgb(201,148,199)","rgb(221,28,119)"],4:["rgb(241,238,246)","rgb(215,181,216)","rgb(223,101,176)","rgb(206,18,86)"],5:["rgb(241,238,246)","rgb(215,181,216)","rgb(223,101,176)","rgb(221,28,119)","rgb(152,0,67)"],6:["rgb(241,238,246)","rgb(212,185,218)","rgb(201,148,199)","rgb(223,101,176)","rgb(221,28,119)","rgb(152,0,67)"],7:["rgb(241,238,246)","rgb(212,185,218)","rgb(201,148,199)","rgb(223,101,176)","rgb(231,41,138)","rgb(206,18,86)","rgb(145,0,63)"],8:["rgb(247,244,249)","rgb(231,225,239)","rgb(212,185,218)","rgb(201,148,199)","rgb(223,101,176)","rgb(231,41,138)","rgb(206,18,86)","rgb(145,0,63)"],9:["rgb(247,244,249)","rgb(231,225,239)","rgb(212,185,218)","rgb(201,148,199)","rgb(223,101,176)","rgb(231,41,138)","rgb(206,18,86)","rgb(152,0,67)","rgb(103,0,31)"],type:"seq"},Blues:{3:["rgb(222,235,247)","rgb(158,202,225)","rgb(49,130,189)"],4:["rgb(239,243,255)","rgb(189,215,231)","rgb(107,174,214)","rgb(33,113,181)"],5:["rgb(239,243,255)","rgb(189,215,231)","rgb(107,174,214)","rgb(49,130,189)","rgb(8,81,156)"],6:["rgb(239,243,255)","rgb(198,219,239)","rgb(158,202,225)","rgb(107,174,214)","rgb(49,130,189)","rgb(8,81,156)"],7:["rgb(239,243,255)","rgb(198,219,239)","rgb(158,202,225)","rgb(107,174,214)","rgb(66,146,198)","rgb(33,113,181)","rgb(8,69,148)"],8:["rgb(247,251,255)","rgb(222,235,247)","rgb(198,219,239)","rgb(158,202,225)","rgb(107,174,214)","rgb(66,146,198)","rgb(33,113,181)","rgb(8,69,148)"],9:["rgb(247,251,255)","rgb(222,235,247)","rgb(198,219,239)","rgb(158,202,225)","rgb(107,174,214)","rgb(66,146,198)","rgb(33,113,181)","rgb(8,81,156)","rgb(8,48,107)"],type:"seq"},PuBuGn:{3:["rgb(236,226,240)","rgb(166,189,219)","rgb(28,144,153)"],4:["rgb(246,239,247)","rgb(189,201,225)","rgb(103,169,207)","rgb(2,129,138)"],5:["rgb(246,239,247)","rgb(189,201,225)","rgb(103,169,207)","rgb(28,144,153)","rgb(1,108,89)"],6:["rgb(246,239,247)","rgb(208,209,230)","rgb(166,189,219)","rgb(103,169,207)","rgb(28,144,153)","rgb(1,108,89)"],7:["rgb(246,239,247)","rgb(208,209,230)","rgb(166,189,219)","rgb(103,169,207)","rgb(54,144,192)","rgb(2,129,138)","rgb(1,100,80)"],8:["rgb(255,247,251)","rgb(236,226,240)","rgb(208,209,230)","rgb(166,189,219)","rgb(103,169,207)","rgb(54,144,192)","rgb(2,129,138)","rgb(1,100,80)"],9:["rgb(255,247,251)","rgb(236,226,240)","rgb(208,209,230)","rgb(166,189,219)","rgb(103,169,207)","rgb(54,144,192)","rgb(2,129,138)","rgb(1,108,89)","rgb(1,70,54)"],type:"seq"},viridis:{256:["#440154","#440256","#450457","#450559","#46075a","#46085c","#460a5d","#460b5e","#470d60","#470e61","#471063","#471164","#471365","#481467","#481668","#481769","#48186a","#481a6c","#481b6d","#481c6e","#481d6f","#481f70","#482071","#482173","#482374","#482475","#482576","#482677","#482878","#482979","#472a7a","#472c7a","#472d7b","#472e7c","#472f7d","#46307e","#46327e","#46337f","#463480","#453581","#453781","#453882","#443983","#443a83","#443b84","#433d84","#433e85","#423f85","#424086","#424186","#414287","#414487","#404588","#404688","#3f4788","#3f4889","#3e4989","#3e4a89","#3e4c8a","#3d4d8a","#3d4e8a","#3c4f8a","#3c508b","#3b518b","#3b528b","#3a538b","#3a548c","#39558c","#39568c","#38588c","#38598c","#375a8c","#375b8d","#365c8d","#365d8d","#355e8d","#355f8d","#34608d","#34618d","#33628d","#33638d","#32648e","#32658e","#31668e","#31678e","#31688e","#30698e","#306a8e","#2f6b8e","#2f6c8e","#2e6d8e","#2e6e8e","#2e6f8e","#2d708e","#2d718e","#2c718e","#2c728e","#2c738e","#2b748e","#2b758e","#2a768e","#2a778e","#2a788e","#29798e","#297a8e","#297b8e","#287c8e","#287d8e","#277e8e","#277f8e","#27808e","#26818e","#26828e","#26828e","#25838e","#25848e","#25858e","#24868e","#24878e","#23888e","#23898e","#238a8d","#228b8d","#228c8d","#228d8d","#218e8d","#218f8d","#21908d","#21918c","#20928c","#20928c","#20938c","#1f948c","#1f958b","#1f968b","#1f978b","#1f988b","#1f998a","#1f9a8a","#1e9b8a","#1e9c89","#1e9d89","#1f9e89","#1f9f88","#1fa088","#1fa188","#1fa187","#1fa287","#20a386","#20a486","#21a585","#21a685","#22a785","#22a884","#23a983","#24aa83","#25ab82","#25ac82","#26ad81","#27ad81","#28ae80","#29af7f","#2ab07f","#2cb17e","#2db27d","#2eb37c","#2fb47c","#31b57b","#32b67a","#34b679","#35b779","#37b878","#38b977","#3aba76","#3bbb75","#3dbc74","#3fbc73","#40bd72","#42be71","#44bf70","#46c06f","#48c16e","#4ac16d","#4cc26c","#4ec36b","#50c46a","#52c569","#54c568","#56c667","#58c765","#5ac864","#5cc863","#5ec962","#60ca60","#63cb5f","#65cb5e","#67cc5c","#69cd5b","#6ccd5a","#6ece58","#70cf57","#73d056","#75d054","#77d153","#7ad151","#7cd250","#7fd34e","#81d34d","#84d44b","#86d549","#89d548","#8bd646","#8ed645","#90d743","#93d741","#95d840","#98d83e","#9bd93c","#9dd93b","#a0da39","#a2da37","#a5db36","#a8db34","#aadc32","#addc30","#b0dd2f","#b2dd2d","#b5de2b","#b8de29","#bade28","#bddf26","#c0df25","#c2df23","#c5e021","#c8e020","#cae11f","#cde11d","#d0e11c","#d2e21b","#d5e21a","#d8e219","#dae319","#dde318","#dfe318","#e2e418","#e5e419","#e7e419","#eae51a","#ece51b","#efe51c","#f1e51d","#f4e61e","#f6e620","#f8e621","#fbe723","#fde725"],type:"seq"},plasma:{256:["#0d0887","#100788","#130789","#16078a","#19068c","#1b068d","#1d068e","#20068f","#220690","#240691","#260591","#280592","#2a0593","#2c0594","#2e0595","#2f0596","#310597","#330597","#350498","#370499","#38049a","#3a049a","#3c049b","#3e049c","#3f049c","#41049d","#43039e","#44039e","#46039f","#48039f","#4903a0","#4b03a1","#4c02a1","#4e02a2","#5002a2","#5102a3","#5302a3","#5502a4","#5601a4","#5801a4","#5901a5","#5b01a5","#5c01a6","#5e01a6","#6001a6","#6100a7","#6300a7","#6400a7","#6600a7","#6700a8","#6900a8","#6a00a8","#6c00a8","#6e00a8","#6f00a8","#7100a8","#7201a8","#7401a8","#7501a8","#7701a8","#7801a8","#7a02a8","#7b02a8","#7d03a8","#7e03a8","#8004a8","#8104a7","#8305a7","#8405a7","#8606a6","#8707a6","#8808a6","#8a09a5","#8b0aa5","#8d0ba5","#8e0ca4","#8f0da4","#910ea3","#920fa3","#9410a2","#9511a1","#9613a1","#9814a0","#99159f","#9a169f","#9c179e","#9d189d","#9e199d","#a01a9c","#a11b9b","#a21d9a","#a31e9a","#a51f99","#a62098","#a72197","#a82296","#aa2395","#ab2494","#ac2694","#ad2793","#ae2892","#b02991","#b12a90","#b22b8f","#b32c8e","#b42e8d","#b52f8c","#b6308b","#b7318a","#b83289","#ba3388","#bb3488","#bc3587","#bd3786","#be3885","#bf3984","#c03a83","#c13b82","#c23c81","#c33d80","#c43e7f","#c5407e","#c6417d","#c7427c","#c8437b","#c9447a","#ca457a","#cb4679","#cc4778","#cc4977","#cd4a76","#ce4b75","#cf4c74","#d04d73","#d14e72","#d24f71","#d35171","#d45270","#d5536f","#d5546e","#d6556d","#d7566c","#d8576b","#d9586a","#da5a6a","#da5b69","#db5c68","#dc5d67","#dd5e66","#de5f65","#de6164","#df6263","#e06363","#e16462","#e26561","#e26660","#e3685f","#e4695e","#e56a5d","#e56b5d","#e66c5c","#e76e5b","#e76f5a","#e87059","#e97158","#e97257","#ea7457","#eb7556","#eb7655","#ec7754","#ed7953","#ed7a52","#ee7b51","#ef7c51","#ef7e50","#f07f4f","#f0804e","#f1814d","#f1834c","#f2844b","#f3854b","#f3874a","#f48849","#f48948","#f58b47","#f58c46","#f68d45","#f68f44","#f79044","#f79143","#f79342","#f89441","#f89540","#f9973f","#f9983e","#f99a3e","#fa9b3d","#fa9c3c","#fa9e3b","#fb9f3a","#fba139","#fba238","#fca338","#fca537","#fca636","#fca835","#fca934","#fdab33","#fdac33","#fdae32","#fdaf31","#fdb130","#fdb22f","#fdb42f","#fdb52e","#feb72d","#feb82c","#feba2c","#febb2b","#febd2a","#febe2a","#fec029","#fdc229","#fdc328","#fdc527","#fdc627","#fdc827","#fdca26","#fdcb26","#fccd25","#fcce25","#fcd025","#fcd225","#fbd324","#fbd524","#fbd724","#fad824","#fada24","#f9dc24","#f9dd25","#f8df25","#f8e125","#f7e225","#f7e425","#f6e626","#f6e826","#f5e926","#f5eb27","#f4ed27","#f3ee27","#f3f027","#f2f227","#f1f426","#f1f525","#f0f724","#f0f921"],type:"seq"},inferno:{256:["#000004","#010005","#010106","#010108","#02010a","#02020c","#02020e","#030210","#040312","#040314","#050417","#060419","#07051b","#08051d","#09061f","#0a0722","#0b0724","#0c0826","#0d0829","#0e092b","#10092d","#110a30","#120a32","#140b34","#150b37","#160b39","#180c3c","#190c3e","#1b0c41","#1c0c43","#1e0c45","#1f0c48","#210c4a","#230c4c","#240c4f","#260c51","#280b53","#290b55","#2b0b57","#2d0b59","#2f0a5b","#310a5c","#320a5e","#340a5f","#360961","#380962","#390963","#3b0964","#3d0965","#3e0966","#400a67","#420a68","#440a68","#450a69","#470b6a","#490b6a","#4a0c6b","#4c0c6b","#4d0d6c","#4f0d6c","#510e6c","#520e6d","#540f6d","#550f6d","#57106e","#59106e","#5a116e","#5c126e","#5d126e","#5f136e","#61136e","#62146e","#64156e","#65156e","#67166e","#69166e","#6a176e","#6c186e","#6d186e","#6f196e","#71196e","#721a6e","#741a6e","#751b6e","#771c6d","#781c6d","#7a1d6d","#7c1d6d","#7d1e6d","#7f1e6c","#801f6c","#82206c","#84206b","#85216b","#87216b","#88226a","#8a226a","#8c2369","#8d2369","#8f2469","#902568","#922568","#932667","#952667","#972766","#982766","#9a2865","#9b2964","#9d2964","#9f2a63","#a02a63","#a22b62","#a32c61","#a52c60","#a62d60","#a82e5f","#a92e5e","#ab2f5e","#ad305d","#ae305c","#b0315b","#b1325a","#b3325a","#b43359","#b63458","#b73557","#b93556","#ba3655","#bc3754","#bd3853","#bf3952","#c03a51","#c13a50","#c33b4f","#c43c4e","#c63d4d","#c73e4c","#c83f4b","#ca404a","#cb4149","#cc4248","#ce4347","#cf4446","#d04545","#d24644","#d34743","#d44842","#d54a41","#d74b3f","#d84c3e","#d94d3d","#da4e3c","#db503b","#dd513a","#de5238","#df5337","#e05536","#e15635","#e25734","#e35933","#e45a31","#e55c30","#e65d2f","#e75e2e","#e8602d","#e9612b","#ea632a","#eb6429","#eb6628","#ec6726","#ed6925","#ee6a24","#ef6c23","#ef6e21","#f06f20","#f1711f","#f1731d","#f2741c","#f3761b","#f37819","#f47918","#f57b17","#f57d15","#f67e14","#f68013","#f78212","#f78410","#f8850f","#f8870e","#f8890c","#f98b0b","#f98c0a","#f98e09","#fa9008","#fa9207","#fa9407","#fb9606","#fb9706","#fb9906","#fb9b06","#fb9d07","#fc9f07","#fca108","#fca309","#fca50a","#fca60c","#fca80d","#fcaa0f","#fcac11","#fcae12","#fcb014","#fcb216","#fcb418","#fbb61a","#fbb81d","#fbba1f","#fbbc21","#fbbe23","#fac026","#fac228","#fac42a","#fac62d","#f9c72f","#f9c932","#f9cb35","#f8cd37","#f8cf3a","#f7d13d","#f7d340","#f6d543","#f6d746","#f5d949","#f5db4c","#f4dd4f","#f4df53","#f4e156","#f3e35a","#f3e55d","#f2e661","#f2e865","#f2ea69","#f1ec6d","#f1ed71","#f1ef75","#f1f179","#f2f27d","#f2f482","#f3f586","#f3f68a","#f4f88e","#f5f992","#f6fa96","#f8fb9a","#f9fc9d","#fafda1","#fcffa4"],type:"seq"},magma:{256:["#000004","#010005","#010106","#010108","#020109","#02020b","#02020d","#03030f","#030312","#040414","#050416","#060518","#06051a","#07061c","#08071e","#090720","#0a0822","#0b0924","#0c0926","#0d0a29","#0e0b2b","#100b2d","#110c2f","#120d31","#130d34","#140e36","#150e38","#160f3b","#180f3d","#19103f","#1a1042","#1c1044","#1d1147","#1e1149","#20114b","#21114e","#221150","#241253","#251255","#271258","#29115a","#2a115c","#2c115f","#2d1161","#2f1163","#311165","#331067","#341069","#36106b","#38106c","#390f6e","#3b0f70","#3d0f71","#3f0f72","#400f74","#420f75","#440f76","#451077","#471078","#491078","#4a1079","#4c117a","#4e117b","#4f127b","#51127c","#52137c","#54137d","#56147d","#57157e","#59157e","#5a167e","#5c167f","#5d177f","#5f187f","#601880","#621980","#641a80","#651a80","#671b80","#681c81","#6a1c81","#6b1d81","#6d1d81","#6e1e81","#701f81","#721f81","#732081","#752181","#762181","#782281","#792282","#7b2382","#7c2382","#7e2482","#802582","#812581","#832681","#842681","#862781","#882781","#892881","#8b2981","#8c2981","#8e2a81","#902a81","#912b81","#932b80","#942c80","#962c80","#982d80","#992d80","#9b2e7f","#9c2e7f","#9e2f7f","#a02f7f","#a1307e","#a3307e","#a5317e","#a6317d","#a8327d","#aa337d","#ab337c","#ad347c","#ae347b","#b0357b","#b2357b","#b3367a","#b5367a","#b73779","#b83779","#ba3878","#bc3978","#bd3977","#bf3a77","#c03a76","#c23b75","#c43c75","#c53c74","#c73d73","#c83e73","#ca3e72","#cc3f71","#cd4071","#cf4070","#d0416f","#d2426f","#d3436e","#d5446d","#d6456c","#d8456c","#d9466b","#db476a","#dc4869","#de4968","#df4a68","#e04c67","#e24d66","#e34e65","#e44f64","#e55064","#e75263","#e85362","#e95462","#ea5661","#eb5760","#ec5860","#ed5a5f","#ee5b5e","#ef5d5e","#f05f5e","#f1605d","#f2625d","#f2645c","#f3655c","#f4675c","#f4695c","#f56b5c","#f66c5c","#f66e5c","#f7705c","#f7725c","#f8745c","#f8765c","#f9785d","#f9795d","#f97b5d","#fa7d5e","#fa7f5e","#fa815f","#fb835f","#fb8560","#fb8761","#fc8961","#fc8a62","#fc8c63","#fc8e64","#fc9065","#fd9266","#fd9467","#fd9668","#fd9869","#fd9a6a","#fd9b6b","#fe9d6c","#fe9f6d","#fea16e","#fea36f","#fea571","#fea772","#fea973","#feaa74","#feac76","#feae77","#feb078","#feb27a","#feb47b","#feb67c","#feb77e","#feb97f","#febb81","#febd82","#febf84","#fec185","#fec287","#fec488","#fec68a","#fec88c","#feca8d","#fecc8f","#fecd90","#fecf92","#fed194","#fed395","#fed597","#fed799","#fed89a","#fdda9c","#fddc9e","#fddea0","#fde0a1","#fde2a3","#fde3a5","#fde5a7","#fde7a9","#fde9aa","#fdebac","#fcecae","#fceeb0","#fcf0b2","#fcf2b4","#fcf4b6","#fcf6b8","#fcf7b9","#fcf9bb","#fcfbbd","#fcfdbf"],type:"seq"}}},function(e,t,n){var r=n(1),i=n(0),o=n(13),s=n(19).Mark.extend({render:function(){var e=s.__super__.render.apply(this),t=this;return this.drag_listener=r.behavior.drag().on("dragstart",(function(e,n){return t.drag_start(e,n,this)})).on("drag",(function(e,n){return t.on_drag(e,n,this)})).on("dragend",(function(e,n){return t.drag_ended(e,n,this)})),this.selected_style=this.model.get("selected_style"),this.unselected_style=this.model.get("unselected_style"),this.selected_indices=this.model.get("selected"),this.hovered_style=this.model.get("hovered_style"),this.unhovered_style=this.model.get("unhovered_style"),this.hovered_index=this.model.get("hovered_point")?[this.model.get("hovered_point")]:null,this.display_el_classes=["dot","legendtext"],this.event_metadata={mouse_over:{msg_name:"hover",lookup_data:!1,hit_test:!0},legend_clicked:{msg_name:"legend_click",hit_test:!0},element_clicked:{msg_name:"element_click",lookup_data:!1,hit_test:!0},parent_clicked:{msg_name:"background_click",hit_test:!1}},this.displayed.then((function(){t.parent.tooltip_div.node().appendChild(t.tooltip_div.node()),t.create_tooltip()})),e.then((function(){t.event_listeners={},t.process_interactions(),t.create_listeners(),t.compute_view_padding(),t.draw()}))},set_ranges:function(){var e=this.scales.x,t=this.scales.y,n=this.scales.size,r=this.scales.opacity,i=this.scales.skew,o=this.scales.rotation;e&&e.set_range(this.parent.padded_range("x",e.model)),t&&t.set_range(this.parent.padded_range("y",t.model)),n&&n.set_range([0,this.model.get("default_size")]),r&&r.set_range([.2,1]),i&&i.set_range([0,1]),o&&o.set_range([0,180])},set_positional_scales:function(){this.x_scale=this.scales.x,this.y_scale=this.scales.y,this.x_scale||(this.x_scale=this.parent.scale_x),this.y_scale||(this.y_scale=this.parent.scale_y),this.listenTo(this.x_scale,"domain_changed",(function(){if(!this.model.dirty){this.update_position(!0)}})),this.listenTo(this.y_scale,"domain_changed",(function(){if(!this.model.dirty){this.update_position(!0)}}))},initialize_additional_scales:function(){var e=this.scales.color,t=this.scales.size,n=this.scales.opacity,r=this.scales.skew,i=this.scales.rotation;e&&(this.listenTo(e,"domain_changed",(function(){this.color_scale_updated(!0)})),e.on("color_scale_range_changed",this.color_scale_updated,this)),t&&this.listenTo(t,"domain_changed",(function(){this.update_default_size(!0)})),n&&this.listenTo(n,"domain_changed",(function(){this.update_default_opacities(!0)})),r&&this.listenTo(r,"domain_changed",(function(){this.update_default_skew(!0)})),i&&this.listenTo(i,"domain_changed",(function(){this.update_position(!0)}))},create_listeners:function(){s.__super__.create_listeners.apply(this),this.d3el.on("mouseover",i.bind((function(){this.event_dispatcher("mouse_over")}),this)).on("mousemove",i.bind((function(){this.event_dispatcher("mouse_move")}),this)).on("mouseout",i.bind((function(){this.event_dispatcher("mouse_out")}),this)),this.listenTo(this.model,"data_updated",(function(){this.draw(!0)}),this),this.listenTo(this.model,"change:tooltip",this.create_tooltip,this),this.listenTo(this.model,"change:enable_hover",(function(){this.hide_tooltip()}),this),this.listenTo(this.model,"change:interactions",this.process_interactions),this.listenTo(this.model,"change:enable_move",this.set_drag_behavior),this.listenTo(this.model,"change:selected",this.update_selected),this.listenTo(this.model,"change:hovered_point",this.update_hovered),this.listenTo(this.model,"change:hovered_style",this.hovered_style_updated,this),this.listenTo(this.model,"change:unhovered_style",this.unhovered_style_updated,this),this.listenTo(this.parent,"bg_clicked",(function(){this.event_dispatcher("parent_clicked")}))},get_element_color:function(e,t){var n=this.scales.color,r=this.model.get("colors"),i=r.length;return n&&void 0!==e.color&&null!==e.color?n.scale(e.color):r[t%i]},get_element_size:function(e){var t=this.scales.size;return t&&void 0!==e.size?t.scale(e.size):this.model.get("default_size")},get_element_opacity:function(e,t){var n=this.scales.opacity,r=this.model.get("default_opacities"),i=r.length;return n&&void 0!==e.opacity?n.scale(e.opacity):r[t%i]},get_element_skew:function(e){var t=this.scales.skew;return t&&void 0!==e.skew?t.scale(e.skew):this.model.get("default_skew")},get_element_rotation:function(e){var t=this.scales.rotation;return t&&e.rotation?"rotate("+t.scale(e.rotation)+")":""},relayout:function(){this.set_ranges(),this.update_position()},update_position:function(e){var t=this.scales.x,n=this.scales.y,r=this,i=!0===e?this.parent.model.get("animation_duration"):0;this.d3el.selectAll(".object_grp").transition("update_position").duration(i).attr("transform",(function(e){return"translate("+(t.scale(e.x)+t.offset)+","+(n.scale(e.y)+n.offset)+")"+r.get_element_rotation(e)})),this.x_pixels=this.model.mark_data.map((function(e){return t.scale(e.x)+t.offset})),this.y_pixels=this.model.mark_data.map((function(e){return n.scale(e.y)+n.offset})),this.pixel_coords=this.model.mark_data.map((function(e){return[t.scale(e.x)+t.offset,n.scale(e.y)+n.offset]}))},draw:function(e){this.set_ranges();this.scales.x,this.scales.y,this.model.get("fill"),!0===e&&this.parent.model.get("animation_duration");var t=this.d3el.selectAll(".object_grp").data(this.model.mark_data,(function(e){return e.unique_id})),n=t.enter().append("g").attr("class","object_grp");this.update_position(e),this.set_drag_behavior(),t.on("click",i.bind((function(e,t){this.event_dispatcher("element_clicked",{data:e,index:t})}),this)),t.on("mouseover",i.bind((function(e,t){this.scatter_hover_handler({data:e,index:t})}),this)),t.on("mouseout",i.bind((function(){this.reset_hover()}),this)),this.draw_elements(e,n),t.exit().remove()},draw_elements:function(e,t){},process_interactions:function(){var e=this.model.get("interactions");i.isEmpty(e)?this.reset_interactions():(void 0!==e.click&&null!==e.click?"tooltip"===e.click?(this.event_listeners.element_clicked=function(){return this.refresh_tooltip(!0)},this.event_listeners.parent_clicked=this.hide_tooltip):"add"===e.click?(this.event_listeners.parent_clicked=this.add_element,this.event_listeners.element_clicked=function(){}):"select"==e.click&&(this.event_listeners.parent_clicked=this.reset_selection,this.event_listeners.element_clicked=this.scatter_click_handler):this.reset_click(),void 0!==e.hover&&null!==e.hover?"tooltip"===e.hover&&(this.event_listeners.mouse_over=this.refresh_tooltip,this.event_listeners.mouse_move=this.move_tooltip,this.event_listeners.mouse_out=this.hide_tooltip):this.reset_hover(),void 0!==e.legend_click&&null!==e.legend_click?"tooltip"===e.legend_click&&(this.event_listeners.legend_clicked=function(){return this.refresh_tooltip(!0)},this.event_listeners.parent_clicked=this.hide_tooltip):this.event_listeners.legend_clicked=function(){},void 0!==e.legend_hover&&null!==e.legend_hover?"highlight_axes"===e.legend_hover&&(this.event_listeners.legend_mouse_over=i.bind(this.highlight_axes,this),this.event_listeners.legend_mouse_out=i.bind(this.unhighlight_axes,this)):this.reset_legend_hover())},reset_hover:function(){this.model.set("hovered_point",null),this.hovered_index=null,this.touch()},scatter_hover_handler:function(e){e.data;var t=e.index;this.model.set("hovered_point",t,{updated_view:this}),this.touch()},reset_selection:function(){this.model.set("selected",null),this.selected_indices=null,this.touch()},scatter_click_handler:function(e){e.data;var t=e.index,n=this.model.get("selected"),i=n?o.deepCopy(n):[],s=i.indexOf(t),a=r.event.ctrlKey||r.event.metaKey;s>-1&&a?i.splice(s,1):a?i.push(t):(i=[]).push(t),this.model.set("selected",0===i.length?null:i,{updated_view:this}),this.touch(),r.event||(r.event=window.event);var l=r.event;void 0!==l.cancelBubble&&(l.cancelBubble=!0),l.stopPropagation&&l.stopPropagation(),l.preventDefault()},hovered_style_updated:function(e,t){this.hovered_style=t,this.clear_style(e.previous("hovered_style"),this.hovered_index),this.style_updated(t,this.hovered_index)},unhovered_style_updated:function(e,t){this.unhovered_style=t;var n=this.hovered_index,r=n?i.range(this.model.mark_data.length).filter((function(e){return-1===n.indexOf(e)})):[];this.clear_style(e.previous("unhovered_style"),r),this.style_updated(t,r)},draw_legend:function(e,t,n,o,s){this.legend_el=e.selectAll(".legend"+this.uuid).data([this.model.mark_data[0]]);var a=this.model.get("colors"),l=a.length,c=this,u=.8*s,h=this.legend_el.enter().append("g").attr("class","legend"+this.uuid).attr("transform",(function(e,t){return"translate(0, "+(t*s+n)+")"})).on("mouseover",i.bind((function(){this.event_dispatcher("legend_mouse_over")}),this)).on("mouseout",i.bind((function(){this.event_dispatcher("legend_mouse_out")}),this)).on("click",i.bind((function(){this.event_dispatcher("legend_clicked")}),this));this.draw_legend_elements(h,u),this.legend_el.append("text").attr("class","legendtext").attr("x",1.2*u).attr("y",u/2).attr("dy","0.35em").text((function(e,t){return c.model.get("labels")[t]})).style("fill",(function(e,t){return a[t%l]}));var d=r.max(this.model.get("labels"),(function(e){return e.length}));return this.legend_el.exit().remove(),[1,d]},draw_legend_elements:function(e,t){},invert_point:function(e){if(void 0===e)return this.model.set("selected",null),void this.touch();this.scales.x;var t=this.x_pixels.map((function(t){return Math.abs(t-e)})),n=t.indexOf(r.min(t));this.model.set("selected",[n]),this.touch()},selector_changed:function(e,t){if(void 0===e)return this.model.set("selected",null),this.touch(),[];var n=this.pixel_coords,r=i.range(n.length),o=i.filter(r,(function(t){return e(n[t])}));this.model.set("selected",o),this.touch()},update_selected:function(e,t){this.selected_indices=t,this.apply_styles()},update_hovered:function(e,t){this.hovered_index=null===t?t:[t],this.apply_styles()},apply_styles:function(e){void 0!==e&&null!=e||(e=[this.selected_style,this.unselected_style,this.hovered_style,this.unhovered_style]),s.__super__.apply_styles.apply(this,[e]);var t=i.range(this.model.mark_data.length);this.set_style_on_elements(this.hovered_style,this.hovered_index);var n=this.hovered_index?i.difference(t,this.hovered_index):[];this.set_style_on_elements(this.unhovered_style,n)},clear_style:function(e,t){var n=this.d3el.selectAll(".element");t&&(n=n.filter((function(e,n){return-1!==t.indexOf(n)})));var r={};for(var i in e)r[i]=null;n.style(r)},set_style_on_elements:function(e,t){if(t&&0!==t.length&&0!==Object.keys(e).length){var n=this.d3el.selectAll(".element");(n=n.filter((function(e,n){return-1!==t.indexOf(n)}))).style(e)}},compute_view_padding:function(){var e=Math.sqrt(this.model.get("default_size"))/2+1;e===this.x_padding&&e===this.y_padding||(this.x_padding=e,this.y_padding=e,this.trigger("mark_padding_updated"))},update_array:function(e,t){var n=this.scales.x,r=this.scales.y;if(!this.model.get("restrict_y")){var i=[];this.model.get_typed_field("x").forEach((function(e){i.push(e)})),i[t]=n.scale.invert(e[0]),this.model.set_typed_field("x",i)}if(!this.model.get("restrict_x")){var o=[];this.model.get_typed_field("y").forEach((function(e){o.push(e)})),o[t]=r.scale.invert(e[1]),this.model.set_typed_field("y",o)}this.touch()},set_drag_behavior:function(){var e=this.d3el.selectAll(".object_grp");this.model.get("enable_move")?e.call(this.drag_listener):e.on(".drag",null)},set_drag_style:function(e,t,n){},reset_drag_style:function(e,t,n){},drag_start:function(e,t,n){var r=this.scales.x,i=this.scales.y;e[0]=r.scale(e.x)+r.offset,e[1]=i.scale(e.y)+i.offset,this.set_drag_style(e,t,n),this.send({event:"drag_start",point:{x:e.x,y:e.y},index:t})},on_drag:function(e,t,n){var i=this.scales.x,o=this.scales.y,s=this.model.get("restrict_x"),a=this.model.get("restrict_y");s&&a||(a||(e[0]=r.event.x),s||(e[1]=r.event.y),r.select(n).attr("transform",(function(){return"translate("+e[0]+","+e[1]+")"})),this.send({event:"drag",origin:{x:e.x,y:e.y},point:{x:i.invert(e[0]),y:o.invert(e[1])},index:t}),this.model.get("update_on_move")&&this.update_array(e,t))},drag_ended:function(e,t,n){var r=this.scales.x,i=this.scales.y;this.reset_drag_style(e,t,n),this.update_array(e,t),this.send({event:"drag_end",point:{x:r.invert(e[0]),y:i.invert(e[1])},index:t})},selected_deleter:function(){r.event.stopPropagation()},add_element:function(){var e=r.mouse(this.el),t=[e[0],e[1]],n=this.scales.x,i=this.scales.y,o=[];this.model.get_typed_field("x").forEach((function(e){o.push(e)}));var s=[];this.model.get_typed_field("y").forEach((function(e){s.push(e)})),o.push(n.scale.invert(t[0])),s.push(i.scale.invert(t[1])),this.model.set_typed_field("x",o),this.model.set_typed_field("y",s),this.touch()}});e.exports={ScatterBase:s}},function(e,t,n){n(1);var r=n(0),i=n(20),o=i.MarkModel.extend({defaults:function(){return r.extend({},i.MarkModel.prototype.defaults,{_model_name:"ScatterBaseModel",_view_name:"ScatterBase",x:[],y:[],color:null,opacity:null,size:null,rotation:null,hovered_point:null,scales_metadata:{x:{orientation:"horizontal",dimension:"x"},y:{orientation:"vertical",dimension:"y"},color:{dimension:"color"},size:{dimension:"size"},opacity:{dimension:"opacity"},rotation:{dimension:"rotation"}},colors:[],default_opacities:[],enable_move:!1,enable_delete:!1,restrict_x:!1,restrict_y:!1,update_on_move:!1})},initialize:function(){o.__super__.initialize.apply(this,arguments),this.on_some_change(["x","y","color","opacity","size","rotation"],this.update_data,this),this.on_some_change(["preserve_domain"],this.update_domains,this),this.update_data()},update_mark_data:function(){var e=this.get_typed_field("x"),t=this.get_typed_field("y"),n=this.get("scales"),r=(n.x,n.y,n.color);if(0===e.length||0===t.length)this.mark_data=[];else{var i=Math.min(e.length,t.length);e=e.slice(0,i);var o=this.get_typed_field("color"),s=this.get_typed_field("size"),a=this.get_typed_field("opacity"),l=this.get_typed_field("rotation");r&&(this.get("preserve_domain").color?r.del_domain([],this.model_id+"_color"):r.compute_and_set_domain(o,this.model_id+"_color")),this.mark_data=e.map((function(e,n){return{x:e,y:t[n],color:o[n],size:s[n],opacity:a[n],rotation:l[n],index:n}}))}},update_data:function(){this.dirty=!0,this.update_mark_data(),this.update_unique_ids(),this.update_domains(),this.dirty=!1,this.trigger("data_updated")},update_unique_ids:function(){},get_data_dict:function(e,t){return e},update_domains:function(){if(this.mark_data){var e=this.get("scales");for(var t in e)if(e.hasOwnProperty(t)&&"color"!=t){var n=e[t];this.get("preserve_domain")[t]?n.del_domain([],this.model_id+t):n.compute_and_set_domain(this.mark_data.map((function(e){return e[t]})),this.model_id+t)}}}});e.exports={ScatterBaseModel:o}},function(e,t){e.exports={point_in_lasso:function(e,t){for(var n,r,i,o,s=e[0],a=e[1],l=!1,c=0,u=t.length-1;c<t.length;u=c++)n=t[c][0],i=t[c][1],r=t[u][0],i>a!=(o=t[u][1])>a&&s<(r-n)*(a-i)/(o-i)+n&&(l=!l);return l}}},function(e,t,n){n(0);var r=n(69).Scale.extend({render:function(){this.create_d3_scale(),this.model.domain.length>0&&this.scale.domain(this.model.domain),this.offset=0,this.create_event_listeners(),this.set_range()},create_d3_scale:function(){this.scale=d3.scale.linear()},create_event_listeners:function(){r.__super__.create_event_listeners.apply(this),this.listenTo(this.model,"colors_changed",this.set_range,this)},set_range:function(){this.scale.range(this.model.color_range),this.trigger("color_scale_range_changed")}});e.exports={ColorScale:r}},function(e,t,n){var r=n(1),o=n(0),s=n(71),a=n(102),l=s.LinearScaleModel.extend({set_init_state:function(){this.type="color_linear",this.color_range=[],this.mid=null},set_listeners:function(){l.__super__.set_listeners.apply(this,arguments),this.on_some_change(["colors","scheme"],this.colors_changed,this),this.on("change:mid",this.update_domain,this),this.colors_changed()},update_domain:function(){var e=this,t=this.min_from_data?r.min(o.map(this.domains,(function(t){return t.length>0?t[0]:e.global_max}))):this.min,n=this.max_from_data?r.max(o.map(this.domains,(function(t){return t.length>0?t[t.length-1]:e.global_min}))):this.max,i=this.mid;this.mid=this.get("mid");var s=this.domain,a=s.length,l=this.color_range.length;t==s[0]&&n==s[a-1]&&l==a&&this.mid==i||(this.domain=this.create_domain(t,this.mid,n,l),this.trigger("domain_changed",this.domain))},create_domain:function(e,t,n,o){var s=r.scale.linear();if(null==t)s.domain([0,o-1]).range([e,n]);else{var a=o/2;s.domain([0,a,o-1]).range([e,t,n])}var l=[];for(i=0;i<o;i++){var c=this.reverse?o-1-i:i;l.push(s(c))}return l},colors_changed:function(){var e=this.get("colors");this.color_range=e.length>0?e:a.get_linear_scale_range(this.get("scheme")),this.update_domain(),this.trigger("colors_changed")}});e.exports={ColorScaleModel:l}},function(e,t,n){var r=n(0),i=n(1),o=n(19),s=n(105),a=(n(13),s.symbol),l=o.Mark.extend({render:function(){var e=l.__super__.render.apply(this),t=this;return this.dot=a().size(this.model.get("marker_size")),this.model.get("marker")&&this.dot.type(this.model.get("marker")),this.displayed.then((function(){t.parent.tooltip_div.node().appendChild(t.tooltip_div.node()),t.create_tooltip()})),this.display_el_classes=["line","legendtext","dot"],e.then((function(){t.event_listeners={},t.process_interactions(),t.create_listeners(),t.compute_view_padding(),t.draw()}))},set_ranges:function(){var e=this.scales.x;e&&e.set_range(this.parent.padded_range("x",e.model));var t=this.scales.y;t&&t.set_range(this.parent.padded_range("y",t.model))},set_positional_scales:function(){var e=this.scales.x,t=this.scales.y;this.listenTo(e,"domain_changed",(function(){this.model.dirty||this.update_line_xy()})),this.listenTo(t,"domain_changed",(function(){this.model.dirty||this.update_line_xy()}))},initialize_additional_scales:function(){var e=this.scales.color;e&&(this.listenTo(e,"domain_changed",(function(){this.update_style()})),e.on("color_scale_range_changed",this.update_style,this))},create_listeners:function(){l.__super__.create_listeners.apply(this),this.d3el.on("mouseover",r.bind((function(){this.event_dispatcher("mouse_over")}),this)).on("mousemove",r.bind((function(){this.event_dispatcher("mouse_move")}),this)).on("mouseout",r.bind((function(){this.event_dispatcher("mouse_out")}),this)),this.listenTo(this.model,"change:tooltip",this.create_tooltip,this),this.listenTo(this.model,"change:interpolation",this.update_path_style,this),this.listenTo(this.model,"change:close_path",this.update_path_style,this),this.listenTo(this.model,"change:colors",this.update_style,this),this.listenTo(this.model,"change:opacities",this.update_style,this),this.listenTo(this.model,"change:fill_opacities",this.update_style,this),this.listenTo(this.model,"change:fill_colors",this.update_style,this),this.listenTo(this.model,"change:fill",this.update_fill,this),this.listenTo(this.model,"data_updated",(function(){this.draw(!0)}),this),this.listenTo(this.model,"labels_updated",this.update_labels,this),this.listenTo(this.model,"change:stroke_width",this.update_stroke_width,this),this.listenTo(this.model,"change:labels_visibility",this.update_legend_labels,this),this.listenTo(this.model,"change:curves_subset",this.update_curves_subset,this),this.listenTo(this.model,"change:line_style",this.update_line_style,this),this.listenTo(this.model,"change:interactions",this.process_interactions),this.listenTo(this.parent,"bg_clicked",(function(){this.event_dispatcher("parent_clicked")})),this.listenTo(this.model,"change:marker",this.update_marker,this),this.listenTo(this.model,"change:marker_size",this.update_marker_size,this)},update_legend_labels:function(){"none"===this.model.get("labels_visibility")?(this.d3el.selectAll(".legend").attr("display","none"),this.d3el.selectAll(".curve_label").attr("display","none")):"label"===this.model.get("labels_visibility")?(this.d3el.selectAll(".legend").attr("display","none"),this.d3el.selectAll(".curve_label").attr("display","inline")):(this.d3el.selectAll(".legend").attr("display","inline"),this.d3el.selectAll(".curve_label").attr("display","none"))},update_labels:function(){this.d3el.selectAll(".curve").data(this.model.mark_data).select(".curve_label").text((function(e){return e.name}))},get_line_style:function(){switch(this.model.get("line_style")){case"solid":return"none";case"dashed":return"10,10";case"dotted":return"2,10";case"dash_dotted":return"10,5,2,5"}},update_line_style:function(){this.d3el.selectAll(".curve").select(".line").style("stroke-dasharray",r.bind(this.get_line_style,this)),this.legend_el&&this.legend_el.select("path").style("stroke-dasharray",r.bind(this.get_line_style,this))},update_stroke_width:function(e,t){this.compute_view_padding(),this.d3el.selectAll(".curve").select(".line").style("stroke-width",t),this.legend_el&&this.legend_el.select("path").style("stroke-width",t)},update_style:function(){var e=this,t=this.model.get("fill"),n=this.model.get("fill_colors"),r=this.model.get("opacities"),i=this.model.get("fill_opacities"),o=this.d3el.selectAll(".curve");o.select(".line").style("opacity",(function(e,t){return r[t]})).style("stroke",(function(t,r){return e.get_element_color(t,r)||n[r]})).style("fill",(function(n,r){return"inside"===t?e.get_fill_color(n,r):""})),o.select(".area").style("fill",(function(t,n){return e.get_fill_color(t,n)})).style("opacity",(function(e,t){return i[t]})),this.update_marker_style(),this.legend_el&&(this.legend_el.select(".line").style("stroke",(function(t,r){return e.get_element_color(t,r)||n[r]})).style("opacity",(function(e,t){return r[t]})).style("fill",(function(t,n){return"none"===e.model.get("fill")?"":e.get_fill_color(t,n)})),this.legend_el.select(".dot").style("stroke",(function(t,r){return e.get_element_color(t,r)||n[r]})).style("opacity",(function(e,t){return r[t]})).style("fill",(function(t,r){return e.get_element_color(t,r)||n[r]})),this.legend_el.select("text").style("fill",(function(t,r){return e.get_element_color(t,r)||n[r]})).style("opacity",(function(e,t){return r[t]}))),this.update_stroke_width(this.model,this.model.get("stroke_width")),this.update_line_style()},path_closure:function(){return this.model.get("close_path")?"Z":""},update_path_style:function(){var e=this.model.get("interpolation");this.line.interpolate(e),this.area.interpolate(e);var t=this;this.d3el.selectAll(".curve").select(".line").attr("d",(function(e){return t.line(e.values)+t.path_closure()})),this.d3el.selectAll(".curve").select(".area").transition("update_path_style").duration(0).attr("d",(function(e){return t.area(e.values)})),this.legend_el&&(this.legend_line.interpolate(e),this.legend_el.selectAll("path").attr("d",this.legend_line(this.legend_path_data)+this.path_closure()))},relayout:function(){this.set_ranges(),this.update_line_xy()},selector_changed:function(e,t){if(void 0===e)return this.model.set("selected",null),this.touch(),[];var n=this.pixel_coords,i=r.range(n.length),o=r.filter(i,(function(t){return e(n[t])}));this.model.set("selected",o),this.touch()},invert_point:function(e){if(void 0===e)return this.model.set("selected",null),void this.touch();this.scales.x;var t=Math.min(this.bisect(this.x_pixels,e),Math.max(this.x_pixels.length-1,0));this.model.set("selected",[t]),this.touch()},update_multi_range:function(e){this.scales.x,this.scales.y;var t=e[0],n=e[1],r=this.model.x_data[0]instanceof Array?this.model.x_data[0]:this.model.x_data,i=this.bisect(r,t),o=Math.min(this.bisect(r,n),Math.max(r.length-1,0));this.selector_model.set("selected",[i,o]),this.selector.touch()},draw_legend:function(e,t,n,o,s){var a=this.model.get_labels(),l=this.model.mark_data.map((function(e){return{index:e.index,name:e.name,color:e.color}}));this.legend_el=e.selectAll(".legend"+this.uuid).data(l);var c=this,u=.8*s,h=this.model.get("fill_colors"),d=this.model.get("opacities");this.legend_line=i.svg.line().interpolate(this.model.get("interpolation")).x((function(e){return e[0]})).y((function(e){return e[1]})),this.legend_path_data=[[0,u],[u/2,0],[u,u/2]];var p=this.legend_el.enter().append("g").attr("class","legend"+this.uuid).attr("transform",(function(e,t){return"translate(0, "+(t*s+n)+")"})).on("mouseover",r.bind((function(){this.event_dispatcher("legend_mouse_over")}),this)).on("mouseout",r.bind((function(){this.event_dispatcher("legend_mouse_out")}),this)).on("click",r.bind((function(){this.event_dispatcher("legend_clicked")}),this));p.append("path").attr("class","line").attr("fill","none").attr("d",this.legend_line(this.legend_path_data)+this.path_closure()).style("stroke",(function(e,t){return c.get_element_color(e,t)||h[t]})).style("fill",(function(e,t){return"none"===c.model.get("fill")?"":c.get_fill_color(e,t)})).style("opacity",(function(e,t){return d[t]})).style("stroke-width",this.model.get("stroke_width")).style("stroke-dasharray",r.bind(this.get_line_style,this)),this.model.get("marker")&&p.append("path").attr("class","dot").attr("transform","translate("+u/2+",0)").attr("d",c.dot.size(25)).style("fill",(function(e,t){return c.get_element_color(e,t)})),this.legend_el.append("text").attr("class","legendtext").attr("x",1.2*u).attr("y",u/2).attr("dy","0.35em").text((function(e,t){return a[t]})).style("fill",(function(e,t){return c.get_element_color(e,t)||h[t]})).style("opacity",(function(e,t){return d[t]}));var f=i.max(a,(function(e){return e.length}));return this.legend_el.exit().remove(),[this.model.mark_data.length,f]},update_curves_subset:function(){var e="label"===this.model.get("labels_visibility"),t=this.model.get("curves_subset");t.length>0?(this.d3el.selectAll(".curve").attr("display",(function(e,n){return-1!==t.indexOf(n)?"inline":"none"})).select(".curve_label").attr("display",(function(n,r){return-1!==t.indexOf(r)&&e?"inline":"none"})),this.legend_el&&this.legend_el.attr("display",(function(e,n){return-1!==t.indexOf(n)?"inline":"none"})),this.d3el.selectAll(".curve")):(this.d3el.selectAll(".curve").attr("display","inline").select(".curve_label").attr("display",(function(t){return e?"inline":"none"})),this.legend_el&&this.legend_el.attr("display","inline"))},update_fill:function(){var e=this.model.get("fill"),t="top"===e||"bottom"===e||"between"===e,n=this.scales.y;this.area.defined((function(e){return t&&null!==e.y&&isFinite(n.scale(e.y))})),"bottom"==e?this.area.y0(this.parent.plotarea_height):"top"==e?this.area.y0(0):"between"==e&&this.area.y0((function(e){return n.scale(e.y0)+n.offset}));var r=this;this.d3el.selectAll(".curve").select(".area").attr("d",(function(e){return r.area(e.values)})),this.d3el.selectAll(".curve").select(".line").style("fill",(function(t,n){return"inside"===e?r.get_fill_color(t,n):""})),this.legend_el&&this.legend_el.select("path").style("fill",(function(t,n){return"none"===e?"":r.get_fill_color(t,n)}))},get_element_color:function(e,t){var n=this.scales.color;return n&&void 0!==e.color&&null!==e.color?n.scale(e.color):this.get_colors(t)},get_fill_color:function(e,t){var n=this.model.get("fill_colors");return 0===n.length?this.get_element_color(e,t):n[t]},update_line_xy:function(e){var t=this.scales.x,n=this.scales.y,r=!0===e?this.parent.model.get("animation_duration"):0;this.line.x((function(e){return t.scale(e.x)+t.offset})).y((function(e){return n.scale(e.y)+n.offset}));var i=this.model.get("fill");this.area.x((function(e){return t.scale(e.x)+t.offset})).y1((function(e){return n.scale(e.y)+n.offset})),"bottom"==i?this.area.y0(this.parent.plotarea_height):"top"==i?this.area.y0(0):"between"==i&&this.area.y0((function(e){return n.scale(e.y0)+n.offset}));var o=this,s=this.d3el.selectAll(".curve");s.select(".line").transition("update_line_xy").duration(r).attr("d",(function(e){return o.line(e.values)+o.path_closure()})),s.select(".area").transition("update_line_xy").duration(r).attr("d",(function(e,t){return o.area(e.values)})),s.select(".curve_label").transition("update_line_xy").duration(r).attr("transform",(function(e){var r=e.values[e.values.length-1];return"translate("+t.scale(r.x)+","+n.scale(r.y)+")"})),this.update_dots_xy(e),this.x_pixels=this.model.mark_data.length>0?this.model.mark_data[0].values.map((function(e){return t.scale(e.x)+t.offset})):[],this.y_pixels=this.model.mark_data.length>0?this.model.mark_data[0].values.map((function(e){return n.scale(e.y)+n.offset})):[],this.pixel_coords=this.model.mark_data.length>0?this.model.mark_data[0].values.map((function(e){return[t.scale(e.x)+t.offset,n.scale(e.y)+n.offset]})):[]},draw:function(e){this.set_ranges();var t=this.d3el.selectAll(".curve").data(this.model.mark_data),n=this.scales.y,o=t.enter().append("g").attr("class","curve");o.append("path").attr("class","line").attr("fill","none"),o.append("path").attr("class","area"),o.append("text").attr("class","curve_label").attr("x",3).attr("dy",".35em").attr("display","label"!==this.model.get("labels_visibility")?"none":"inline").text((function(e){return e.name}));var s=this.model.get("fill"),a="top"===s||"bottom"===s||"between"===s;t.select(".line").attr("id",(function(e,t){return"curve"+(t+1)})).on("click",r.bind((function(){this.event_dispatcher("element_clicked")}),this)),this.draw_dots(),this.line=i.svg.line().interpolate(this.model.get("interpolation")).defined((function(e){return null!==e.y&&isFinite(n.scale(e.y))})),this.area=i.svg.area().interpolate(this.model.get("interpolation")).defined((function(e){return a&&null!==e.y&&isFinite(n.scale(e.y))})),t.exit().remove(),this.update_line_xy(e),this.update_style(),this.update_curves_subset()},draw_dots:function(){if(this.model.get("marker")){var e=this.d3el.selectAll(".curve").selectAll(".dot").data((function(e,t){return e.values.map((function(e){return{x:e.x,y:e.y,sub_index:e.sub_index}}))}));e.enter().append("path").attr("class","dot"),e.exit().remove()}},update_dots_xy:function(e){if(this.model.get("marker")){var t=this.scales.x,n=this.scales.y,r=!0===e?this.parent.model.get("animation_duration"):0;this.d3el.selectAll(".curve").selectAll(".dot").transition("update_dots_xy").duration(r).attr("transform",(function(e){return"translate("+(t.scale(e.x)+t.offset)+","+(n.scale(e.y)+n.offset)+")"})).attr("d",this.dot.size(this.model.get("marker_size")).type(this.model.get("marker")))}},compute_view_padding:function(){var e;if(this.model.get("marker")){var t=Math.sqrt(this.model.get("marker_size"))/2+1,n=this.model.get("stroke_width")/2;e=Math.max(t,n)}else e=this.model.get("stroke_width")/2;var r=e;e===this.x_padding&&r===this.y_padding||(this.x_padding=e,this.y_padding=r,this.trigger("mark_padding_updated"))},update_marker_style:function(){var e=this,t=this.model.get("fill_colors"),n=this.model.get("opacities");this.d3el.selectAll(".curve").each((function(r,o){i.select(this).selectAll(".dot").style("opacity",n[o]).style("fill",e.get_element_color(r,o)||t[o])}))},update_marker:function(e,t){t?(this.draw_dots(),this.update_dots_xy(),this.update_marker_style(),this.legend_el&&this.legend_el.select(".dot").attr("d",this.dot.type(t).size(25))):(this.d3el.selectAll(".dot").remove(),this.legend_el&&this.legend_el.select(".dot").attr("d",this.dot.size(0)))},update_marker_size:function(e,t){this.compute_view_padding(),this.d3el.selectAll(".dot").attr("d",this.dot.size(t))},process_interactions:function(){var e=this.model.get("interactions");r.isEmpty(e)?this.reset_interactions():(void 0!==e.click&&null!==e.click?"tooltip"===e.click&&(this.event_listeners.element_clicked=function(){return this.refresh_tooltip(!0)},this.event_listeners.parent_clicked=this.hide_tooltip):this.reset_click(),void 0!==e.hover&&null!==e.hover?"tooltip"===e.hover&&(this.event_listeners.mouse_over=this.refresh_tooltip,this.event_listeners.mouse_move=this.move_tooltip,this.event_listeners.mouse_out=this.hide_tooltip):this.reset_hover(),void 0!==e.legend_hover&&null!==e.legend_hover?"highlight_axes"===e.legend_hover&&(this.event_listeners.legend_mouse_over=r.bind(this.highlight_axes,this),this.event_listeners.legend_mouse_out=r.bind(this.unhighlight_axes,this)):this.reset_legend_hover())}});e.exports={Lines:l}},function(e,t,n){var r=n(9),i=n(1),o=n(0),s=n(202),a=n(203);a.__esModule&&(a=a.default);var l=r.DOMWidgetView.extend({initialize:function(){this.el.classList.add("bqplot"),this.el.classList.add("figure"),this.el.classList.add("jupyter-widgets");var e=document.createElementNS(i.ns.prefix.svg,"svg");this.el.appendChild(e),this.svg=i.select(e),l.__super__.initialize.apply(this,arguments)},_get_height_width:function(e,t){var n=this.model.get("max_aspect_ratio"),r=this.model.get("min_aspect_ratio"),i={},o=void 0===t||isNaN(t)||t<=0,s=void 0===e||isNaN(e)||t<=0;o&&s?(e=480,t=640):s?e=t/r:o&&(t=e*r);var a=t/e;return a<=n&&a>=r?(i.width=t,i.height=e):a>n?(i.height=e,i.width=e*n):(i.width=t,i.height=t/r),i},render:function(){var e=String(this.model.get("layout").get("min_width")),t=String(this.model.get("layout").get("min_height")),n=this._get_height_width(t.slice(0,-2),e.slice(0,-2));this.width=n.width,this.height=n.height,this.id=r.uuid(),this.x_pad_dict={},this.y_pad_dict={},this.x_padding_arr={},this.y_padding_arr={},this.figure_padding_x=this.model.get("padding_x"),this.figure_padding_y=this.model.get("padding_y"),this.clip_id="clip_path_"+this.id,this.margin=this.model.get("fig_margin"),this.update_plotarea_dimensions(),this.fig=this.svg.append("g").attr("transform","translate("+this.margin.left+","+this.margin.top+")"),this.tooltip_div=i.select(document.createElement("div")).attr("class","tooltip_div"),this.popper_reference=new s.PositionReference({x:0,y:0,width:20,height:20}),this.popper=new a(this.popper_reference,this.tooltip_div.node(),{placement:"auto"}),this.bg=this.fig.append("rect").attr("class","plotarea_background").attr("x",0).attr("y",0).attr("width",this.plotarea_width).attr("height",this.plotarea_height).on("click",(function(){l.trigger("bg_clicked")})).style("pointer-events","inherit").style(this.model.get("background_style")),this.fig_axes=this.fig.append("g"),this.fig_marks=this.fig.append("g"),this.interaction=this.fig.append("g"),this.clip_path=this.svg.append("svg:defs").append("svg:clipPath").attr("id",this.clip_id).append("rect").attr("x",0).attr("y",0).attr("width",this.plotarea_width).attr("height",this.plotarea_height),this.title=this.fig.append("text").attr("class","mainheading").attr({x:.5*this.plotarea_width,y:-this.margin.top/2,dy:"1em"}).text(this.model.get("title")).style(this.model.get("title_style")),this.model.on("save_png",this.save_png,this),this.model.on("save_svg",this.save_svg,this);var o=this.create_figure_scales(),l=this;o.then((function(){l.mark_views=new r.ViewList(l.add_mark,l.remove_mark,l),l.mark_views.update(l.model.get("marks")),Promise.all(l.mark_views.views).then((function(e){l.replace_dummy_nodes(e),l.update_marks(e),l.update_legend(),l.set_interaction(l.model.get("interaction"))})),l.axis_views=new r.ViewList(l.add_axis,null,l),l.axis_views.update(l.model.get("axes")),l.model.on_some_change(["fig_margin","min_aspect_ration","max_aspect_ratio","preserve_aspect"],l.relayout,l),l.model.on_some_change(["padding_x","padding_y"],(function(){this.figure_padding_x=this.model.get("padding_x"),this.figure_padding_y=this.model.get("padding_y"),this.trigger("margin_updated")}),l),l.model.on("change:axes",(function(e,t,n){this.axis_views.update(t)}),l),l.model.on("change:marks",(function(e,t,n){this.mark_views.update(t),Promise.all(this.mark_views.views).then((function(e){l.replace_dummy_nodes(e),l.update_marks(e),l.update_legend()}))}),l),l.model.on("change:legend_location",l.update_legend,l),l.model.on("change:title",l.update_title,l),l.model.on("change:interaction",(function(e,t){this.set_interaction(t)}),l),l.displayed.then((function(e){document.body.appendChild(l.tooltip_div.node()),l.create_listeners(),void 0!==e&&!0===e.add_to_dom_only||l.relayout(),window.addEventListener("resize",(function(){l.relayout()}))}))}))},replace_dummy_nodes:function(e){o.each(e,(function(e){null!==e.dummy_node&&(e.dummy_node.parentNode.replaceChild(e.el,e.dummy_node),e.dummy_node=null,this.displayed.then((function(){e.trigger("displayed")})))}),this)},create_listeners:function(){this.listenTo(this.model,"change:title_style",this.title_style_updated,this),this.listenTo(this.model,"change:background_style",this.background_style_updated,this),this.listenTo(this.model,"change:layout",this.change_layout,this),this.listenTo(this.model,"change:legend_style",this.legend_style_updated,this),this.listenTo(this.model,"change:legend_text",this.legend_text_updated,this)},title_style_updated:function(){this.title.style(this.model.get("title_style"))},background_style_updated:function(){this.bg.style(this.model.get("background_style"))},legend_style_updated:function(){this.fig_marks.selectAll(".g_legend").selectAll(".axis").selectAll("rect").style(this.model.get("legend_style"))},legend_text_updated:function(){this.fig_marks.selectAll(".g_legend").selectAll("text.legendtext").style(this.model.get("legend_text"))},create_figure_scales:function(){var e=this,t=this.create_child_view(this.model.get("scale_x")).then((function(t){e.scale_x=t,e.scale_x.scale.clamp(!0),e.scale_x.set_range([0,e.plotarea_width])})),n=this.create_child_view(this.model.get("scale_y")).then((function(t){e.scale_y=t,e.scale_y.scale.clamp(!0),e.scale_y.set_range([e.plotarea_height,0])}));return Promise.all([t,n])},padded_range:function(e,t){var n,r;if(!t.get("allow_padding"))return this.range(e);var i=t.model_id;return"x"===e?(n=void 0!==this.x_padding_arr[i]?this.x_padding_arr[i]:0,[(r=this.plotarea_width*this.figure_padding_x)+n,this.plotarea_width-r-n]):"y"===e?(n=void 0!==this.y_padding_arr[i]?this.y_padding_arr[i]:0,r=this.plotarea_height*this.figure_padding_y,[this.plotarea_height-n-r,n+r]):void 0},range:function(e){return"x"===e?[0,this.plotarea_width]:"y"===e?[this.plotarea_height,0]:void 0},get_mark_plotarea_height:function(e){if(!e.get("allow_padding"))return this.plotarea_height;var t=e.model_id,n=void 0!==this.y_padding_arr[t]?this.y_padding_arr[t]:0;return this.plotarea_height*(1-this.figure_padding_y)-n-n},get_mark_plotarea_width:function(e){if(!e.get("allow_padding"))return this.plotarea_width;var t=e.model_id,n=void 0!==this.x_padding_arr[t]?this.x_padding_arr[t]:0;return this.plotarea_width*(1-this.figure_padding_x)-n-n},add_axis:function(e){var t=this;return this.create_child_view(e).then((function(e){return t.fig_axes.node().appendChild(e.el),t.displayed.then((function(){e.trigger("displayed")})),e}))},remove_from_padding_dict:function(e,t,n){if(null!=n){var r=n.model_id;void 0!==e[r]&&(delete e[r][t.model.model_id+"_"+t.cid],0===Object.keys(e[r]).length&&delete e[r])}},update_padding_dict:function(e,t,n,r){var i=n.model_id;e[i]||(e[i]={}),e[i][t.model.model_id+"_"+t.cid]=r},mark_scales_updated:function(e){var t=e.model,n=t.previous("scales");this.remove_from_padding_dict(this.x_pad_dict,e,n[t.get_key_for_orientation("horizontal")]),this.remove_from_padding_dict(this.y_pad_dict,e,n[t.get_key_for_orientation("vertical")]);var r=t.get("scales");this.update_padding_dict(this.x_pad_dict,e,r[t.get_key_for_orientation("horizontal")],e.x_padding),this.update_padding_dict(this.y_pad_dict,e,r[t.get_key_for_orientation("vertical")],e.y_padding),this.update_paddings()},mark_padding_updated:function(e){var t=e.model,n=t.get("scales");this.update_padding_dict(this.x_pad_dict,e,n[t.get_key_for_orientation("horizontal")],e.x_padding),this.update_padding_dict(this.y_pad_dict,e,n[t.get_key_for_orientation("vertical")],e.y_padding),this.update_paddings()},update_marks:function(e){this.update_paddings()},remove_mark:function(e){var t=e.model;t.off("redraw_legend",null,this),t.off("data_updated",null,this),t.off("scales_updated",null,this),t.off("mark_padding_updated",null,this);var n=t.get("scales");this.remove_from_padding_dict(this.x_pad_dict,e,n[t.get_key_for_orientation("horizontal")]),this.remove_from_padding_dict(this.y_pad_dict,e,n[t.get_key_for_orientation("vertical")]),e.remove()},add_mark:function(e){var t=this;e.state_change.then((function(){e.on("data_updated redraw_legend",t.update_legend,t)}));var n=t.fig_marks.node().appendChild(document.createElementNS(i.ns.prefix.svg,"g"));return t.create_child_view(e,{clip_id:t.clip_id}).then((function(e){e.dummy_node=n,e.on("mark_padding_updated",(function(){t.mark_padding_updated(e)}),t),e.on("mark_scales_updated",(function(){t.mark_scales_updated(e)}),t);var r=e.model.get("scales")[e.model.get_key_for_dimension("x")],i=e.model.get("scales")[e.model.get_key_for_dimension("y")];return void 0===r&&(r=t.scale_x.model),void 0===i&&(i=t.scale_y.model),t.update_padding_dict(t.x_pad_dict,e,r,e.x_padding),t.update_padding_dict(t.y_pad_dict,e,i,e.y_padding),e}))},update_paddings:function(){var e=0;this.x_padding_arr={},this.y_padding_arr={};var t=this;o.forEach(this.x_pad_dict,(function(n,r){e=0,o.forEach(n,(function(t,n){e=Math.max(e,t)})),t.x_padding_arr[r]=e})),o.forEach(this.y_pad_dict,(function(n,r){e=0,o.forEach(n,(function(t,n){e=Math.max(e,t)})),t.y_padding_arr[r]=e})),this.trigger("margin_updated")},update_plotarea_dimensions:function(){this.plotarea_width=this.width-this.margin.left-this.margin.right,this.plotarea_height=this.height-this.margin.top-this.margin.bottom},processPhosphorMessage:function(e){switch(l.__super__.processPhosphorMessage.apply(this,arguments),e.type){case"resize":case"after-show":this.relayout()}},relayout:function(){var e=this,t=this._get_height_width(this.el.clientHeight,this.el.clientWidth);e.width=t.width,e.height=t.height,window.requestAnimationFrame((function(){e.margin=e.model.get("fig_margin"),e.update_plotarea_dimensions(),void 0!==e.scale_x&&null!==e.scale_x&&e.scale_x.set_range([0,e.plotarea_width]),void 0!==e.scale_y&&null!==e.scale_y&&e.scale_y.set_range([e.plotarea_height,0]),e.fig.attr("transform","translate("+e.margin.left+","+e.margin.top+")"),e.title.attr({x:.5*e.plotarea_width,y:-e.margin.top/2,dy:"1em"}),e.bg.attr("width",e.plotarea_width).attr("height",e.plotarea_height),e.clip_path.attr("width",e.plotarea_width).attr("height",e.plotarea_height),e.trigger("margin_updated"),e.update_legend()}))},update_legend:function(){this.fig_marks.selectAll(".g_legend").remove();this.model.get("marks").length;var e=this.model.get("legend_location"),t=this.fig_marks.append("g").attr("class","g_legend"),n=this,r=1,i=1;void 0!==this.mark_views&&null!==this.mark_views&&Promise.all(this.mark_views.views).then((function(o){o.forEach((function(e){if(e.model.get("display_legend")){var n=e.draw_legend(t,0,16*r,0,16);r+=n[0],i=n[1]?Math.max(i,n[1]):i}}));var s=n.get_legend_coords(e,24,16*(r+1),0);1!==r&&t.insert("g",":first-child").attr("class","axis").append("rect").attr({y:8,x:-8}).attr("width",i+2+"em").attr("height",16*r),i="top-right"===e||"right"===e||"bottom-right"===e?-(i+2):1;t.attr("transform","translate("+String(s[0]+16*i)+" "+String(s[1])+") "),t.selectAll("text.legendtext").style(n.model.get("legend_text")),t.selectAll(".axis").selectAll("rect").style(n.model.get("legend_style"))}))},get_legend_coords:function(e,t,n,r){var i=0,o=0,s=this.plotarea_width,a=this.plotarea_height;switch(e){case"top":i=.5*s-t,o=0;break;case"top-right":i=s-r,o=0;break;case"right":i=s-r,o=.5*a-n;break;case"bottom-right":i=s-r,o=a-n;break;case"bottom":i=.5*s-t,o=a-n;break;case"bottom-left":i=0,o=a-n;break;case"left":i=0,o=.5*a-n;break;default:i=0,o=0}return[i,o]},set_interaction:function(e){if(e){var t=this;e.state_change.then((function(){t.create_child_view(e).then((function(e){t.interaction_view&&t.interaction_view.remove(),t.interaction_view=e,t.interaction.node().appendChild(e.el),t.displayed.then((function(){e.trigger("displayed")}))}))}))}else this.interaction_view&&this.interaction_view.remove()},update_title:function(e,t){this.title.text(this.model.get("title"))},remove:function(){return void 0!==this.mark_views&&null!==this.mark_views&&this.mark_views.remove(),void 0!==this.axis_views&&null!==this.axis_views&&this.axis_views.remove(),void 0!==this.tooltip_div&&this.tooltip_div.remove(),l.__super__.remove.apply(this,arguments)},get_svg:function(){return function(e){var t=e.cloneNode(!0);t.setAttribute("version","1.1"),t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),t.style.background=window.getComputedStyle(document.body).background;var n=document.createElement("style");n.setAttribute("type","text/css"),n.innerHTML="<![CDATA[\n"+function(e,t){for(var n,r,i,o="",s=document.styleSheets,a=0;a<s.length;a++){var l=s[a].cssRules;if(l)for(var c=0;c<l.length;c++){var u=l[c];if(void 0!==u.style){var h=null;try{h=e.querySelectorAll(u.selectorText)}catch(e){console.warn("Invalid CSS selector '"+u.selectorText+"'",e)}if(h){if(e.querySelectorAll(u.selectorText).length>0){n=u.selectorText;for(var d=0;d<t.length;d++)r=t[d],i="",n=n.replace(new RegExp(r,"g"),i);o+=n+" { "+u.style.cssText+" }\n"}}else u.cssText.match(/^@font-face/)&&(o+=u.cssText+"\n")}}}return o+="svg { font-size: 10px; }\n"}(e,[".theme-dark",".theme-light",".bqplot > "])+"\n]]>";var r=document.createElement("defs");return r.appendChild(n),t.insertBefore(r,t.firstChild),t.outerHTML}(this.svg.node())},save_png:function(e){var t=this.get_svg(),n=new Image,r=this;n.onload=function(){var t=document.createElement("canvas");t.classList.add("bqplot"),t.width=r.width,t.height=r.height,t.getContext("2d").drawImage(n,0,0);var i=document.createElement("a");i.download=e||"bqplot.png",i.href=t.toDataURL("bqplot/png"),document.body.appendChild(i),i.click(),document.body.removeChild(i)},n.src="data:image/svg+xml;base64,"+btoa(t)},save_svg:function(e){var t=this.get_svg(),n=document.createElement("a");n.download=e||"bqplot.svg",n.href="data:text/plain;charset=utf-8,"+encodeURIComponent(t),document.body.appendChild(n),n.click(),document.body.removeChild(n)}});e.exports={Figure:l}},function(e,t){var n=function(){function e(e){this.elt=e}return e.prototype.getBoundingClientRect=function(){return this.elt.getBoundingClientRect()},Object.defineProperty(e.prototype,"clientWidth",{get:function(){return this.elt.clientWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clientHeight",{get:function(){return this.elt.clientHeight},enumerable:!0,configurable:!0}),e}(),r=function(){function e(e){var t=e.x,n=e.y,r=e.width,i=e.height;this.x=t,this.y=n,this.width=r,this.height=i}return e.prototype.getBoundingClientRect=function(){var e=this.width/2,t=this.height/2;return{left:this.x-e,right:this.x+e,top:this.y-t,bottom:this.y+t,width:this.width,height:this.height}},Object.defineProperty(e.prototype,"clientWidth",{get:function(){return this.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clientHeight",{get:function(){return this.height},enumerable:!0,configurable:!0}),e}();e.exports={ElementReference:n,PositionReference:r}},function(e,t,n){"use strict";n.r(t),function(e){
/**!
 * @fileOverview Kickass library to create and place poppers near their reference elements.
 * @version 1.16.1
 * @license
 * Copyright (c) 2016 Federico Zivolo and contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
var n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,r=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(n&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var i=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),r))}};function o(e){return e&&"[object Function]"==={}.toString.call(e)}function s(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function a(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=s(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:l(a(e))}function c(e){return e&&e.referenceNode?e.referenceNode:e}var u=n&&!(!window.MSInputMethodContext||!document.documentMode),h=n&&/MSIE 10/.test(navigator.userAgent);function d(e){return 11===e?u:10===e?h:u||h}function p(e){if(!e)return document.documentElement;for(var t=d(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===s(n,"position")?p(n):n:e?e.ownerDocument.documentElement:document.documentElement}function f(e){return null!==e.parentNode?f(e.parentNode):e}function g(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var s,a,l=o.commonAncestorContainer;if(e!==l&&t!==l||r.contains(i))return"BODY"===(a=(s=l).nodeName)||"HTML"!==a&&p(s.firstElementChild)!==s?p(l):l;var c=f(e);return c.host?g(c.host,t):g(e,f(t).host)}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var i=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||i;return o[n]}return e[n]}function _(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=m(t,"top"),i=m(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function v(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function y(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],d(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function b(e){var t=e.body,n=e.documentElement,r=d(10)&&getComputedStyle(n);return{height:y("Height",t,n,r),width:y("Width",t,n,r)}}var w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},x=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),k=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function S(e){return E({},e,{right:e.left+e.width,bottom:e.top+e.height})}function M(e){var t={};try{if(d(10)){t=e.getBoundingClientRect();var n=m(e,"top"),r=m(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?b(e.ownerDocument):{},a=o.width||e.clientWidth||i.width,l=o.height||e.clientHeight||i.height,c=e.offsetWidth-a,u=e.offsetHeight-l;if(c||u){var h=s(e);c-=v(h,"x"),u-=v(h,"y"),i.width-=c,i.height-=u}return S(i)}function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=d(10),i="HTML"===t.nodeName,o=M(e),a=M(t),c=l(e),u=s(t),h=parseFloat(u.borderTopWidth),p=parseFloat(u.borderLeftWidth);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var f=S({top:o.top-a.top-h,left:o.left-a.left-p,width:o.width,height:o.height});if(f.marginTop=0,f.marginLeft=0,!r&&i){var g=parseFloat(u.marginTop),m=parseFloat(u.marginLeft);f.top-=h-g,f.bottom-=h-g,f.left-=p-m,f.right-=p-m,f.marginTop=g,f.marginLeft=m}return(r&&!n?t.contains(c):t===c&&"BODY"!==c.nodeName)&&(f=_(f,t)),f}function j(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=C(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),s=t?0:m(n),a=t?0:m(n,"left"),l={top:s-r.top+r.marginTop,left:a-r.left+r.marginLeft,width:i,height:o};return S(l)}function A(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===s(e,"position"))return!0;var n=a(e);return!!n&&A(n)}function T(e){if(!e||!e.parentElement||d())return document.documentElement;for(var t=e.parentElement;t&&"none"===s(t,"transform");)t=t.parentElement;return t||document.documentElement}function P(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},s=i?T(e):g(e,c(t));if("viewport"===r)o=j(s,i);else{var u=void 0;"scrollParent"===r?"BODY"===(u=l(a(t))).nodeName&&(u=e.ownerDocument.documentElement):u="window"===r?e.ownerDocument.documentElement:r;var h=C(u,s,i);if("HTML"!==u.nodeName||A(s))o=h;else{var d=b(e.ownerDocument),p=d.height,f=d.width;o.top+=h.top-h.marginTop,o.bottom=p+h.top,o.left+=h.left-h.marginLeft,o.right=f+h.left}}var m="number"==typeof(n=n||0);return o.left+=m?n:n.left||0,o.top+=m?n:n.top||0,o.right-=m?n:n.right||0,o.bottom-=m?n:n.bottom||0,o}function O(e){return e.width*e.height}function L(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var s=P(n,r,o,i),a={top:{width:s.width,height:t.top-s.top},right:{width:s.right-t.right,height:s.height},bottom:{width:s.width,height:s.bottom-t.bottom},left:{width:t.left-s.left,height:s.height}},l=Object.keys(a).map((function(e){return E({key:e},a[e],{area:O(a[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,h=e.split("-")[1];return u+(h?"-"+h:"")}function I(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?T(t):g(t,c(n));return C(n,i,r)}function D(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function R(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function B(e,t,n){n=n.split("-")[0];var r=D(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),s=o?"top":"left",a=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return i[s]=t[s]+t[l]/2-r[l]/2,i[a]=n===a?t[a]-r[c]:t[R(a)],i}function z(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function N(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=z(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&o(n)&&(t.offsets.popper=S(t.offsets.popper),t.offsets.reference=S(t.offsets.reference),t=n(t,e))})),t}function F(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=I(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=L(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=B(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=N(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function U(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function q(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if(void 0!==document.body.style[o])return o}return null}function H(){return this.state.isDestroyed=!0,U(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[q("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function W(e){var t=e.ownerDocument;return t?t.defaultView:window}function V(e,t,n,r){n.updateBound=r,W(e).addEventListener("resize",n.updateBound,{passive:!0});var i=l(e);return function e(t,n,r,i){var o="BODY"===t.nodeName,s=o?t.ownerDocument.defaultView:t;s.addEventListener(n,r,{passive:!0}),o||e(l(s.parentNode),n,r,i),i.push(s)}(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function $(){this.state.eventsEnabled||(this.state=V(this.reference,this.options,this.state,this.scheduleUpdate))}function K(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,W(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function G(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function Y(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&G(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var J=n&&/Firefox/i.test(navigator.userAgent);function X(e,t,n){var r=z(e,(function(e){return e.name===t})),i=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!i){var o="`"+t+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}var Q=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Z=Q.slice(3);function ee(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Z.indexOf(e),r=Z.slice(n+1).concat(Z.slice(0,n));return t?r.reverse():r}var te="flip",ne="clockwise",re="counterclockwise";function ie(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),s=e.split(/(\+|\-)/).map((function(e){return e.trim()})),a=s.indexOf(z(s,(function(e){return-1!==e.search(/,|\s/)})));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==a?[s.slice(0,a).concat([s[a].split(l)[0]]),[s[a].split(l)[1]].concat(s.slice(a+1))]:[s];return(c=c.map((function(e,r){var i=(1===r?!o:o)?"height":"width",s=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,s=!0,e):s?(e[e.length-1]+=t,s=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],s=i[2];if(!o)return e;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=r}return S(a)[t]/100*o}if("vh"===s||"vw"===s){return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}(e,i,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){G(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))}))})),i}var oe={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,s=i.popper,a=-1!==["bottom","top"].indexOf(n),l=a?"left":"top",c=a?"width":"height",u={start:k({},l,o[l]),end:k({},l,o[l]+o[c]-s[c])};e.offsets.popper=E({},s,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,s=i.reference,a=r.split("-")[0],l=void 0;return l=G(+n)?[+n,0]:ie(n,o,s,a),"left"===a?(o.top+=l[0],o.left-=l[1]):"right"===a?(o.top+=l[0],o.left+=l[1]):"top"===a?(o.left+=l[0],o.top-=l[1]):"bottom"===a&&(o.left+=l[0],o.top+=l[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||p(e.instance.popper);e.instance.reference===n&&(n=p(n));var r=q("transform"),i=e.instance.popper.style,o=i.top,s=i.left,a=i[r];i.top="",i.left="",i[r]="";var l=P(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=s,i[r]=a,t.boundaries=l;var c=t.priority,u=e.offsets.popper,h={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),k({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(r=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),k({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=E({},u,h[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,s=-1!==["top","bottom"].indexOf(i),a=s?"right":"bottom",l=s?"left":"top",c=s?"width":"height";return n[a]<o(r[l])&&(e.offsets.popper[l]=o(r[l])-n[c]),n[l]>o(r[a])&&(e.offsets.popper[l]=o(r[a])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!X(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,a=o.popper,l=o.reference,c=-1!==["left","right"].indexOf(i),u=c?"height":"width",h=c?"Top":"Left",d=h.toLowerCase(),p=c?"left":"top",f=c?"bottom":"right",g=D(r)[u];l[f]-g<a[d]&&(e.offsets.popper[d]-=a[d]-(l[f]-g)),l[d]+g>a[f]&&(e.offsets.popper[d]+=l[d]+g-a[f]),e.offsets.popper=S(e.offsets.popper);var m=l[d]+l[u]/2-g/2,_=s(e.instance.popper),v=parseFloat(_["margin"+h]),y=parseFloat(_["border"+h+"Width"]),b=m-e.offsets.popper[d]-v-y;return b=Math.max(Math.min(a[u]-g,b),0),e.arrowElement=r,e.offsets.arrow=(k(n={},d,Math.round(b)),k(n,p,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(U(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=P(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=R(r),o=e.placement.split("-")[1]||"",s=[];switch(t.behavior){case te:s=[r,i];break;case ne:s=ee(r);break;case re:s=ee(r,!0);break;default:s=t.behavior}return s.forEach((function(a,l){if(r!==a||s.length===l+1)return e;r=e.placement.split("-")[0],i=R(r);var c=e.offsets.popper,u=e.offsets.reference,h=Math.floor,d="left"===r&&h(c.right)>h(u.left)||"right"===r&&h(c.left)<h(u.right)||"top"===r&&h(c.bottom)>h(u.top)||"bottom"===r&&h(c.top)<h(u.bottom),p=h(c.left)<h(n.left),f=h(c.right)>h(n.right),g=h(c.top)<h(n.top),m=h(c.bottom)>h(n.bottom),_="left"===r&&p||"right"===r&&f||"top"===r&&g||"bottom"===r&&m,v=-1!==["top","bottom"].indexOf(r),y=!!t.flipVariations&&(v&&"start"===o&&p||v&&"end"===o&&f||!v&&"start"===o&&g||!v&&"end"===o&&m),b=!!t.flipVariationsByContent&&(v&&"start"===o&&f||v&&"end"===o&&p||!v&&"start"===o&&m||!v&&"end"===o&&g),w=y||b;(d||_||w)&&(e.flipped=!0,(d||_)&&(r=s[l+1]),w&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=E({},e.offsets.popper,B(e.instance.popper,e.offsets.reference,e.placement)),e=N(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return i[s?"left":"top"]=o[n]-(a?i[s?"width":"height"]:0),e.placement=R(t),e.offsets.popper=S(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!X(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=z(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,i=e.offsets.popper,o=z(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=void 0!==o?o:t.gpuAcceleration,a=p(e.instance.popper),l=M(a),c={position:i.position},u=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,o=Math.round,s=Math.floor,a=function(e){return e},l=o(i.width),c=o(r.width),u=-1!==["left","right"].indexOf(e.placement),h=-1!==e.placement.indexOf("-"),d=t?u||h||l%2==c%2?o:s:a,p=t?o:a;return{left:d(l%2==1&&c%2==1&&!h&&t?r.left-1:r.left),top:p(r.top),bottom:p(r.bottom),right:d(r.right)}}(e,window.devicePixelRatio<2||!J),h="bottom"===n?"top":"bottom",d="right"===r?"left":"right",f=q("transform"),g=void 0,m=void 0;if(m="bottom"===h?"HTML"===a.nodeName?-a.clientHeight+u.bottom:-l.height+u.bottom:u.top,g="right"===d?"HTML"===a.nodeName?-a.clientWidth+u.right:-l.width+u.right:u.left,s&&f)c[f]="translate3d("+g+"px, "+m+"px, 0)",c[h]=0,c[d]=0,c.willChange="transform";else{var _="bottom"===h?-1:1,v="right"===d?-1:1;c[h]=m*_,c[d]=g*v,c.willChange=h+", "+d}var y={"x-placement":e.placement};return e.attributes=E({},y,e.attributes),e.styles=E({},c,e.styles),e.arrowStyles=E({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return Y(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&Y(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var o=I(i,t,e,n.positionFixed),s=L(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",s),Y(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},se=function(){function e(t,n){var r=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};w(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=i(this.update.bind(this)),this.options=E({},e.Defaults,s),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(E({},e.Defaults.modifiers,s.modifiers)).forEach((function(t){r.options.modifiers[t]=E({},e.Defaults.modifiers[t]||{},s.modifiers?s.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return E({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&o(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return x(e,[{key:"update",value:function(){return F.call(this)}},{key:"destroy",value:function(){return H.call(this)}},{key:"enableEventListeners",value:function(){return $.call(this)}},{key:"disableEventListeners",value:function(){return K.call(this)}}]),e}();se.Utils=("undefined"!=typeof window?window:e).PopperUtils,se.placements=Q,se.Defaults=oe,t.default=se}.call(this,n(17))},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,a="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,c=a||l||Function("return this")(),u=Object.prototype.toString,h=Math.max,d=Math.min,p=function(){return c.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(f(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=f(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var a=i.test(e);return a||o.test(e)?s(e.slice(2),a?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,s,a,l,c=0,u=!1,m=!1,_=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,o=i;return r=i=void 0,c=t,s=e.apply(o,n)}function y(e){return c=e,a=setTimeout(w,t),u?v(e):s}function b(e){var n=e-l;return void 0===l||n>=t||n<0||m&&e-c>=o}function w(){var e=p();if(b(e))return x(e);a=setTimeout(w,function(e){var n=t-(e-l);return m?d(n,o-(e-c)):n}(e))}function x(e){return a=void 0,_&&r?v(e):(r=i=void 0,s)}function k(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===a)return y(l);if(m)return a=setTimeout(w,t),v(l)}return void 0===a&&(a=setTimeout(w,t)),s}return t=g(t)||0,f(n)&&(u=!!n.leading,o=(m="maxWait"in n)?h(g(n.maxWait)||0,t):o,_="trailing"in n?!!n.trailing:_),k.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=l=i=a=void 0},k.flush=function(){return void 0===a?s:x(p())},k}}).call(this,n(17))},function(e,t,n){!function(e){"use strict";var t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},n={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",fadeColor:"transparent",animation:"spinner-line-fade-default",rotate:0,direction:1,speed:1,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:"0 0 1px transparent",position:"absolute"},r=function(){function e(e){void 0===e&&(e={}),this.opts=t(t({},n),e)}return e.prototype.spin=function(e){return this.stop(),this.el=document.createElement("div"),this.el.className=this.opts.className,this.el.setAttribute("role","progressbar"),i(this.el,{position:this.opts.position,width:0,zIndex:this.opts.zIndex,left:this.opts.left,top:this.opts.top,transform:"scale("+this.opts.scale+")"}),e&&e.insertBefore(this.el,e.firstChild||null),function(e,t){var n=Math.round(t.corners*t.width*500)/1e3+"px",r="none";!0===t.shadow?r="0 2px 4px #000":"string"==typeof t.shadow&&(r=t.shadow);for(var a=function(e){for(var t=/^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/,n=[],r=0,i=e.split(",");r<i.length;r++){var o=i[r].match(t);if(null!==o){var s=+o[2],a=+o[5],l=o[4],c=o[7];0!==s||l||(l=c),0!==a||c||(c=l),l===c&&n.push({prefix:o[1]||"",x:s,y:a,xUnits:l,yUnits:c,end:o[8]})}}return n}(r),l=0;l<t.lines;l++){var c=~~(360/t.lines*l+t.rotate),u=i(document.createElement("div"),{position:"absolute",top:-t.width/2+"px",width:t.length+t.width+"px",height:t.width+"px",background:o(t.fadeColor,l),borderRadius:n,transformOrigin:"left",transform:"rotate("+c+"deg) translateX("+t.radius+"px)"}),h=l*t.direction/t.lines/t.speed;h-=1/t.speed;var d=i(document.createElement("div"),{width:"100%",height:"100%",background:o(t.color,l),borderRadius:n,boxShadow:s(a,c),animation:1/t.speed+"s linear "+h+"s infinite "+t.animation});u.appendChild(d),e.appendChild(u)}}(this.el,this.opts),this},e.prototype.stop=function(){return this.el&&("undefined"!=typeof requestAnimationFrame?cancelAnimationFrame(this.animateId):clearTimeout(this.animateId),this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=void 0),this},e}();function i(e,t){for(var n in t)e.style[n]=t[n];return e}function o(e,t){return"string"==typeof e?e:e[t%e.length]}function s(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r],s=a(o.x,o.y,t);n.push(o.prefix+s[0]+o.xUnits+" "+s[1]+o.yUnits+o.end)}return n.join(", ")}function a(e,t,n){var r=n*Math.PI/180,i=Math.sin(r),o=Math.cos(r);return[Math.round(1e3*(e*o+t*i))/1e3,Math.round(1e3*(-e*i+t*o))/1e3]}e.Spinner=r,window.Spinner=r,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(382)),t.version=n(498).version,t.generateEmbedScript=function(e,t){return["<img src="+t+' class="jupyter-widget">','<script type="application/vnd.jupyter.widgets-state+json">'+JSON.stringify(e)+"<\/script>"].join("\n")}},function(e,t,n){e.exports={};var r=[n(192),n(499),n(19),n(500),n(501),n(20),n(502),n(503),n(504),n(505),n(506),n(507),n(28),n(508),n(509),n(510),n(511),n(512),n(513),n(68),n(193),n(514),n(515),n(516),n(517),n(518),n(519),n(520),n(197),n(521),n(194),n(198),n(522),n(102),n(199),n(523),n(524),n(104),n(69),n(525),n(71),n(70),n(526),n(200),n(527),n(528),n(529),n(530),n(531),n(532),n(52),n(201),n(533),n(534),n(535),n(536),n(537),n(538),n(539),n(540),n(542),n(105),n(13),n(543),n(544),n(545),n(546),n(547),n(548),n(549),n(550),n(551),n(552),n(553)];for(var i in r)if(r.hasOwnProperty(i)){var o=r[i];for(var s in o)o.hasOwnProperty(s)&&(e.exports[s]=o[s])}e.exports.version=n(21).version},,function(e,t,n){var r=n(23),i=n(73),o=n(74),s=n(212),a=r.navigator,l=!!a&&/MSIE .\./.test(a.userAgent),c=function(e){return l?function(t,n){return e(o(s,[].slice.call(arguments,2),"function"==typeof t?t:Function(t)),n)}:e};i(i.G+i.B+i.F*l,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(e,t,n){e.exports=!n(211)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var r=n(213),i=n(74),o=n(114);e.exports=function(){for(var e=o(this),t=arguments.length,n=Array(t),s=0,a=r._,l=!1;t>s;)(n[s]=arguments[s++])===a&&(l=!0);return function(){var r,o=this,s=arguments,c=s.length,u=0,h=0;if(!l&&!c)return i(e,n,o);if(r=n.slice(),l)for(;t>u;u++)r[u]===a&&(r[u]=s[h++]);for(;c>h;)r.push(s[h++]);return i(e,r,o)}}},function(e,t,n){e.exports=n(23)},function(e,t,n){var r=n(73),i=n(215);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){var r,i,o,s=n(113),a=n(74),l=n(216),c=n(217),u=n(23),h=u.process,d=u.setImmediate,p=u.clearImmediate,f=u.MessageChannel,g=0,m={},_=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},v=function(e){_.call(e.data)};d&&p||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++g]=function(){a("function"==typeof e?e:Function(e),t)},r(g),g},p=function(e){delete m[e]},"process"==n(115)(h)?r=function(e){h.nextTick(s(_,e,1))}:f?(o=(i=new f).port2,i.port1.onmessage=v,r=s(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(r=function(e){u.postMessage(e+"","*")},u.addEventListener("message",v,!1)):r="onreadystatechange"in c("script")?function(e){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),_.call(e)}}:function(e){setTimeout(s(_,e,1),0)}),e.exports={set:d,clear:p}},function(e,t,n){e.exports=n(23).document&&document.documentElement},function(e,t,n){var r=n(218),i=n(23).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){n(220);var r=n(23),i=n(31),o=n(75),s=n(39)("iterator"),a=r.NodeList,l=r.HTMLCollection,c=a&&a.prototype,u=l&&l.prototype,h=o.NodeList=o.HTMLCollection=o.Array;c&&!c[s]&&i(c,s,h),u&&!u[s]&&i(u,s,h)},function(e,t,n){"use strict";var r=n(221),i=n(223),o=n(75),s=n(224);e.exports=n(227)(Array,"Array",(function(e,t){this._t=s(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var r=n(39)("unscopables"),i=Array.prototype;null==i[r]&&n(31)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){var r=n(23),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(225),i=n(226);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(115);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t,n){"use strict";var r=n(228),i=n(73),o=n(111),s=n(31),a=n(116),l=n(75),c=n(229),u=n(117),h=n(56).getProto,d=n(39)("iterator"),p=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,n,g,m,_,v){c(n,t,g);var y,b,w=function(e){if(!p&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",k="values"==m,E=!1,S=e.prototype,M=S[d]||S["@@iterator"]||m&&S[m],C=M||w(m);if(M){var j=h(C.call(new e));u(j,x,!0),!r&&a(S,"@@iterator")&&s(j,d,f),k&&"values"!==M.name&&(E=!0,C=function(){return M.call(this)})}if(r&&!v||!p&&!E&&S[d]||s(S,d,C),l[t]=C,l[x]=f,m)if(y={values:k?C:w("values"),keys:_?C:w("keys"),entries:k?w("entries"):C},v)for(b in y)b in S||o(S,b,y[b]);else i(i.P+i.F*(p||E),t,y);return y}},function(e,t){e.exports=!1},function(e,t,n){"use strict";var r=n(56),i=n(110),o=n(117),s={};n(31)(s,n(39)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r.create(s,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(231);"string"==typeof r&&(r=[[e.i,r,""]]);var i={transform:void 0};n(40)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(25)(!1)).push([e.i,"/*\n * This file is converted from bqplot.less so we don't have to so LESS\n * transpilation ourselves.\n */\n.theme-light .bqplot {\n  box-sizing: border-box;\n  display: flex;\n  width: 640px;\n  height: 480px;\n}\n.theme-light .bqplot > svg {\n  font: 11px sans-serif;\n  user-select: none;\n  -ms-user-select: none;\n  -khtml-user-select: none;\n  -webkit-user-select: none;\n  flex-grow: 1;\n}\n.theme-light .bqplot > svg .axis line {\n  shape-rendering: crispEdges;\n  font: 10px sans-serif;\n  stroke-width: 1px;\n}\n.theme-light .bqplot > svg .axis path,\n.theme-light .bqplot > svg .axis line {\n  fill: none;\n}\n.theme-light .bqplot > svg .axis text.axislabel,\n.theme-light .bqplot > svg .axis tspan.axislabel {\n  text-anchor: end;\n  font: 14px sans-serif;\n}\n.theme-light .bqplot > svg .axis .tick text {\n  cursor: default;\n}\n.theme-light .bqplot > svg .axis.axisbold path {\n  stroke-width: 3px;\n}\n.theme-light .bqplot > svg .axis.axisbold text,\n.theme-light .bqplot > svg .axis.axisbold text.axislabel {\n  font-weight: bolder;\n}\n.theme-light .bqplot > svg text.mainheading {\n  text-anchor: middle;\n  font: 16px sans-serif;\n}\n.theme-light .bqplot > svg .zeroLine {\n  shape-rendering: crispEdges;\n}\n.theme-light .bqplot > svg .brushintsel,\n.theme-light .bqplot > svg .intsel {\n  pointer-events: none;\n}\n.theme-light .bqplot > svg .indsel {\n  stroke: red;\n}\n.theme-light .bqplot > svg .brushintsel,\n.theme-light .bqplot > svg .intsel {\n  fill-opacity: 0.2;\n}\n.theme-light .bqplot > svg .intselmouse {\n  visibility: hidden;\n  pointer-events: all;\n}\n.theme-light .bqplot > svg text.legendtext {\n  text-anchor: start;\n  font: 14px sans-serif;\n}\n.theme-light .bqplot > svg .multiselector .active {\n  pointer-events: all !important;\n  stroke: green;\n}\n.theme-light .bqplot > svg .multiselector .inactive {\n  pointer-events: none !important;\n  stroke: red;\n}\n.theme-light .bqplot > svg .multiselector .visible {\n  pointer-events: visible !important;\n  stroke: red;\n}\n.theme-light .bqplot > svg .lassoselector .selected {\n  opacity: 0.3;\n}\n.theme-light .bqplot > svg .lassoselector path {\n  fill: none;\n  stroke: orange;\n  stroke-width: 4;\n}\n.theme-light .tooltip_div {\n  z-index: 1001;\n}\n.theme-light .mark_tooltip {\n  pointer-events: none;\n  z-index: 1001;\n}\n.theme-light .mark_tooltip table {\n  border-radius: 5px;\n}\n.theme-light .mark_tooltip .tooltiptext {\n  text-align: center;\n  padding: 0.5em;\n}\n.theme-light .world_map .hovered {\n  fill: Orange;\n  stroke: Orange;\n  stroke-width: 2.5px;\n}\n.theme-light .world_map #container {\n  margin: 10px 10%;\n  border: 2px solid #000;\n  border-radius: 5px;\n  height: 100%;\n  overflow: hidden;\n  background: #F0F8FF;\n}\n.theme-light .world_map .graticule {\n  fill: none;\n  stroke: #bbb;\n  stroke-width: .5px;\n  stroke-opacity: .5;\n}\n.theme-light .g_legend {\n  fill: none;\n}\n.theme-light .bqplot > svg .axis rect {\n  stroke: white;\n  opacity: 1.0;\n}\n.theme-light .bqplot > svg .axis .tick line {\n  stroke: white;\n  stroke-width: 1;\n  opacity: 1.0;\n}\n.theme-light .bqplot > svg .axis .tick.short line {\n  stroke: #8B8B8B;\n}\n.theme-light .bqplot > svg .axis .tick text {\n  fill: #8B8B8B;\n  font: 12px sans-serif;\n}\n.theme-light .bqplot > svg .stick,\n.theme-light .bqplot > svg .zeroLine {\n  stroke: black;\n  fill: black;\n}\n.theme-light .bqplot > svg .bargroup rect,\n.theme-light .bqplot > svg .bargroup path,\n.theme-light .bqplot > svg .bargroup line,\n.theme-light .bqplot > svg .boxplot rect,\n.theme-light .bqplot > svg .boxplot path,\n.theme-light .bqplot > svg .boxplot line,\n.theme-light .bqplot > svg .slice rect,\n.theme-light .bqplot > svg .slice path,\n.theme-light .bqplot > svg .slice line {\n  stroke: black;\n}\n.theme-light .bqplot > svg .sticktext {\n  fill: black;\n}\n.theme-light .bqplot > svg .brushintsel,\n.theme-light .bqplot > svg .intsel {\n  fill: #000000;\n}\n.theme-light .bqplot > svg text.axislabel,\n.theme-light .bqplot > svg tspan.axislabel {\n  fill: black;\n  font: serif;\n}\n.theme-light .bqplot > svg text.mainheading {\n  fill: black;\n  font: serif;\n  font-size: large;\n}\n.theme-light .bqplot > svg .plotarea_background {\n  fill: #F7F7F7;\n}\n.theme-light .mark_tooltip {\n  border: 2px solid black;\n  border-radius: 5px;\n  box-shadow: 1px 1px 2px rgba(10,10,10,0.8);\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  background-color: #FCFCFC;\n}\n.theme-light .mark_tooltip td {\n  border: thin solid black;\n}\n.theme-light .mark_tooltip table {\n  background: #ececec;\n}\n.theme-light .world_map path {\n  stroke: #FFF;\n  stroke-width: 0.25px;\n  fill: dodgerblue;\n}\n.theme-light .pie polyline {\n  opacity: .3;\n  stroke: black;\n  stroke-width: 1px;\n  fill: none;\n}\n.theme-light .network .node .element {\n  fill: #ccc;\n  stroke: #000;\n  stroke-width: 1.5px;\n}\n.theme-light .network .link {\n  fill: none;\n  stroke: #666;\n  stroke-width: 1.5px;\n}\n.theme-light .network .node .label {\n  font: 12px sans-serif;\n  pointer-events: none;\n  text-shadow: 0 1px 0 #fff, 1px 0 0 #fff, 0 -1px 0 #fff, -1px 0 0 #fff;\n}\n.theme-light .linkarrow {\n  fill: #000;\n}\n.bqplot {\n  box-sizing: border-box;\n  display: flex;\n  width: 640px;\n  height: 480px;\n}\n.bqplot > svg {\n  font: 11px sans-serif;\n  user-select: none;\n  -ms-user-select: none;\n  -khtml-user-select: none;\n  -webkit-user-select: none;\n  flex-grow: 1;\n}\n.bqplot > svg .axis line {\n  shape-rendering: crispEdges;\n  font: 10px sans-serif;\n  stroke-width: 1px;\n}\n.bqplot > svg .axis path,\n.bqplot > svg .axis line {\n  fill: none;\n}\n.bqplot > svg .axis text.axislabel,\n.bqplot > svg .axis tspan.axislabel {\n  text-anchor: end;\n  font: 14px sans-serif;\n}\n.bqplot > svg .axis .tick text {\n  cursor: default;\n}\n.bqplot > svg .axis.axisbold path {\n  stroke-width: 3px;\n}\n.bqplot > svg .axis.axisbold text,\n.bqplot > svg .axis.axisbold text.axislabel {\n  font-weight: bolder;\n}\n.bqplot > svg text.mainheading {\n  text-anchor: middle;\n  font: 16px sans-serif;\n}\n.bqplot > svg .zeroLine {\n  shape-rendering: crispEdges;\n}\n.bqplot > svg .brushintsel,\n.bqplot > svg .intsel {\n  pointer-events: none;\n}\n.bqplot > svg .indsel {\n  stroke: red;\n}\n.bqplot > svg .brushintsel,\n.bqplot > svg .intsel {\n  fill-opacity: 0.2;\n}\n.bqplot > svg .intselmouse {\n  visibility: hidden;\n  pointer-events: all;\n}\n.bqplot > svg text.legendtext {\n  text-anchor: start;\n  font: 14px sans-serif;\n}\n.bqplot > svg .multiselector .active {\n  pointer-events: all !important;\n  stroke: green;\n}\n.bqplot > svg .multiselector .inactive {\n  pointer-events: none !important;\n  stroke: red;\n}\n.bqplot > svg .multiselector .visible {\n  pointer-events: visible !important;\n  stroke: red;\n}\n.bqplot > svg .lassoselector .selected {\n  opacity: 0.3;\n}\n.bqplot > svg .lassoselector path {\n  fill: none;\n  stroke: orange;\n  stroke-width: 4;\n}\n.tooltip_div {\n  z-index: 1001;\n}\n.mark_tooltip {\n  pointer-events: none;\n  z-index: 1001;\n}\n.mark_tooltip table {\n  border-radius: 5px;\n}\n.mark_tooltip .tooltiptext {\n  text-align: center;\n  padding: 0.5em;\n}\n.world_map .hovered {\n  fill: Orange;\n  stroke: Orange;\n  stroke-width: 2.5px;\n}\n.world_map #container {\n  margin: 10px 10%;\n  border: 2px solid #000;\n  border-radius: 5px;\n  height: 100%;\n  overflow: hidden;\n  background: #F0F8FF;\n}\n.world_map .graticule {\n  fill: none;\n  stroke: #bbb;\n  stroke-width: .5px;\n  stroke-opacity: .5;\n}\n.g_legend {\n  fill: none;\n}\n.bqplot > svg .axis rect {\n  stroke: white;\n  opacity: 1.0;\n}\n.bqplot > svg .axis .tick line {\n  stroke: white;\n  stroke-width: 1;\n  opacity: 1.0;\n}\n.bqplot > svg .axis .tick.short line {\n  stroke: #8B8B8B;\n}\n.bqplot > svg .axis .tick text {\n  fill: #8B8B8B;\n  font: 12px sans-serif;\n}\n.bqplot > svg .stick,\n.bqplot > svg .zeroLine {\n  stroke: black;\n  fill: black;\n}\n.bqplot > svg .bargroup rect,\n.bqplot > svg .bargroup path,\n.bqplot > svg .bargroup line,\n.bqplot > svg .boxplot rect,\n.bqplot > svg .boxplot path,\n.bqplot > svg .boxplot line,\n.bqplot > svg .slice rect,\n.bqplot > svg .slice path,\n.bqplot > svg .slice line {\n  stroke: black;\n}\n.bqplot > svg .sticktext {\n  fill: black;\n}\n.bqplot > svg .brushintsel,\n.bqplot > svg .intsel {\n  fill: #000000;\n}\n.bqplot > svg text.axislabel,\n.bqplot > svg tspan.axislabel {\n  fill: black;\n  font: serif;\n}\n.bqplot > svg text.mainheading {\n  fill: black;\n  font: serif;\n  font-size: large;\n}\n.bqplot > svg .plotarea_background {\n  fill: #F7F7F7;\n}\n.mark_tooltip {\n  border: 2px solid black;\n  border-radius: 5px;\n  box-shadow: 1px 1px 2px rgba(10,10,10,0.8);\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  background-color: #FCFCFC;\n}\n.mark_tooltip td {\n  border: thin solid black;\n}\n.mark_tooltip table {\n  background: #ececec;\n}\n.world_map path {\n  stroke: #FFF;\n  stroke-width: 0.25px;\n  fill: dodgerblue;\n}\n.pie polyline {\n  opacity: .3;\n  stroke: black;\n  stroke-width: 1px;\n  fill: none;\n}\n.network .node .element {\n  fill: #ccc;\n  stroke: #000;\n  stroke-width: 1.5px;\n}\n.network .link {\n  fill: none;\n  stroke: #666;\n  stroke-width: 1.5px;\n}\n.network .node .label {\n  font: 12px sans-serif;\n  pointer-events: none;\n  text-shadow: 0 1px 0 #fff, 1px 0 0 #fff, 0 -1px 0 #fff, -1px 0 0 #fff;\n}\n.linkarrow {\n  fill: #000;\n}\n.theme-dark .bqplot {\n  box-sizing: border-box;\n  display: flex;\n  width: 640px;\n  height: 480px;\n}\n.theme-dark .bqplot > svg {\n  font: 11px sans-serif;\n  user-select: none;\n  -ms-user-select: none;\n  -khtml-user-select: none;\n  -webkit-user-select: none;\n  flex-grow: 1;\n}\n.theme-dark .bqplot > svg .axis line {\n  shape-rendering: crispEdges;\n  font: 10px sans-serif;\n  stroke-width: 1px;\n}\n.theme-dark .bqplot > svg .axis path,\n.theme-dark .bqplot > svg .axis line {\n  fill: none;\n}\n.theme-dark .bqplot > svg .axis text.axislabel,\n.theme-dark .bqplot > svg .axis tspan.axislabel {\n  text-anchor: end;\n  font: 14px sans-serif;\n}\n.theme-dark .bqplot > svg .axis .tick text {\n  cursor: default;\n}\n.theme-dark .bqplot > svg .axis.axisbold path {\n  stroke-width: 3px;\n}\n.theme-dark .bqplot > svg .axis.axisbold text,\n.theme-dark .bqplot > svg .axis.axisbold text.axislabel {\n  font-weight: bolder;\n}\n.theme-dark .bqplot > svg text.mainheading {\n  text-anchor: middle;\n  font: 16px sans-serif;\n}\n.theme-dark .bqplot > svg .zeroLine {\n  shape-rendering: crispEdges;\n}\n.theme-dark .bqplot > svg .brushintsel,\n.theme-dark .bqplot > svg .intsel {\n  pointer-events: none;\n}\n.theme-dark .bqplot > svg .indsel {\n  stroke: red;\n}\n.theme-dark .bqplot > svg .brushintsel,\n.theme-dark .bqplot > svg .intsel {\n  fill-opacity: 0.2;\n}\n.theme-dark .bqplot > svg .intselmouse {\n  visibility: hidden;\n  pointer-events: all;\n}\n.theme-dark .bqplot > svg text.legendtext {\n  text-anchor: start;\n  font: 14px sans-serif;\n}\n.theme-dark .bqplot > svg .multiselector .active {\n  pointer-events: all !important;\n  stroke: green;\n}\n.theme-dark .bqplot > svg .multiselector .inactive {\n  pointer-events: none !important;\n  stroke: red;\n}\n.theme-dark .bqplot > svg .multiselector .visible {\n  pointer-events: visible !important;\n  stroke: red;\n}\n.theme-dark .bqplot > svg .lassoselector .selected {\n  opacity: 0.3;\n}\n.theme-dark .bqplot > svg .lassoselector path {\n  fill: none;\n  stroke: orange;\n  stroke-width: 4;\n}\n.theme-dark .tooltip_div {\n  z-index: 1001;\n}\n.theme-dark .mark_tooltip {\n  pointer-events: none;\n  z-index: 1001;\n}\n.theme-dark .mark_tooltip table {\n  border-radius: 5px;\n}\n.theme-dark .mark_tooltip .tooltiptext {\n  text-align: center;\n  padding: 0.5em;\n}\n.theme-dark .world_map .hovered {\n  fill: Orange;\n  stroke: Orange;\n  stroke-width: 2.5px;\n}\n.theme-dark .world_map #container {\n  margin: 10px 10%;\n  border: 2px solid #000;\n  border-radius: 5px;\n  height: 100%;\n  overflow: hidden;\n  background: #F0F8FF;\n}\n.theme-dark .world_map .graticule {\n  fill: none;\n  stroke: #bbb;\n  stroke-width: .5px;\n  stroke-opacity: .5;\n}\n.theme-dark .g_legend {\n  fill: none;\n}\n.theme-dark .bqplot > svg {\n  background: #1a1a1a;\n}\n.theme-dark .bqplot > svg .axis rect {\n  stroke: #1A1A1A;\n}\n.theme-dark .bqplot > svg .axis path {\n  stroke: #b3b3b3;\n}\n.theme-dark .bqplot > svg .axis .tick line {\n  stroke: #3b3b3b;\n}\n.theme-dark .bqplot > svg .axis .tick.short line {\n  stroke: #B3B3B3;\n}\n.theme-dark .bqplot > svg .axis .tick text {\n  fill: #B3B3B3;\n}\n.theme-dark .bqplot > svg .stick,\n.theme-dark .bqplot > svg .zeroLine {\n  stroke: white;\n  fill: white;\n}\n.theme-dark .bqplot > svg .bargroup rect,\n.theme-dark .bqplot > svg .bargroup path,\n.theme-dark .bqplot > svg .bargroup line,\n.theme-dark .bqplot > svg .slice rect,\n.theme-dark .bqplot > svg .slice path,\n.theme-dark .bqplot > svg .slice line {\n  stroke: white;\n}\n.theme-dark .bqplot > svg .sticktext {\n  fill: white;\n}\n.theme-dark .bqplot > svg .brushintsel,\n.theme-dark .bqplot > svg .intsel {\n  fill: #ffffff;\n}\n.theme-dark .bqplot > svg text.axislabel,\n.theme-dark .bqplot > svg tspan.axislabel,\n.theme-dark .bqplot > svg text.mainheading {\n  fill: orange;\n}\n.theme-dark .bqplot > svg .plotarea_background {\n  fill: #1a1a1a;\n}\n.theme-dark .mark_tooltip {\n  border: 2px solid whitesmoke;\n  border-radius: 5px;\n  box-shadow: 1px 1px 2px rgba(245,245,245,0.8);\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  background-color: black;\n}\n.theme-dark .mark_tooltip td {\n  border: thin solid whitesmoke;\n}\n.theme-dark .mark_tooltip table {\n  background: black;\n}\n.theme-dark .world_map path {\n  stroke: black;\n  stroke-width: 0.25px;\n  fill: seagreen;\n}\n.theme-dark .pie polyline {\n  opacity: .5;\n  stroke: white;\n  stroke-width: 1px;\n  fill: none;\n}\n.theme-dark .network .node .element {\n  fill: #666;\n  stroke: #000;\n  stroke-width: 1.5px;\n}\n.theme-dark .network .node .element {\n  fill: #666;\n  stroke: #000;\n  stroke-width: 1.5px;\n}\n.theme-dark .network .link {\n  fill: none;\n  stroke: #666;\n  stroke-width: 1.5px;\n}\n.theme-dark .network .node .label {\n  font: 12px sans-serif;\n  pointer-events: none;\n  text-shadow: 0 1px 0 #000, 1px 0 0 #000, 0 -1px 0 #000, -1px 0 0 #000;\n}\n.theme-dark .linkarrow {\n  fill: #ccc;\n}\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(o)?e:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__,factory;factory=function(){function isUndefined(e){return void 0===e}function EventSupport(){}Array.prototype.push||(Array.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)this[this.length]=arguments[e];return this.length}),Array.prototype.shift||(Array.prototype.shift=function(){if(this.length>0){for(var e=this[0],t=0,n=this.length-1;t<n;t++)this[t]=this[t+1];return this.length=this.length-1,e}}),Array.prototype.splice||(Array.prototype.splice=function(e,t){var n=this.slice(e+t),r=this.slice(e,e+t);this.length=e;for(var i=[],o=0,s=arguments.length;o<s;o++)i[o]=arguments[o];var a=i.length>2?n=i.slice(2).concat(n):n;for(o=0,s=a.length;o<s;o++)this.push(a[o]);return r}),EventSupport.prototype={eventTypes:[],eventListeners:{},setEventTypes:function(e){if(e instanceof Array){this.eventTypes=e,this.eventListeners={};for(var t=0,n=this.eventTypes.length;t<n;t++)this.eventListeners[this.eventTypes[t]]=[]}else handleError("log4javascript.EventSupport ["+this+"]: setEventTypes: eventTypes parameter must be an Array")},addEventListener:function(e,t){"function"==typeof t?(array_contains(this.eventTypes,e)||handleError("log4javascript.EventSupport ["+this+"]: addEventListener: no event called '"+e+"'"),this.eventListeners[e].push(t)):handleError("log4javascript.EventSupport ["+this+"]: addEventListener: listener must be a function")},removeEventListener:function(e,t){"function"==typeof t?(array_contains(this.eventTypes,e)||handleError("log4javascript.EventSupport ["+this+"]: removeEventListener: no event called '"+e+"'"),array_remove(this.eventListeners[e],t)):handleError("log4javascript.EventSupport ["+this+"]: removeEventListener: listener must be a function")},dispatchEvent:function(e,t){if(array_contains(this.eventTypes,e))for(var n=this.eventListeners[e],r=0,i=n.length;r<i;r++)n[r](this,e,t);else handleError("log4javascript.EventSupport ["+this+"]: dispatchEvent: no event called '"+e+"'")}};var applicationStartDate=new Date,uniqueId="log4javascript_"+applicationStartDate.getTime()+"_"+Math.floor(1e8*Math.random()),emptyFunction=function(){},newLine="\r\n",pageLoaded=!1;function Log4JavaScript(){}Log4JavaScript.prototype=new EventSupport;var log4javascript=new Log4JavaScript;function toStr(e){return e&&e.toString?e.toString():String(e)}function getExceptionMessage(e){return e.message?e.message:e.description?e.description:toStr(e)}function getUrlFileName(e){var t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return e.substr(t+1)}function getExceptionStringRep(e){if(e){var t="Exception: "+getExceptionMessage(e);try{e.lineNumber&&(t+=" on line number "+e.lineNumber),e.fileName&&(t+=" in file "+getUrlFileName(e.fileName))}catch(e){logLog.warn("Unable to obtain file and line information for error")}return showStackTraces&&e.stack&&(t+=newLine+"Stack trace:"+newLine+e.stack),t}return null}function bool(e){return Boolean(e)}function trim(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}function splitIntoLines(e){return e.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n")}log4javascript.version="1.4.13",log4javascript.edition="log4javascript";var urlEncode=void 0!==window.encodeURIComponent?function(e){return encodeURIComponent(e)}:function(e){return escape(e).replace(/\+/g,"%2B").replace(/"/g,"%22").replace(/'/g,"%27").replace(/\//g,"%2F").replace(/=/g,"%3D")};function array_remove(e,t){for(var n=-1,r=0,i=e.length;r<i;r++)if(e[r]===t){n=r;break}return n>=0&&(e.splice(n,1),!0)}function array_contains(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]==t)return!0;return!1}function extractBooleanFromParam(e,t){return isUndefined(e)?t:bool(e)}function extractStringFromParam(e,t){return isUndefined(e)?t:String(e)}function extractIntFromParam(e,t){if(isUndefined(e))return t;try{var n=parseInt(e,10);return isNaN(n)?t:n}catch(n){return logLog.warn("Invalid int param "+e,n),t}}function extractFunctionFromParam(e,t){return"function"==typeof e?e:t}function isError(e){return e instanceof Error}Function.prototype.apply||(Function.prototype.apply=function(obj,args){var methodName="__apply__";void 0!==obj[methodName]&&(methodName+=String(Math.random()).substr(2)),obj[methodName]=this;for(var argsStrings=[],i=0,len=args.length;i<len;i++)argsStrings[i]="args["+i+"]";var script="obj."+methodName+"("+argsStrings.join(",")+")",returnValue=eval(script);return delete obj[methodName],returnValue}),Function.prototype.call||(Function.prototype.call=function(e){for(var t=[],n=1,r=arguments.length;n<r;n++)t[n-1]=arguments[n];return this.apply(e,t)});var logLog={quietMode:!1,debugMessages:[],setQuietMode:function(e){this.quietMode=bool(e)},numberOfErrors:0,alertAllErrors:!1,setAlertAllErrors:function(e){this.alertAllErrors=e},debug:function(e){this.debugMessages.push(e)},displayDebug:function(){alert(this.debugMessages.join(newLine))},warn:function(e,t){},error:function(e,t){if((1==++this.numberOfErrors||this.alertAllErrors)&&!this.quietMode){var n="log4javascript error: "+e;t&&(n+=newLine+newLine+"Original error: "+getExceptionStringRep(t)),alert(n)}}};function handleError(e,t){logLog.error(e,t),log4javascript.dispatchEvent("error",{message:e,exception:t})}log4javascript.logLog=logLog,log4javascript.setEventTypes(["load","error"]),log4javascript.handleError=handleError;var enabled=!("undefined"!=typeof log4javascript_disabled&&log4javascript_disabled);log4javascript.setEnabled=function(e){enabled=bool(e)},log4javascript.isEnabled=function(){return enabled};var useTimeStampsInMilliseconds=!0;log4javascript.setTimeStampsInMilliseconds=function(e){useTimeStampsInMilliseconds=bool(e)},log4javascript.isTimeStampsInMilliseconds=function(){return useTimeStampsInMilliseconds},log4javascript.evalInScope=function(expr){return eval(expr)};var showStackTraces=!1;log4javascript.setShowStackTraces=function(e){showStackTraces=bool(e)};var Level=function(e,t){this.level=e,this.name=t};function Timer(e,t){this.name=e,this.level=isUndefined(t)?Level.INFO:t,this.start=new Date}Level.prototype={toString:function(){return this.name},equals:function(e){return this.level==e.level},isGreaterOrEqual:function(e){return this.level>=e.level}},Level.ALL=new Level(Number.MIN_VALUE,"ALL"),Level.TRACE=new Level(1e4,"TRACE"),Level.DEBUG=new Level(2e4,"DEBUG"),Level.INFO=new Level(3e4,"INFO"),Level.WARN=new Level(4e4,"WARN"),Level.ERROR=new Level(5e4,"ERROR"),Level.FATAL=new Level(6e4,"FATAL"),Level.OFF=new Level(Number.MAX_VALUE,"OFF"),log4javascript.Level=Level,Timer.prototype.getElapsedTime=function(){return(new Date).getTime()-this.start.getTime()};var anonymousLoggerName="[anonymous]",defaultLoggerName="[default]",nullLoggerName="[null]",rootLoggerName="root";function Logger(e){this.name=e,this.parent=null,this.children=[];var t=[],n=null,r=this.name===rootLoggerName,i=this.name===nullLoggerName,o=null,s=!1;this.addChild=function(e){this.children.push(e),e.parent=this,e.invalidateAppenderCache()};var a=!0;this.getAdditivity=function(){return a},this.setAdditivity=function(e){var t=a!=e;a=e,t&&this.invalidateAppenderCache()},this.addAppender=function(e){i?handleError("Logger.addAppender: you may not add an appender to the null logger"):e instanceof log4javascript.Appender?array_contains(t,e)||(t.push(e),e.setAddedToLogger(this),this.invalidateAppenderCache()):handleError("Logger.addAppender: appender supplied ('"+toStr(e)+"') is not a subclass of Appender")},this.removeAppender=function(e){array_remove(t,e),e.setRemovedFromLogger(this),this.invalidateAppenderCache()},this.removeAllAppenders=function(){var e=t.length;if(e>0){for(var n=0;n<e;n++)t[n].setRemovedFromLogger(this);t.length=0,this.invalidateAppenderCache()}},this.getEffectiveAppenders=function(){if(null===o||s){var e=r||!this.getAdditivity()?[]:this.parent.getEffectiveAppenders();o=e.concat(t),s=!1}return o},this.invalidateAppenderCache=function(){s=!0;for(var e=0,t=this.children.length;e<t;e++)this.children[e].invalidateAppenderCache()},this.log=function(e,t){if(enabled&&e.isGreaterOrEqual(this.getEffectiveLevel())){var n,r=t.length-1,i=t[r];t.length>1&&isError(i)&&(n=i,r--);for(var o=[],s=0;s<=r;s++)o[s]=t[s];var a=new LoggingEvent(this,new Date,e,o,n);this.callAppenders(a)}},this.callAppenders=function(e){for(var t=this.getEffectiveAppenders(),n=0,r=t.length;n<r;n++)t[n].doAppend(e)},this.setLevel=function(e){r&&null===e?handleError("Logger.setLevel: you cannot set the level of the root logger to null"):e instanceof Level?n=e:handleError("Logger.setLevel: level supplied to logger "+this.name+" is not an instance of log4javascript.Level")},this.getLevel=function(){return n},this.getEffectiveLevel=function(){for(var e=this;null!==e;e=e.parent){var t=e.getLevel();if(null!==t)return t}},this.group=function(e,t){if(enabled)for(var n=this.getEffectiveAppenders(),r=0,i=n.length;r<i;r++)n[r].group(e,t)},this.groupEnd=function(){if(enabled)for(var e=this.getEffectiveAppenders(),t=0,n=e.length;t<n;t++)e[t].groupEnd()};var l={};this.time=function(e,t){enabled&&(isUndefined(e)?handleError("Logger.time: a name for the timer must be supplied"):!t||t instanceof Level?l[e]=new Timer(e,t):handleError("Logger.time: level supplied to timer "+e+" is not an instance of log4javascript.Level"))},this.timeEnd=function(e){if(enabled)if(isUndefined(e))handleError("Logger.timeEnd: a name for the timer must be supplied");else if(l[e]){var t=l[e],n=t.getElapsedTime();this.log(t.level,["Timer "+toStr(e)+" completed in "+n+"ms"]),delete l[e]}else logLog.warn("Logger.timeEnd: no timer found with name "+e)},this.assert=function(e){if(enabled&&!e){for(var t=[],n=1,r=arguments.length;n<r;n++)t.push(arguments[n]);(t=t.length>0?t:["Assertion Failure"]).push(newLine),t.push(e),this.log(Level.ERROR,t)}},this.toString=function(){return"Logger["+this.name+"]"}}Logger.prototype={trace:function(){this.log(Level.TRACE,arguments)},debug:function(){this.log(Level.DEBUG,arguments)},info:function(){this.log(Level.INFO,arguments)},warn:function(){this.log(Level.WARN,arguments)},error:function(){this.log(Level.ERROR,arguments)},fatal:function(){this.log(Level.FATAL,arguments)},isEnabledFor:function(e){return e.isGreaterOrEqual(this.getEffectiveLevel())},isTraceEnabled:function(){return this.isEnabledFor(Level.TRACE)},isDebugEnabled:function(){return this.isEnabledFor(Level.DEBUG)},isInfoEnabled:function(){return this.isEnabledFor(Level.INFO)},isWarnEnabled:function(){return this.isEnabledFor(Level.WARN)},isErrorEnabled:function(){return this.isEnabledFor(Level.ERROR)},isFatalEnabled:function(){return this.isEnabledFor(Level.FATAL)}},Logger.prototype.trace.isEntryPoint=!0,Logger.prototype.debug.isEntryPoint=!0,Logger.prototype.info.isEntryPoint=!0,Logger.prototype.warn.isEntryPoint=!0,Logger.prototype.error.isEntryPoint=!0,Logger.prototype.fatal.isEntryPoint=!0;var loggers={},loggerNames=[],ROOT_LOGGER_DEFAULT_LEVEL=Level.DEBUG,rootLogger=new Logger(rootLoggerName);rootLogger.setLevel(ROOT_LOGGER_DEFAULT_LEVEL),log4javascript.getRootLogger=function(){return rootLogger},log4javascript.getLogger=function(e){if("string"!=typeof e&&(e=anonymousLoggerName,logLog.warn("log4javascript.getLogger: non-string logger name "+toStr(e)+" supplied, returning anonymous logger")),e==rootLoggerName&&handleError("log4javascript.getLogger: root logger may not be obtained by name"),!loggers[e]){var t=new Logger(e);loggers[e]=t,loggerNames.push(e);var n,r=e.lastIndexOf(".");if(r>-1){var i=e.substring(0,r);n=log4javascript.getLogger(i)}else n=rootLogger;n.addChild(t)}return loggers[e]};var defaultLogger=null;log4javascript.getDefaultLogger=function(){return defaultLogger||(defaultLogger=createDefaultLogger()),defaultLogger};var nullLogger=null;log4javascript.getNullLogger=function(){return nullLogger||(nullLogger=new Logger(nullLoggerName)).setLevel(Level.OFF),nullLogger},log4javascript.resetConfiguration=function(){rootLogger.setLevel(ROOT_LOGGER_DEFAULT_LEVEL),loggers={}};var LoggingEvent=function(e,t,n,r,i){this.logger=e,this.timeStamp=t,this.timeStampInMilliseconds=t.getTime(),this.timeStampInSeconds=Math.floor(this.timeStampInMilliseconds/1e3),this.milliseconds=this.timeStamp.getMilliseconds(),this.level=n,this.messages=r,this.exception=i};LoggingEvent.prototype={getThrowableStrRep:function(){return this.exception?getExceptionStringRep(this.exception):""},getCombinedMessages:function(){return 1==this.messages.length?this.messages[0]:this.messages.join(newLine)},toString:function(){return"LoggingEvent["+this.level+"]"}},log4javascript.LoggingEvent=LoggingEvent;var Layout=function(){};Layout.prototype={defaults:{loggerKey:"logger",timeStampKey:"timestamp",millisecondsKey:"milliseconds",levelKey:"level",messageKey:"message",exceptionKey:"exception",urlKey:"url"},loggerKey:"logger",timeStampKey:"timestamp",millisecondsKey:"milliseconds",levelKey:"level",messageKey:"message",exceptionKey:"exception",urlKey:"url",batchHeader:"",batchFooter:"",batchSeparator:"",returnsPostData:!1,overrideTimeStampsSetting:!1,useTimeStampsInMilliseconds:null,format:function(){handleError("Layout.format: layout supplied has no format() method")},ignoresThrowable:function(){handleError("Layout.ignoresThrowable: layout supplied has no ignoresThrowable() method")},getContentType:function(){return"text/plain"},allowBatching:function(){return!0},setTimeStampsInMilliseconds:function(e){this.overrideTimeStampsSetting=!0,this.useTimeStampsInMilliseconds=bool(e)},isTimeStampsInMilliseconds:function(){return this.overrideTimeStampsSetting?this.useTimeStampsInMilliseconds:useTimeStampsInMilliseconds},getTimeStampValue:function(e){return this.isTimeStampsInMilliseconds()?e.timeStampInMilliseconds:e.timeStampInSeconds},getDataValues:function(e,t){var n=[[this.loggerKey,e.logger.name],[this.timeStampKey,this.getTimeStampValue(e)],[this.levelKey,e.level.name],[this.urlKey,window.location.href],[this.messageKey,t?e.getCombinedMessages():e.messages]];if(this.isTimeStampsInMilliseconds()||n.push([this.millisecondsKey,e.milliseconds]),e.exception&&n.push([this.exceptionKey,getExceptionStringRep(e.exception)]),this.hasCustomFields())for(var r=0,i=this.customFields.length;r<i;r++){var o=this.customFields[r].value;"function"==typeof o&&(o=o(this,e)),n.push([this.customFields[r].name,o])}return n},setKeys:function(e,t,n,r,i,o,s){this.loggerKey=extractStringFromParam(e,this.defaults.loggerKey),this.timeStampKey=extractStringFromParam(t,this.defaults.timeStampKey),this.levelKey=extractStringFromParam(n,this.defaults.levelKey),this.messageKey=extractStringFromParam(r,this.defaults.messageKey),this.exceptionKey=extractStringFromParam(i,this.defaults.exceptionKey),this.urlKey=extractStringFromParam(o,this.defaults.urlKey),this.millisecondsKey=extractStringFromParam(s,this.defaults.millisecondsKey)},setCustomField:function(e,t){for(var n=!1,r=0,i=this.customFields.length;r<i;r++)this.customFields[r].name===e&&(this.customFields[r].value=t,n=!0);n||this.customFields.push({name:e,value:t})},hasCustomFields:function(){return this.customFields.length>0},formatWithException:function(e){var t=this.format(e);return e.exception&&this.ignoresThrowable()&&(t+=e.getThrowableStrRep()),t},toString:function(){handleError("Layout.toString: all layouts must override this method")}},log4javascript.Layout=Layout;var Appender=function(){},SimpleDateFormat;function SimpleLayout(){this.customFields=[]}function NullLayout(){this.customFields=[]}function XmlLayout(e){this.combineMessages=extractBooleanFromParam(e,!0),this.customFields=[]}function escapeNewLines(e){return e.replace(/\r\n|\r|\n/g,"\\r\\n")}function JsonLayout(e,t){this.readable=extractBooleanFromParam(e,!1),this.combineMessages=extractBooleanFromParam(t,!0),this.batchHeader=this.readable?"["+newLine:"[",this.batchFooter=this.readable?"]"+newLine:"]",this.batchSeparator=this.readable?","+newLine:",",this.setKeys(),this.colon=this.readable?": ":":",this.tab=this.readable?"\t":"",this.lineBreak=this.readable?newLine:"",this.customFields=[]}function HttpPostDataLayout(){this.setKeys(),this.customFields=[],this.returnsPostData=!0}function formatObjectExpansion(e,t,n){var r=[];return function e(t,n,i){var o,s,a,l,c,u,h;function d(e){for(var t=splitIntoLines(e),n=1,r=t.length;n<r;n++)t[n]=i+t[n];return t.join(newLine)}if(i||(i=""),null===t)return"null";if(void 0===t)return"undefined";if("string"==typeof t)return d(t);if("object"==typeof t&&array_contains(r,t)){try{u=toStr(t)}catch(e){u="Error formatting property. Details: "+getExceptionStringRep(e)}return u+" [already expanded]"}if(t instanceof Array&&n>0){for(r.push(t),u="["+newLine,a=n-1,l=i+"  ",c=[],o=0,s=t.length;o<s;o++)try{h=e(t[o],a,l),c.push(l+h)}catch(e){c.push(l+"Error formatting array member. Details: "+getExceptionStringRep(e))}return u+=c.join(","+newLine)+newLine+i+"]"}if("[object Date]"==Object.prototype.toString.call(t))return t.toString();if("object"==typeof t&&n>0){for(o in r.push(t),u="{"+newLine,a=n-1,l=i+"  ",c=[],t)try{h=e(t[o],a,l),c.push(l+o+": "+h)}catch(e){c.push(l+o+": Error formatting property. Details: "+getExceptionStringRep(e))}return u+=c.join(","+newLine)+newLine+i+"}"}return d(toStr(t))}(e,t,n)}function PatternLayout(e){this.pattern=e||PatternLayout.DEFAULT_CONVERSION_PATTERN,this.customFields=[]}function AlertAppender(){}function BrowserConsoleAppender(){}Appender.prototype=new EventSupport,Appender.prototype.layout=new PatternLayout,Appender.prototype.threshold=Level.ALL,Appender.prototype.loggers=[],Appender.prototype.doAppend=function(e){enabled&&e.level.level>=this.threshold.level&&this.append(e)},Appender.prototype.append=function(e){},Appender.prototype.setLayout=function(e){e instanceof Layout?this.layout=e:handleError("Appender.setLayout: layout supplied to "+this.toString()+" is not a subclass of Layout")},Appender.prototype.getLayout=function(){return this.layout},Appender.prototype.setThreshold=function(e){e instanceof Level?this.threshold=e:handleError("Appender.setThreshold: threshold supplied to "+this.toString()+" is not a subclass of Level")},Appender.prototype.getThreshold=function(){return this.threshold},Appender.prototype.setAddedToLogger=function(e){this.loggers.push(e)},Appender.prototype.setRemovedFromLogger=function(e){array_remove(this.loggers,e)},Appender.prototype.group=emptyFunction,Appender.prototype.groupEnd=emptyFunction,Appender.prototype.toString=function(){handleError("Appender.toString: all appenders must override this method")},log4javascript.Appender=Appender,SimpleLayout.prototype=new Layout,SimpleLayout.prototype.format=function(e){return e.level.name+" - "+e.getCombinedMessages()},SimpleLayout.prototype.ignoresThrowable=function(){return!0},SimpleLayout.prototype.toString=function(){return"SimpleLayout"},log4javascript.SimpleLayout=SimpleLayout,NullLayout.prototype=new Layout,NullLayout.prototype.format=function(e){return e.messages},NullLayout.prototype.ignoresThrowable=function(){return!0},NullLayout.prototype.formatWithException=function(e){var t=e.messages,n=e.exception;return n?t.concat([n]):t},NullLayout.prototype.toString=function(){return"NullLayout"},log4javascript.NullLayout=NullLayout,XmlLayout.prototype=new Layout,XmlLayout.prototype.isCombinedMessages=function(){return this.combineMessages},XmlLayout.prototype.getContentType=function(){return"text/xml"},XmlLayout.prototype.escapeCdata=function(e){return e.replace(/\]\]>/,"]]>]]&gt;<![CDATA[")},XmlLayout.prototype.format=function(e){var t,n,r=this;function i(e){return e="string"==typeof e?e:toStr(e),"<log4javascript:message><![CDATA["+r.escapeCdata(e)+"]]></log4javascript:message>"}var o='<log4javascript:event logger="'+e.logger.name+'" timestamp="'+this.getTimeStampValue(e)+'"';if(this.isTimeStampsInMilliseconds()||(o+=' milliseconds="'+e.milliseconds+'"'),o+=' level="'+e.level.name+'">'+newLine,this.combineMessages)o+=i(e.getCombinedMessages());else{for(o+="<log4javascript:messages>"+newLine,t=0,n=e.messages.length;t<n;t++)o+=i(e.messages[t])+newLine;o+="</log4javascript:messages>"+newLine}if(this.hasCustomFields())for(t=0,n=this.customFields.length;t<n;t++)o+='<log4javascript:customfield name="'+this.customFields[t].name+'"><![CDATA['+this.customFields[t].value.toString()+"]]></log4javascript:customfield>"+newLine;return e.exception&&(o+="<log4javascript:exception><![CDATA["+getExceptionStringRep(e.exception)+"]]></log4javascript:exception>"+newLine),o+="</log4javascript:event>"+newLine+newLine},XmlLayout.prototype.ignoresThrowable=function(){return!1},XmlLayout.prototype.toString=function(){return"XmlLayout"},log4javascript.XmlLayout=XmlLayout,JsonLayout.prototype=new Layout,JsonLayout.prototype.isReadable=function(){return this.readable},JsonLayout.prototype.isCombinedMessages=function(){return this.combineMessages},JsonLayout.prototype.format=function(e){var t,n,r=this,i=this.getDataValues(e,this.combineMessages),o="{"+this.lineBreak;function s(e,t,n){var i,o=typeof e;if(e instanceof Date)i=String(e.getTime());else if(n&&e instanceof Array){i="["+r.lineBreak;for(var a=0,l=e.length;a<l;a++){var c=t+r.tab;i+=c+s(e[a],c,!1),a<e.length-1&&(i+=","),i+=r.lineBreak}i+=t+"]"}else i="number"!==o&&"boolean"!==o?'"'+escapeNewLines(toStr(e).replace(/\"/g,'\\"'))+'"':e;return i}for(t=0,n=i.length-1;t<=n;t++)o+=this.tab+'"'+i[t][0]+'"'+this.colon+s(i[t][1],this.tab,!0),t<n&&(o+=","),o+=this.lineBreak;return o+="}"+this.lineBreak},JsonLayout.prototype.ignoresThrowable=function(){return!1},JsonLayout.prototype.toString=function(){return"JsonLayout"},JsonLayout.prototype.getContentType=function(){return"application/json"},log4javascript.JsonLayout=JsonLayout,HttpPostDataLayout.prototype=new Layout,HttpPostDataLayout.prototype.allowBatching=function(){return!1},HttpPostDataLayout.prototype.format=function(e){for(var t=this.getDataValues(e),n=[],r=0,i=t.length;r<i;r++){var o=t[r][1]instanceof Date?String(t[r][1].getTime()):t[r][1];n.push(urlEncode(t[r][0])+"="+urlEncode(o))}return n.join("&")},HttpPostDataLayout.prototype.ignoresThrowable=function(e){return!1},HttpPostDataLayout.prototype.toString=function(){return"HttpPostDataLayout"},log4javascript.HttpPostDataLayout=HttpPostDataLayout,function(){var e=/('[^']*')|(G+|y+|M+|w+|W+|D+|d+|F+|E+|a+|H+|k+|K+|h+|m+|s+|S+|Z+)|([a-zA-Z]+)|([^a-zA-Z']+)/,t=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],r={G:0,y:3,M:4,w:2,W:2,D:2,d:2,F:2,E:1,a:0,H:2,k:2,K:2,h:2,m:2,s:2,S:2,Z:5},i=function(e,t,n){var r=new Date(e,t,n,0,0,0);return r.setMilliseconds(0),r};Date.prototype.getDifference=function(e){return this.getTime()-e.getTime()},Date.prototype.isBefore=function(e){return this.getTime()<e.getTime()},Date.prototype.getUTCTime=function(){return Date.UTC(this.getFullYear(),this.getMonth(),this.getDate(),this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())},Date.prototype.getTimeSince=function(e){return this.getUTCTime()-e.getUTCTime()},Date.prototype.getPreviousSunday=function(){var e=new Date(this.getFullYear(),this.getMonth(),this.getDate(),12,0,0),t=new Date(e.getTime()-864e5*this.getDay());return i(t.getFullYear(),t.getMonth(),t.getDate())},Date.prototype.getWeekInYear=function(e){isUndefined(this.minimalDaysInFirstWeek)&&(e=1);var t=this.getPreviousSunday(),n=i(this.getFullYear(),0,1),r=t.isBefore(n)?0:1+Math.floor(t.getTimeSince(n)/6048e5);return 7-n.getDay()<e&&r--,r},Date.prototype.getWeekInMonth=function(e){isUndefined(this.minimalDaysInFirstWeek)&&(e=1);var t=this.getPreviousSunday(),n=i(this.getFullYear(),this.getMonth(),1),r=t.isBefore(n)?0:1+Math.floor(t.getTimeSince(n)/6048e5);return 7-n.getDay()>=e&&r++,r},Date.prototype.getDayInYear=function(){var e=i(this.getFullYear(),0,1);return 1+Math.floor(this.getTimeSince(e)/864e5)},(SimpleDateFormat=function(e){this.formatString=e}).prototype.setMinimalDaysInFirstWeek=function(e){this.minimalDaysInFirstWeek=e},SimpleDateFormat.prototype.getMinimalDaysInFirstWeek=function(){return isUndefined(this.minimalDaysInFirstWeek)?1:this.minimalDaysInFirstWeek};var o=function(e,t){for(;e.length<t;)e="0"+e;return e},s=function(e,t,n){return t>=4?e:e.substr(0,Math.max(n,t))},a=function(e,t){return o(""+e,t)};SimpleDateFormat.prototype.format=function(i){for(var l,c="",u=this.formatString;l=e.exec(u);){var h=l[1],d=l[2],p=l[3],f=l[4];if(h)c+="''"==h?"'":h.substring(1,h.length-1);else if(p);else if(f)c+=f;else if(d){var g=d.charAt(0),m=d.length,_="";switch(g){case"G":_="AD";break;case"y":_=i.getFullYear();break;case"M":_=i.getMonth();break;case"w":_=i.getWeekInYear(this.getMinimalDaysInFirstWeek());break;case"W":_=i.getWeekInMonth(this.getMinimalDaysInFirstWeek());break;case"D":_=i.getDayInYear();break;case"d":_=i.getDate();break;case"F":_=1+Math.floor((i.getDate()-1)/7);break;case"E":_=n[i.getDay()];break;case"a":_=i.getHours()>=12?"PM":"AM";break;case"H":_=i.getHours();break;case"k":_=i.getHours()||24;break;case"K":_=i.getHours()%12;break;case"h":_=i.getHours()%12||12;break;case"m":_=i.getMinutes();break;case"s":_=i.getSeconds();break;case"S":_=i.getMilliseconds();break;case"Z":_=i.getTimezoneOffset()}switch(r[g]){case 0:c+=s(_,m,2);break;case 1:c+=s(_,m,3);break;case 2:c+=a(_,m);break;case 3:c+=m<=3?(""+_).substr(2,2):a(_,m);break;case 4:c+=m>=3?s(t[_],m,m):a(_+1,m);break;case 5:var v=_>0?"-":"+",y=Math.abs(_),b=""+Math.floor(y/60),w=""+y%60;c+=v+(b=o(b,2))+(w=o(w,2))}}u=u.substr(l.index+l[0].length)}return c}}(),log4javascript.SimpleDateFormat=SimpleDateFormat,PatternLayout.TTCC_CONVERSION_PATTERN="%r %p %c - %m%n",PatternLayout.DEFAULT_CONVERSION_PATTERN="%m%n",PatternLayout.ISO8601_DATEFORMAT="yyyy-MM-dd HH:mm:ss,SSS",PatternLayout.DATETIME_DATEFORMAT="dd MMM yyyy HH:mm:ss,SSS",PatternLayout.ABSOLUTETIME_DATEFORMAT="HH:mm:ss,SSS",PatternLayout.prototype=new Layout,PatternLayout.prototype.format=function(e){for(var t,n=/%(-?[0-9]+)?(\.?[0-9]+)?([acdfmMnpr%])(\{([^\}]+)\})?|([^%]+)/,r="",i=this.pattern;t=n.exec(i);){var o=t[0],s=t[1],a=t[2],l=t[3],c=t[5],u=t[6];if(u)r+=""+u;else{var h,d="";switch(l){case"a":case"m":var p=0;c&&(p=parseInt(c,10),isNaN(p)&&(handleError("PatternLayout.format: invalid specifier '"+c+"' for conversion character '"+l+"' - should be a number"),p=0));for(var f="a"===l?e.messages[0]:e.messages,g=0,m=f.length;g<m;g++)g>0&&" "!==d.charAt(d.length-1)&&(d+=" "),d+=0===p?f[g]:formatObjectExpansion(f[g],p);break;case"c":var _=e.logger.name;if(c){var v=parseInt(c,10),y=e.logger.name.split(".");d=v>=y.length?_:y.slice(y.length-v).join(".")}else d=_;break;case"d":var b=PatternLayout.ISO8601_DATEFORMAT;c&&("ISO8601"==(b=c)?b=PatternLayout.ISO8601_DATEFORMAT:"ABSOLUTE"==b?b=PatternLayout.ABSOLUTETIME_DATEFORMAT:"DATE"==b&&(b=PatternLayout.DATETIME_DATEFORMAT)),d=new SimpleDateFormat(b).format(e.timeStamp);break;case"f":if(this.hasCustomFields()){var w=0;c&&(w=parseInt(c,10),isNaN(w)?handleError("PatternLayout.format: invalid specifier '"+c+"' for conversion character 'f' - should be a number"):0===w?handleError("PatternLayout.format: invalid specifier '"+c+"' for conversion character 'f' - must be greater than zero"):w>this.customFields.length?handleError("PatternLayout.format: invalid specifier '"+c+"' for conversion character 'f' - there aren't that many custom fields"):w-=1);var x=this.customFields[w].value;"function"==typeof x&&(x=x(this,e)),d=x}break;case"n":d=newLine;break;case"p":d=e.level.name;break;case"r":d=""+e.timeStamp.getDifference(applicationStartDate);break;case"%":d="%";break;default:d=o}if(a){h=parseInt(a.substr(1),10);var k=d.length;h<k&&(d=d.substring(k-h,k))}if(s)if("-"==s.charAt(0))for(h=parseInt(s.substr(1),10);d.length<h;)d+=" ";else for(h=parseInt(s,10);d.length<h;)d=" "+d;r+=d}i=i.substr(t.index+t[0].length)}return r},PatternLayout.prototype.ignoresThrowable=function(){return!0},PatternLayout.prototype.toString=function(){return"PatternLayout"},log4javascript.PatternLayout=PatternLayout,AlertAppender.prototype=new Appender,AlertAppender.prototype.layout=new SimpleLayout,AlertAppender.prototype.append=function(e){alert(this.getLayout().formatWithException(e))},AlertAppender.prototype.toString=function(){return"AlertAppender"},log4javascript.AlertAppender=AlertAppender,BrowserConsoleAppender.prototype=new log4javascript.Appender,BrowserConsoleAppender.prototype.layout=new NullLayout,BrowserConsoleAppender.prototype.threshold=Level.DEBUG,BrowserConsoleAppender.prototype.append=function(e){var t,n=this,r=function(t){var r=n.getLayout().formatWithException(e);return"string"==typeof r?t?r:[r]:t?r.join(" "):r},i=window.console;i&&i.log?"function"==typeof i[t=i.debug&&Level.DEBUG.isGreaterOrEqual(e.level)?"debug":i.info&&Level.INFO.equals(e.level)?"info":i.warn&&Level.WARN.equals(e.level)?"warn":i.error&&e.level.isGreaterOrEqual(Level.ERROR)?"error":"log"].apply?i[t].apply(i,r(!1)):i[t](r(!0)):"undefined"!=typeof opera&&opera.postError&&opera.postError(r(!0))},BrowserConsoleAppender.prototype.group=function(e){window.console&&window.console.group&&window.console.group(e)},BrowserConsoleAppender.prototype.groupEnd=function(){window.console&&window.console.groupEnd&&window.console.groupEnd()},BrowserConsoleAppender.prototype.toString=function(){return"BrowserConsoleAppender"},log4javascript.BrowserConsoleAppender=BrowserConsoleAppender;var xhrFactory=function(){return new XMLHttpRequest},xmlHttpFactories=[xhrFactory,function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],withCredentialsSupported=!1,getXmlHttp=function(e){for(var t,n=null,r=0,i=xmlHttpFactories.length;r<i;r++){t=xmlHttpFactories[r];try{return n=t(),withCredentialsSupported=t==xhrFactory&&"withCredentials"in n,getXmlHttp=t,n}catch(e){}}e?e():handleError("getXmlHttp: unable to obtain XMLHttpRequest object")},ConsoleAppender;function isHttpRequestSuccessful(e){return isUndefined(e.status)||0===e.status||e.status>=200&&e.status<300||1223==e.status}function AjaxAppender(e,t){var n=this,r=!0;e||(handleError("AjaxAppender: URL must be specified in constructor"),r=!1);var i=this.defaults.timed,o=this.defaults.waitForResponse,s=this.defaults.batchSize,a=this.defaults.timerInterval,l=this.defaults.requestSuccessCallback,c=this.defaults.failCallback,u=this.defaults.postVarName,h=this.defaults.sendAllOnUnload,d=this.defaults.contentType,p=null,f=[],g=[],m=[],_=!1,v=!1;function y(e){return!v||(handleError("AjaxAppender: configuration option '"+e+"' may not be set after the appender has been initialized"),!1)}function b(){var e;if(r&&enabled)if(_=!0,o)g.length>0?S(x(e=g.shift()),b):(_=!1,i&&k());else{for(;e=g.shift();)S(x(e));_=!1,i&&k()}}function w(){var e=!1;if(r&&enabled){for(var t,a=n.getLayout().allowBatching()?s:1,l=[];t=f.shift();)l.push(t),f.length>=a&&(g.push(l),l=[]);l.length>0&&g.push(l),e=g.length>0,o=!1,i=!1,b()}return e}function x(e){for(var t,r=[],i="";t=e.shift();)r.push(n.getLayout().formatWithException(t));return i=1==e.length?r.join(""):n.getLayout().batchHeader+r.join(n.getLayout().batchSeparator)+n.getLayout().batchFooter,d==n.defaults.contentType&&((i=n.getLayout().returnsPostData?i:urlEncode(u)+"="+urlEncode(i)).length>0&&(i+="&"),i+="layout="+urlEncode(n.getLayout().toString())),i}function k(){window.setTimeout(b,a)}function E(){var e="AjaxAppender: could not create XMLHttpRequest object. AjaxAppender disabled";handleError(e),r=!1,c&&c(e)}function S(n,i){try{var o=getXmlHttp(E);if(r){o.onreadystatechange=function(){if(4==o.readyState){if(isHttpRequestSuccessful(o))l&&l(o),i&&i(o);else{var t="AjaxAppender.append: XMLHttpRequest request to URL "+e+" returned status code "+o.status;handleError(t),c&&c(t)}o.onreadystatechange=emptyFunction,o=null}},o.open("POST",e,!0),t&&withCredentialsSupported&&(o.withCredentials=!0);try{for(var s,a=0;s=m[a++];)o.setRequestHeader(s.name,s.value);o.setRequestHeader("Content-Type",d)}catch(e){var u="AjaxAppender.append: your browser's XMLHttpRequest implementation does not support setRequestHeader, therefore cannot post data. AjaxAppender disabled";return handleError(u),r=!1,void(c&&c(u))}o.send(n)}}catch(t){var h="AjaxAppender.append: error sending log message to "+e;handleError(h,t),r=!1,c&&c(h+". Details: "+getExceptionStringRep(t))}}this.getSessionId=function(){return p},this.setSessionId=function(e){p=extractStringFromParam(e,null),this.layout.setCustomField("sessionid",p)},this.setLayout=function(e){y("layout")&&(this.layout=e,null!==p&&this.setSessionId(p))},this.isTimed=function(){return i},this.setTimed=function(e){y("timed")&&(i=bool(e))},this.getTimerInterval=function(){return a},this.setTimerInterval=function(e){y("timerInterval")&&(a=extractIntFromParam(e,a))},this.isWaitForResponse=function(){return o},this.setWaitForResponse=function(e){y("waitForResponse")&&(o=bool(e))},this.getBatchSize=function(){return s},this.setBatchSize=function(e){y("batchSize")&&(s=extractIntFromParam(e,s))},this.isSendAllOnUnload=function(){return h},this.setSendAllOnUnload=function(e){y("sendAllOnUnload")&&(h=extractBooleanFromParam(e,h))},this.setRequestSuccessCallback=function(e){l=extractFunctionFromParam(e,l)},this.setFailCallback=function(e){c=extractFunctionFromParam(e,c)},this.getPostVarName=function(){return u},this.setPostVarName=function(e){y("postVarName")&&(u=extractStringFromParam(e,u))},this.getHeaders=function(){return m},this.addHeader=function(e,t){"content-type"==e.toLowerCase()?d=t:m.push({name:e,value:t})},this.sendAll=b,this.sendAllRemaining=w,this.append=function(e){if(r){v||function(){if(v=!0,h){var e=window.onbeforeunload;window.onbeforeunload=function(){e&&e(),w()}}i&&k()}(),f.push(e);var t=this.getLayout().allowBatching()?s:1;if(f.length>=t){for(var n,a=[];n=f.shift();)a.push(n);g.push(a),i||o&&(!o||_)||b()}}}}function setCookie(e,t,n,r){var i;if(r=r?"; path="+r:"",n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),i="; expires="+o.toGMTString()}else i="";document.cookie=escape(e)+"="+escape(t)+i+r}function getCookie(e){for(var t=escape(e)+"=",n=document.cookie.split(";"),r=0,i=n.length;r<i;r++){for(var o=n[r];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return unescape(o.substring(t.length,o.length))}return null}function getBaseUrl(){for(var e=document.getElementsByTagName("script"),t=0,n=e.length;t<n;++t)if(-1!=e[t].src.indexOf("log4javascript")){var r=e[t].src.lastIndexOf("/");return-1==r?"":e[t].src.substr(0,r+1)}return null}function isLoaded(e){try{return bool(e.loaded)}catch(e){return!1}}function padWithSpaces(e,t){if(e.length<t){for(var n=[],r=Math.max(0,t-e.length),i=0;i<r;i++)n[i]=" ";e+=n.join("")}return e}function createDefaultLogger(){var e=log4javascript.getLogger(defaultLoggerName),t=new log4javascript.PopUpAppender;return e.addAppender(t),e}if(AjaxAppender.prototype=new Appender,AjaxAppender.prototype.defaults={waitForResponse:!1,timed:!1,timerInterval:1e3,batchSize:1,sendAllOnUnload:!1,requestSuccessCallback:null,failCallback:null,postVarName:"data",contentType:"application/x-www-form-urlencoded"},AjaxAppender.prototype.layout=new HttpPostDataLayout,AjaxAppender.prototype.toString=function(){return"AjaxAppender"},log4javascript.AjaxAppender=AjaxAppender,function(){var e=[],t=1;function n(e,t,n,r,i){this.create(!1,null,e,t,n,r,i,this.defaults.focusPopUp)}function r(e,t,n,r,i,o){this.create(!0,e,t,n,r,i,o,!1)}(ConsoleAppender=function(){}).prototype=new Appender,ConsoleAppender.prototype.create=function(n,r,i,o,s,a,l,c){var u=this,h=!1,d=!1,p=!1,f=!1,g=[],m=!0,_=t++;o=extractBooleanFromParam(o,this.defaults.initiallyMinimized),i=extractBooleanFromParam(i,this.defaults.lazyInit),s=extractBooleanFromParam(s,this.defaults.useDocumentWrite);var v=this.defaults.newestMessageAtTop,y=this.defaults.scrollToLatestMessage;a=a||this.defaults.width,l=l||this.defaults.height;var b,w,x,k,E,S=this.defaults.maxMessages,M=this.defaults.showCommandLine,C=this.defaults.commandLineObjectExpansionDepth,j=this.defaults.showHideButton,A=this.defaults.showCloseButton;this.setLayout(this.defaults.layout);var T=n?"InPageAppender":"PopUpAppender",P=function(e){return!d||(handleError(T+": configuration option '"+e+"' may not be set after the appender has been initialized"),!1)},O=function(){return p&&m&&!f};this.isNewestMessageAtTop=function(){return v},this.setNewestMessageAtTop=function(e){v=bool(e),O()&&k().setNewestAtTop(v)},this.isScrollToLatestMessage=function(){return y},this.setScrollToLatestMessage=function(e){y=bool(e),O()&&k().setScrollToLatest(y)},this.getWidth=function(){return a},this.setWidth=function(e){P("width")&&(a=extractStringFromParam(e,a))},this.getHeight=function(){return l},this.setHeight=function(e){P("height")&&(l=extractStringFromParam(e,l))},this.getMaxMessages=function(){return S},this.setMaxMessages=function(e){S=extractIntFromParam(e,S),O()&&k().setMaxMessages(S)},this.isShowCommandLine=function(){return M},this.setShowCommandLine=function(e){M=bool(e),O()&&k().setShowCommandLine(M)},this.isShowHideButton=function(){return j},this.setShowHideButton=function(e){j=bool(e),O()&&k().setShowHideButton(j)},this.isShowCloseButton=function(){return A},this.setShowCloseButton=function(e){A=bool(e),O()&&k().setShowCloseButton(A)},this.getCommandLineObjectExpansionDepth=function(){return C},this.setCommandLineObjectExpansionDepth=function(e){C=extractIntFromParam(e,C)};var L=o;function I(e,t){this.loggingEvent=e,this.levelName=e.level.name,this.formattedMessage=t}function D(e,t){this.name=e,this.initiallyExpanded=t}function R(){}this.isInitiallyMinimized=function(){return o},this.setInitiallyMinimized=function(e){P("initiallyMinimized")&&(o=bool(e),L=o)},this.isUseDocumentWrite=function(){return s},this.setUseDocumentWrite=function(e){P("useDocumentWrite")&&(s=bool(e))},I.prototype.append=function(){k().log(this.levelName,this.formattedMessage)},D.prototype.append=function(){k().group(this.name,this.initiallyExpanded)},R.prototype.append=function(){k().groupEnd()};var B=function(){x(),h?f&&ee&&w():b(),x()&&z()};this.append=function(e){if(m){var t=u.getLayout().formatWithException(e);g.push(new I(e,t)),B()}},this.group=function(e,t){m&&(g.push(new D(e,t)),B())},this.groupEnd=function(){m&&(g.push(new R),B())};var z=function(){for(;g.length>0;)g.shift().append();c&&k().focus()};this.setAddedToLogger=function(e){this.loggers.push(e),enabled&&!i&&b()},this.clear=function(){O()&&k().clearLog(),g.length=0},this.focus=function(){O()&&k().focus()},this.focusCommandLine=function(){O()&&k().focusCommandLine()},this.focusSearch=function(){O()&&k().focusSearch()};var N=window;this.getCommandWindow=function(){return N},this.setCommandWindow=function(e){N=e},this.executeLastCommand=function(){O()&&k().evalLastCommand()};var F=new PatternLayout("%m");this.getCommandLayout=function(){return F},this.setCommandLayout=function(e){F=e},this.evalCommandAndAppend=function(e){var t={appendResult:!0,isError:!1},n="";try{var r,i;!N.eval&&N.execScript&&N.execScript("null");var o={};for(i=0,len=U.length;i<len;i++)o[U[i][0]]=U[i][1];var s=[],a=function(e){s.push([e,N[e]])};a("appender"),N.appender=u,a("commandReturnValue"),N.commandReturnValue=t,a("commandLineFunctionsHash"),N.commandLineFunctionsHash=o;var l=function(e){a(e),N[e]=function(){return this.commandLineFunctionsHash[e](u,arguments,t)}};for(i=0,len=U.length;i<len;i++)l(U[i][0]);for(N===window&&N.execScript?(a("evalExpr"),a("result"),window.evalExpr=e,N.execScript("window.result=eval(window.evalExpr);"),r=window.result):r=N.eval(e),n=isUndefined(r)?r:formatObjectExpansion(r,C),i=0,len=s.length;i<len;i++)N[s[i][0]]=s[i][1]}catch(e){n="Error evaluating command: "+getExceptionStringRep(e),t.isError=!0}if(t.appendResult){var c=">>> "+e;isUndefined(n)||(c+=newLine+n);var h=t.isError?Level.ERROR:Level.INFO,d=new LoggingEvent(null,new Date,h,[c],null),p=this.getLayout();this.setLayout(F),this.append(d),this.setLayout(p)}};var U=e.concat([]);this.addCommandLineFunction=function(e,t){U.push([e,t])},this.storeCommandHistory=function(e){setCookie("log4javascriptCommandHistory",e.join(","))};var q=function(e){var t=['<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">','<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">',"<head>","<title>log4javascript</title>",'<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />',"\x3c!-- Make IE8 behave like IE7, having gone to all the trouble of making IE work --\x3e",'<meta http-equiv="X-UA-Compatible" content="IE=7" />','<script type="text/javascript">var isIe = false, isIePre7 = false;<\/script>','\x3c!--[if IE]><script type="text/javascript">isIe = true<\/script><![endif]--\x3e','\x3c!--[if lt IE 7]><script type="text/javascript">isIePre7 = true<\/script><![endif]--\x3e','<script type="text/javascript">',"//<![CDATA[","var loggingEnabled=true;var logQueuedEventsTimer=null;var logEntries=[];var logEntriesAndSeparators=[];var logItems=[];var renderDelay=100;var unrenderedLogItemsExist=false;var rootGroup,currentGroup=null;var loaded=false;var currentLogItem=null;var logMainContainer;function copyProperties(obj,props){for(var i in props){obj[i]=props[i];}}","function LogItem(){}","LogItem.prototype={mainContainer:null,wrappedContainer:null,unwrappedContainer:null,group:null,appendToLog:function(){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].appendToLog();}","this.group.update();},doRemove:function(doUpdate,removeFromGroup){if(this.rendered){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].remove();}","this.unwrappedElementContainer=null;this.wrappedElementContainer=null;this.mainElementContainer=null;}","if(this.group&&removeFromGroup){this.group.removeChild(this,doUpdate);}","if(this===currentLogItem){currentLogItem=null;}},remove:function(doUpdate,removeFromGroup){this.doRemove(doUpdate,removeFromGroup);},render:function(){},accept:function(visitor){visitor.visit(this);},getUnwrappedDomContainer:function(){return this.group.unwrappedElementContainer.contentDiv;},getWrappedDomContainer:function(){return this.group.wrappedElementContainer.contentDiv;},getMainDomContainer:function(){return this.group.mainElementContainer.contentDiv;}};LogItem.serializedItemKeys={LOG_ENTRY:0,GROUP_START:1,GROUP_END:2};function LogItemContainerElement(){}",'LogItemContainerElement.prototype={appendToLog:function(){var insertBeforeFirst=(newestAtTop&&this.containerDomNode.hasChildNodes());if(insertBeforeFirst){this.containerDomNode.insertBefore(this.mainDiv,this.containerDomNode.firstChild);}else{this.containerDomNode.appendChild(this.mainDiv);}}};function SeparatorElementContainer(containerDomNode){this.containerDomNode=containerDomNode;this.mainDiv=document.createElement("div");this.mainDiv.className="separator";this.mainDiv.innerHTML="&nbsp;";}',"SeparatorElementContainer.prototype=new LogItemContainerElement();SeparatorElementContainer.prototype.remove=function(){this.mainDiv.parentNode.removeChild(this.mainDiv);this.mainDiv=null;};function Separator(){this.rendered=false;}","Separator.prototype=new LogItem();copyProperties(Separator.prototype,{render:function(){var containerDomNode=this.group.contentDiv;if(isIe){this.unwrappedElementContainer=new SeparatorElementContainer(this.getUnwrappedDomContainer());this.wrappedElementContainer=new SeparatorElementContainer(this.getWrappedDomContainer());this.elementContainers=[this.unwrappedElementContainer,this.wrappedElementContainer];}else{this.mainElementContainer=new SeparatorElementContainer(this.getMainDomContainer());this.elementContainers=[this.mainElementContainer];}",'this.content=this.formattedMessage;this.rendered=true;}});function GroupElementContainer(group,containerDomNode,isRoot,isWrapped){this.group=group;this.containerDomNode=containerDomNode;this.isRoot=isRoot;this.isWrapped=isWrapped;this.expandable=false;if(this.isRoot){if(isIe){this.contentDiv=logMainContainer.appendChild(document.createElement("div"));this.contentDiv.id=this.isWrapped?"log_wrapped":"log_unwrapped";}else{this.contentDiv=logMainContainer;}}else{var groupElementContainer=this;this.mainDiv=document.createElement("div");this.mainDiv.className="group";this.headingDiv=this.mainDiv.appendChild(document.createElement("div"));this.headingDiv.className="groupheading";this.expander=this.headingDiv.appendChild(document.createElement("span"));this.expander.className="expander unselectable greyedout";this.expander.unselectable=true;var expanderText=this.group.expanded?"-":"+";this.expanderTextNode=this.expander.appendChild(document.createTextNode(expanderText));this.headingDiv.appendChild(document.createTextNode(" "+this.group.name));this.contentDiv=this.mainDiv.appendChild(document.createElement("div"));var contentCssClass=this.group.expanded?"expanded":"collapsed";this.contentDiv.className="groupcontent "+contentCssClass;this.expander.onclick=function(){if(groupElementContainer.group.expandable){groupElementContainer.group.toggleExpanded();}};}}','GroupElementContainer.prototype=new LogItemContainerElement();copyProperties(GroupElementContainer.prototype,{toggleExpanded:function(){if(!this.isRoot){var oldCssClass,newCssClass,expanderText;if(this.group.expanded){newCssClass="expanded";oldCssClass="collapsed";expanderText="-";}else{newCssClass="collapsed";oldCssClass="expanded";expanderText="+";}',"replaceClass(this.contentDiv,newCssClass,oldCssClass);this.expanderTextNode.nodeValue=expanderText;}},remove:function(){if(!this.isRoot){this.headingDiv=null;this.expander.onclick=null;this.expander=null;this.expanderTextNode=null;this.contentDiv=null;this.containerDomNode=null;this.mainDiv.parentNode.removeChild(this.mainDiv);this.mainDiv=null;}},reverseChildren:function(){var node=null;var childDomNodes=[];while((node=this.contentDiv.firstChild)){this.contentDiv.removeChild(node);childDomNodes.push(node);}",'while((node=childDomNodes.pop())){this.contentDiv.appendChild(node);}},update:function(){if(!this.isRoot){if(this.group.expandable){removeClass(this.expander,"greyedout");}else{addClass(this.expander,"greyedout");}}},clear:function(){if(this.isRoot){this.contentDiv.innerHTML="";}}});function Group(name,isRoot,initiallyExpanded){this.name=name;this.group=null;this.isRoot=isRoot;this.initiallyExpanded=initiallyExpanded;this.elementContainers=[];this.children=[];this.expanded=initiallyExpanded;this.rendered=false;this.expandable=false;}',"Group.prototype=new LogItem();copyProperties(Group.prototype,{addChild:function(logItem){this.children.push(logItem);logItem.group=this;},render:function(){if(isIe){var unwrappedDomContainer,wrappedDomContainer;if(this.isRoot){unwrappedDomContainer=logMainContainer;wrappedDomContainer=logMainContainer;}else{unwrappedDomContainer=this.getUnwrappedDomContainer();wrappedDomContainer=this.getWrappedDomContainer();}","this.unwrappedElementContainer=new GroupElementContainer(this,unwrappedDomContainer,this.isRoot,false);this.wrappedElementContainer=new GroupElementContainer(this,wrappedDomContainer,this.isRoot,true);this.elementContainers=[this.unwrappedElementContainer,this.wrappedElementContainer];}else{var mainDomContainer=this.isRoot?logMainContainer:this.getMainDomContainer();this.mainElementContainer=new GroupElementContainer(this,mainDomContainer,this.isRoot,false);this.elementContainers=[this.mainElementContainer];}","this.rendered=true;},toggleExpanded:function(){this.expanded=!this.expanded;for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].toggleExpanded();}},expand:function(){if(!this.expanded){this.toggleExpanded();}},accept:function(visitor){visitor.visitGroup(this);},reverseChildren:function(){if(this.rendered){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].reverseChildren();}}},update:function(){var previouslyExpandable=this.expandable;this.expandable=(this.children.length!==0);if(this.expandable!==previouslyExpandable){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].update();}}},flatten:function(){var visitor=new GroupFlattener();this.accept(visitor);return visitor.logEntriesAndSeparators;},removeChild:function(child,doUpdate){array_remove(this.children,child);child.group=null;if(doUpdate){this.update();}},remove:function(doUpdate,removeFromGroup){for(var i=0,len=this.children.length;i<len;i++){this.children[i].remove(false,false);}","this.children=[];this.update();if(this===currentGroup){currentGroup=this.group;}","this.doRemove(doUpdate,removeFromGroup);},serialize:function(items){items.push([LogItem.serializedItemKeys.GROUP_START,this.name]);for(var i=0,len=this.children.length;i<len;i++){this.children[i].serialize(items);}","if(this!==currentGroup){items.push([LogItem.serializedItemKeys.GROUP_END]);}},clear:function(){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].clear();}}});function LogEntryElementContainer(){}",'LogEntryElementContainer.prototype=new LogItemContainerElement();copyProperties(LogEntryElementContainer.prototype,{remove:function(){this.doRemove();},doRemove:function(){this.mainDiv.parentNode.removeChild(this.mainDiv);this.mainDiv=null;this.contentElement=null;this.containerDomNode=null;},setContent:function(content,wrappedContent){if(content===this.formattedMessage){this.contentElement.innerHTML="";this.contentElement.appendChild(document.createTextNode(this.formattedMessage));}else{this.contentElement.innerHTML=content;}},setSearchMatch:function(isMatch){var oldCssClass=isMatch?"searchnonmatch":"searchmatch";var newCssClass=isMatch?"searchmatch":"searchnonmatch";replaceClass(this.mainDiv,newCssClass,oldCssClass);},clearSearch:function(){removeClass(this.mainDiv,"searchmatch");removeClass(this.mainDiv,"searchnonmatch");}});function LogEntryWrappedElementContainer(logEntry,containerDomNode){this.logEntry=logEntry;this.containerDomNode=containerDomNode;this.mainDiv=document.createElement("div");this.mainDiv.appendChild(document.createTextNode(this.logEntry.formattedMessage));this.mainDiv.className="logentry wrapped "+this.logEntry.level;this.contentElement=this.mainDiv;}','LogEntryWrappedElementContainer.prototype=new LogEntryElementContainer();LogEntryWrappedElementContainer.prototype.setContent=function(content,wrappedContent){if(content===this.formattedMessage){this.contentElement.innerHTML="";this.contentElement.appendChild(document.createTextNode(this.formattedMessage));}else{this.contentElement.innerHTML=wrappedContent;}};function LogEntryUnwrappedElementContainer(logEntry,containerDomNode){this.logEntry=logEntry;this.containerDomNode=containerDomNode;this.mainDiv=document.createElement("div");this.mainDiv.className="logentry unwrapped "+this.logEntry.level;this.pre=this.mainDiv.appendChild(document.createElement("pre"));this.pre.appendChild(document.createTextNode(this.logEntry.formattedMessage));this.pre.className="unwrapped";this.contentElement=this.pre;}','LogEntryUnwrappedElementContainer.prototype=new LogEntryElementContainer();LogEntryUnwrappedElementContainer.prototype.remove=function(){this.doRemove();this.pre=null;};function LogEntryMainElementContainer(logEntry,containerDomNode){this.logEntry=logEntry;this.containerDomNode=containerDomNode;this.mainDiv=document.createElement("div");this.mainDiv.className="logentry nonielogentry "+this.logEntry.level;this.contentElement=this.mainDiv.appendChild(document.createElement("span"));this.contentElement.appendChild(document.createTextNode(this.logEntry.formattedMessage));}',"LogEntryMainElementContainer.prototype=new LogEntryElementContainer();function LogEntry(level,formattedMessage){this.level=level;this.formattedMessage=formattedMessage;this.rendered=false;}",'LogEntry.prototype=new LogItem();copyProperties(LogEntry.prototype,{render:function(){var logEntry=this;var containerDomNode=this.group.contentDiv;if(isIe){this.formattedMessage=this.formattedMessage.replace(/\\r\\n/g,"\\r");this.unwrappedElementContainer=new LogEntryUnwrappedElementContainer(this,this.getUnwrappedDomContainer());this.wrappedElementContainer=new LogEntryWrappedElementContainer(this,this.getWrappedDomContainer());this.elementContainers=[this.unwrappedElementContainer,this.wrappedElementContainer];}else{this.mainElementContainer=new LogEntryMainElementContainer(this,this.getMainDomContainer());this.elementContainers=[this.mainElementContainer];}','this.content=this.formattedMessage;this.rendered=true;},setContent:function(content,wrappedContent){if(content!=this.content){if(isIe&&(content!==this.formattedMessage)){content=content.replace(/\\r\\n/g,"\\r");}',"for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].setContent(content,wrappedContent);}",'this.content=content;}},getSearchMatches:function(){var matches=[];var i,len;if(isIe){var unwrappedEls=getElementsByClass(this.unwrappedElementContainer.mainDiv,"searchterm","span");var wrappedEls=getElementsByClass(this.wrappedElementContainer.mainDiv,"searchterm","span");for(i=0,len=unwrappedEls.length;i<len;i++){matches[i]=new Match(this.level,null,unwrappedEls[i],wrappedEls[i]);}}else{var els=getElementsByClass(this.mainElementContainer.mainDiv,"searchterm","span");for(i=0,len=els.length;i<len;i++){matches[i]=new Match(this.level,els[i]);}}',"return matches;},setSearchMatch:function(isMatch){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].setSearchMatch(isMatch);}},clearSearch:function(){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].clearSearch();}},accept:function(visitor){visitor.visitLogEntry(this);},serialize:function(items){items.push([LogItem.serializedItemKeys.LOG_ENTRY,this.level,this.formattedMessage]);}});function LogItemVisitor(){}","LogItemVisitor.prototype={visit:function(logItem){},visitParent:function(logItem){if(logItem.group){logItem.group.accept(this);}},visitChildren:function(logItem){for(var i=0,len=logItem.children.length;i<len;i++){logItem.children[i].accept(this);}},visitLogEntry:function(logEntry){this.visit(logEntry);},visitSeparator:function(separator){this.visit(separator);},visitGroup:function(group){this.visit(group);}};function GroupFlattener(){this.logEntriesAndSeparators=[];}",'GroupFlattener.prototype=new LogItemVisitor();GroupFlattener.prototype.visitGroup=function(group){this.visitChildren(group);};GroupFlattener.prototype.visitLogEntry=function(logEntry){this.logEntriesAndSeparators.push(logEntry);};GroupFlattener.prototype.visitSeparator=function(separator){this.logEntriesAndSeparators.push(separator);};window.onload=function(){if(location.search){var queryBits=unescape(location.search).substr(1).split("&"),nameValueBits;for(var i=0,len=queryBits.length;i<len;i++){nameValueBits=queryBits[i].split("=");if(nameValueBits[0]=="log4javascript_domain"){document.domain=nameValueBits[1];break;}}}','logMainContainer=$("log");if(isIePre7){addClass(logMainContainer,"oldIe");}','rootGroup=new Group("root",true);rootGroup.render();currentGroup=rootGroup;setCommandInputWidth();setLogContainerHeight();toggleLoggingEnabled();toggleSearchEnabled();toggleSearchFilter();toggleSearchHighlight();applyFilters();checkAllLevels();toggleWrap();toggleNewestAtTop();toggleScrollToLatest();renderQueuedLogItems();loaded=true;$("command").value="";$("command").autocomplete="off";$("command").onkeydown=function(evt){evt=getEvent(evt);if(evt.keyCode==10||evt.keyCode==13){evalCommandLine();stopPropagation(evt);}else if(evt.keyCode==27){this.value="";this.focus();}else if(evt.keyCode==38&&commandHistory.length>0){currentCommandIndex=Math.max(0,currentCommandIndex-1);this.value=commandHistory[currentCommandIndex];moveCaretToEnd(this);}else if(evt.keyCode==40&&commandHistory.length>0){currentCommandIndex=Math.min(commandHistory.length-1,currentCommandIndex+1);this.value=commandHistory[currentCommandIndex];moveCaretToEnd(this);}};$("command").onkeypress=function(evt){evt=getEvent(evt);if(evt.keyCode==38&&commandHistory.length>0&&evt.preventDefault){evt.preventDefault();}};$("command").onkeyup=function(evt){evt=getEvent(evt);if(evt.keyCode==27&&evt.preventDefault){evt.preventDefault();this.focus();}};document.onkeydown=function keyEventHandler(evt){evt=getEvent(evt);switch(evt.keyCode){case 69:if(evt.shiftKey&&(evt.ctrlKey||evt.metaKey)){evalLastCommand();cancelKeyEvent(evt);return false;}',"break;case 75:if(evt.shiftKey&&(evt.ctrlKey||evt.metaKey)){focusSearch();cancelKeyEvent(evt);return false;}","break;case 40:case 76:if(evt.shiftKey&&(evt.ctrlKey||evt.metaKey)){focusCommandLine();cancelKeyEvent(evt);return false;}","break;}};setTimeout(setLogContainerHeight,20);setShowCommandLine(showCommandLine);doSearch();};window.onunload=function(){if(mainWindowExists()){appender.unload();}",'appender=null;};function toggleLoggingEnabled(){setLoggingEnabled($("enableLogging").checked);}',"function setLoggingEnabled(enable){loggingEnabled=enable;}","var appender=null;function setAppender(appenderParam){appender=appenderParam;}",'function setShowCloseButton(showCloseButton){$("closeButton").style.display=showCloseButton?"inline":"none";}','function setShowHideButton(showHideButton){$("hideButton").style.display=showHideButton?"inline":"none";}',"var newestAtTop=false;function LogItemContentReverser(){}","LogItemContentReverser.prototype=new LogItemVisitor();LogItemContentReverser.prototype.visitGroup=function(group){group.reverseChildren();this.visitChildren(group);};function setNewestAtTop(isNewestAtTop){var oldNewestAtTop=newestAtTop;var i,iLen,j,jLen;newestAtTop=Boolean(isNewestAtTop);if(oldNewestAtTop!=newestAtTop){var visitor=new LogItemContentReverser();rootGroup.accept(visitor);if(currentSearch){var currentMatch=currentSearch.matches[currentMatchIndex];var matchIndex=0;var matches=[];var actOnLogEntry=function(logEntry){var logEntryMatches=logEntry.getSearchMatches();for(j=0,jLen=logEntryMatches.length;j<jLen;j++){matches[matchIndex]=logEntryMatches[j];if(currentMatch&&logEntryMatches[j].equals(currentMatch)){currentMatchIndex=matchIndex;}","matchIndex++;}};if(newestAtTop){for(i=logEntries.length-1;i>=0;i--){actOnLogEntry(logEntries[i]);}}else{for(i=0,iLen=logEntries.length;i<iLen;i++){actOnLogEntry(logEntries[i]);}}","currentSearch.matches=matches;if(currentMatch){currentMatch.setCurrent();}}else if(scrollToLatest){doScrollToLatest();}}",'$("newestAtTop").checked=isNewestAtTop;}','function toggleNewestAtTop(){var isNewestAtTop=$("newestAtTop").checked;setNewestAtTop(isNewestAtTop);}',"var scrollToLatest=true;function setScrollToLatest(isScrollToLatest){scrollToLatest=isScrollToLatest;if(scrollToLatest){doScrollToLatest();}",'$("scrollToLatest").checked=isScrollToLatest;}','function toggleScrollToLatest(){var isScrollToLatest=$("scrollToLatest").checked;setScrollToLatest(isScrollToLatest);}','function doScrollToLatest(){var l=logMainContainer;if(typeof l.scrollTop!="undefined"){if(newestAtTop){l.scrollTop=0;}else{var latestLogEntry=l.lastChild;if(latestLogEntry){l.scrollTop=l.scrollHeight;}}}}',"var closeIfOpenerCloses=true;function setCloseIfOpenerCloses(isCloseIfOpenerCloses){closeIfOpenerCloses=isCloseIfOpenerCloses;}","var maxMessages=null;function setMaxMessages(max){maxMessages=max;pruneLogEntries();}",'var showCommandLine=false;function setShowCommandLine(isShowCommandLine){showCommandLine=isShowCommandLine;if(loaded){$("commandLine").style.display=showCommandLine?"block":"none";setCommandInputWidth();setLogContainerHeight();}}','function focusCommandLine(){if(loaded){$("command").focus();}}','function focusSearch(){if(loaded){$("searchBox").focus();}}',"function getLogItems(){var items=[];for(var i=0,len=logItems.length;i<len;i++){logItems[i].serialize(items);}","return items;}","function setLogItems(items){var loggingReallyEnabled=loggingEnabled;loggingEnabled=true;for(var i=0,len=items.length;i<len;i++){switch(items[i][0]){case LogItem.serializedItemKeys.LOG_ENTRY:log(items[i][1],items[i][2]);break;case LogItem.serializedItemKeys.GROUP_START:group(items[i][1]);break;case LogItem.serializedItemKeys.GROUP_END:groupEnd();break;}}","loggingEnabled=loggingReallyEnabled;}","function log(logLevel,formattedMessage){if(loggingEnabled){var logEntry=new LogEntry(logLevel,formattedMessage);logEntries.push(logEntry);logEntriesAndSeparators.push(logEntry);logItems.push(logEntry);currentGroup.addChild(logEntry);if(loaded){if(logQueuedEventsTimer!==null){clearTimeout(logQueuedEventsTimer);}","logQueuedEventsTimer=setTimeout(renderQueuedLogItems,renderDelay);unrenderedLogItemsExist=true;}}}","function renderQueuedLogItems(){logQueuedEventsTimer=null;var pruned=pruneLogEntries();var initiallyHasMatches=currentSearch?currentSearch.hasMatches():false;for(var i=0,len=logItems.length;i<len;i++){if(!logItems[i].rendered){logItems[i].render();logItems[i].appendToLog();if(currentSearch&&(logItems[i]instanceof LogEntry)){currentSearch.applyTo(logItems[i]);}}}","if(currentSearch){if(pruned){if(currentSearch.hasVisibleMatches()){if(currentMatchIndex===null){setCurrentMatchIndex(0);}","displayMatches();}else{displayNoMatches();}}else if(!initiallyHasMatches&&currentSearch.hasVisibleMatches()){setCurrentMatchIndex(0);displayMatches();}}","if(scrollToLatest){doScrollToLatest();}","unrenderedLogItemsExist=false;}","function pruneLogEntries(){if((maxMessages!==null)&&(logEntriesAndSeparators.length>maxMessages)){var numberToDelete=logEntriesAndSeparators.length-maxMessages;var prunedLogEntries=logEntriesAndSeparators.slice(0,numberToDelete);if(currentSearch){currentSearch.removeMatches(prunedLogEntries);}","var group;for(var i=0;i<numberToDelete;i++){group=logEntriesAndSeparators[i].group;array_remove(logItems,logEntriesAndSeparators[i]);array_remove(logEntries,logEntriesAndSeparators[i]);logEntriesAndSeparators[i].remove(true,true);if(group.children.length===0&&group!==currentGroup&&group!==rootGroup){array_remove(logItems,group);group.remove(true,true);}}","logEntriesAndSeparators=array_removeFromStart(logEntriesAndSeparators,numberToDelete);return true;}","return false;}",'function group(name,startExpanded){if(loggingEnabled){initiallyExpanded=(typeof startExpanded==="undefined")?true:Boolean(startExpanded);var newGroup=new Group(name,false,initiallyExpanded);currentGroup.addChild(newGroup);currentGroup=newGroup;logItems.push(newGroup);if(loaded){if(logQueuedEventsTimer!==null){clearTimeout(logQueuedEventsTimer);}',"logQueuedEventsTimer=setTimeout(renderQueuedLogItems,renderDelay);unrenderedLogItemsExist=true;}}}","function groupEnd(){currentGroup=(currentGroup===rootGroup)?rootGroup:currentGroup.group;}","function mainPageReloaded(){currentGroup=rootGroup;var separator=new Separator();logEntriesAndSeparators.push(separator);logItems.push(separator);currentGroup.addChild(separator);}","function closeWindow(){if(appender&&mainWindowExists()){appender.close(true);}else{window.close();}}","function hide(){if(appender&&mainWindowExists()){appender.hide();}}",'var mainWindow=window;var windowId="log4javascriptConsoleWindow_"+new Date().getTime()+"_"+(""+Math.random()).substr(2);function setMainWindow(win){mainWindow=win;mainWindow[windowId]=window;if(opener&&closeIfOpenerCloses){pollOpener();}}',"function pollOpener(){if(closeIfOpenerCloses){if(mainWindowExists()){setTimeout(pollOpener,500);}else{closeWindow();}}}","function mainWindowExists(){try{return(mainWindow&&!mainWindow.closed&&mainWindow[windowId]==window);}catch(ex){}","return false;}",'var logLevels=["TRACE","DEBUG","INFO","WARN","ERROR","FATAL"];function getCheckBox(logLevel){return $("switch_"+logLevel);}','function getIeWrappedLogContainer(){return $("log_wrapped");}','function getIeUnwrappedLogContainer(){return $("log_unwrapped");}',"function applyFilters(){for(var i=0;i<logLevels.length;i++){if(getCheckBox(logLevels[i]).checked){addClass(logMainContainer,logLevels[i]);}else{removeClass(logMainContainer,logLevels[i]);}}","updateSearchFromFilters();}",'function toggleAllLevels(){var turnOn=$("switch_ALL").checked;for(var i=0;i<logLevels.length;i++){getCheckBox(logLevels[i]).checked=turnOn;if(turnOn){addClass(logMainContainer,logLevels[i]);}else{removeClass(logMainContainer,logLevels[i]);}}}','function checkAllLevels(){for(var i=0;i<logLevels.length;i++){if(!getCheckBox(logLevels[i]).checked){getCheckBox("ALL").checked=false;return;}}','getCheckBox("ALL").checked=true;}',"function clearLog(){rootGroup.clear();currentGroup=rootGroup;logEntries=[];logItems=[];logEntriesAndSeparators=[];doSearch();}",'function toggleWrap(){var enable=$("wrap").checked;if(enable){addClass(logMainContainer,"wrap");}else{removeClass(logMainContainer,"wrap");}',"refreshCurrentMatch();}","var searchTimer=null;function scheduleSearch(){try{clearTimeout(searchTimer);}catch(ex){}","searchTimer=setTimeout(doSearch,500);}","function Search(searchTerm,isRegex,searchRegex,isCaseSensitive){this.searchTerm=searchTerm;this.isRegex=isRegex;this.searchRegex=searchRegex;this.isCaseSensitive=isCaseSensitive;this.matches=[];}","Search.prototype={hasMatches:function(){return this.matches.length>0;},hasVisibleMatches:function(){if(this.hasMatches()){for(var i=0;i<this.matches.length;i++){if(this.matches[i].isVisible()){return true;}}}","return false;},match:function(logEntry){var entryText=String(logEntry.formattedMessage);var matchesSearch=false;if(this.isRegex){matchesSearch=this.searchRegex.test(entryText);}else if(this.isCaseSensitive){matchesSearch=(entryText.indexOf(this.searchTerm)>-1);}else{matchesSearch=(entryText.toLowerCase().indexOf(this.searchTerm.toLowerCase())>-1);}","return matchesSearch;},getNextVisibleMatchIndex:function(){for(var i=currentMatchIndex+1;i<this.matches.length;i++){if(this.matches[i].isVisible()){return i;}}","for(i=0;i<=currentMatchIndex;i++){if(this.matches[i].isVisible()){return i;}}","return-1;},getPreviousVisibleMatchIndex:function(){for(var i=currentMatchIndex-1;i>=0;i--){if(this.matches[i].isVisible()){return i;}}","for(var i=this.matches.length-1;i>=currentMatchIndex;i--){if(this.matches[i].isVisible()){return i;}}",'return-1;},applyTo:function(logEntry){var doesMatch=this.match(logEntry);if(doesMatch){logEntry.group.expand();logEntry.setSearchMatch(true);var logEntryContent;var wrappedLogEntryContent;var searchTermReplacementStartTag="<span class=\\"searchterm\\">";var searchTermReplacementEndTag="<"+"/span>";var preTagName=isIe?"pre":"span";var preStartTag="<"+preTagName+" class=\\"pre\\">";var preEndTag="<"+"/"+preTagName+">";var startIndex=0;var searchIndex,matchedText,textBeforeMatch;if(this.isRegex){var flags=this.isCaseSensitive?"g":"gi";var capturingRegex=new RegExp("("+this.searchRegex.source+")",flags);var rnd=(""+Math.random()).substr(2);var startToken="%%s"+rnd+"%%";var endToken="%%e"+rnd+"%%";logEntryContent=logEntry.formattedMessage.replace(capturingRegex,startToken+"$1"+endToken);logEntryContent=escapeHtml(logEntryContent);var result;var searchString=logEntryContent;logEntryContent="";wrappedLogEntryContent="";while((searchIndex=searchString.indexOf(startToken,startIndex))>-1){var endTokenIndex=searchString.indexOf(endToken,searchIndex);matchedText=searchString.substring(searchIndex+startToken.length,endTokenIndex);textBeforeMatch=searchString.substring(startIndex,searchIndex);logEntryContent+=preStartTag+textBeforeMatch+preEndTag;logEntryContent+=searchTermReplacementStartTag+preStartTag+matchedText+',"preEndTag+searchTermReplacementEndTag;if(isIe){wrappedLogEntryContent+=textBeforeMatch+searchTermReplacementStartTag+","matchedText+searchTermReplacementEndTag;}","startIndex=endTokenIndex+endToken.length;}",'logEntryContent+=preStartTag+searchString.substr(startIndex)+preEndTag;if(isIe){wrappedLogEntryContent+=searchString.substr(startIndex);}}else{logEntryContent="";wrappedLogEntryContent="";var searchTermReplacementLength=searchTermReplacementStartTag.length+',"this.searchTerm.length+searchTermReplacementEndTag.length;var searchTermLength=this.searchTerm.length;var searchTermLowerCase=this.searchTerm.toLowerCase();var logTextLowerCase=logEntry.formattedMessage.toLowerCase();while((searchIndex=logTextLowerCase.indexOf(searchTermLowerCase,startIndex))>-1){matchedText=escapeHtml(logEntry.formattedMessage.substr(searchIndex,this.searchTerm.length));textBeforeMatch=escapeHtml(logEntry.formattedMessage.substring(startIndex,searchIndex));var searchTermReplacement=searchTermReplacementStartTag+","preStartTag+matchedText+preEndTag+searchTermReplacementEndTag;logEntryContent+=preStartTag+textBeforeMatch+preEndTag+searchTermReplacement;if(isIe){wrappedLogEntryContent+=textBeforeMatch+searchTermReplacementStartTag+","matchedText+searchTermReplacementEndTag;}","startIndex=searchIndex+searchTermLength;}","var textAfterLastMatch=escapeHtml(logEntry.formattedMessage.substr(startIndex));logEntryContent+=preStartTag+textAfterLastMatch+preEndTag;if(isIe){wrappedLogEntryContent+=textAfterLastMatch;}}","logEntry.setContent(logEntryContent,wrappedLogEntryContent);var logEntryMatches=logEntry.getSearchMatches();this.matches=this.matches.concat(logEntryMatches);}else{logEntry.setSearchMatch(false);logEntry.setContent(logEntry.formattedMessage,logEntry.formattedMessage);}","return doesMatch;},removeMatches:function(logEntries){var matchesToRemoveCount=0;var currentMatchRemoved=false;var matchesToRemove=[];var i,iLen,j,jLen;for(i=0,iLen=this.matches.length;i<iLen;i++){for(j=0,jLen=logEntries.length;j<jLen;j++){if(this.matches[i].belongsTo(logEntries[j])){matchesToRemove.push(this.matches[i]);if(i===currentMatchIndex){currentMatchRemoved=true;}}}}","var newMatch=currentMatchRemoved?null:this.matches[currentMatchIndex];if(currentMatchRemoved){for(i=currentMatchIndex,iLen=this.matches.length;i<iLen;i++){if(this.matches[i].isVisible()&&!array_contains(matchesToRemove,this.matches[i])){newMatch=this.matches[i];break;}}}","for(i=0,iLen=matchesToRemove.length;i<iLen;i++){array_remove(this.matches,matchesToRemove[i]);matchesToRemove[i].remove();}","if(this.hasVisibleMatches()){if(newMatch===null){setCurrentMatchIndex(0);}else{var newMatchIndex=0;for(i=0,iLen=this.matches.length;i<iLen;i++){if(newMatch===this.matches[i]){newMatchIndex=i;break;}}","setCurrentMatchIndex(newMatchIndex);}}else{currentMatchIndex=null;displayNoMatches();}}};function getPageOffsetTop(el,container){var currentEl=el;var y=0;while(currentEl&&currentEl!=container){y+=currentEl.offsetTop;currentEl=currentEl.offsetParent;}","return y;}",'function scrollIntoView(el){var logContainer=logMainContainer;if(!$("wrap").checked){var logContainerLeft=logContainer.scrollLeft;var logContainerRight=logContainerLeft+logContainer.offsetWidth;var elLeft=el.offsetLeft;var elRight=elLeft+el.offsetWidth;if(elLeft<logContainerLeft||elRight>logContainerRight){logContainer.scrollLeft=elLeft-(logContainer.offsetWidth-el.offsetWidth)/2;}}',"var logContainerTop=logContainer.scrollTop;var logContainerBottom=logContainerTop+logContainer.offsetHeight;var elTop=getPageOffsetTop(el)-getToolBarsHeight();var elBottom=elTop+el.offsetHeight;if(elTop<logContainerTop||elBottom>logContainerBottom){logContainer.scrollTop=elTop-(logContainer.offsetHeight-el.offsetHeight)/2;}}","function Match(logEntryLevel,spanInMainDiv,spanInUnwrappedPre,spanInWrappedDiv){this.logEntryLevel=logEntryLevel;this.spanInMainDiv=spanInMainDiv;if(isIe){this.spanInUnwrappedPre=spanInUnwrappedPre;this.spanInWrappedDiv=spanInWrappedDiv;}","this.mainSpan=isIe?spanInUnwrappedPre:spanInMainDiv;}",'Match.prototype={equals:function(match){return this.mainSpan===match.mainSpan;},setCurrent:function(){if(isIe){addClass(this.spanInUnwrappedPre,"currentmatch");addClass(this.spanInWrappedDiv,"currentmatch");var elementToScroll=$("wrap").checked?this.spanInWrappedDiv:this.spanInUnwrappedPre;scrollIntoView(elementToScroll);}else{addClass(this.spanInMainDiv,"currentmatch");scrollIntoView(this.spanInMainDiv);}},belongsTo:function(logEntry){if(isIe){return isDescendant(this.spanInUnwrappedPre,logEntry.unwrappedPre);}else{return isDescendant(this.spanInMainDiv,logEntry.mainDiv);}},setNotCurrent:function(){if(isIe){removeClass(this.spanInUnwrappedPre,"currentmatch");removeClass(this.spanInWrappedDiv,"currentmatch");}else{removeClass(this.spanInMainDiv,"currentmatch");}},isOrphan:function(){return isOrphan(this.mainSpan);},isVisible:function(){return getCheckBox(this.logEntryLevel).checked;},remove:function(){if(isIe){this.spanInUnwrappedPre=null;this.spanInWrappedDiv=null;}else{this.spanInMainDiv=null;}}};var currentSearch=null;var currentMatchIndex=null;function doSearch(){var searchBox=$("searchBox");var searchTerm=searchBox.value;var isRegex=$("searchRegex").checked;var isCaseSensitive=$("searchCaseSensitive").checked;var i;if(searchTerm===""){$("searchReset").disabled=true;$("searchNav").style.display="none";removeClass(document.body,"searching");removeClass(searchBox,"hasmatches");removeClass(searchBox,"nomatches");for(i=0;i<logEntries.length;i++){logEntries[i].clearSearch();logEntries[i].setContent(logEntries[i].formattedMessage,logEntries[i].formattedMessage);}','currentSearch=null;setLogContainerHeight();}else{$("searchReset").disabled=false;$("searchNav").style.display="block";var searchRegex;var regexValid;if(isRegex){try{searchRegex=isCaseSensitive?new RegExp(searchTerm,"g"):new RegExp(searchTerm,"gi");regexValid=true;replaceClass(searchBox,"validregex","invalidregex");searchBox.title="Valid regex";}catch(ex){regexValid=false;replaceClass(searchBox,"invalidregex","validregex");searchBox.title="Invalid regex: "+(ex.message?ex.message:(ex.description?ex.description:"unknown error"));return;}}else{searchBox.title="";removeClass(searchBox,"validregex");removeClass(searchBox,"invalidregex");}','addClass(document.body,"searching");currentSearch=new Search(searchTerm,isRegex,searchRegex,isCaseSensitive);for(i=0;i<logEntries.length;i++){currentSearch.applyTo(logEntries[i]);}',"setLogContainerHeight();if(currentSearch.hasVisibleMatches()){setCurrentMatchIndex(0);displayMatches();}else{displayNoMatches();}}}","function updateSearchFromFilters(){if(currentSearch){if(currentSearch.hasMatches()){if(currentMatchIndex===null){currentMatchIndex=0;}","var currentMatch=currentSearch.matches[currentMatchIndex];if(currentMatch.isVisible()){displayMatches();setCurrentMatchIndex(currentMatchIndex);}else{currentMatch.setNotCurrent();var nextVisibleMatchIndex=currentSearch.getNextVisibleMatchIndex();if(nextVisibleMatchIndex>-1){setCurrentMatchIndex(nextVisibleMatchIndex);displayMatches();}else{displayNoMatches();}}}else{displayNoMatches();}}}","function refreshCurrentMatch(){if(currentSearch&&currentSearch.hasVisibleMatches()){setCurrentMatchIndex(currentMatchIndex);}}",'function displayMatches(){replaceClass($("searchBox"),"hasmatches","nomatches");$("searchBox").title=""+currentSearch.matches.length+" matches found";$("searchNav").style.display="block";setLogContainerHeight();}','function displayNoMatches(){replaceClass($("searchBox"),"nomatches","hasmatches");$("searchBox").title="No matches found";$("searchNav").style.display="none";setLogContainerHeight();}','function toggleSearchEnabled(enable){enable=(typeof enable=="undefined")?!$("searchDisable").checked:enable;$("searchBox").disabled=!enable;$("searchReset").disabled=!enable;$("searchRegex").disabled=!enable;$("searchNext").disabled=!enable;$("searchPrevious").disabled=!enable;$("searchCaseSensitive").disabled=!enable;$("searchNav").style.display=(enable&&($("searchBox").value!=="")&&currentSearch&&currentSearch.hasVisibleMatches())?"block":"none";if(enable){removeClass($("search"),"greyedout");addClass(document.body,"searching");if($("searchHighlight").checked){addClass(logMainContainer,"searchhighlight");}else{removeClass(logMainContainer,"searchhighlight");}','if($("searchFilter").checked){addClass(logMainContainer,"searchfilter");}else{removeClass(logMainContainer,"searchfilter");}','$("searchDisable").checked=!enable;}else{addClass($("search"),"greyedout");removeClass(document.body,"searching");removeClass(logMainContainer,"searchhighlight");removeClass(logMainContainer,"searchfilter");}',"setLogContainerHeight();}",'function toggleSearchFilter(){var enable=$("searchFilter").checked;if(enable){addClass(logMainContainer,"searchfilter");}else{removeClass(logMainContainer,"searchfilter");}',"refreshCurrentMatch();}",'function toggleSearchHighlight(){var enable=$("searchHighlight").checked;if(enable){addClass(logMainContainer,"searchhighlight");}else{removeClass(logMainContainer,"searchhighlight");}}','function clearSearch(){$("searchBox").value="";doSearch();}','function searchNext(){if(currentSearch!==null&&currentMatchIndex!==null){currentSearch.matches[currentMatchIndex].setNotCurrent();var nextMatchIndex=currentSearch.getNextVisibleMatchIndex();if(nextMatchIndex>currentMatchIndex||confirm("Reached the end of the page. Start from the top?")){setCurrentMatchIndex(nextMatchIndex);}}}','function searchPrevious(){if(currentSearch!==null&&currentMatchIndex!==null){currentSearch.matches[currentMatchIndex].setNotCurrent();var previousMatchIndex=currentSearch.getPreviousVisibleMatchIndex();if(previousMatchIndex<currentMatchIndex||confirm("Reached the start of the page. Continue from the bottom?")){setCurrentMatchIndex(previousMatchIndex);}}}',"function setCurrentMatchIndex(index){currentMatchIndex=index;currentSearch.matches[currentMatchIndex].setCurrent();}",'function addClass(el,cssClass){if(!hasClass(el,cssClass)){if(el.className){el.className+=" "+cssClass;}else{el.className=cssClass;}}}','function hasClass(el,cssClass){if(el.className){var classNames=el.className.split(" ");return array_contains(classNames,cssClass);}',"return false;}",'function removeClass(el,cssClass){if(hasClass(el,cssClass)){var existingClasses=el.className.split(" ");var newClasses=[];for(var i=0,len=existingClasses.length;i<len;i++){if(existingClasses[i]!=cssClass){newClasses[newClasses.length]=existingClasses[i];}}','el.className=newClasses.join(" ");}}',"function replaceClass(el,newCssClass,oldCssClass){removeClass(el,oldCssClass);addClass(el,newCssClass);}","function getElementsByClass(el,cssClass,tagName){var elements=el.getElementsByTagName(tagName);var matches=[];for(var i=0,len=elements.length;i<len;i++){if(hasClass(elements[i],cssClass)){matches.push(elements[i]);}}","return matches;}","function $(id){return document.getElementById(id);}","function isDescendant(node,ancestorNode){while(node!=null){if(node===ancestorNode){return true;}","node=node.parentNode;}","return false;}","function isOrphan(node){var currentNode=node;while(currentNode){if(currentNode==document.body){return false;}","currentNode=currentNode.parentNode;}","return true;}",'function escapeHtml(str){return str.replace(/&/g,"&amp;").replace(/[<]/g,"&lt;").replace(/>/g,"&gt;");}',"function getWindowWidth(){if(window.innerWidth){return window.innerWidth;}else if(document.documentElement&&document.documentElement.clientWidth){return document.documentElement.clientWidth;}else if(document.body){return document.body.clientWidth;}","return 0;}","function getWindowHeight(){if(window.innerHeight){return window.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){return document.documentElement.clientHeight;}else if(document.body){return document.body.clientHeight;}","return 0;}",'function getToolBarsHeight(){return $("switches").offsetHeight;}','function getChromeHeight(){var height=getToolBarsHeight();if(showCommandLine){height+=$("commandLine").offsetHeight;}',"return height;}",'function setLogContainerHeight(){if(logMainContainer){var windowHeight=getWindowHeight();$("body").style.height=getWindowHeight()+"px";logMainContainer.style.height=""+','Math.max(0,windowHeight-getChromeHeight())+"px";}}','function setCommandInputWidth(){if(showCommandLine){$("command").style.width=""+Math.max(0,$("commandLineContainer").offsetWidth-','($("evaluateButton").offsetWidth+13))+"px";}}',"window.onresize=function(){setCommandInputWidth();setLogContainerHeight();};if(!Array.prototype.push){Array.prototype.push=function(){for(var i=0,len=arguments.length;i<len;i++){this[this.length]=arguments[i];}","return this.length;};}","if(!Array.prototype.pop){Array.prototype.pop=function(){if(this.length>0){var val=this[this.length-1];this.length=this.length-1;return val;}};}","if(!Array.prototype.shift){Array.prototype.shift=function(){if(this.length>0){var firstItem=this[0];for(var i=0,len=this.length-1;i<len;i++){this[i]=this[i+1];}","this.length=this.length-1;return firstItem;}};}","if(!Array.prototype.splice){Array.prototype.splice=function(startIndex,deleteCount){var itemsAfterDeleted=this.slice(startIndex+deleteCount);var itemsDeleted=this.slice(startIndex,startIndex+deleteCount);this.length=startIndex;var argumentsArray=[];for(var i=0,len=arguments.length;i<len;i++){argumentsArray[i]=arguments[i];}","var itemsToAppend=(argumentsArray.length>2)?itemsAfterDeleted=argumentsArray.slice(2).concat(itemsAfterDeleted):itemsAfterDeleted;for(i=0,len=itemsToAppend.length;i<len;i++){this.push(itemsToAppend[i]);}","return itemsDeleted;};}","function array_remove(arr,val){var index=-1;for(var i=0,len=arr.length;i<len;i++){if(arr[i]===val){index=i;break;}}","if(index>=0){arr.splice(index,1);return index;}else{return false;}}","function array_removeFromStart(array,numberToRemove){if(Array.prototype.splice){array.splice(0,numberToRemove);}else{for(var i=numberToRemove,len=array.length;i<len;i++){array[i-numberToRemove]=array[i];}","array.length=array.length-numberToRemove;}","return array;}","function array_contains(arr,val){for(var i=0,len=arr.length;i<len;i++){if(arr[i]==val){return true;}}","return false;}","function getErrorMessage(ex){if(ex.message){return ex.message;}else if(ex.description){return ex.description;}",'return""+ex;}',"function moveCaretToEnd(input){if(input.setSelectionRange){input.focus();var length=input.value.length;input.setSelectionRange(length,length);}else if(input.createTextRange){var range=input.createTextRange();range.collapse(false);range.select();}","input.focus();}",'function stopPropagation(evt){if(evt.stopPropagation){evt.stopPropagation();}else if(typeof evt.cancelBubble!="undefined"){evt.cancelBubble=true;}}',"function getEvent(evt){return evt?evt:event;}","function getTarget(evt){return evt.target?evt.target:evt.srcElement;}",'function getRelatedTarget(evt){if(evt.relatedTarget){return evt.relatedTarget;}else if(evt.srcElement){switch(evt.type){case"mouseover":return evt.fromElement;case"mouseout":return evt.toElement;default:return evt.srcElement;}}}',"function cancelKeyEvent(evt){evt.returnValue=false;stopPropagation(evt);}",'function evalCommandLine(){var expr=$("command").value;evalCommand(expr);$("command").value="";}',"function evalLastCommand(){if(lastCommand!=null){evalCommand(lastCommand);}}",'var lastCommand=null;var commandHistory=[];var currentCommandIndex=0;function evalCommand(expr){if(appender){appender.evalCommandAndAppend(expr);}else{var prefix=">>> "+expr+"\\r\\n";try{log("INFO",prefix+eval(expr));}catch(ex){log("ERROR",prefix+"Error: "+getErrorMessage(ex));}}',"if(expr!=commandHistory[commandHistory.length-1]){commandHistory.push(expr);if(appender){appender.storeCommandHistory(commandHistory);}}","currentCommandIndex=(expr==commandHistory[currentCommandIndex])?currentCommandIndex+1:commandHistory.length;lastCommand=expr;}","//]]>","<\/script>",'<style type="text/css">',"body{background-color:white;color:black;padding:0;margin:0;font-family:tahoma,verdana,arial,helvetica,sans-serif;overflow:hidden}div#switchesContainer input{margin-bottom:0}div.toolbar{border-top:solid #ffffff 1px;border-bottom:solid #aca899 1px;background-color:#f1efe7;padding:3px 5px;font-size:68.75%}div.toolbar,div#search input{font-family:tahoma,verdana,arial,helvetica,sans-serif}div.toolbar input.button{padding:0 5px;font-size:100%}div.toolbar input.hidden{display:none}div#switches input#clearButton{margin-left:20px}div#levels label{font-weight:bold}div#levels label,div#options label{margin-right:5px}div#levels label#wrapLabel{font-weight:normal}div#search label{margin-right:10px}div#search label.searchboxlabel{margin-right:0}div#search input{font-size:100%}div#search input.validregex{color:green}div#search input.invalidregex{color:red}div#search input.nomatches{color:white;background-color:#ff6666}div#search input.nomatches{color:white;background-color:#ff6666}div#searchNav{display:none}div#commandLine{display:none}div#commandLine input#command{font-size:100%;font-family:Courier New,Courier}div#commandLine input#evaluateButton{}*.greyedout{color:gray !important;border-color:gray !important}*.greyedout *.alwaysenabled{color:black}*.unselectable{-khtml-user-select:none;-moz-user-select:none;user-select:none}div#log{font-family:Courier New,Courier;font-size:75%;width:100%;overflow:auto;clear:both;position:relative}div.group{border-color:#cccccc;border-style:solid;border-width:1px 0 1px 1px;overflow:visible}div.oldIe div.group,div.oldIe div.group *,div.oldIe *.logentry{height:1%}div.group div.groupheading span.expander{border:solid black 1px;font-family:Courier New,Courier;font-size:0.833em;background-color:#eeeeee;position:relative;top:-1px;color:black;padding:0 2px;cursor:pointer;cursor:hand;height:1%}div.group div.groupcontent{margin-left:10px;padding-bottom:2px;overflow:visible}div.group div.expanded{display:block}div.group div.collapsed{display:none}*.logentry{overflow:visible;display:none;white-space:pre}span.pre{white-space:pre}pre.unwrapped{display:inline !important}pre.unwrapped pre.pre,div.wrapped pre.pre{display:inline}div.wrapped pre.pre{white-space:normal}div.wrapped{display:none}body.searching *.logentry span.currentmatch{color:white !important;background-color:green !important}body.searching div.searchhighlight *.logentry span.searchterm{color:black;background-color:yellow}div.wrap *.logentry{white-space:normal !important;border-width:0 0 1px 0;border-color:#dddddd;border-style:dotted}div.wrap #log_wrapped,#log_unwrapped{display:block}div.wrap #log_unwrapped,#log_wrapped{display:none}div.wrap *.logentry span.pre{overflow:visible;white-space:normal}div.wrap *.logentry pre.unwrapped{display:none}div.wrap *.logentry span.wrapped{display:inline}div.searchfilter *.searchnonmatch{display:none !important}div#log *.TRACE,label#label_TRACE{color:#666666}div#log *.DEBUG,label#label_DEBUG{color:green}div#log *.INFO,label#label_INFO{color:#000099}div#log *.WARN,label#label_WARN{color:#999900}div#log *.ERROR,label#label_ERROR{color:red}div#log *.FATAL,label#label_FATAL{color:#660066}div.TRACE#log *.TRACE,div.DEBUG#log *.DEBUG,div.INFO#log *.INFO,div.WARN#log *.WARN,div.ERROR#log *.ERROR,div.FATAL#log *.FATAL{display:block}div#log div.separator{background-color:#cccccc;margin:5px 0;line-height:1px}","</style>","</head>",'<body id="body">','<div id="switchesContainer">','<div id="switches">','<div id="levels" class="toolbar">',"Filters:",'<input type="checkbox" id="switch_TRACE" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide trace messages" /><label for="switch_TRACE" id="label_TRACE">trace</label>','<input type="checkbox" id="switch_DEBUG" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide debug messages" /><label for="switch_DEBUG" id="label_DEBUG">debug</label>','<input type="checkbox" id="switch_INFO" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide info messages" /><label for="switch_INFO" id="label_INFO">info</label>','<input type="checkbox" id="switch_WARN" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide warn messages" /><label for="switch_WARN" id="label_WARN">warn</label>','<input type="checkbox" id="switch_ERROR" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide error messages" /><label for="switch_ERROR" id="label_ERROR">error</label>','<input type="checkbox" id="switch_FATAL" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide fatal messages" /><label for="switch_FATAL" id="label_FATAL">fatal</label>','<input type="checkbox" id="switch_ALL" onclick="toggleAllLevels(); applyFilters()" checked="checked" title="Show/hide all messages" /><label for="switch_ALL" id="label_ALL">all</label>',"</div>",'<div id="search" class="toolbar">','<label for="searchBox" class="searchboxlabel">Search:</label> <input type="text" id="searchBox" onclick="toggleSearchEnabled(true)" onkeyup="scheduleSearch()" size="20" />','<input type="button" id="searchReset" disabled="disabled" value="Reset" onclick="clearSearch()" class="button" title="Reset the search" />','<input type="checkbox" id="searchRegex" onclick="doSearch()" title="If checked, search is treated as a regular expression" /><label for="searchRegex">Regex</label>','<input type="checkbox" id="searchCaseSensitive" onclick="doSearch()" title="If checked, search is case sensitive" /><label for="searchCaseSensitive">Match case</label>','<input type="checkbox" id="searchDisable" onclick="toggleSearchEnabled()" title="Enable/disable search" /><label for="searchDisable" class="alwaysenabled">Disable</label>','<div id="searchNav">','<input type="button" id="searchNext" disabled="disabled" value="Next" onclick="searchNext()" class="button" title="Go to the next matching log entry" />','<input type="button" id="searchPrevious" disabled="disabled" value="Previous" onclick="searchPrevious()" class="button" title="Go to the previous matching log entry" />','<input type="checkbox" id="searchFilter" onclick="toggleSearchFilter()" title="If checked, non-matching log entries are filtered out" /><label for="searchFilter">Filter</label>','<input type="checkbox" id="searchHighlight" onclick="toggleSearchHighlight()" title="Highlight matched search terms" /><label for="searchHighlight" class="alwaysenabled">Highlight all</label>',"</div>","</div>",'<div id="options" class="toolbar">',"Options:",'<input type="checkbox" id="enableLogging" onclick="toggleLoggingEnabled()" checked="checked" title="Enable/disable logging" /><label for="enableLogging" id="enableLoggingLabel">Log</label>','<input type="checkbox" id="wrap" onclick="toggleWrap()" title="Enable / disable word wrap" /><label for="wrap" id="wrapLabel">Wrap</label>','<input type="checkbox" id="newestAtTop" onclick="toggleNewestAtTop()" title="If checked, causes newest messages to appear at the top" /><label for="newestAtTop" id="newestAtTopLabel">Newest at the top</label>','<input type="checkbox" id="scrollToLatest" onclick="toggleScrollToLatest()" checked="checked" title="If checked, window automatically scrolls to a new message when it is added" /><label for="scrollToLatest" id="scrollToLatestLabel">Scroll to latest</label>','<input type="button" id="clearButton" value="Clear" onclick="clearLog()" class="button" title="Clear all log messages"  />','<input type="button" id="hideButton" value="Hide" onclick="hide()" class="hidden button" title="Hide the console" />','<input type="button" id="closeButton" value="Close" onclick="closeWindow()" class="hidden button" title="Close the window" />',"</div>","</div>","</div>",'<div id="log" class="TRACE DEBUG INFO WARN ERROR FATAL"></div>','<div id="commandLine" class="toolbar">','<div id="commandLineContainer">','<input type="text" id="command" title="Enter a JavaScript command here and hit return or press \'Evaluate\'" />','<input type="button" id="evaluateButton" value="Evaluate" class="button" title="Evaluate the command" onclick="evalCommandLine()" />',"</div>","</div>","</body>","</html>",""];e.open();for(var n=0,r=t.length;n<r;n++)e.writeln(t[n]);e.close()};this.setEventTypes(["load","unload"]);var H=function(){var e=k();e.setAppender(u),e.setNewestAtTop(v),e.setScrollToLatest(y),e.setMaxMessages(S),e.setShowCommandLine(M),e.setShowHideButton(j),e.setShowCloseButton(A),e.setMainWindow(window);var t=getCookie("log4javascriptCommandHistory");t&&(e.commandHistory=t.split(","),e.currentCommandIndex=e.commandHistory.length),u.dispatchEvent("load",{win:e})};this.unload=function(){logLog.debug("unload "+this+", caller: "+this.unload.caller),f||(logLog.debug("really doing unload "+this),f=!0,p=!1,d=!1,u.dispatchEvent("unload",{}))};var W=function(e,t,n,r){var i=setInterval((function(){try{f&&clearInterval(i),e(k())&&(clearInterval(i),n())}catch(e){clearInterval(i),m=!1,handleError(r,e)}}),t)},V=function(){var e=document.domain!=location.hostname;return s?"":getBaseUrl()+"console.html"+(e?"?log4javascript_domain="+escape(document.domain):"")};if(n){var $=null,K=[];this.addCssProperty=function(e,t){P("cssProperties")&&K.push([e,t])};var G,Y=!1,J=uniqueId+"_InPageAppender_"+_;this.hide=function(){h&&d&&(O()&&k().$("command").blur(),G.style.display="none",L=!0)},this.show=function(){h&&(d?(G.style.display="block",this.setShowCommandLine(M),L=!1):Y||w(!0))},this.isVisible=function(){return!L&&!f},this.close=function(e){f||e&&!confirm("This will permanently remove the console from the page. No more messages will be logged. Do you wish to continue?")||(G.parentNode.removeChild(G),this.unload())},E=function(){var e="InPageAppender.open: unable to create console iframe";function t(){try{o||u.show(),H(),p=!0,z()}catch(t){m=!1,handleError(e,t)}}function n(){try{var n=function(e){return isLoaded(e)};s&&q(k().document),n(k())?t():W(n,100,t,e)}catch(t){m=!1,handleError(e,t)}}L=!1,(G=$.appendChild(document.createElement("div"))).style.width=a,G.style.height=l,G.style.border="solid gray 1px";for(var r=0,i=K.length;r<i;r++)G.style[K[r][0]]=K[r][1];var c=s?"":" src='"+V()+"'";G.innerHTML="<iframe id='"+J+"' name='"+J+"' width='100%' height='100%' frameborder='0'"+c+" scrolling='no'></iframe>",f=!1;var h=function(e){try{return bool(e)&&bool(e.document)}catch(e){return!1}};h(k())?n():W(h,100,n,e),d=!0},w=function(e){if(e||!o){var t=function(){if(r)try{var e=document.getElementById(r);1==e.nodeType&&($=e),E()}catch(e){handleError("InPageAppender.init: invalid container element '"+r+"' supplied",e)}else($=document.createElement("div")).style.position="fixed",$.style.left="0",$.style.right="0",$.style.bottom="0",document.body.appendChild($),u.addCssProperty("borderWidth","1px 0 0 0"),u.addCssProperty("zIndex",1e6),E()};pageLoaded&&r&&r.appendChild?($=r,E()):pageLoaded?t():log4javascript.addEventListener("load",t),Y=!0}},b=function(){w(),h=!0},k=function(){var e=window.frames[J];if(e)return e},x=function(){return!(!m||f)&&(d&&!p&&k()&&isLoaded(k())&&(p=!0),p)}}else{var X,Q=u.defaults.useOldPopUp,Z=u.defaults.complainAboutPopUpBlocking,ee=this.defaults.reopenWhenClosed;this.isUseOldPopUp=function(){return Q},this.setUseOldPopUp=function(e){P("useOldPopUp")&&(Q=bool(e))},this.isComplainAboutPopUpBlocking=function(){return Z},this.setComplainAboutPopUpBlocking=function(e){P("complainAboutPopUpBlocking")&&(Z=bool(e))},this.isFocusPopUp=function(){return c},this.setFocusPopUp=function(e){c=bool(e)},this.isReopenWhenClosed=function(){return ee},this.setReopenWhenClosed=function(e){ee=bool(e)},this.close=function(){logLog.debug("close "+this);try{X.close(),this.unload()}catch(e){}},this.hide=function(){logLog.debug("hide "+this),O()&&this.close()},this.show=function(){logLog.debug("show "+this),d||E()},this.isVisible=function(){return x()},E=function(){var e="width="+a+",height="+l+",status,resizable",t="";try{var n=window.frameElement;n&&(t="_"+n.tagName+"_"+(n.name||n.id||""))}catch(e){t="_inaccessibleParentFrame"}var r="PopUp_"+location.host.replace(/[^a-z0-9]/gi,"_")+"_"+_+t;Q&&s||(r=r+"_"+uniqueId);var i=function(e){if(f)return!0;try{return bool(e)&&e.closed}catch(e){}return!1},o=function(){f||u.unload()};function c(){k().setCloseIfOpenerCloses(!Q||!s),H(),p=!0,z(),W(i,500,o,"PopUpAppender.checkPopUpClosed: error checking pop-up window")}try{X=window.open(V(),r,e),f=!1,d=!0,X&&X.document?s&&Q&&isLoaded(X)?(X.mainPageReloaded(),c()):(s&&q(X.document),isLoaded(X)?c():W((function(e){return bool(e)&&isLoaded(e)}),100,c,"PopUpAppender.init: unable to create console window")):(m=!1,logLog.warn("PopUpAppender.init: pop-ups blocked, please unblock to use PopUpAppender"),Z&&handleError("log4javascript: pop-up windows appear to be blocked. Please unblock them to use pop-up logging."))}catch(e){handleError("PopUpAppender.init: error creating pop-up",e)}},w=function(){o||E()},b=function(){w(),h=!0},k=function(){return X},x=function(){if(m&&!isUndefined(X)&&!f){if(X.closed||p&&isUndefined(X.closed))return u.unload(),logLog.debug("PopUpAppender: pop-up closed"),!1;!p&&isLoaded(X)&&(p=!0)}return m&&p&&!f}}this.getConsoleWindow=k},ConsoleAppender.addGlobalCommandLineFunction=function(t,n){e.push([t,n])},n.prototype=new ConsoleAppender,n.prototype.defaults={layout:new PatternLayout("%d{HH:mm:ss} %-5p - %m{1}%n"),initiallyMinimized:!1,focusPopUp:!1,lazyInit:!0,useOldPopUp:!0,complainAboutPopUpBlocking:!0,newestMessageAtTop:!1,scrollToLatestMessage:!0,width:"600",height:"400",reopenWhenClosed:!1,maxMessages:null,showCommandLine:!0,commandLineObjectExpansionDepth:1,showHideButton:!1,showCloseButton:!0,useDocumentWrite:!0},n.prototype.toString=function(){return"PopUpAppender"},log4javascript.PopUpAppender=n,r.prototype=new ConsoleAppender,r.prototype.defaults={layout:new PatternLayout("%d{HH:mm:ss} %-5p - %m{1}%n"),initiallyMinimized:!1,lazyInit:!0,newestMessageAtTop:!1,scrollToLatestMessage:!0,width:"100%",height:"220px",maxMessages:null,showCommandLine:!0,commandLineObjectExpansionDepth:1,showHideButton:!1,showCloseButton:!1,showLogEntryDeleteButtons:!0,useDocumentWrite:!0},r.prototype.toString=function(){return"InPageAppender"},log4javascript.InPageAppender=r,log4javascript.InlineAppender=r}(),function(){function e(e){var t=0;for(var n in e)t=Math.max(toStr(n).length,t);var r=[];for(n in e){var i,o="  "+padWithSpaces(toStr(n),t+2);try{i=splitIntoLines(toStr(e[n])).join(padWithSpaces(newLine,t+6))}catch(e){i="[Error obtaining property. Details: "+getExceptionMessage(e)+"]"}r.push(o+i)}return r.join(newLine)}var t=1,n=3,r=4,i=9,o=11,s=["script","pre"],a=["br","img","hr","param","link","area","input","col","base","meta"];function l(e,c,u,h,d){var p,f,g,m,_;function v(e){for(var t=e.style.cssText.split(";"),n="",r=0,i=t.length;r<i;r++){var o=t[r].split(":"),s=[];/^\s*$/.test(o[0])||s.push(trim(o[0]).toLowerCase()+":"+trim(o[1])),n=s.join(";")}return n}if("string"!=typeof u&&(u=""),h=!!h,d=!!d,!(c=void 0===c||!!c)||e.nodeType==o){for(p="",f=0,g=e.childNodes.length;f<g;f++)p+=l(e.childNodes[f],!0,u+"  ");return p}switch(e.nodeType){case t:var y=e.tagName.toLowerCase();p=h?newLine+u:"",p+="<";var b=(_=e).prefix?_.prefix:_.outerHTML&&new RegExp("<([^:]+):"+_.tagName+"[^>]*>","i").test(_.outerHTML)?RegExp.$1.toLowerCase():"",w=!!b;for(w&&(p+=b+":"),p+=y,f=0,g=e.attributes.length;f<g;f++){var x=e.attributes[f];x.specified&&null!==x.nodeValue&&"style"!==x.nodeName.toLowerCase()&&"string"==typeof x.nodeValue&&0!==x.nodeName.indexOf("_moz")&&(p+=" "+x.nodeName.toLowerCase()+'="',p+=x.nodeValue.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;"),p+='"')}if(e.style.cssText&&""!==v(e)&&(p+=' style="'+v(e)+'"'),array_contains(a,y)||w&&!e.hasChildNodes())p+="/>";else{p+=">";var k=!(1===e.childNodes.length&&e.childNodes[0].nodeType===n),E=array_contains(s,y);for(f=0,g=e.childNodes.length;f<g;f++)p+=l(e.childNodes[f],!0,u+"  ",k,E);var S="</"+y+">";p+=k?newLine+u+S:S}return p;case n:if((m=e).nodeType==n&&/^[ \t\r\n]*$/.test(m.nodeValue))p="";else{if(d)p=e.nodeValue;else{var M=splitIntoLines(trim(e.nodeValue)),C=[];for(f=0,g=M.length;f<g;f++)C[f]=trim(M[f]);p=C.join(newLine+u)}h&&(p=newLine+u+p)}return p;case r:return"<![CDATA["+e.nodeValue+"]]>"+newLine;case i:for(p="",f=0,g=e.childNodes.length;f<g;f++)p+=l(e.childNodes[f],!0,u);return p;default:return""}}ConsoleAppender.addGlobalCommandLineFunction("$",(function(e,t,n){return document.getElementById(t[0])})),ConsoleAppender.addGlobalCommandLineFunction("dir",(function(t,n,r){for(var i=[],o=0,s=n.length;o<s;o++)i[o]=e(n[o]);return i.join(newLine+newLine)})),ConsoleAppender.addGlobalCommandLineFunction("dirxml",(function(e,t,n){for(var r=[],i=0,o=t.length;i<o;i++)r[i]=l(t[i]);return r.join(newLine+newLine)})),ConsoleAppender.addGlobalCommandLineFunction("cd",(function(e,t,n){var r,i;return 0===t.length||""===t[0]?(r=window,i="Command line set to run in main window"):t[0].window==t[0]?(r=t[0],i="Command line set to run in frame '"+t[0].name+"'"):(r=window.frames[t[0]])?i="Command line set to run in frame '"+t[0]+"'":(n.isError=!0,i="Frame '"+t[0]+"' does not exist",r=e.getCommandWindow()),e.setCommandWindow(r),i})),ConsoleAppender.addGlobalCommandLineFunction("clear",(function(e,t,n){n.appendResult=!1,e.clear()})),ConsoleAppender.addGlobalCommandLineFunction("keys",(function(e,t,n){var r=[];for(var i in t[0])r.push(i);return r})),ConsoleAppender.addGlobalCommandLineFunction("values",(function(e,t,n){var r=[];for(var i in t[0])try{r.push(t[0][i])}catch(e){logLog.warn("values(): Unable to obtain value for key "+i+". Details: "+getExceptionMessage(e))}return r})),ConsoleAppender.addGlobalCommandLineFunction("expansionDepth",(function(e,t,n){var r=parseInt(t[0],10);return isNaN(r)||r<0?(n.isError=!0,t[0]+" is not a valid expansion depth"):(e.setCommandLineObjectExpansionDepth(r),"Object expansion depth set to "+r)}))}(),log4javascript.setDocumentReady=function(){pageLoaded=!0,log4javascript.dispatchEvent("load",{})},window.addEventListener)window.addEventListener("load",log4javascript.setDocumentReady,!1);else if(window.attachEvent)window.attachEvent("onload",log4javascript.setDocumentReady);else{var oldOnload=window.onload;"function"!=typeof window.onload?window.onload=log4javascript.setDocumentReady:window.onload=function(e){oldOnload&&oldOnload(e),log4javascript.setDocumentReady()}}return log4javascript},void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=factory)?__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),o=n(14);!function(e){e.create=function(e){var t=new s(e);return t.load().then((function(){return t}))}}(t.ConfigSection||(t.ConfigSection={}));var s=function(){function e(e){this._url="unknown";var t=this.serverSettings=e.serverSettings||o.ServerConnection.makeSettings();this._url=i.URLExt.join(t.baseUrl,"api/config",encodeURIComponent(e.name))}return Object.defineProperty(e.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),e.prototype.load=function(){var e=this;return o.ServerConnection.makeRequest(this._url,{},this.serverSettings).then((function(e){if(200!==e.status)throw new o.ServerConnection.ResponseError(e);return e.json()})).then((function(t){e._data=t}))},e.prototype.update=function(e){var t=this;this._data=r({},this._data,e);var n={method:"PATCH",body:JSON.stringify(e)};return o.ServerConnection.makeRequest(this._url,n,this.serverSettings).then((function(e){if(200!==e.status)throw new o.ServerConnection.ResponseError(e);return e.json()})).then((function(e){return t._data=e,t._data}))},e}(),a=function(){function e(e){this._className="",this._section=e.section,this._defaults=e.defaults||{},this._className=e.className||""}return e.prototype.get=function(e){var t=this._classData();return e in t?t[e]:this._defaults[e]},e.prototype.set=function(e,t){var n={};if(n[e]=t,this._className){var r={};return r[this._className]=n,this._section.update(r)}return this._section.update(n)},e.prototype._classData=function(){var e=this._section.data;return this._className&&this._className in e?e[this._className]:e},e}();t.ConfigWithDefaults=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=function(){function e(e){this._timer=-1,this._timeout=-1,this._isDisposed=!1,this._activityStopped=new r.Signal(this),e.signal.connect(this._onSignalFired,this),this._timeout=e.timeout||1e3}return Object.defineProperty(e.prototype,"activityStopped",{get:function(){return this._activityStopped},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"timeout",{get:function(){return this._timeout},set:function(e){this._timeout=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,r.Signal.clearData(this))},e.prototype._onSignalFired=function(e,t){var n=this;clearTimeout(this._timer),this._sender=e,this._args=t,this._timer=window.setTimeout((function(){n._activityStopped.emit({sender:n._sender,args:n._args})}),this._timeout)},e}();t.ActivityMonitor=i},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,s,a,l=1,c={},u=!1,h=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){f(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){o.port2.postMessage(e)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,r=function(e){var t=h.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(f,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&f(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(s+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return c[l]=i,r(l),l++},d.clearImmediate=p}function p(e){delete c[e]}function f(e){if(u)setTimeout(f,0,e);else{var t=c[e];if(t){u=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{p(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(17),n(26))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function t(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=-1);var i,o=e.length;if(0===o)return-1;n=n<0?Math.max(0,n+o):Math.min(n,o-1),i=(r=r<0?Math.max(0,r+o):Math.min(r,o-1))<n?r+1+(o-n):r-n+1;for(var s=0;s<i;++s){var a=(n+s)%o;if(e[a]===t)return a}return-1}function n(e,t,n,r){void 0===n&&(n=-1),void 0===r&&(r=0);var i,o=e.length;if(0===o)return-1;i=(n=n<0?Math.max(0,n+o):Math.min(n,o-1))<(r=r<0?Math.max(0,r+o):Math.min(r,o-1))?n+1+(o-r):n-r+1;for(var s=0;s<i;++s){var a=(n-s+o)%o;if(e[a]===t)return a}return-1}function r(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=-1);var i,o=e.length;if(0===o)return-1;n=n<0?Math.max(0,n+o):Math.min(n,o-1),i=(r=r<0?Math.max(0,r+o):Math.min(r,o-1))<n?r+1+(o-n):r-n+1;for(var s=0;s<i;++s){var a=(n+s)%o;if(t(e[a],a))return a}return-1}function i(e,t,n,r){void 0===n&&(n=-1),void 0===r&&(r=0);var i,o=e.length;if(0===o)return-1;i=(n=n<0?Math.max(0,n+o):Math.min(n,o-1))<(r=r<0?Math.max(0,r+o):Math.min(r,o-1))?n+1+(o-r):n-r+1;for(var s=0;s<i;++s){var a=(n-s+o)%o;if(t(e[a],a))return a}return-1}function o(e,t,n){void 0===t&&(t=0),void 0===n&&(n=-1);var r=e.length;if(!(r<=1))for(t=t<0?Math.max(0,t+r):Math.min(t,r-1),n=n<0?Math.max(0,n+r):Math.min(n,r-1);t<n;){var i=e[t],o=e[n];e[t++]=o,e[n--]=i}}function s(e,t){var n=e.length;if(t<0&&(t+=n),!(t<0||t>=n)){for(var r=e[t],i=t+1;i<n;++i)e[i-1]=e[i];return e.length=n-1,r}}e.firstIndexOf=t,e.lastIndexOf=n,e.findFirstIndex=r,e.findLastIndex=i,e.findFirstValue=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=-1);var o=r(e,t,n,i);return-1!==o?e[o]:void 0},e.findLastValue=function(e,t,n,r){void 0===n&&(n=-1),void 0===r&&(r=0);var o=i(e,t,n,r);return-1!==o?e[o]:void 0},e.lowerBound=function(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=-1);var o=e.length;if(0===o)return 0;for(var s=r=r<0?Math.max(0,r+o):Math.min(r,o-1),a=(i=i<0?Math.max(0,i+o):Math.min(i,o-1))-r+1;a>0;){var l=a>>1,c=s+l;n(e[c],t)<0?(s=c+1,a-=l+1):a=l}return s},e.upperBound=function(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=-1);var o=e.length;if(0===o)return 0;for(var s=r=r<0?Math.max(0,r+o):Math.min(r,o-1),a=(i=i<0?Math.max(0,i+o):Math.min(i,o-1))-r+1;a>0;){var l=a>>1,c=s+l;n(e[c],t)>0?a=l:(s=c+1,a-=l+1)}return s},e.shallowEqual=function(e,t,n){if(e===t)return!0;if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;++r)if(n?!n(e[r],t[r]):e[r]!==t[r])return!1;return!0},e.slice=function(e,t){void 0===t&&(t={});var n=t.start,r=t.stop,i=t.step;if(void 0===i&&(i=1),0===i)throw new Error("Slice `step` cannot be zero.");var o,s=e.length;void 0===n?n=i<0?s-1:0:n<0?n=Math.max(n+s,i<0?-1:0):n>=s&&(n=i<0?s-1:s),void 0===r?r=i<0?-1:s:r<0?r=Math.max(r+s,i<0?-1:0):r>=s&&(r=i<0?s-1:s),o=i<0&&r>=n||i>0&&n>=r?0:i<0?Math.floor((r-n+1)/i+1):Math.floor((r-n-1)/i+1);for(var a=[],l=0;l<o;++l)a[l]=e[n+l*i];return a},e.move=function(e,t,n){var r=e.length;if(!(r<=1)&&(t=t<0?Math.max(0,t+r):Math.min(t,r-1))!==(n=n<0?Math.max(0,n+r):Math.min(n,r-1))){for(var i=e[t],o=t<n?1:-1,s=t;s!==n;s+=o)e[s]=e[s+o];e[n]=i}},e.reverse=o,e.rotate=function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=-1);var i=e.length;if(!(i<=1||(n=n<0?Math.max(0,n+i):Math.min(n,i-1))>=(r=r<0?Math.max(0,r+i):Math.min(r,i-1)))){var s=r-n+1;if(t>0?t%=s:t<0&&(t=(t%s+s)%s),0!==t){var a=n+t;o(e,n,a-1),o(e,a,r),o(e,n,r)}}},e.fill=function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=-1);var i=e.length;if(0!==i){var o;n=n<0?Math.max(0,n+i):Math.min(n,i-1),o=(r=r<0?Math.max(0,r+i):Math.min(r,i-1))<n?r+1+(i-n):r-n+1;for(var s=0;s<o;++s)e[(n+s)%i]=t}},e.insert=function(e,t,n){var r=e.length;t=t<0?Math.max(0,t+r):Math.min(t,r);for(var i=r;i>t;--i)e[i]=e[i-1];e[t]=n},e.removeAt=s,e.removeFirstOf=function(e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=-1);var o=t(e,n,r,i);return-1!==o&&s(e,o),o},e.removeLastOf=function(e,t,r,i){void 0===r&&(r=-1),void 0===i&&(i=0);var o=n(e,t,r,i);return-1!==o&&s(e,o),o},e.removeAllOf=function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=-1);var i=e.length;if(0===i)return 0;n=n<0?Math.max(0,n+i):Math.min(n,i-1),r=r<0?Math.max(0,r+i):Math.min(r,i-1);for(var o=0,s=0;s<i;++s)n<=r&&s>=n&&s<=r&&e[s]===t||r<n&&(s<=r||s>=n)&&e[s]===t?o++:o>0&&(e[s-o]=e[s]);return o>0&&(e.length=i-o),o},e.removeFirstWhere=function(e,t,n,i){var o;void 0===n&&(n=0),void 0===i&&(i=-1);var a=r(e,t,n,i);return-1!==a&&(o=s(e,a)),{index:a,value:o}},e.removeLastWhere=function(e,t,n,r){var o;void 0===n&&(n=-1),void 0===r&&(r=0);var a=i(e,t,n,r);return-1!==a&&(o=s(e,a)),{index:a,value:o}},e.removeAllWhere=function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=-1);var i=e.length;if(0===i)return 0;n=n<0?Math.max(0,n+i):Math.min(n,i-1),r=r<0?Math.max(0,r+i):Math.min(r,i-1);for(var o=0,s=0;s<i;++s)n<=r&&s>=n&&s<=r&&t(e[s],s)||r<n&&(s<=r||s>=n)&&t(e[s],s)?o++:o>0&&(e[s-o]=e[s]);return o>0&&(e.length=i-o),o}}(t.ArrayExt||(t.ArrayExt={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22);t.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new i(r.iter(e.map(r.iter)))};var i=function(){function e(e){this._cloned=!1,this._source=e,this._active=void 0}return e.prototype.iter=function(){return this},e.prototype.clone=function(){var t=new e(this._source.clone());return t._active=this._active&&this._active.clone(),t._cloned=!0,this._cloned=!0,t},e.prototype.next=function(){if(void 0===this._active){var e=this._source.next();if(void 0===e)return;this._active=this._cloned?e.clone():e}var t=this._active.next();return void 0!==t?t:(this._active=void 0,this.next())},e}();t.ChainIterator=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=function(){return new r};var r=function(){function e(){}return e.prototype.iter=function(){return this},e.prototype.clone=function(){return new e},e.prototype.next=function(){},e}();t.EmptyIterator=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22);t.enumerate=function(e,t){return void 0===t&&(t=0),new i(r.iter(e),t)};var i=function(){function e(e,t){this._source=e,this._index=t}return e.prototype.iter=function(){return this},e.prototype.clone=function(){return new e(this._source.clone(),this._index)},e.prototype.next=function(){var e=this._source.next();if(void 0!==e)return[this._index++,e]},e}();t.EnumerateIterator=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22);t.filter=function(e,t){return new i(r.iter(e),t)};var i=function(){function e(e,t){this._index=0,this._source=e,this._fn=t}return e.prototype.iter=function(){return this},e.prototype.clone=function(){var t=new e(this._source.clone(),this._fn);return t._index=this._index,t},e.prototype.next=function(){for(var e,t=this._fn,n=this._source;void 0!==(e=n.next());)if(t(e,this._index++))return e},e}();t.FilterIterator=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22);t.find=function(e,t){for(var n,i=0,o=r.iter(e);void 0!==(n=o.next());)if(t(n,i++))return n},t.findIndex=function(e,t){for(var n,i=0,o=r.iter(e);void 0!==(n=o.next());)if(t(n,i++))return i-1;return-1},t.min=function(e,t){var n=r.iter(e),i=n.next();if(void 0!==i){for(var o=i;void 0!==(i=n.next());)t(i,o)<0&&(o=i);return o}},t.max=function(e,t){var n=r.iter(e),i=n.next();if(void 0!==i){for(var o=i;void 0!==(i=n.next());)t(i,o)>0&&(o=i);return o}},t.minmax=function(e,t){var n=r.iter(e),i=n.next();if(void 0!==i){for(var o=i,s=i;void 0!==(i=n.next());)t(i,o)<0?o=i:t(i,s)>0&&(s=i);return[o,s]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22);t.map=function(e,t){return new i(r.iter(e),t)};var i=function(){function e(e,t){this._index=0,this._source=e,this._fn=t}return e.prototype.iter=function(){return this},e.prototype.clone=function(){var t=new e(this._source.clone(),this._fn);return t._index=this._index,t},e.prototype.next=function(){var e=this._source.next();if(void 0!==e)return this._fn.call(void 0,e,this._index++)},e}();t.MapIterator=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.range=function(e,t,n){return void 0===t?new i(0,e,1):new i(e,t,void 0===n?1:n)};var r,i=function(){function e(e,t,n){this._index=0,this._start=e,this._stop=t,this._step=n,this._length=r.rangeLength(e,t,n)}return e.prototype.iter=function(){return this},e.prototype.clone=function(){var t=new e(this._start,this._stop,this._step);return t._index=this._index,t},e.prototype.next=function(){if(!(this._index>=this._length))return this._start+this._step*this._index++},e}();t.RangeIterator=i,function(e){e.rangeLength=function(e,t,n){return 0===n?1/0:e>t&&n>0||e<t&&n<0?0:Math.ceil((t-e)/n)}}(r||(r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22);t.reduce=function(e,t,n){var i=0,o=r.iter(e),s=o.next();if(void 0===s&&void 0===n)throw new TypeError("Reduce of empty iterable with no initial value.");if(void 0===s)return n;var a,l,c=o.next();if(void 0===c&&void 0===n)return s;if(void 0===c)return t(n,s,i++);for(a=t(void 0===n?s:t(n,s,i++),c,i++);void 0!==(l=o.next());)a=t(a,l,i++);return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=function(e,t){return new r(e,t)},t.once=function(e){return new r(e,1)};var r=function(){function e(e,t){this._value=e,this._count=t}return e.prototype.iter=function(){return this},e.prototype.clone=function(){return new e(this._value,this._count)},e.prototype.next=function(){if(!(this._count<=0))return this._count--,this._value},e}();t.RepeatIterator=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retro=function(e){return"function"==typeof e.retro?e.retro():new r(e)};var r=function(){function e(e){this._source=e,this._index=e.length-1}return e.prototype.iter=function(){return this},e.prototype.clone=function(){var t=new e(this._source);return t._index=this._index,t},e.prototype.next=function(){if(!(this._index<0||this._index>=this._source.length))return this._source[this._index--]},e}();t.RetroArrayIterator=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22);t.topologicSort=function(e){var t=[],n=new Set,i=new Map;return r.each(e,(function(e){var t=e[0],n=e[1],r=i.get(n);r?r.push(t):i.set(n,[t])})),i.forEach((function(e,t){o(t)})),t;function o(e){if(!n.has(e)){n.add(e);var r=i.get(e);r&&r.forEach(o),t.push(e)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22);t.stride=function(e,t){return new i(r.iter(e),t)};var i=function(){function e(e,t){this._source=e,this._step=t}return e.prototype.iter=function(){return this},e.prototype.clone=function(){return new e(this._source.clone(),this._step)},e.prototype.next=function(){for(var e=this._source.next(),t=this._step-1;t>0;--t)this._source.next();return e},e}();t.StrideIterator=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function t(e,t,n){void 0===n&&(n=0);for(var r=new Array(t.length),i=0,o=n,s=t.length;i<s;++i,++o){if(-1===(o=e.indexOf(t[i],o)))return null;r[i]=o}return r}e.findIndices=t,e.matchSumOfSquares=function(e,n,r){void 0===r&&(r=0);var i=t(e,n,r);if(!i)return null;for(var o=0,s=0,a=i.length;s<a;++s){var l=i[s]-r;o+=l*l}return{score:o,indices:i}},e.matchSumOfDeltas=function(e,n,r){void 0===r&&(r=0);var i=t(e,n,r);if(!i)return null;for(var o=0,s=r-1,a=0,l=i.length;a<l;++a){var c=i[a];o+=c-s-1,s=c}return{score:o,indices:i}},e.highlight=function(e,t,n){for(var r=[],i=0,o=0,s=t.length;i<s;){for(var a=t[i],l=t[i];++i<s&&t[i]===l+1;)l++;o<a&&r.push(e.slice(o,a)),a<l+1&&r.push(n(e.slice(a,l+1))),o=l+1}return o<e.length&&r.push(e.slice(o)),r},e.cmp=function(e,t){return e<t?-1:e>t?1:0}}(t.StringExt||(t.StringExt={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22);t.take=function(e,t){return new i(r.iter(e),t)};var i=function(){function e(e,t){this._source=e,this._count=t}return e.prototype.iter=function(){return this},e.prototype.clone=function(){return new e(this._source.clone(),this._count)},e.prototype.next=function(){if(!(this._count<=0)){var e=this._source.next();if(void 0!==e)return this._count--,e}},e}();t.TakeIterator=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new i(e.map(r.iter))};var i=function(){function e(e){this._source=e}return e.prototype.iter=function(){return this},e.prototype.clone=function(){return new e(this._source.map((function(e){return e.clone()})))},e.prototype.next=function(){for(var e=new Array(this._source.length),t=0,n=this._source.length;t<n;++t){var r=this._source[t].next();if(void 0===r)return;e[t]=r}return e},e}();t.ZipIterator=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.prototype.remove=function(e){return Promise.reject(new Error("Removing has not been implemented."))},e.prototype.save=function(e,t){return Promise.reject(new Error("Saving has not been implemented."))},e}();t.DataConnector=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.CODE_BLOCK_MARKER="```";var t=[".markdown",".mdown",".mkdn",".md",".mkd",".mdwn",".mdtxt",".mdtext",".text",".txt",".Rmd"],n=function(e){this.startLine=e,this.code="",this.endLine=-1};e.MarkdownCodeBlock=n,e.isMarkdown=function(e){return t.indexOf(e)>-1},e.findMarkdownCodeBlocks=function(t){if(!t||""===t)return[];for(var r=t.split("\n"),i=[],o=null,s=0;s<r.length;s++){var a=r[s],l=0===a.indexOf(e.CODE_BLOCK_MARKER),c=null!=o;if(l||c)if(c)o&&(l?(o.endLine=s-1,i.push(o),o=null):o.code+=a+"\n");else{o=new n(s);var u=a.indexOf(e.CODE_BLOCK_MARKER),h=a.lastIndexOf(e.CODE_BLOCK_MARKER);u!==h&&(o.code=a.substring(u+e.CODE_BLOCK_MARKER.length,h),o.endLine=s,i.push(o),o=null)}}return i}}(t.MarkdownCodeBlocks||(t.MarkdownCodeBlocks={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12);!function(e){e.MAJOR_VERSION=4,e.MINOR_VERSION=2,e.validateMimeValue=function(e,t){var n="application/json"===e||/^application\/(.*?)+\+json$/.test(e),i=function(e){return"[object String]"===Object.prototype.toString.call(e)};if(Array.isArray(t)){if(n)return!1;var o=!0;return t.forEach((function(e){i(e)||(o=!1)})),o}return i(t)?!n:!!n&&r.JSONExt.isObject(t)},e.isRaw=function(e){return"raw"===e.cell_type},e.isMarkdown=function(e){return"markdown"===e.cell_type},e.isCode=function(e){return"code"===e.cell_type},e.isExecuteResult=function(e){return"execute_result"===e.output_type},e.isDisplayData=function(e){return"display_data"===e.output_type},e.isDisplayUpdate=function(e){return"update_display_data"===e.output_type},e.isStream=function(e){return"stream"===e.output_type},e.isError=function(e){return"error"===e.output_type}}(t.nbformat||(t.nbformat={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function t(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e}function n(e){return Array.isArray(e)}function r(e,i){if(e===i)return!0;if(t(e)||t(i))return!1;var o=n(e),s=n(i);return o===s&&(o&&s?function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;++n)if(!r(e[n],t[n]))return!1;return!0}(e,i):function(e,t){if(e===t)return!0;for(var n in e)if(!(n in t))return!1;for(var n in t)if(!(n in e))return!1;for(var n in e)if(!r(e[n],t[n]))return!1;return!0}(e,i))}function i(e){return t(e)?e:n(e)?function(e){for(var t=new Array(e.length),n=0,r=e.length;n<r;++n)t[n]=i(e[n]);return t}(e):function(e){var t={};for(var n in e)t[n]=i(e[n]);return t}(e)}e.emptyObject=Object.freeze({}),e.emptyArray=Object.freeze([]),e.isPrimitive=t,e.isArray=n,e.isObject=function(e){return!t(e)&&!n(e)},e.deepEqual=r,e.deepCopy=i}(t.JSONExt||(t.JSONExt={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this._types=[],this._values=[]}return e.prototype.types=function(){return this._types.slice()},e.prototype.hasData=function(e){return-1!==this._types.indexOf(e)},e.prototype.getData=function(e){var t=this._types.indexOf(e);return-1!==t?this._values[t]:void 0},e.prototype.setData=function(e,t){this.clearData(e),this._types.push(e),this._values.push(t)},e.prototype.clearData=function(e){var t=this._types.indexOf(e);-1!==t&&(this._types.splice(t,1),this._values.splice(t,1))},e.prototype.clear=function(){this._types.length=0,this._values.length=0},e}();t.MimeData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){var e=this;this.promise=new Promise((function(t,n){e._resolve=t,e._reject=n}))}return e.prototype.resolve=function(e){(0,this._resolve)(e)},e.prototype.reject=function(e){(0,this._reject)(e)},e}();t.PromiseDelegate=r},function(e,t,n){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(32),t.createHash=t.Hash=n(41),t.createHmac=t.Hmac=n(122);var r=n(271),i=Object.keys(r),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var s=n(125);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var a=n(273);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var l=n(288);t.DiffieHellmanGroup=l.DiffieHellmanGroup,t.createDiffieHellmanGroup=l.createDiffieHellmanGroup,t.getDiffieHellman=l.getDiffieHellman,t.createDiffieHellman=l.createDiffieHellman,t.DiffieHellman=l.DiffieHellman;var c=n(293);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=n(305);var u=n(306);t.publicEncrypt=u.publicEncrypt,t.privateEncrypt=u.privateEncrypt,t.publicDecrypt=u.publicDecrypt,t.privateDecrypt=u.privateDecrypt;var h=n(309);t.randomFill=h.randomFill,t.randomFillSync=h.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t){
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,l=(1<<a)-1,c=l>>1,u=-7,h=n?i-1:0,d=n?-1:1,p=e[t+h];for(h+=d,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=r;u>0;s=256*s+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*l-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&a,p+=f,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[n+p]=255&s,p+=f,s/=256,c-=8);e[n+p-f]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){var r=n(8),i=n(33),o=n(4).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function l(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function u(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,l=0|this._e,h=0;h<16;++h)n[h]=e.readInt32BE(4*h);for(;h<80;++h)n[h]=n[h-3]^n[h-8]^n[h-14]^n[h-16];for(var d=0;d<80;++d){var p=~~(d/20),f=0|((t=r)<<5|t>>>27)+u(p,i,o,a)+l+n[d]+s[p];l=a,a=o,o=c(i),i=r,r=f}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},function(e,t,n){var r=n(8),i=n(33),o=n(4).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function l(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function h(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,l=0|this._e,d=0;d<16;++d)n[d]=e.readInt32BE(4*d);for(;d<80;++d)n[d]=(t=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|t>>>31;for(var p=0;p<80;++p){var f=~~(p/20),g=c(r)+h(f,i,o,a)+l+n[p]+s[f]|0;l=a,a=o,o=u(i),i=r,r=g}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},function(e,t,n){var r=n(8),i=n(120),o=n(33),s=n(4).Buffer,a=new Array(64);function l(){this.init(),this._w=a,o.call(this,64,56)}r(l,i),l.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},l.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=l},function(e,t,n){var r=n(8),i=n(121),o=n(33),s=n(4).Buffer,a=new Array(160);function l(){this.init(),this._w=a,o.call(this,128,112)}r(l,i),l.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},l.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=l},function(e,t,n){e.exports=i;var r=n(267).EventEmitter;function i(){r.call(this)}n(8)(i,r),i.Readable=n(7),i.Writable=n(7),i.Duplex=n(7),i.Transform=n(7),i.PassThrough=n(7),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",a),n.on("close",l));var s=!1;function a(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",a),n.removeListener("close",l),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",c),e.on("error",c),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e}},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}_(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&_(e,"error",t,n)}(e,i,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function h(e,t,n,r){var i,o,s,a;if(c(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var c=l.length,u=m(l,c);for(n=0;n<c;++n)o(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return h(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return h(this,e,t,!0)},a.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,o,s;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},a.prototype.listenerCount=g,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";var r=n(269).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=h,t=3;break;default:return this.write=d,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function u(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=s(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=s(t[r]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=s(t[r]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){var r=n(24),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=s),o(i,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";var r=n(8),i=n(4).Buffer,o=n(29),s=i.alloc(128);function a(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>64?t=e(t):t.length<64&&(t=i.concat([t,s],64));for(var n=this._ipad=i.allocUnsafe(64),r=this._opad=i.allocUnsafe(64),a=0;a<64;a++)n[a]=54^t[a],r[a]=92^t[a];this._hash=[n]}r(a,o),a.prototype._update=function(e){this._hash.push(e)},a.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=a},function(e,t,n){e.exports=n(124)},function(e,t,n){(function(t){var r,i,o=n(4).Buffer,s=n(126),a=n(127),l=n(128),c=n(129),u=t.crypto&&t.crypto.subtle,h={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function p(){return i||(i=t.process&&t.process.nextTick?t.process.nextTick:t.queueMicrotask?t.queueMicrotask:t.setImmediate?t.setImmediate:t.setTimeout)}function f(e,t,n,r,i){return u.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return u.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:i}},e,r<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,n,i,g,m,_){"function"==typeof m&&(_=m,m=void 0);var v=h[(m=m||"sha1").toLowerCase()];if(v&&"function"==typeof t.Promise){if(s(i,g),e=c(e,a,"Password"),n=c(n,a,"Salt"),"function"!=typeof _)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){p()((function(){t(null,e)}))}),(function(e){p()((function(){t(e)}))}))}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var n=f(r=r||o.alloc(8),r,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=n,n}(v).then((function(t){return t?f(e,n,i,g,v):l(e,n,i,g,m)})),_)}else p()((function(){var t;try{t=l(e,n,i,g,m)}catch(e){return _(e)}_(null,t)}))}}).call(this,n(17))},function(e,t,n){var r=n(274),i=n(80),o=n(81),s=n(287),a=n(59);function l(e,t,n){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,n);if(s[e])return new r({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function c(e,t,n){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,n);if(s[e])return new r({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var n,r;if(e=e.toLowerCase(),o[e])n=o[e].key,r=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");n=8*s[e].key,r=s[e].iv}var i=a(t,!1,n,r);return l(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=l,t.createDecipher=t.Decipher=function(e,t){var n,r;if(e=e.toLowerCase(),o[e])n=o[e].key,r=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");n=8*s[e].key,r=s[e].iv}var i=a(t,!1,n,r);return c(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=c,t.listCiphers=t.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},function(e,t,n){var r=n(29),i=n(275),o=n(8),s=n(4).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function l(e){r.call(this);var t,n=e.mode.toLowerCase(),i=a[n];t=e.decrypt?"decrypt":"encrypt";var o=e.key;s.isBuffer(o)||(o=s.from(o)),"des-ede"!==n&&"des-ede-cbc"!==n||(o=s.concat([o,o.slice(0,8)]));var l=e.iv;s.isBuffer(l)||(l=s.from(l)),this._des=i.create({key:o,iv:l,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=l,o(l,r),l.prototype._update=function(e){return s.from(this._des.update(e))},l.prototype._final=function(){return s.from(this._des.final())}},function(e,t,n){"use strict";t.utils=n(130),t.Cipher=n(79),t.DES=n(131),t.CBC=n(276),t.EDE=n(277)},function(e,t,n){"use strict";var r=n(42),i=n(8),o={};function s(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var n=Object.keys(o),r=0;r<n.length;r++){var s=n[r];t.prototype[s]=o[s]}return t.create=function(e){return new t(e)},t},o._cbcInit=function(){var e=new s(this.options.iv);this._cbcState=e},o._update=function(e,t,n,r){var i=this._cbcState,o=this.constructor.super_.prototype,s=i.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)s[a]^=e[t+a];o._update.call(this,s,0,n,r);for(a=0;a<this.blockSize;a++)s[a]=n[r+a]}else{o._update.call(this,e,t,n,r);for(a=0;a<this.blockSize;a++)n[r+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=e[t+a]}}},function(e,t,n){"use strict";var r=n(42),i=n(8),o=n(79),s=n(131);function a(e,t){r.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:n})]}function l(e){o.call(this,e);var t=new a(this.type,this.options.key);this._edeState=t}i(l,o),e.exports=l,l.create=function(e){return new l(e)},l.prototype._update=function(e,t,n,r){var i=this._edeState;i.ciphers[0]._update(e,t,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},l.prototype._pad=s.prototype._pad,l.prototype._unpad=s.prototype._unpad},function(e,t,n){var r=n(81),i=n(135),o=n(4).Buffer,s=n(136),a=n(29),l=n(58),c=n(59);function u(e,t,n){a.call(this),this._cache=new d,this._cipher=new l.AES(t),this._prev=o.from(n),this._mode=e,this._autopadding=!0}n(8)(u,a),u.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get();)n=this._mode.encrypt(this,t),r.push(n);return o.concat(r)};var h=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function p(e,t,n){var a=r[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=o.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new s(a.module,t,n):"auth"===a.type?new i(a.module,t,n):new u(a.module,t,n)}u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=o.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return o.concat([this.cache,t])},t.createCipheriv=p,t.createCipher=function(e,t){var n=r[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=c(t,!1,n.key,n.iv);return p(e,i.key,i.iv)}},function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},function(e,t,n){var r=n(43);t.encrypt=function(e,t){var n=r(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return r(i,n)}},function(e,t,n){var r=n(4).Buffer,i=n(43);function o(e,t,n){var o=t.length,s=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=r.concat([e._prev,n?t:s]),s}t.encrypt=function(e,t,n){for(var i,s=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){s=r.concat([s,o(e,t,n)]);break}i=e._cache.length,s=r.concat([s,o(e,t.slice(0,i),n)]),t=t.slice(i)}return s}},function(e,t,n){var r=n(4).Buffer;function i(e,t,n){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=r.concat([e._prev.slice(1),r.from([n?t:i])]),i}t.encrypt=function(e,t,n){for(var o=t.length,s=r.allocUnsafe(o),a=-1;++a<o;)s[a]=i(e,t[a],n);return s}},function(e,t,n){var r=n(4).Buffer;function i(e,t,n){for(var r,i,s=-1,a=0;++s<8;)r=t&1<<7-s?128:0,a+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^r))>>s%8,e._prev=o(e._prev,n?r:i);return a}function o(e,t){var n=e.length,i=-1,o=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++i<n;)o[i]=e[i]<<1|e[i+1]>>7;return o}t.encrypt=function(e,t,n){for(var o=t.length,s=r.allocUnsafe(o),a=-1;++a<o;)s[a]=i(e,t[a],n);return s}},function(e,t,n){(function(e){var r=n(43);function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(t,n){for(;t._cache.length<n.length;)t._cache=e.concat([t._cache,i(t)]);var o=t._cache.slice(0,n.length);return t._cache=t._cache.slice(n.length),r(n,o)}}).call(this,n(24).Buffer)},function(e,t,n){var r=n(4).Buffer,i=r.alloc(16,0);function o(e){var t=r.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},s.prototype._multiply=function(){for(var e,t,n,r=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],s=-1;++s<128;){for(0!=(this.state[~~(s/8)]&1<<7-s%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=o(i)},s.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=s},function(e,t,n){var r=n(135),i=n(4).Buffer,o=n(81),s=n(136),a=n(29),l=n(58),c=n(59);function u(e,t,n){a.call(this),this._cache=new h,this._last=void 0,this._cipher=new l.AES(t),this._prev=i.from(n),this._mode=e,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function d(e,t,n){var a=o[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,n,!0):"auth"===a.type?new r(a.module,t,n,!0):new u(a.module,t,n)}n(8)(u,a),u.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),r.push(n);return i.concat(r)},u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var n=-1;for(;++n<t;)if(e[n+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=i.concat([this.cache,e])},h.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var n=o[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=c(t,!1,n.key,n.iv);return d(e,r.key,r.iv)},t.createDecipheriv=d},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,n){(function(e){var r=n(137),i=n(291),o=n(292);var s={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var n=new e(i[t].prime,"hex"),r=new e(i[t].gen,"hex");return new o(n,r)},t.createDiffieHellman=t.DiffieHellman=function t(n,i,a,l){return e.isBuffer(i)||void 0===s[i]?t(n,"binary",i,a):(i=i||"binary",l=l||"binary",a=a||new e([2]),e.isBuffer(a)||(a=new e(a,l)),"number"==typeof n?new o(r(n,a),a,!0):(e.isBuffer(n)||(n=new e(n,i)),new o(n,a,!0)))}}).call(this,n(24).Buffer)},function(e,t,n){var r;function i(e){this.rand=e}if(e.exports=function(e){return r||(r=new i(null)),r.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=n(290);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},function(e,t){},function(e){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(e,t,n){(function(t){var r=n(7),i=new(n(138)),o=new r(24),s=new r(11),a=new r(10),l=new r(3),c=new r(7),u=n(137),h=n(32);function d(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._pub=new r(e),this}function p(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._priv=new r(e),this}e.exports=g;var f={};function g(e,t,n){this.setGenerator(t),this.__prime=new r(e),this._prime=r.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=d,this.setPrivateKey=p):this._primeCode=8}function m(e,n){var r=new t(e.toArray());return n?r.toString(n):r}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var n=t.toString("hex"),r=[n,e.toString(16)].join("_");if(r in f)return f[r];var h,d=0;if(e.isEven()||!u.simpleSieve||!u.fermatTest(e)||!i.test(e))return d+=1,d+="02"===n||"05"===n?8:4,f[r]=d,d;switch(i.test(e.shrn(1))||(d+=2),n){case"02":e.mod(o).cmp(s)&&(d+=8);break;case"05":(h=e.mod(a)).cmp(l)&&h.cmp(c)&&(d+=8);break;default:d+=4}return f[r]=d,d}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new r(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(e){var n=(e=(e=new r(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new t(n.toArray()),o=this.getPrime();if(i.length<o.length){var s=new t(o.length-i.length);s.fill(0),i=t.concat([s,i])}return i},g.prototype.getPublicKey=function(e){return m(this._pub,e)},g.prototype.getPrivateKey=function(e){return m(this._priv,e)},g.prototype.getPrime=function(e){return m(this.__prime,e)},g.prototype.getGenerator=function(e){return m(this._gen,e)},g.prototype.setGenerator=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.__gen=e,this._gen=new r(e),this}}).call(this,n(24).Buffer)},function(e,t,n){var r=n(4).Buffer,i=n(41),o=n(7),s=n(8),a=n(294),l=n(304),c=n(124);function u(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){return new u(e)}function p(e){return new h(e)}Object.keys(c).forEach((function(e){c[e].id=r.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),s(u,o.Writable),u.prototype._write=function(e,t,n){this._hash.update(e),n()},u.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=a(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},s(h,o.Writable),h.prototype._write=function(e,t,n){this._hash.update(e),n()},h.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},h.prototype.verify=function(e,t,n){"string"==typeof t&&(t=r.from(t,n)),this.end();var i=this._hash.digest();return l(t,i,e,this._signType,this._tag)},e.exports={Sign:d,Verify:p,createSign:d,createVerify:p}},function(e,t,n){var r=n(4).Buffer,i=n(122),o=n(82),s=n(7).ec,a=n(7),l=n(60),c=n(144);function u(e,t,n,o){if((e=r.from(e.toArray())).length<t.byteLength()){var s=r.alloc(t.byteLength()-e.length);e=r.concat([s,e])}var a=n.length,l=function(e,t){e=(e=h(e,t)).mod(t);var n=r.from(e.toArray());if(n.length<t.byteLength()){var i=r.alloc(t.byteLength()-n.length);n=r.concat([i,n])}return n}(n,t),c=r.alloc(a);c.fill(1);var u=r.alloc(a);return u=i(o,u).update(c).update(r.from([0])).update(e).update(l).digest(),c=i(o,u).update(c).digest(),{k:u=i(o,u).update(c).update(r.from([1])).update(e).update(l).digest(),v:c=i(o,u).update(c).digest()}}function h(e,t){var n=new a(e),r=(e.length<<3)-t.bitLength();return r>0&&n.ishrn(r),n}function d(e,t,n){var o,s;do{for(o=r.alloc(0);8*o.length<e.bitLength();)t.v=i(n,t.k).update(t.v).digest(),o=r.concat([o,t.v]);s=h(o,e),t.k=i(n,t.k).update(t.v).update(r.from([0])).digest(),t.v=i(n,t.k).update(t.v).digest()}while(-1!==s.cmp(e));return s}function p(e,t,n,r){return e.toRed(a.mont(n)).redPow(t).fromRed().mod(r)}e.exports=function(e,t,n,i,f){var g=l(t);if(g.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var n=c[t.curve.join(".")];if(!n)throw new Error("unknown curve "+t.curve.join("."));var i=new s(n).keyFromPrivate(t.privateKey).sign(e);return r.from(i.toDER())}(e,g)}if("dsa"===g.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,n){var i,o=t.params.priv_key,s=t.params.p,l=t.params.q,c=t.params.g,f=new a(0),g=h(e,l).mod(l),m=!1,_=u(o,l,e,n);for(;!1===m;)i=d(l,_,n),f=p(c,i,s,l),0===(m=i.invm(l).imul(g.add(o.mul(f))).mod(l)).cmpn(0)&&(m=!1,f=new a(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e));128&t[0]&&(t=[0].concat(t));var n=[48,e.length+t.length+4,2,e.length];return n=n.concat(e,[2,t.length],t),r.from(n)}(f,m)}(e,g,n)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=r.concat([f,e]);for(var m=g.modulus.byteLength(),_=[0,1];e.length+_.length+1<m;)_.push(255);_.push(0);for(var v=-1;++v<e.length;)_.push(e[v]);return o(_,g)},e.exports.getKey=u,e.exports.makeKey=d},function(e,t,n){"use strict";var r=n(139);t.certificate=n(301);var i=r.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var o=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var s=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}));t.PublicKey=s;var a=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),l=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=l;var c=r.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=c;var u=r.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=u,t.DSAparam=r.define("DSAparam",(function(){this.int()}));var h=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=h;var d=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},function(e,t,n){"use strict";const r=n(140),i=n(142),o=n(8);function s(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new s(e,t)},s.prototype._createNamed=function(e){const t=this.name;function n(e){this._initNamed(e,t)}return o(n,e),n.prototype._initNamed=function(t,n){e.call(this,t,n)},new n(this)},s.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},s.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},s.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r[e])),this.encoders[e]},s.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}},function(e,t,n){"use strict";const r=n(8),i=n(141);function o(e){i.call(this,e),this.enc="pem"}r(o,i),e.exports=o,o.prototype.encode=function(e,t){const n=i.prototype.encode.call(this,e).toString("base64"),r=["-----BEGIN "+t.label+"-----"];for(let e=0;e<n.length;e+=64)r.push(n.slice(e,e+64));return r.push("-----END "+t.label+"-----"),r.join("\n")}},function(e,t,n){"use strict";const r=n(8),i=n(83).Buffer,o=n(143);function s(e){o.call(this,e),this.enc="pem"}r(s,o),e.exports=s,s.prototype.decode=function(e,t){const n=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/;let a=-1,l=-1;for(let e=0;e<n.length;e++){const t=n[e].match(s);if(null!==t&&t[2]===r){if(-1!==a){if("END"!==t[1])break;l=e;break}if("BEGIN"!==t[1])break;a=e}}if(-1===a||-1===l)throw new Error("PEM section not found for: "+r);const c=n.slice(a+1,l).join("");c.replace(/[^a-z0-9+/=]+/gi,"");const u=i.from(c,"base64");return o.prototype.decode.call(this,u,t)}},function(e,t,n){"use strict";const r=t;r.Reporter=n(85).Reporter,r.DecoderBuffer=n(44).DecoderBuffer,r.EncoderBuffer=n(44).EncoderBuffer,r.Node=n(84)},function(e,t,n){"use strict";const r=t;r._reverse=function(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t},r.der=n(86)},function(e,t,n){"use strict";var r=n(139),i=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),l=r.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=r.define("RDNSequence",(function(){this.seqof(l)})),u=r.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),h=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),d=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),p=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(u),this.key("validity").use(h),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())})),f=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(p),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));e.exports=f},function(e){e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},function(e,t,n){var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=n(59),a=n(80),l=n(4).Buffer;e.exports=function(e,t){var n,c=e.toString(),u=c.match(r);if(u){var h="aes"+u[1],d=l.from(u[2],"hex"),p=l.from(u[3].replace(/[\r\n]/g,""),"base64"),f=s(t,d.slice(0,8),parseInt(u[1],10)).key,g=[],m=a.createDecipheriv(h,f,d);g.push(m.update(p)),g.push(m.final()),n=l.concat(g)}else{var _=c.match(o);n=l.from(_[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:n}}},function(e,t,n){var r=n(4).Buffer,i=n(7),o=n(7).ec,s=n(60),a=n(144);function l(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,n,c,u){var h=s(n);if("ec"===h.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,n){var r=a[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var i=new o(r),s=n.data.subjectPrivateKey.data;return i.verify(t,e,s)}(e,t,h)}if("dsa"===h.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,n){var r=n.data.p,o=n.data.q,a=n.data.g,c=n.data.pub_key,u=s.signature.decode(e,"der"),h=u.s,d=u.r;l(h,o),l(d,o);var p=i.mont(r),f=h.invm(o);return 0===a.toRed(p).redPow(new i(t).mul(f).mod(o)).fromRed().mul(c.toRed(p).redPow(d.mul(f).mod(o)).fromRed()).mod(r).mod(o).cmp(d)}(e,t,h)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=r.concat([u,t]);for(var d=h.modulus.byteLength(),p=[1],f=0;t.length+p.length+2<d;)p.push(255),f++;p.push(0);for(var g=-1;++g<t.length;)p.push(t[g]);p=r.from(p);var m=i.mont(h.modulus);e=(e=new i(e).toRed(m)).redPow(new i(h.publicExponent)),e=r.from(e.fromRed().toArray());var _=f<8?1:0;for(d=Math.min(e.length,p.length),e.length!==p.length&&(_=1),g=-1;++g<d;)_|=e[g]^p[g];return 0===_}},function(e,t,n){(function(t){var r=n(7),i=n(7);e.exports=function(e){return new s(e)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=o[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function a(e,n,r){Array.isArray(e)||(e=e.toArray());var i=new t(e);if(r&&i.length<r){var o=new t(r-i.length);o.fill(0),i=t.concat([o,i])}return n?i.toString(n):i}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,s.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},s.prototype.computeSecret=function(e,n,r){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),a(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},s.prototype.getPublicKey=function(e,t){var n=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(n[n.length-1]%2?n[0]=7:n[0]=6),a(n,e)},s.prototype.getPrivateKey=function(e){return a(this.keys.getPrivate(),e)},s.prototype.setPublicKey=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.keys._importPublic(e),this},s.prototype.setPrivateKey=function(e,n){n=n||"utf8",t.isBuffer(e)||(e=new t(e,n));var r=new i(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}}).call(this,n(24).Buffer)},function(e,t,n){t.publicEncrypt=n(307),t.privateDecrypt=n(308),t.privateEncrypt=function(e,n){return t.publicEncrypt(e,n,!0)},t.publicDecrypt=function(e,n){return t.privateDecrypt(e,n,!0)}},function(e,t,n){var r=n(60),i=n(32),o=n(41),s=n(145),a=n(146),l=n(7),c=n(147),u=n(82),h=n(4).Buffer;e.exports=function(e,t,n){var d;d=e.padding?e.padding:n?1:4;var p,f=r(e);if(4===d)p=function(e,t){var n=e.modulus.byteLength(),r=t.length,c=o("sha1").update(h.alloc(0)).digest(),u=c.length,d=2*u;if(r>n-d-2)throw new Error("message too long");var p=h.alloc(n-r-d-2),f=n-u-1,g=i(u),m=a(h.concat([c,p,h.alloc(1,1),t],f),s(g,f)),_=a(g,s(m,u));return new l(h.concat([h.alloc(1),_,m],n))}(f,t);else if(1===d)p=function(e,t,n){var r,o=t.length,s=e.modulus.byteLength();if(o>s-11)throw new Error("message too long");r=n?h.alloc(s-o-3,255):function(e){var t,n=h.allocUnsafe(e),r=0,o=i(2*e),s=0;for(;r<e;)s===o.length&&(o=i(2*e),s=0),(t=o[s++])&&(n[r++]=t);return n}(s-o-3);return new l(h.concat([h.from([0,n?1:2]),r,h.alloc(1),t],s))}(f,t,n);else{if(3!==d)throw new Error("unknown padding");if((p=new l(t)).cmp(f.modulus)>=0)throw new Error("data too long for modulus")}return n?u(p,f):c(p,f)}},function(e,t,n){var r=n(60),i=n(145),o=n(146),s=n(7),a=n(82),l=n(41),c=n(147),u=n(4).Buffer;e.exports=function(e,t,n){var h;h=e.padding?e.padding:n?1:4;var d,p=r(e),f=p.modulus.byteLength();if(t.length>f||new s(t).cmp(p.modulus)>=0)throw new Error("decryption error");d=n?c(new s(t),p):a(t,p);var g=u.alloc(f-d.length);if(d=u.concat([g,d],f),4===h)return function(e,t){var n=e.modulus.byteLength(),r=l("sha1").update(u.alloc(0)).digest(),s=r.length;if(0!==t[0])throw new Error("decryption error");var a=t.slice(1,s+1),c=t.slice(s+1),h=o(a,i(c,s)),d=o(c,i(h,n-s-1));if(function(e,t){e=u.from(e),t=u.from(t);var n=0,r=e.length;e.length!==t.length&&(n++,r=Math.min(e.length,t.length));var i=-1;for(;++i<r;)n+=e[i]^t[i];return n}(r,d.slice(0,s)))throw new Error("decryption error");var p=s;for(;0===d[p];)p++;if(1!==d[p++])throw new Error("decryption error");return d.slice(p)}(p,d);if(1===h)return function(e,t,n){var r=t.slice(0,2),i=2,o=0;for(;0!==t[i++];)if(i>=t.length){o++;break}var s=t.slice(2,i-1);("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,d,n);if(3===h)return d;throw new Error("unknown padding")}},function(e,t,n){"use strict";(function(e,r){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=n(4),s=n(32),a=o.Buffer,l=o.kMaxLength,c=e.crypto||e.msCrypto,u=Math.pow(2,32)-1;function h(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>u||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range")}function d(e,t,n){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>l)throw new RangeError("buffer too small")}function p(e,t,n,i){if(r.browser){var o=e.buffer,a=new Uint8Array(o,t,n);return c.getRandomValues(a),i?void r.nextTick((function(){i(null,e)})):e}if(!i)return s(n).copy(e,t),e;s(n,(function(n,r){if(n)return i(n);r.copy(e,t),i(null,e)}))}c&&c.getRandomValues||!r.browser?(t.randomFill=function(t,n,r,i){if(!(a.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)i=n,n=0,r=t.length;else if("function"==typeof r)i=r,r=t.length-n;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(n,t.length),d(r,n,t.length),p(t,n,r,i)},t.randomFillSync=function(t,n,r){void 0===n&&(n=0);if(!(a.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(n,t.length),void 0===r&&(r=t.length-n);return d(r,n,t.length),p(t,n,r)}):(t.randomFill=i,t.randomFillSync=i)}).call(this,n(17),n(26))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.name=e,this._tokenStructuralPropertyT=null};t.Token=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(118);!function(e){e.uuid4=function(){for(var e=new Uint8Array(16),t=new Array(256),n=0;n<16;++n)t[n]="0"+n.toString(16);for(n=16;n<256;++n)t[n]=n.toString(16);return function(){return r.Random.getRandomValues(e),e[6]=64|15&e[6],e[8]=128|63&e[8],t[e[0]]+t[e[1]]+t[e[2]]+t[e[3]]+"-"+t[e[4]]+t[e[5]]+"-"+t[e[6]]+t[e[7]]+"-"+t[e[8]]+t[e[9]]+"-"+t[e[10]]+t[e[11]]+t[e[12]]+t[e[13]]+t[e[14]]+t[e[15]]}}()}(t.UUID||(t.UUID={}))},function(module,exports,__webpack_require__){"use strict";(function(process){Object.defineProperty(exports,"__esModule",{value:!0});var coreutils_1=__webpack_require__(12),minimist=__webpack_require__(313),url_1=__webpack_require__(148),PageConfig,Private;!function(PageConfig){function getOption(name){if(configData)return configData[name]||Private.getBodyData(name);configData=Object.create(null);var found=!1;if("undefined"!=typeof document){var el=document.getElementById("jupyter-config-data");el&&(configData=JSON.parse(el.textContent||""),found=!0)}if(!found&&void 0!==process)try{var cli=minimist(process.argv.slice(2));if("jupyter-config-data"in cli){var path=__webpack_require__(317),fullPath=path.resolve(cli["jupyter-config-data"]);configData=eval("require")(fullPath)}}catch(e){console.error(e)}if(coreutils_1.JSONExt.isObject(configData))for(var key in configData)configData[key]=String(configData[key]).split("&#39;").join('"');else configData=Object.create(null);return configData[name]||""}function setOption(e,t){var n=getOption(e);return configData[e]=t,n}function getBaseUrl(){var e=getOption("baseUrl");return e&&"/"!==e||(e="undefined"==typeof location?"http://localhost:8888/":location.origin+"/"),url_1.URLExt.parse(e).toString()}function getTreeUrl(){return url_1.URLExt.join(getBaseUrl(),getOption("pageUrl"),"tree")}function getWsUrl(e){var t=getOption("wsUrl");return t||(0!==(e=e||getBaseUrl()).indexOf("http")&&(e="undefined"!=typeof location?url_1.URLExt.join(location.origin,e):url_1.URLExt.join("http://localhost:8888/",e)),t="ws"+e.slice(4)),url_1.URLExt.parse(t).toString()}function getToken(){return getOption("token")||Private.getBodyData("jupyterApiToken")}PageConfig.getOption=getOption,PageConfig.setOption=setOption,PageConfig.getBaseUrl=getBaseUrl,PageConfig.getTreeUrl=getTreeUrl,PageConfig.getWsUrl=getWsUrl,PageConfig.getToken=getToken;var configData=null}(PageConfig=exports.PageConfig||(exports.PageConfig={})),function(e){e.getBodyData=function(e){if("undefined"==typeof document||!document.body)return"";var t=document.body.dataset[e];return void 0===t?"":decodeURIComponent(t)}}(Private||(Private={}))}).call(this,__webpack_require__(26))},function(e,t){function n(e){return"number"==typeof e||(!!/^0x[0-9a-f]+$/i.test(e)||/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e))}function r(e,t){return"constructor"===t&&"function"==typeof e[t]||"__proto__"===t}e.exports=function(e,t){t||(t={});var i={bools:{},strings:{},unknownFn:null};"function"==typeof t.unknown&&(i.unknownFn=t.unknown),"boolean"==typeof t.boolean&&t.boolean?i.allBools=!0:[].concat(t.boolean).filter(Boolean).forEach((function(e){i.bools[e]=!0}));var o={};Object.keys(t.alias||{}).forEach((function(e){o[e]=[].concat(t.alias[e]),o[e].forEach((function(t){o[t]=[e].concat(o[e].filter((function(e){return t!==e})))}))})),[].concat(t.string).filter(Boolean).forEach((function(e){i.strings[e]=!0,o[e]&&(i.strings[o[e]]=!0)}));var s=t.default||{},a={_:[]};Object.keys(i.bools).forEach((function(e){c(e,void 0!==s[e]&&s[e])}));var l=[];function c(e,t,r){if(!r||!i.unknownFn||function(e,t){return i.allBools&&/^--[^=]+$/.test(t)||i.strings[e]||i.bools[e]||o[e]}(e,r)||!1!==i.unknownFn(r)){var s=!i.strings[e]&&n(t)?Number(t):t;u(a,e.split("."),s),(o[e]||[]).forEach((function(e){u(a,e.split("."),s)}))}}function u(e,t,n){for(var o=e,s=0;s<t.length-1;s++){if(r(o,a=t[s]))return;void 0===o[a]&&(o[a]={}),o[a]!==Object.prototype&&o[a]!==Number.prototype&&o[a]!==String.prototype||(o[a]={}),o[a]===Array.prototype&&(o[a]=[]),o=o[a]}var a;r(o,a=t[t.length-1])||(o!==Object.prototype&&o!==Number.prototype&&o!==String.prototype||(o={}),o===Array.prototype&&(o=[]),void 0===o[a]||i.bools[a]||"boolean"==typeof o[a]?o[a]=n:Array.isArray(o[a])?o[a].push(n):o[a]=[o[a],n])}function h(e){return o[e].some((function(e){return i.bools[e]}))}-1!==e.indexOf("--")&&(l=e.slice(e.indexOf("--")+1),e=e.slice(0,e.indexOf("--")));for(var d=0;d<e.length;d++){var p=e[d];if(/^--.+=/.test(p)){var f=p.match(/^--([^=]+)=([\s\S]*)$/),g=f[1],m=f[2];i.bools[g]&&(m="false"!==m),c(g,m,p)}else if(/^--no-.+/.test(p)){c(g=p.match(/^--no-(.+)/)[1],!1,p)}else if(/^--.+/.test(p)){g=p.match(/^--(.+)/)[1];void 0===(b=e[d+1])||/^-/.test(b)||i.bools[g]||i.allBools||o[g]&&h(g)?/^(true|false)$/.test(b)?(c(g,"true"===b,p),d++):c(g,!i.strings[g]||"",p):(c(g,b,p),d++)}else if(/^-[^-]+/.test(p)){for(var _=p.slice(1,-1).split(""),v=!1,y=0;y<_.length;y++){var b;if("-"!==(b=p.slice(y+2))){if(/[A-Za-z]/.test(_[y])&&/=/.test(b)){c(_[y],b.split("=")[1],p),v=!0;break}if(/[A-Za-z]/.test(_[y])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(b)){c(_[y],b,p),v=!0;break}if(_[y+1]&&_[y+1].match(/\W/)){c(_[y],p.slice(y+2),p),v=!0;break}c(_[y],!i.strings[_[y]]||"",p)}else c(_[y],b,p)}g=p.slice(-1)[0];v||"-"===g||(!e[d+1]||/^(-|--)[^-]/.test(e[d+1])||i.bools[g]||o[g]&&h(g)?e[d+1]&&/^(true|false)$/.test(e[d+1])?(c(g,"true"===e[d+1],p),d++):c(g,!i.strings[g]||"",p):(c(g,e[d+1],p),d++))}else if(i.unknownFn&&!1===i.unknownFn(p)||a._.push(i.strings._||!n(p)?p:Number(p)),t.stopEarly){a._.push.apply(a._,e.slice(d+1));break}}return Object.keys(s).forEach((function(e){var t,n,r;t=a,n=e.split("."),r=t,n.slice(0,-1).forEach((function(e){r=r[e]||{}})),n[n.length-1]in r||(u(a,e.split("."),s[e]),(o[e]||[]).forEach((function(t){u(a,t.split("."),s[e])})))})),t["--"]?(a["--"]=new Array,l.forEach((function(e){a["--"].push(e)}))):l.forEach((function(e){a._.push(e)})),a}},function(e,t,n){"use strict";(function(t){var r=n(315),i=n(316),o=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,a=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],l={hash:1,query:1};function c(e){var n,r={},i=typeof(e=e||t.location||{});if("blob:"===e.protocol)r=new h(unescape(e.pathname),{});else if("string"===i)for(n in r=new h(e,{}),l)delete r[n];else if("object"===i){for(n in e)n in l||(r[n]=e[n]);void 0===r.slashes&&(r.slashes=s.test(e.href))}return r}function u(e){var t=o.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function h(e,t,n){if(!(this instanceof h))return new h(e,t,n);var o,s,l,d,p,f,g=a.slice(),m=typeof t,_=this,v=0;for("object"!==m&&"string"!==m&&(n=t,t=null),n&&"function"!=typeof n&&(n=i.parse),t=c(t),o=!(s=u(e||"")).protocol&&!s.slashes,_.slashes=s.slashes||o&&t.slashes,_.protocol=s.protocol||t.protocol||"",e=s.rest,s.slashes||(g[2]=[/(.*)/,"pathname"]);v<g.length;v++)l=(d=g[v])[0],f=d[1],l!=l?_[f]=e:"string"==typeof l?~(p=e.indexOf(l))&&("number"==typeof d[2]?(_[f]=e.slice(0,p),e=e.slice(p+d[2])):(_[f]=e.slice(p),e=e.slice(0,p))):(p=l.exec(e))&&(_[f]=p[1],e=e.slice(0,p.index)),_[f]=_[f]||o&&d[3]&&t[f]||"",d[4]&&(_[f]=_[f].toLowerCase());n&&(_.query=n(_.query)),o&&t.slashes&&"/"!==_.pathname.charAt(0)&&(""!==_.pathname||""!==t.pathname)&&(_.pathname=function(e,t){for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],o=!1,s=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),s++):s&&(0===r&&(o=!0),n.splice(r,1),s--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(_.pathname,t.pathname)),r(_.port,_.protocol)||(_.host=_.hostname,_.port=""),_.username=_.password="",_.auth&&(d=_.auth.split(":"),_.username=d[0]||"",_.password=d[1]||""),_.origin=_.protocol&&_.host&&"file:"!==_.protocol?_.protocol+"//"+_.host:"null",_.href=_.toString()}h.prototype={set:function(e,t,n){var o=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||i.parse)(t)),o[e]=t;break;case"port":o[e]=t,r(t,o.protocol)?t&&(o.host=o.hostname+":"+t):(o.host=o.hostname,o[e]="");break;case"hostname":o[e]=t,o.port&&(t+=":"+o.port),o.host=t;break;case"host":o[e]=t,/:\d+$/.test(t)?(t=t.split(":"),o.port=t.pop(),o.hostname=t.join(":")):(o.hostname=t,o.port="");break;case"protocol":o.protocol=t.toLowerCase(),o.slashes=!n;break;case"pathname":o.pathname=t.length&&"/"!==t.charAt(0)?"/"+t:t;break;default:o[e]=t}for(var s=0;s<a.length;s++){var l=a[s];l[4]&&(o[l[1]]=o[l[1]].toLowerCase())}return o.origin=o.protocol&&o.host&&"file:"!==o.protocol?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(e){e&&"function"==typeof e||(e=i.stringify);var t,n=this,r=n.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var o=r+(n.slashes?"//":"");return n.username&&(o+=n.username,n.password&&(o+=":"+n.password),o+="@"),o+=n.host+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(o+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(o+=n.hash),o}},h.extractProtocol=u,h.location=c,h.qs=i,e.exports=h}).call(this,n(17))},function(e,t,n){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(e){return decodeURIComponent(e.replace(/\+/g," "))}t.stringify=function(e,t){t=t||"";var n=[];for(var i in"string"!=typeof t&&(t="?"),e)r.call(e,i)&&n.push(encodeURIComponent(i)+"="+encodeURIComponent(e[i]));return n.length?t+n.join("&"):""},t.parse=function(e){for(var t,n=/([^=?&]+)=?([^&]*)/g,r={};t=n.exec(e);r[i(t[1])]=i(t[2]));return r}},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var t="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,i="/"===s.charAt(0))}return(i?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var o=t.isAbsolute(e),s="/"===i(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&s&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),o=r(n.split("/")),s=Math.min(i.length,o.length),a=s,l=0;l<s;l++)if(i[l]!==o[l]){a=l;break}var c=[];for(l=a;l<i.length;l++)c.push("..");return(c=c.concat(o.slice(a))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===r&&(i=!1,r=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=s+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(26))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(319);!function(e){function t(e){return 0===e.indexOf("/")&&(e=e.slice(1)),e}e.join=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=r.join.apply(r,e);return"."===i?"":t(r.join.apply(r,e))},e.basename=function(e,t){return r.basename(e,t)},e.dirname=function(e){var n=t(r.dirname(e));return"."===n?"":n},e.extname=function(e){return r.extname(e)},e.normalize=function(e){return""===e?"":t(r.normalize(e))},e.resolve=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t(r.resolve.apply(r,e))},e.relative=function(e,n){return t(r.relative(e,n))},e.normalizeExtension=function(e){return e.length>0&&0!==e.indexOf(".")&&(e="."+e),e},e.removeSlash=t}(t.PathExt||(t.PathExt={}))},function(e,t,n){"use strict";(function(t){var r=n(320),i=function(e){return"string"==typeof e};function o(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];i&&"."!==i&&(".."===i?n.length&&".."!==n[n.length-1]?n.pop():t&&n.push(".."):n.push(i))}return n}var s=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a={};function l(e){return s.exec(e).slice(1)}a.resolve=function(){for(var e="",n=!1,r=arguments.length-1;r>=-1&&!n;r--){var s=r>=0?arguments[r]:t.cwd();if(!i(s))throw new TypeError("Arguments to path.resolve must be strings");s&&(e=s+"/"+e,n="/"===s.charAt(0))}return(n?"/":"")+(e=o(e.split("/"),!n).join("/"))||"."},a.normalize=function(e){var t=a.isAbsolute(e),n="/"===e.substr(-1);return(e=o(e.split("/"),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},a.isAbsolute=function(e){return"/"===e.charAt(0)},a.join=function(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];if(!i(n))throw new TypeError("Arguments to path.join must be strings");n&&(e+=e?"/"+n:n)}return a.normalize(e)},a.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n+1)}e=a.resolve(e).substr(1),t=a.resolve(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),o=Math.min(r.length,i.length),s=o,l=0;l<o;l++)if(r[l]!==i[l]){s=l;break}var c=[];for(l=s;l<r.length;l++)c.push("..");return(c=c.concat(i.slice(s))).join("/")},a._makeLong=function(e){return e},a.dirname=function(e){var t=l(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},a.basename=function(e,t){var n=l(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},a.extname=function(e){return l(e)[3]},a.format=function(e){if(!r.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!i(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);return(e.dir?e.dir+a.sep:"")+(e.base||"")},a.parse=function(e){if(!i(e))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=l(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,t[1].length-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},a.sep="/",a.delimiter=":",e.exports=a}).call(this,n(26))},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;t.format=function(e){if(!_(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(a(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,s=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),l=r[n];n<o;l=r[++n])g(l)||!b(l)?s+=" "+l:s+=" "+a(l);return s},t.deprecate=function(n,r){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,s={};function a(e,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),f(n)?r.showHidden=n:n&&t._extend(r,n),v(r.showHidden)&&(r.showHidden=!1),v(r.depth)&&(r.depth=2),v(r.colors)&&(r.colors=!1),v(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),u(r,e,r.depth)}function l(e,t){var n=a.styles[t];return n?"["+a.colors[n][0]+"m"+e+"["+a.colors[n][1]+"m":e}function c(e,t){return e}function u(e,n,r){if(e.customInspect&&n&&k(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return _(i)||(i=u(e,i,r)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(_(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(m(t))return e.stylize(""+t,"number");if(f(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(o)return o;var s=Object.keys(n),a=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(n)),x(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(n);if(0===s.length){if(k(n)){var l=n.name?": "+n.name:"";return e.stylize("[Function"+l+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return h(n)}var c,b="",E=!1,S=["{","}"];(p(n)&&(E=!0,S=["[","]"]),k(n))&&(b=" [Function"+(n.name?": "+n.name:"")+"]");return y(n)&&(b=" "+RegExp.prototype.toString.call(n)),w(n)&&(b=" "+Date.prototype.toUTCString.call(n)),x(n)&&(b=" "+h(n)),0!==s.length||E&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=E?function(e,t,n,r,i){for(var o=[],s=0,a=t.length;s<a;++s)j(t,String(s))?o.push(d(e,t,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(e,t,n,r,i,!0))})),o}(e,n,r,a,s):s.map((function(t){return d(e,n,r,a,t,E)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(c,b,S)):S[0]+b+S[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i,o){var s,a,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),j(r,i)||(s="["+i+"]"),a||(e.seen.indexOf(l.value)<0?(a=g(n)?u(e,l.value,null):u(e,l.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return"  "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return"   "+e})).join("\n")):a=e.stylize("[Circular]","special")),v(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function g(e){return null===e}function m(e){return"number"==typeof e}function _(e){return"string"==typeof e}function v(e){return void 0===e}function y(e){return b(e)&&"[object RegExp]"===E(e)}function b(e){return"object"==typeof e&&null!==e}function w(e){return b(e)&&"[object Date]"===E(e)}function x(e){return b(e)&&("[object Error]"===E(e)||e instanceof Error)}function k(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(v(o)&&(o=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!s[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=e.pid;s[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else s[n]=function(){};return s[n]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=f,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=_,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=y,t.isObject=b,t.isDate=w,t.isError=x,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(321);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":");return[e.getDate(),M[e.getMonth()],t].join(" ")}function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",C(),t.format.apply(t,arguments))},t.inherits=n(322),t._extend=function(e,t){if(!t||!b(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var A="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function T(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(A&&e[A]){var t;if("function"!=typeof(t=e[A]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,A,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,i)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),A&&Object.defineProperty(t,A,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=A,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};t.apply(this,n).then((function(t){e.nextTick(s,null,t)}),(function(t){e.nextTick(T,t,s)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,r(t)),n}}).call(this,n(26))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(324),o=n(7),s=n(3),a=n(12),l=n(6);t.ICON_CLASS_KEY="jupyter.lab.setting-icon-class",t.ICON_LABEL_KEY="jupyter.lab.setting-icon-label";var c=a.JSONExt.deepCopy;t.ISettingRegistry=new a.Token("@jupyterlab/coreutils:ISettingRegistry");var u=function(){function e(){this._composer=new i({useDefaults:!0}),this._validator=new i,this._composer.addSchema(d.SCHEMA,"main"),this._validator.addSchema(d.SCHEMA,"main")}return e.prototype.validateData=function(e,t){void 0===t&&(t=!0);var n,r=this._validator.getSchema(e.id),i=this._composer.getSchema(e.id);if(!r||!i){var s=this._addSchema(e.id,e.schema);return s||this.validateData(e)}try{n=o.parse(e.raw,null,!0)}catch(e){if(e instanceof SyntaxError)return[{dataPath:"",keyword:"syntax",schemaPath:"",message:e.message}];var a=e.column;return[{dataPath:"",keyword:"parse",schemaPath:"",message:e.description+" (line "+e.lineNumber+" column "+a+")"}]}if(!r(n))return r.errors;var l=c(n);return i(l)?(t&&(e.data={composite:l,user:n}),null):i.errors},e.prototype._addSchema=function(e,t){var n=this._composer,r=this._validator,i=r.getSchema("main");return i(t)?r.validateSchema(t)?(n.removeSchema(e),r.removeSchema(e),n.addSchema(t,e),r.addSchema(t,e),null):r.errors:i.errors},e}();t.DefaultSchemaValidator=u;var h=function(){function e(e){this.schema=d.SCHEMA,this._pluginChanged=new l.Signal(this),this._plugins=Object.create(null),this._connector=e.connector,this.validator=e.validator||new u}return Object.defineProperty(e.prototype,"pluginChanged",{get:function(){return this._pluginChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"plugins",{get:function(){var e=this._plugins;return Object.keys(e).map((function(t){return c(e[t])}))},enumerable:!0,configurable:!0}),e.prototype.get=function(e,t){var n=this,r=this._plugins;if(e in r){var i=r[e].data,o=i.composite,s=i.user,a={composite:t in o?c(o[t]):void 0,user:t in s?c(s[t]):void 0};return Promise.resolve(a)}return this.load(e).then((function(){return n.get(e,t)}))},e.prototype.load=function(e){var t=this._plugins;if(e in t){var n=new p({plugin:t[e],registry:this});return Promise.resolve(n)}return this.reload(e)},e.prototype.reload=function(e){var t=this,n=this._connector,r=this._plugins,i=this;return n.fetch(e).then((function(n){try{t._validate(n)}catch(t){var o=["Validating "+e+" failed:"];throw t.forEach((function(e,t){var n=e.dataPath,r=e.schemaPath,i=e.keyword,s=e.message;o.push(t+" - schema @ "+r+", data @ "+n),o.push("\t"+i+" "+s)})),console.error(o.join("\n")),new Error("Failed validating "+e)}return t._pluginChanged.emit(e),new p({plugin:r[e],registry:i})}))},e.prototype.remove=function(e,t){var n=this._plugins;if(!(e in n))return Promise.resolve(void 0);var r=o.parse(n[e].raw);return delete r[t],delete r["// "+t],n[e].raw=o.stringify(r),this._save(e)},e.prototype.set=function(e,t,n){var i=this,s=this._plugins;if(!(e in s))return this.load(e).then((function(){return i.set(e,t,n)}));var a,l=o.parse(s[e].raw);return s[e].raw=o.stringify(r({},l,((a={})[t]=n,a))),this._save(e)},e.prototype.upload=function(e,t){var n=this,r=this._plugins;return e in r?(r[e].raw=t,this._save(e)):this.load(e).then((function(){return n.upload(e,t)}))},e.prototype._save=function(e){var t=this,n=this._plugins;if(!(e in n)){var r=e+" does not exist in setting registry.";return Promise.reject(new Error(r))}try{this._validate(n[e])}catch(t){r=e+" failed to validate; check console for errors.";return console.warn(e+" validation errors:",t),Promise.reject(new Error(r))}return this._connector.save(e,n[e].raw).then((function(){t._pluginChanged.emit(e)}))},e.prototype._validate=function(e){var t=this.validator.validateData(e);if(t)throw t;this._plugins[e.id]=e},e}();t.SettingRegistry=h;var d,p=function(){function e(e){this._changed=new l.Signal(this),this._composite=Object.create(null),this._isDisposed=!1,this._raw="{ }",this._schema=Object.create(null),this._user=Object.create(null);var t=e.plugin;this.plugin=t.id,this.registry=e.registry,this._composite=t.data.composite||{},this._raw=t.raw||"{ }",this._schema=t.schema||{type:"object"},this._user=t.data.user||{},this.registry.pluginChanged.connect(this._onPluginChanged,this)}return Object.defineProperty(e.prototype,"changed",{get:function(){return this._changed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"composite",{get:function(){return this._composite},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this._schema},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"raw",{get:function(){return this._raw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"user",{get:function(){return this._user},enumerable:!0,configurable:!0}),e.prototype.annotatedDefaults=function(){return d.annotatedDefaults(this._schema,this.plugin)},e.prototype.default=function(e){return d.reifyDefault(this.schema,e)},e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,l.Signal.clearData(this))},e.prototype.get=function(e){var t=this.composite,n=this.user;return{composite:e in t?c(t[e]):void 0,user:e in n?c(n[e]):void 0}},e.prototype.remove=function(e){return this.registry.remove(this.plugin,e)},e.prototype.save=function(e){return this.registry.upload(this.plugin,e)},e.prototype.set=function(e,t){return this.registry.set(this.plugin,e,t)},e.prototype.validate=function(e){var t=this.plugin,n=this._schema;return this.registry.validator.validateData({data:{composite:{},user:{}},id:t,raw:e,schema:n},!1)},e.prototype._onPluginChanged=function(e,t){if(t===this.plugin){var n=s.find(this.registry.plugins,(function(e){return e.id===t}));if(!n)return;var r=n.data,i=r.composite,o=r.user,a=n.raw,l=n.schema;this._composite=i||{},this._raw=a,this._schema=l||{type:"object"},this._user=o||{},this._changed.emit(void 0)}},e}();t.Settings=p,function(e){e.SCHEMA={$schema:"http://json-schema.org/draft-06/schema",title:"Jupyter Settings/Preferences Schema",description:"Jupyter settings/preferences schema v0.1.0",type:"object",additionalProperties:!0,properties:(n={},n[t.ICON_CLASS_KEY]={type:"string",default:"jp-FileIcon"},n[t.ICON_LABEL_KEY]={type:"string",default:"Plugin"},n)};var n,r="[missing schema description]";function i(e,t){return void 0===t&&(t="*"),new Array(e+1).join(t)}function o(e,t){return void 0===t&&(t="    // "),t+e.split("\n").join("\n"+t)}function s(e,t){if(!("default"in(e=(t?e.properties[t]:e)||{}))||"object"!==e.type)return e.default;var n=a.JSONExt.deepCopy(e.default);for(var r in e.properties||{})n[r]=s(e.properties[r]);return n}e.annotatedDefaults=function(e,t){var n=e.description,a=e.properties,l=e.title,c=Object.keys(a).sort((function(e,t){return e.localeCompare(t)})),u=Math.max((n||r).length,t.length);return["{",o(""+(l||"[missing schema title]")),o(t),o(n||r),o(i(u)),"",c.map((function(t){return function(e,t){var n=e.properties[t],i=n.description,a=n.title,l=s(e,t),c=void 0===l?o('"'+t+'": [missing schema default]'):o('"'+t+'": '+JSON.stringify(l,null,2),"    ");return[o(""+(a||"[missing schema title]")),o(i||r),c].join("\n")}(e,t)})).join("\n\n"),"}"].join("\n")},e.reifyDefault=s}(d=t.Private||(t.Private={}))},function(e,t,n){"use strict";var r=n(325),i=n(87),o=n(337),s=n(149),a=n(150),l=n(338),c=n(339),u=n(358),h=n(359),d=n(34),p=n(152);e.exports=y,y.prototype.validate=function(e,t){var n;if("string"==typeof e){if(!(n=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var r=this._addSchema(e);n=r.validate||this._compile(r)}var i=n(t);return!0===n.$async?"*"==this._opts.async?p(i):i:(this.errors=n.errors,i)},y.prototype.compile=function(e,t){var n=this._addSchema(e,void 0,t);return n.validate||this._compile(n)},y.prototype.addSchema=function(e,t,n,r){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,n,r);return}var s=this._getId(e);if(void 0!==s&&"string"!=typeof s)throw new Error("schema id must be string");S(this,t=i.normalizeId(t||s)),this._schemas[t]=this._addSchema(e,n,r,!0)},y.prototype.addMetaSchema=function(e,t,n){this.addSchema(e,t,n,!0)},y.prototype.validateSchema=function(e,t){var n=e.$schema;if(void 0!==n&&"string"!=typeof n)throw new Error("$schema must be a string");if(!(n=n||this._opts.defaultMeta||function(e){var t=e._opts.meta;return e._opts.defaultMeta="object"==typeof t?e._getId(t)||t:e.getSchema(m)?m:void 0,e._opts.defaultMeta}(this)))return console.warn("meta-schema not available"),this.errors=null,!0;var r,i=this._formats.uri;this._formats.uri="function"==typeof i?this._schemaUriFormatFunc:this._schemaUriFormat;try{r=this.validate(n,e)}finally{this._formats.uri=i}if(!r&&t){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);console.error(o)}return r},y.prototype.getSchema=function(e){var t=b(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return function(e,t){var n=i.schema.call(e,{schema:{}},t);if(n){var o=n.schema,a=n.root,l=n.baseId,c=r.call(e,o,a,void 0,l);return e._fragments[t]=new s({ref:t,fragment:!0,schema:o,root:a,baseId:l,validate:c}),c}}(this,e)}},y.prototype.removeSchema=function(e){if(e instanceof RegExp)return w(this,this._schemas,e),void w(this,this._refs,e);switch(typeof e){case"undefined":return w(this,this._schemas),w(this,this._refs),void this._cache.clear();case"string":var t=b(this,e);return t&&this._cache.del(t.cacheKey),delete this._schemas[e],void delete this._refs[e];case"object":var n=this._opts.serialize,r=n?n(e):e;this._cache.del(r);var o=this._getId(e);o&&(o=i.normalizeId(o),delete this._schemas[o],delete this._refs[o])}},y.prototype.addFormat=function(e,t){"string"==typeof t&&(t=new RegExp(t));this._formats[e]=t},y.prototype.errorsText=function(e,t){if(!(e=e||this.errors))return"No errors";for(var n=void 0===(t=t||{}).separator?", ":t.separator,r=void 0===t.dataVar?"data":t.dataVar,i="",o=0;o<e.length;o++){var s=e[o];s&&(i+=r+s.dataPath+" "+s.message+n)}return i.slice(0,-n.length)},y.prototype._addSchema=function(e,t,n,r){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,a=o?o(e):e,l=this._cache.get(a);if(l)return l;r=r||!1!==this._opts.addUsedSchema;var c=i.normalizeId(this._getId(e));c&&r&&S(this,c);var u,h=!1!==this._opts.validateSchema&&!t;h&&!(u=c&&c==i.normalizeId(e.$schema))&&this.validateSchema(e,!0);var d=i.ids.call(this,e),p=new s({id:c,schema:e,localRefs:d,cacheKey:a,meta:n});"#"!=c[0]&&r&&(this._refs[c]=p);this._cache.put(a,p),h&&u&&this.validateSchema(e,!0);return p},y.prototype._compile=function(e,t){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=t||o,!0===e.schema.$async&&(o.$async=!0),o;var n,i;e.compiling=!0,e.meta&&(n=this._opts,this._opts=this._metaOpts);try{i=r.call(this,e.schema,t,e.localRefs)}finally{e.compiling=!1,e.meta&&(this._opts=n)}return e.validate=i,e.refs=i.refs,e.refVal=i.refVal,e.root=i.root,i;function o(){var t=e.validate,n=t.apply(null,arguments);return o.errors=t.errors,n}},y.prototype.compileAsync=n(360);var f=n(361);y.prototype.addKeyword=f.add,y.prototype.getKeyword=f.get,y.prototype.removeKeyword=f.remove;var g=n(90);y.ValidationError=g.Validation,y.MissingRefError=g.MissingRef,y.$dataMetaSchema=u;var m="http://json-schema.org/draft-06/schema",_=["removeAdditional","useDefaults","coerceTypes"],v=["/properties"];function y(e){if(!(this instanceof y))return new y(e);e=this._opts=d.copy(e)||{},this._schemas={},this._refs={},this._fragments={},this._formats=l(e.format);var t=this._schemaUriFormat=this._formats["uri-reference"];this._schemaUriFormatFunc=function(e){return t.test(e)},this._cache=e.cache||new o,this._loadingSchemas={},this._compilations=[],this.RULES=c(),this._getId=function(e){switch(e.schemaId){case"$id":return k;case"id":return x;default:return E}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=a),this._metaOpts=function(e){for(var t=d.copy(e._opts),n=0;n<_.length;n++)delete t[_[n]];return t}(this),e.formats&&function(e){for(var t in e._opts.formats){var n=e._opts.formats[t];e.addFormat(t,n)}}(this),function(e){var t;e._opts.$data&&(t=n(363),e.addMetaSchema(t,t.$id,!0));if(!1===e._opts.meta)return;var r=n(364);e._opts.$data&&(r=u(r,v));e.addMetaSchema(r,m,!0),e._refs["http://json-schema.org/schema"]=m}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),function(e){var t=e._opts.schemas;if(!t)return;if(Array.isArray(t))e.addSchema(t);else for(var n in t)e.addSchema(t[n],n)}(this),e.patternGroups&&h(this)}function b(e,t){return t=i.normalizeId(t),e._schemas[t]||e._refs[t]||e._fragments[t]}function w(e,t,n){for(var r in t){var i=t[r];i.meta||n&&!n.test(r)||(e._cache.del(i.cacheKey),delete t[r])}}function x(e){return e.$id&&console.warn("schema $id ignored",e.$id),e.id}function k(e){return e.id&&console.warn("schema id ignored",e.id),e.$id}function E(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function S(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}},function(e,t,n){"use strict";var r=n(87),i=n(34),o=n(90),s=n(150),a=n(151),l=n(152),c=i.ucs2length,u=n(89),h=o.Validation;function d(e,t,n){var r=f.call(this,e,t,n);return r>=0?{index:r,compiling:!0}:(r=this._compilations.length,this._compilations[r]={schema:e,root:t,baseId:n},{index:r,compiling:!1})}function p(e,t,n){var r=f.call(this,e,t,n);r>=0&&this._compilations.splice(r,1)}function f(e,t,n){for(var r=0;r<this._compilations.length;r++){var i=this._compilations[r];if(i.schema==e&&i.root==t&&i.baseId==n)return r}return-1}function g(e,t){return"var pattern"+e+" = new RegExp("+i.toQuotedString(t[e])+");"}function m(e){return"var default"+e+" = defaults["+e+"];"}function _(e,t){return void 0===t[e]?"":"var refVal"+e+" = refVal["+e+"];"}function v(e){return"var customRule"+e+" = customRules["+e+"];"}function y(e,t){if(!e.length)return"";for(var n="",r=0;r<e.length;r++)n+=t(r,e);return n}e.exports=function e(t,n,f,b){var w=this,x=this._opts,k=[void 0],E={},S=[],M={},C=[],j={},A=[];n=n||{schema:t,refVal:k,refs:E};var T=d.call(this,t,n,b),P=this._compilations[T.index];if(T.compiling)return P.callValidate=function e(){var t=P.validate,n=t.apply(null,arguments);return e.errors=t.errors,n};var O=this._formats,L=this.RULES;try{var I=R(t,n,f,b);P.validate=I;var D=P.callValidate;return D&&(D.schema=I.schema,D.errors=null,D.refs=I.refs,D.refVal=I.refVal,D.root=I.root,D.$async=I.$async,x.sourceCode&&(D.source=I.source)),I}finally{p.call(this,t,n,b)}function R(t,s,d,p){var f=!s||s&&s.schema==t;if(s.schema!=n.schema)return e.call(w,t,s,d,p);var b,M=!0===t.$async,j=a({isTop:!0,schema:t,isRoot:f,baseId:p,root:s,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:o.MissingRef,RULES:L,validate:a,util:i,resolve:r,resolveRef:B,usePattern:F,useDefault:U,useCustomRule:q,opts:x,formats:O,self:w});j=y(k,_)+y(S,g)+y(C,m)+y(A,v)+j,x.processCode&&(j=x.processCode(j));try{b=new Function("self","RULES","formats","root","refVal","defaults","customRules","co","equal","ucs2length","ValidationError",j)(w,L,O,n,k,C,A,l,u,c,h),k[0]=b}catch(e){throw console.error("Error compiling schema, function code:",j),e}return b.schema=t,b.errors=null,b.refs=E,b.refVal=k,b.root=f?b:s,M&&(b.$async=!0),!0===x.sourceCode&&(b.source={code:j,patterns:S,defaults:C}),b}function B(t,i,o){i=r.url(t,i);var s,a,l=E[i];if(void 0!==l)return N(s=k[l],a="refVal["+l+"]");if(!o&&n.refs){var c=n.refs[i];if(void 0!==c)return N(s=n.refVal[c],a=z(i,s))}a=z(i);var u=r.call(w,R,n,i);if(void 0===u){var h=f&&f[i];h&&(u=r.inlineRef(h,x.inlineRefs)?h:e.call(w,h,n,f,t))}return void 0!==u?(function(e,t){var n=E[e];k[n]=t}(i,u),N(u,a)):void 0}function z(e,t){var n=k.length;return k[n]=t,E[e]=n,"refVal"+n}function N(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&e.$async}}function F(e){var t=M[e];return void 0===t&&(t=M[e]=S.length,S[t]=e),"pattern"+t}function U(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return i.toQuotedString(e);case"object":if(null===e)return"null";var t=s(e),n=j[t];return void 0===n&&(n=j[t]=C.length,C[n]=e),"default"+n}}function q(e,t,n,r){var i=e.definition.validateSchema;if(i&&!1!==w._opts.validateSchema&&!i(t)){var o="keyword schema is invalid: "+w.errorsText(i.errors);if("log"!=w._opts.validateSchema)throw new Error(o);console.error(o)}var s,a=e.definition.compile,l=e.definition.inline,c=e.definition.macro;if(a)s=a.call(w,t,n,r);else if(c)s=c.call(w,t,n,r),!1!==x.validateSchema&&w.validateSchema(s,!0);else if(l)s=l.call(w,r,e.keyword,t,n);else if(!(s=e.definition.validate))return;if(void 0===s)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var u=A.length;return A[u]=s,{code:"customRule"+u,validate:s}}}},function(e,t,n){"use strict";var r=n(327),i=n(328);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=y,t.resolve=function(e,t){return y(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=y(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),h=["%","/","?",";","#"].concat(u),d=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=n(329);function y(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(a);c[0]=c[0].replace(/\\/g,"/");var y=e=c.join(a);if(y=y.trim(),!n&&1===e.split("#").length){var b=l.exec(y);if(b)return this.path=y,this.href=y,this.pathname=b[1],b[2]?(this.search=b[2],this.query=t?v.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=s.exec(y);if(w){var x=(w=w[0]).toLowerCase();this.protocol=x,y=y.substr(w.length)}if(n||w||y.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===y.substr(0,2);!k||w&&m[w]||(y=y.substr(2),this.slashes=!0)}if(!m[w]&&(k||w&&!_[w])){for(var E,S,M=-1,C=0;C<d.length;C++){-1!==(j=y.indexOf(d[C]))&&(-1===M||j<M)&&(M=j)}-1!==(S=-1===M?y.lastIndexOf("@"):y.lastIndexOf("@",M))&&(E=y.slice(0,S),y=y.slice(S+1),this.auth=decodeURIComponent(E)),M=-1;for(C=0;C<h.length;C++){var j;-1!==(j=y.indexOf(h[C]))&&(-1===M||j<M)&&(M=j)}-1===M&&(M=y.length),this.host=y.slice(0,M),y=y.slice(M),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var T=this.hostname.split(/\./),P=(C=0,T.length);C<P;C++){var O=T[C];if(O&&!O.match(p)){for(var L="",I=0,D=O.length;I<D;I++)O.charCodeAt(I)>127?L+="x":L+=O[I];if(!L.match(p)){var R=T.slice(0,C),B=T.slice(C+1),z=O.match(f);z&&(R.push(z[1]),B.unshift(z[2])),B.length&&(y="/"+B.join(".")+y),this.hostname=R.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=r.toASCII(this.hostname));var N=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+N,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!g[x])for(C=0,P=u.length;C<P;C++){var U=u[C];if(-1!==y.indexOf(U)){var q=encodeURIComponent(U);q===U&&(q=escape(U)),y=y.split(U).join(q)}}var H=y.indexOf("#");-1!==H&&(this.hash=y.substr(H),y=y.slice(0,H));var W=y.indexOf("?");if(-1!==W?(this.search=y.substr(W),this.query=y.substr(W+1),t&&(this.query=v.parse(this.query)),y=y.slice(0,W)):t&&(this.search="",this.query={}),y&&(this.pathname=y),_[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){N=this.pathname||"";var V=this.search||"";this.path=N+V}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=v.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||_[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(y(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),s=0;s<r.length;s++){var a=r[s];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(n[u]=e[u])}return _[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!_[e.protocol]){for(var h=Object.keys(e),d=0;d<h.length;d++){var p=h[d];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||m[e.protocol])n.pathname=e.pathname;else{for(var f=(e.pathname||"").split("/");f.length&&!(e.host=f.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),n.pathname=f.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var g=n.pathname||"",v=n.search||"";n.path=g+v}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),b=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=b||y||n.host&&e.pathname,x=w,k=n.pathname&&n.pathname.split("/")||[],E=(f=e.pathname&&e.pathname.split("/")||[],n.protocol&&!_[n.protocol]);if(E&&(n.hostname="",n.port=null,n.host&&(""===k[0]?k[0]=n.host:k.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===f[0]?f[0]=e.host:f.unshift(e.host)),e.host=null),w=w&&(""===f[0]||""===k[0])),b)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,k=f;else if(f.length)k||(k=[]),k.pop(),k=k.concat(f),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(E)n.hostname=n.host=k.shift(),(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=k.slice(-1)[0],M=(n.host||e.host||k.length>1)&&("."===S||".."===S)||""===S,C=0,j=k.length;j>=0;j--)"."===(S=k[j])?k.splice(j,1):".."===S?(k.splice(j,1),C++):C&&(k.splice(j,1),C--);if(!w&&!x)for(;C--;C)k.unshift("..");!w||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),M&&"/"!==k.join("/").substr(-1)&&k.push("");var A,T=""===k[0]||k[0]&&"/"===k[0].charAt(0);E&&(n.hostname=n.host=T?"":k.length?k.shift():"",(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift()));return(w=w||n.host&&k.length)&&!T&&k.unshift(""),k.length?n.pathname=k.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var a,l=2147483647,c=/^xn--/,u=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,f=String.fromCharCode;function g(e){throw new RangeError(d[e])}function m(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function _(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+m((e=e.replace(h,".")).split("."),t).join(".")}function v(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function y(e){return m(e,(function(e){var t="";return e>65535&&(t+=f((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=f(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,n){var r=0;for(e=n?p(e/700):e>>1,e+=p(e/t);e>455;r+=36)e=p(e/35);return p(r+36*e/(e+38))}function x(e){var t,n,r,i,o,s,a,c,u,h,d,f=[],m=e.length,_=0,v=128,b=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&g("not-basic"),f.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<m;){for(o=_,s=1,a=36;i>=m&&g("invalid-input"),((c=(d=e.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||c>p((l-_)/s))&&g("overflow"),_+=c*s,!(c<(u=a<=b?1:a>=b+26?26:a-b));a+=36)s>p(l/(h=36-u))&&g("overflow"),s*=h;b=w(_-o,t=f.length+1,0==o),p(_/t)>l-v&&g("overflow"),v+=p(_/t),_%=t,f.splice(_++,0,v)}return y(f)}function k(e){var t,n,r,i,o,s,a,c,u,h,d,m,_,y,x,k=[];for(m=(e=v(e)).length,t=128,n=0,o=72,s=0;s<m;++s)(d=e[s])<128&&k.push(f(d));for(r=i=k.length,i&&k.push("-");r<m;){for(a=l,s=0;s<m;++s)(d=e[s])>=t&&d<a&&(a=d);for(a-t>p((l-n)/(_=r+1))&&g("overflow"),n+=(a-t)*_,t=a,s=0;s<m;++s)if((d=e[s])<t&&++n>l&&g("overflow"),d==t){for(c=n,u=36;!(c<(h=u<=o?1:u>=o+26?26:u-o));u+=36)x=c-h,y=36-h,k.push(f(b(h+x%y,0))),c=p(x/y);k.push(f(b(c,0))),o=w(n,_,r==i),n=0,++r}++n,++t}return k.join("")}a={version:"1.4.1",ucs2:{decode:v,encode:y},decode:x,encode:k,toASCII:function(e){return _(e,(function(e){return u.test(e)?"xn--"+k(e):e}))},toUnicode:function(e){return _(e,(function(e){return c.test(e)?x(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return a}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(88)(e),n(17))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(330),t.encode=t.stringify=n(331)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var h,d,p,f,g=e[u].replace(a,"%20"),m=g.indexOf(n);m>=0?(h=g.substr(0,m),d=g.substr(m+1)):(h=g,d=""),p=decodeURIComponent(h),f=decodeURIComponent(d),r(s,p)?i(s[p])?s[p].push(f):s[p]=[s[p],f]:s[p]=f}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(s(e),(function(s){var a=encodeURIComponent(r(s))+n;return i(e[s])?o(e[s],(function(e){return a+encodeURIComponent(r(e))})).join(t):a+encodeURIComponent(r(e[s]))})).join(t):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";e.exports=function(e){for(var t,n=0,r=e.length,i=0;i<r;)n++,(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<r&&56320==(64512&(t=e.charCodeAt(i)))&&i++;return n}},function(e,t,n){"use strict";var r=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),function e(t,n,i,o,s,a,l,c,u){if(i&&"object"==typeof i&&!Array.isArray(i))for(var h in n(i,o,s,a,l,c,u),i){var d=i[h];if(Array.isArray(d)){if(h in r.arrayKeywords)for(var p=0;p<d.length;p++)e(t,n,d[p],o+"/"+h+"/"+p,s,o,h,i,p)}else if(h in r.propsKeywords){if(d&&"object"==typeof d)for(var f in d)e(t,n,d[f],o+"/"+h+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,o,h,i,f)}else(h in r.keywords||t.allKeys&&!(h in r.skipKeywords))&&e(t,n,d,o+"/"+h,s,o,h,i)}}(t,n,e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},function(e,t,n){t.parse=n(335),t.stringify=n(336)},function(e,t){var n,r,i,o,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},a=function(e){throw{name:"SyntaxError",message:e,at:n,text:i}},l=function(e){return e&&e!==r&&a("Expected '"+e+"' instead of '"+r+"'"),r=i.charAt(n),n+=1,r},c=function(){var e,t="";for("-"===r&&(t="-",l("-"));r>="0"&&r<="9";)t+=r,l();if("."===r)for(t+=".";l()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,l(),"-"!==r&&"+"!==r||(t+=r,l());r>="0"&&r<="9";)t+=r,l();if(e=+t,isFinite(e))return e;a("Bad number")},u=function(){var e,t,n,i="";if('"'===r)for(;l();){if('"'===r)return l(),i;if("\\"===r)if(l(),"u"===r){for(n=0,t=0;t<4&&(e=parseInt(l(),16),isFinite(e));t+=1)n=16*n+e;i+=String.fromCharCode(n)}else{if("string"!=typeof s[r])break;i+=s[r]}else i+=r}a("Bad string")},h=function(){for(;r&&r<=" ";)l()};o=function(){switch(h(),r){case"{":return function(){var e,t={};if("{"===r){if(l("{"),h(),"}"===r)return l("}"),t;for(;r;){if(e=u(),h(),l(":"),Object.hasOwnProperty.call(t,e)&&a('Duplicate key "'+e+'"'),t[e]=o(),h(),"}"===r)return l("}"),t;l(","),h()}}a("Bad object")}();case"[":return function(){var e=[];if("["===r){if(l("["),h(),"]"===r)return l("]"),e;for(;r;){if(e.push(o()),h(),"]"===r)return l("]"),e;l(","),h()}}a("Bad array")}();case'"':return u();case"-":return c();default:return r>="0"&&r<="9"?c():function(){switch(r){case"t":return l("t"),l("r"),l("u"),l("e"),!0;case"f":return l("f"),l("a"),l("l"),l("s"),l("e"),!1;case"n":return l("n"),l("u"),l("l"),l("l"),null}a("Unexpected '"+r+"'")}()}},e.exports=function(e,t){var s;return i=e,n=0,r=" ",s=o(),h(),r&&a("Syntax error"),"function"==typeof t?function e(n,r){var i,o,s=n[r];if(s&&"object"==typeof s)for(i in s)Object.prototype.hasOwnProperty.call(s,i)&&(void 0!==(o=e(s,i))?s[i]=o:delete s[i]);return t.call(n,r,s)}({"":s},""):s}},function(e,t){var n,r,i,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(e){return o.lastIndex=0,o.test(e)?'"'+e.replace(o,(function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}e.exports=function(e,t,o){var s;if(n="",r="","number"==typeof o)for(s=0;s<o;s+=1)r+=" ";else"string"==typeof o&&(r=o);if(i=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return function e(t,o){var s,l,c,u,h,d=n,p=o[t];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(t)),"function"==typeof i&&(p=i.call(o,t,p)),typeof p){case"string":return a(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(n+=r,h=[],"[object Array]"===Object.prototype.toString.apply(p)){for(u=p.length,s=0;s<u;s+=1)h[s]=e(s,p)||"null";return c=0===h.length?"[]":n?"[\n"+n+h.join(",\n"+n)+"\n"+d+"]":"["+h.join(",")+"]",n=d,c}if(i&&"object"==typeof i)for(u=i.length,s=0;s<u;s+=1)"string"==typeof(l=i[s])&&(c=e(l,p))&&h.push(a(l)+(n?": ":":")+c);else for(l in p)Object.prototype.hasOwnProperty.call(p,l)&&(c=e(l,p))&&h.push(a(l)+(n?": ":":")+c);return c=0===h.length?"{}":n?"{\n"+n+h.join(",\n"+n)+"\n"+d+"}":"{"+h.join(",")+"}",n=d,c}}("",{"":e})}},function(e,t,n){"use strict";var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,t){this._cache[e]=t},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}},function(e,t,n){"use strict";var r=n(34),i=/^\d\d\d\d-(\d\d)-(\d\d)$/,o=[0,31,29,31,30,31,30,31,31,30,31,30,31],s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,a=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,l=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#.\/;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\:[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\:[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+\-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+\-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn\:uuid\:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~\/]|~0|~1)*)*$|^\#(?:\/(?:[a-z0-9_\-\.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)*)*)$/;function f(e){return e="full"==e?"full":"fast",r.copy(f[e])}function g(e){var t=e.match(i);if(!t)return!1;var n=+t[1],r=+t[2];return n>=1&&n<=12&&r>=1&&r<=o[n]}function m(e,t){var n=e.match(s);if(!n)return!1;var r=n[1],i=n[2],o=n[3],a=n[5];return r<=23&&i<=59&&o<=59&&(!t||a)}e.exports=f,f.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*)(?:\:|\/)\/?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,"uri-template":c,url:u,email:/^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:b,uuid:h,"json-pointer":d,"relative-json-pointer":p},f.full={date:g,time:m,"date-time":function(e){var t=e.split(_);return 2==t.length&&g(t[0])&&m(t[1],!0)},uri:function(e){return v.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'"()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:function(e){return e.length<=255&&a.test(e)},ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:b,uuid:h,"json-pointer":d,"relative-json-pointer":p};var _=/t|\s/i;var v=/\/|\:/;var y=/[^\\]\\Z/;function b(e){if(y.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},function(e,t,n){"use strict";var r=n(340),i=n(34).toHash;e.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","uniqueItems","contains","items"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf"]}],t=["type"];return e.all=i(t),e.types=i(["number","integer","string","array","object","boolean","null"]),e.forEach((function(n){n.rules=n.rules.map((function(n){var i;if("object"==typeof n){var o=Object.keys(n)[0];i=n[o],n=o,i.forEach((function(n){t.push(n),e.all[n]=!0}))}return t.push(n),e.all[n]={keyword:n,code:r[n],implements:i}})),n.type&&(e.types[n.type]=n)})),e.keywords=i(t.concat(["additionalItems","$schema","id","title","description","default","definitions"])),e.custom={},e}},function(e,t,n){"use strict";e.exports={$ref:n(341),allOf:n(342),anyOf:n(343),const:n(344),contains:n(345),dependencies:n(346),enum:n(347),format:n(348),items:n(349),maximum:n(153),minimum:n(153),maxItems:n(154),minItems:n(154),maxLength:n(155),minLength:n(155),maxProperties:n(156),minProperties:n(156),multipleOf:n(350),not:n(351),oneOf:n(352),pattern:n(353),properties:n(354),propertyNames:n(355),required:n(356),uniqueItems:n(357),validate:n(151)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i,o=" ",s=e.level,a=e.dataLevel,l=e.schema[t],c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(a||""),d="valid"+s;if("#"==l||"#/"==l)e.isRoot?(r=e.async,i="validate"):(r=!0===e.root.schema.$async,i="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var f=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){console.error(f),(v=v||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(o+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(o+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var g=o;o=v.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+g+"]); ":o+=" validate.errors = ["+g+"]; return false; ":o+=" var err = "+g+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(o+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,f);console.warn(f),u&&(o+=" if (true) { ")}}else if(p.inline){var m=e.util.copy(e);m.level++;var _="valid"+m.level;m.schema=p.schema,m.schemaPath="",m.errSchemaPath=l,o+=" "+e.validate(m).replace(/validate\.schema/g,p.code)+" ",u&&(o+=" if ("+_+") { ")}else r=!0===p.$async,i=p.code}if(i){var v;(v=v||[]).push(o),o="",e.opts.passContext?o+=" "+i+".call(this, ":o+=" "+i+"( ",o+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var y=o+=" , "+(a?"data"+(a-1||""):"parentData")+" , "+(a?e.dataPathArr[a]:"parentDataProperty")+", rootData)  ";if(o=v.pop(),r){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(o+=" var "+d+"; "),o+=" try { "+e.yieldAwait+" "+y+"; ",u&&(o+=" "+d+" = true; "),o+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(o+=" "+d+" = false; "),o+=" } ",u&&(o+=" if ("+d+") { ")}else o+=" if (!"+y+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",u&&(o+=" else { ")}return o}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.schema[t],o=e.schemaPath+e.util.getProperty(t),s=e.errSchemaPath+"/"+t,a=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,h=l.baseId,d=!0,p=i;if(p)for(var f,g=-1,m=p.length-1;g<m;)f=p[g+=1],e.util.schemaHasRules(f,e.RULES.all)&&(d=!1,l.schema=f,l.schemaPath=o+"["+g+"]",l.errSchemaPath=s+"/"+g,r+="  "+e.validate(l)+" ",l.baseId=h,a&&(r+=" if ("+u+") { ",c+="}"));return a&&(r+=d?" if (true) { ":" "+c.slice(0,-1)+" "),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d="errs__"+i,p=e.util.copy(e),f="";p.level++;var g="valid"+p.level;if(s.every((function(t){return e.util.schemaHasRules(t,e.RULES.all)}))){var m=p.baseId;r+=" var "+d+" = errors; var "+h+" = false;  ";var _=e.compositeRule;e.compositeRule=p.compositeRule=!0;var v=s;if(v)for(var y,b=-1,w=v.length-1;b<w;)y=v[b+=1],p.schema=y,p.schemaPath=a+"["+b+"]",p.errSchemaPath=l+"/"+b,r+="  "+e.validate(p)+" ",p.baseId=m,r+=" "+h+" = "+h+" || "+g+"; if (!"+h+") { ",f+="}";e.compositeRule=p.compositeRule=_,r+=" "+f+" if (!"+h+") {   var err =   ",!1!==e.createErrors?(r+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+=" } else {  errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(r+=" } "),r=e.util.cleanUpCode(r)}else c&&(r+=" if (true) { ");return r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d=e.opts.$data&&s&&s.$data;d&&(r+=" var schema"+i+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; "),d||(r+=" var schema"+i+" = validate.schema"+a+";"),r+="var "+h+" = equal("+u+", schema"+i+"); if (!"+h+") {   ";var p=p||[];p.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should be equal to constant' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var f=r;return r=p.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+f+"]); ":r+=" validate.errors = ["+f+"]; return false; ":r+=" var err = "+f+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" }",c&&(r+=" else { "),r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d="errs__"+i,p=e.util.copy(e);p.level++;var f="valid"+p.level,g="i"+i,m=p.dataLevel=e.dataLevel+1,_="data"+m,v=e.baseId,y=e.util.schemaHasRules(s,e.RULES.all);if(r+="var "+d+" = errors;var "+h+";",y){var b=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=s,p.schemaPath=a,p.errSchemaPath=l,r+=" var "+f+" = false; for (var "+g+" = 0; "+g+" < "+u+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);var w=u+"["+g+"]";p.dataPathArr[m]=g;var x=e.validate(p);p.baseId=v,e.util.varOccurences(x,_)<2?r+=" "+e.util.varReplace(x,_,w)+" ":r+=" var "+_+" = "+w+"; "+x+" ",r+=" if ("+f+") break; }  ",e.compositeRule=p.compositeRule=b,r+="  if (!"+f+") {"}else r+=" if ("+u+".length == 0) {";var k=k||[];k.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should contain a valid item' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var E=r;return r=k.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+E+"]); ":r+=" validate.errors = ["+E+"]; return false; ":r+=" var err = "+E+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { ",y&&(r+="  errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "),e.opts.allErrors&&(r+=" } "),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="errs__"+i,d=e.util.copy(e),p="";d.level++;var f="valid"+d.level,g={},m={},_=e.opts.ownProperties;for(w in s){var v=s[w],y=Array.isArray(v)?m:g;y[w]=v}r+="var "+h+" = errors;";var b=e.errorPath;for(var w in r+="var missing"+i+";",m)if((y=m[w]).length){if(r+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",_&&(r+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){r+=" && ( ";var x=y;if(x)for(var k=-1,E=x.length-1;k<E;){T=x[k+=1],k&&(r+=" || "),r+=" ( ( "+(I=u+(L=e.util.getProperty(T)))+" === undefined ",_&&(r+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(T)+"') "),r+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?T:L)+") ) "}r+=")) {  ";var S="missing"+i,M="' + "+S+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(b,S,!0):b+" + "+S);var C=C||[];C.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+M+"', depsCount: "+y.length+", deps: '"+e.util.escapeQuotes(1==y.length?y[0]:y.join(", "))+"' } ",!1!==e.opts.messages&&(r+=" , message: 'should have ",1==y.length?r+="property "+e.util.escapeQuotes(y[0]):r+="properties "+e.util.escapeQuotes(y.join(", ")),r+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var j=r;r=C.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+j+"]); ":r+=" validate.errors = ["+j+"]; return false; ":r+=" var err = "+j+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{r+=" ) { ";var A=y;if(A)for(var T,P=-1,O=A.length-1;P<O;){T=A[P+=1];var L=e.util.getProperty(T),I=(M=e.util.escapeQuotes(T),u+L);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(b,T,e.opts.jsonPointers)),r+=" if ( "+I+" === undefined ",_&&(r+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(T)+"') "),r+=") {  var err =   ",!1!==e.createErrors?(r+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+M+"', depsCount: "+y.length+", deps: '"+e.util.escapeQuotes(1==y.length?y[0]:y.join(", "))+"' } ",!1!==e.opts.messages&&(r+=" , message: 'should have ",1==y.length?r+="property "+e.util.escapeQuotes(y[0]):r+="properties "+e.util.escapeQuotes(y.join(", ")),r+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}r+=" }   ",c&&(p+="}",r+=" else { ")}e.errorPath=b;var D=d.baseId;for(var w in g){v=g[w];e.util.schemaHasRules(v,e.RULES.all)&&(r+=" "+f+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",_&&(r+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),r+=") { ",d.schema=v,d.schemaPath=a+e.util.getProperty(w),d.errSchemaPath=l+"/"+e.util.escapeFragment(w),r+="  "+e.validate(d)+" ",d.baseId=D,r+=" }  ",c&&(r+=" if ("+f+") { ",p+="}"))}return c&&(r+="   "+p+" if ("+h+" == errors) {"),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d=e.opts.$data&&s&&s.$data;d&&(r+=" var schema"+i+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ");var p="i"+i,f="schema"+i;d||(r+=" var "+f+" = validate.schema"+a+";"),r+="var "+h+";",d&&(r+=" if (schema"+i+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+i+")) "+h+" = false; else {"),r+=h+" = false;for (var "+p+"=0; "+p+"<"+f+".length; "+p+"++) if (equal("+u+", "+f+"["+p+"])) { "+h+" = true; break; }",d&&(r+="  }  "),r+=" if (!"+h+") {   ";var g=g||[];g.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(r+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var m=r;return r=g.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+m+"]); ":r+=" validate.errors = ["+m+"]; return false; ":r+=" var err = "+m+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" }",c&&(r+=" else { "),r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||"");if(!1===e.opts.format)return c&&(r+=" if (true) { "),r;var h,d=e.opts.$data&&s&&s.$data;d?(r+=" var schema"+i+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",h="schema"+i):h=s;var p=e.opts.unknownFormats,f=Array.isArray(p);if(d){r+=" var "+(g="format"+i)+" = formats["+h+"]; var "+(m="isObject"+i)+" = typeof "+g+" == 'object' && !("+g+" instanceof RegExp) && "+g+".validate; var "+(_="formatType"+i)+" = "+m+" && "+g+".type || 'string'; if ("+m+") { ",e.async&&(r+=" var async"+i+" = "+g+".async; "),r+=" "+g+" = "+g+".validate; } if (  ",d&&(r+=" ("+h+" !== undefined && typeof "+h+" != 'string') || "),r+=" (","ignore"!=p&&(r+=" ("+h+" && !"+g+" ",f&&(r+=" && self._opts.unknownFormats.indexOf("+h+") == -1 "),r+=") || "),r+=" ("+g+" && "+_+" == '"+n+"' && !(typeof "+g+" == 'function' ? ",e.async?r+=" (async"+i+" ? "+e.yieldAwait+" "+g+"("+u+") : "+g+"("+u+")) ":r+=" "+g+"("+u+") ",r+=" : "+g+".test("+u+"))))) {"}else{var g;if(!(g=e.formats[s])){if("ignore"==p)return console.warn('unknown format "'+s+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(r+=" if (true) { "),r;if(f&&p.indexOf(s)>=0)return c&&(r+=" if (true) { "),r;throw new Error('unknown format "'+s+'" is used in schema at path "'+e.errSchemaPath+'"')}var m,_=(m="object"==typeof g&&!(g instanceof RegExp)&&g.validate)&&g.type||"string";if(m){var v=!0===g.async;g=g.validate}if(_!=n)return c&&(r+=" if (true) { "),r;if(v){if(!e.async)throw new Error("async format in sync schema");var y="formats"+e.util.getProperty(s)+".validate";r+=" if (!("+e.yieldAwait+" "+y+"("+u+"))) { "}else{r+=" if (! ";y="formats"+e.util.getProperty(s);m&&(y+=".validate"),r+="function"==typeof g?" "+y+"("+u+") ":" "+y+".test("+u+") ",r+=") { "}}var b=b||[];b.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format:  ",r+=d?""+h:""+e.util.toQuotedString(s),r+="  } ",!1!==e.opts.messages&&(r+=" , message: 'should match format \"",r+=d?"' + "+h+" + '":""+e.util.escapeQuotes(s),r+="\"' "),e.opts.verbose&&(r+=" , schema:  ",r+=d?"validate.schema"+a:""+e.util.toQuotedString(s),r+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var w=r;return r=b.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+w+"]); ":r+=" validate.errors = ["+w+"]; return false; ":r+=" var err = "+w+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",c&&(r+=" else { "),r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d="errs__"+i,p=e.util.copy(e),f="";p.level++;var g="valid"+p.level,m="i"+i,_=p.dataLevel=e.dataLevel+1,v="data"+_,y=e.baseId;if(r+="var "+d+" = errors;var "+h+";",Array.isArray(s)){var b=e.schema.additionalItems;if(!1===b){r+=" "+h+" = "+u+".length <= "+s.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",r+="  if (!"+h+") {   ";var x=x||[];x.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+s.length+" } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have more than "+s.length+" items' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var k=r;r=x.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+k+"]); ":r+=" validate.errors = ["+k+"]; return false; ":r+=" var err = "+k+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",l=w,c&&(f+="}",r+=" else { ")}var E=s;if(E)for(var S,M=-1,C=E.length-1;M<C;)if(S=E[M+=1],e.util.schemaHasRules(S,e.RULES.all)){r+=" "+g+" = true; if ("+u+".length > "+M+") { ";var j=u+"["+M+"]";p.schema=S,p.schemaPath=a+"["+M+"]",p.errSchemaPath=l+"/"+M,p.errorPath=e.util.getPathExpr(e.errorPath,M,e.opts.jsonPointers,!0),p.dataPathArr[_]=M;var A=e.validate(p);p.baseId=y,e.util.varOccurences(A,v)<2?r+=" "+e.util.varReplace(A,v,j)+" ":r+=" var "+v+" = "+j+"; "+A+" ",r+=" }  ",c&&(r+=" if ("+g+") { ",f+="}")}if("object"==typeof b&&e.util.schemaHasRules(b,e.RULES.all)){p.schema=b,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",r+=" "+g+" = true; if ("+u+".length > "+s.length+") {  for (var "+m+" = "+s.length+"; "+m+" < "+u+".length; "+m+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);j=u+"["+m+"]";p.dataPathArr[_]=m;A=e.validate(p);p.baseId=y,e.util.varOccurences(A,v)<2?r+=" "+e.util.varReplace(A,v,j)+" ":r+=" var "+v+" = "+j+"; "+A+" ",c&&(r+=" if (!"+g+") break; "),r+=" } }  ",c&&(r+=" if ("+g+") { ",f+="}")}}else if(e.util.schemaHasRules(s,e.RULES.all)){p.schema=s,p.schemaPath=a,p.errSchemaPath=l,r+="  for (var "+m+" = 0; "+m+" < "+u+".length; "+m+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);j=u+"["+m+"]";p.dataPathArr[_]=m;A=e.validate(p);p.baseId=y,e.util.varOccurences(A,v)<2?r+=" "+e.util.varReplace(A,v,j)+" ":r+=" var "+v+" = "+j+"; "+A+" ",c&&(r+=" if (!"+g+") break; "),r+=" }"}return c&&(r+=" "+f+" if ("+d+" == errors) {"),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",r="schema"+o):r=a,i+="var division"+o+";if (",d&&(i+=" "+r+" !== undefined && ( typeof "+r+" != 'number' || "),i+=" (division"+o+" = "+h+" / "+r+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+o+" !== parseInt(division"+o+") ",i+=" ) ",d&&(i+="  )  "),i+=" ) {   ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=d?"' + "+r:r+"'"),e.opts.verbose&&(i+=" , schema:  ",i+=d?"validate.schema"+l:""+a,i+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var f=i;return i=p.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="errs__"+i,d=e.util.copy(e);d.level++;var p="valid"+d.level;if(e.util.schemaHasRules(s,e.RULES.all)){d.schema=s,d.schemaPath=a,d.errSchemaPath=l,r+=" var "+h+" = errors;  ";var f,g=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.opts.allErrors&&(f=d.opts.allErrors,d.opts.allErrors=!1),r+=" "+e.validate(d)+" ",d.createErrors=!0,f&&(d.opts.allErrors=f),e.compositeRule=d.compositeRule=g,r+=" if ("+p+") {   ";var m=m||[];m.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var _=r;r=m.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+_+"]); ":r+=" validate.errors = ["+_+"]; return false; ":r+=" var err = "+_+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else {  errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(r+=" } ")}else r+="  var err =   ",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(r+=" if (false) { ");return r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d="errs__"+i,p=e.util.copy(e),f="";p.level++;var g="valid"+p.level;r+="var "+d+" = errors;var prevValid"+i+" = false;var "+h+" = false;";var m=p.baseId,_=e.compositeRule;e.compositeRule=p.compositeRule=!0;var v=s;if(v)for(var y,b=-1,w=v.length-1;b<w;)y=v[b+=1],e.util.schemaHasRules(y,e.RULES.all)?(p.schema=y,p.schemaPath=a+"["+b+"]",p.errSchemaPath=l+"/"+b,r+="  "+e.validate(p)+" ",p.baseId=m):r+=" var "+g+" = true; ",b&&(r+=" if ("+g+" && prevValid"+i+") "+h+" = false; else { ",f+="}"),r+=" if ("+g+") "+h+" = prevValid"+i+" = true;";return e.compositeRule=p.compositeRule=_,r+=f+"if (!"+h+") {   var err =   ",!1!==e.createErrors?(r+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+="} else {  errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }",e.opts.allErrors&&(r+=" } "),r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",r="schema"+o):r=a,i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'string') || "),i+=" !"+(d?"(new RegExp("+r+"))":e.usePattern(a))+".test("+h+") ) {   ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern:  ",i+=d?""+r:""+e.util.toQuotedString(a),i+="  } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=d?"' + "+r+" + '":""+e.util.escapeQuotes(a),i+="\"' "),e.opts.verbose&&(i+=" , schema:  ",i+=d?"validate.schema"+l:""+e.util.toQuotedString(a),i+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var f=i;return i=p.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d="errs__"+i,p=e.util.copy(e),f="";p.level++;var g="valid"+p.level,m="key"+i,_="idx"+i,v=p.dataLevel=e.dataLevel+1,y="data"+v,b="dataProperties"+i,w=Object.keys(s||{}),x=e.schema.patternProperties||{},k=Object.keys(x),E=e.schema.additionalProperties,S=w.length||k.length,M=!1===E,C="object"==typeof E&&Object.keys(E).length,j=e.opts.removeAdditional,A=M||C||j,T=e.opts.ownProperties,P=e.baseId,O=e.schema.required;if(O&&(!e.opts.v5||!O.$data)&&O.length<e.opts.loopRequired)var L=e.util.toHash(O);if(e.opts.patternGroups)var I=e.schema.patternGroups||{},D=Object.keys(I);if(r+="var "+d+" = errors;var "+g+" = true;",T&&(r+=" var "+b+" = undefined;"),A){if(r+=T?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+_+"=0; "+_+"<"+b+".length; "+_+"++) { var "+m+" = "+b+"["+_+"]; ":" for (var "+m+" in "+u+") { ",S){if(r+=" var isAdditional"+i+" = !(false ",w.length)if(w.length>5)r+=" || validate.schema"+a+"["+m+"] ";else{var R=w;if(R)for(var B=-1,z=R.length-1;B<z;)Z=R[B+=1],r+=" || "+m+" == "+e.util.toQuotedString(Z)+" "}if(k.length){var N=k;if(N)for(var F=-1,U=N.length-1;F<U;)le=N[F+=1],r+=" || "+e.usePattern(le)+".test("+m+") "}if(e.opts.patternGroups&&D.length){var q=D;if(q){F=-1;for(var H=q.length-1;F<H;)de=q[F+=1],r+=" || "+e.usePattern(de)+".test("+m+") "}}r+=" ); if (isAdditional"+i+") { "}if("all"==j)r+=" delete "+u+"["+m+"]; ";else{var W=e.errorPath,V="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),M)if(j)r+=" delete "+u+"["+m+"]; ";else{r+=" "+g+" = false; ";var $=l;l=e.errSchemaPath+"/additionalProperties",(we=we||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { additionalProperty: '"+V+"' } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have additional properties' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var K=r;r=we.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+K+"]); ":r+=" validate.errors = ["+K+"]; return false; ":r+=" var err = "+K+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=$,c&&(r+=" break; ")}else if(C)if("failing"==j){r+=" var "+d+" = errors;  ";var G=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=E,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var Y=u+"["+m+"]";p.dataPathArr[v]=m;var J=e.validate(p);p.baseId=P,e.util.varOccurences(J,y)<2?r+=" "+e.util.varReplace(J,y,Y)+" ":r+=" var "+y+" = "+Y+"; "+J+" ",r+=" if (!"+g+") { errors = "+d+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+u+"["+m+"]; }  ",e.compositeRule=p.compositeRule=G}else{p.schema=E,p.schemaPath=e.schemaPath+".additionalProperties",p.errSchemaPath=e.errSchemaPath+"/additionalProperties",p.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);Y=u+"["+m+"]";p.dataPathArr[v]=m;J=e.validate(p);p.baseId=P,e.util.varOccurences(J,y)<2?r+=" "+e.util.varReplace(J,y,Y)+" ":r+=" var "+y+" = "+Y+"; "+J+" ",c&&(r+=" if (!"+g+") break; ")}e.errorPath=W}S&&(r+=" } "),r+=" }  ",c&&(r+=" if ("+g+") { ",f+="}")}var X=e.opts.useDefaults&&!e.compositeRule;if(w.length){var Q=w;if(Q)for(var Z,ee=-1,te=Q.length-1;ee<te;){var ne=s[Z=Q[ee+=1]];if(e.util.schemaHasRules(ne,e.RULES.all)){var re=e.util.getProperty(Z),ie=(Y=u+re,X&&void 0!==ne.default);p.schema=ne,p.schemaPath=a+re,p.errSchemaPath=l+"/"+e.util.escapeFragment(Z),p.errorPath=e.util.getPath(e.errorPath,Z,e.opts.jsonPointers),p.dataPathArr[v]=e.util.toQuotedString(Z);J=e.validate(p);if(p.baseId=P,e.util.varOccurences(J,y)<2){J=e.util.varReplace(J,y,Y);var oe=Y}else{oe=y;r+=" var "+y+" = "+Y+"; "}if(ie)r+=" "+J+" ";else{if(L&&L[Z]){r+=" if ( "+oe+" === undefined ",T&&(r+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(Z)+"') "),r+=") { "+g+" = false; ";W=e.errorPath,$=l;var se=e.util.escapeQuotes(Z);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(W,Z,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(we=we||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+se+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+se+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";K=r;r=we.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+K+"]); ":r+=" validate.errors = ["+K+"]; return false; ":r+=" var err = "+K+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=$,e.errorPath=W,r+=" } else { "}else c?(r+=" if ( "+oe+" === undefined ",T&&(r+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(Z)+"') "),r+=") { "+g+" = true; } else { "):(r+=" if ("+oe+" !== undefined ",T&&(r+=" &&   Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(Z)+"') "),r+=" ) { ");r+=" "+J+" } "}}c&&(r+=" if ("+g+") { ",f+="}")}}if(k.length){var ae=k;if(ae)for(var le,ce=-1,ue=ae.length-1;ce<ue;){ne=x[le=ae[ce+=1]];if(e.util.schemaHasRules(ne,e.RULES.all)){p.schema=ne,p.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(le),p.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(le),r+=T?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+_+"=0; "+_+"<"+b+".length; "+_+"++) { var "+m+" = "+b+"["+_+"]; ":" for (var "+m+" in "+u+") { ",r+=" if ("+e.usePattern(le)+".test("+m+")) { ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);Y=u+"["+m+"]";p.dataPathArr[v]=m;J=e.validate(p);p.baseId=P,e.util.varOccurences(J,y)<2?r+=" "+e.util.varReplace(J,y,Y)+" ":r+=" var "+y+" = "+Y+"; "+J+" ",c&&(r+=" if (!"+g+") break; "),r+=" } ",c&&(r+=" else "+g+" = true; "),r+=" }  ",c&&(r+=" if ("+g+") { ",f+="}")}}}if(e.opts.patternGroups&&D.length){var he=D;if(he)for(var de,pe=-1,fe=he.length-1;pe<fe;){var ge=I[de=he[pe+=1]];ne=ge.schema;if(e.util.schemaHasRules(ne,e.RULES.all)){p.schema=ne,p.schemaPath=e.schemaPath+".patternGroups"+e.util.getProperty(de)+".schema",p.errSchemaPath=e.errSchemaPath+"/patternGroups/"+e.util.escapeFragment(de)+"/schema",r+=" var pgPropCount"+i+" = 0;  ",r+=T?" "+b+" = "+b+" || Object.keys("+u+"); for (var "+_+"=0; "+_+"<"+b+".length; "+_+"++) { var "+m+" = "+b+"["+_+"]; ":" for (var "+m+" in "+u+") { ",r+=" if ("+e.usePattern(de)+".test("+m+")) { pgPropCount"+i+"++; ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);Y=u+"["+m+"]";p.dataPathArr[v]=m;J=e.validate(p);p.baseId=P,e.util.varOccurences(J,y)<2?r+=" "+e.util.varReplace(J,y,Y)+" ":r+=" var "+y+" = "+Y+"; "+J+" ",c&&(r+=" if (!"+g+") break; "),r+=" } ",c&&(r+=" else "+g+" = true; "),r+=" }  ",c&&(r+=" if ("+g+") { ",f+="}");var me=ge.minimum,_e=ge.maximum;if(void 0!==me||void 0!==_e){r+=" var "+h+" = true; ";$=l;if(void 0!==me){var ve=me,ye="minimum",be="less";r+=" "+h+" = pgPropCount"+i+" >= "+me+"; ",l=e.errSchemaPath+"/patternGroups/minimum",r+="  if (!"+h+") {   ",(we=we||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { reason: '"+ye+"', limit: "+ve+", pattern: '"+e.util.escapeQuotes(de)+"' } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have "+be+" than "+ve+' properties matching pattern "'+e.util.escapeQuotes(de)+"\"' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";K=r;r=we.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+K+"]); ":r+=" validate.errors = ["+K+"]; return false; ":r+=" var err = "+K+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",void 0!==_e&&(r+=" else ")}if(void 0!==_e){var we;ve=_e,ye="maximum",be="more";r+=" "+h+" = pgPropCount"+i+" <= "+_e+"; ",l=e.errSchemaPath+"/patternGroups/maximum",r+="  if (!"+h+") {   ",(we=we||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { reason: '"+ye+"', limit: "+ve+", pattern: '"+e.util.escapeQuotes(de)+"' } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have "+be+" than "+ve+' properties matching pattern "'+e.util.escapeQuotes(de)+"\"' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";K=r;r=we.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+K+"]); ":r+=" validate.errors = ["+K+"]; return false; ":r+=" var err = "+K+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } "}l=$,c&&(r+=" if ("+h+") { ",f+="}")}}}}return c&&(r+=" "+f+" if ("+d+" == errors) {"),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="errs__"+i,d=e.util.copy(e);d.level++;var p="valid"+d.level;if(e.util.schemaHasRules(s,e.RULES.all)){d.schema=s,d.schemaPath=a,d.errSchemaPath=l;var f="key"+i,g="idx"+i,m="i"+i,_="' + "+f+" + '",v="data"+(d.dataLevel=e.dataLevel+1),y="dataProperties"+i,b=e.opts.ownProperties,w=e.baseId;r+=" var "+h+" = errors; ",b&&(r+=" var "+y+" = undefined; "),r+=b?" "+y+" = "+y+" || Object.keys("+u+"); for (var "+g+"=0; "+g+"<"+y+".length; "+g+"++) { var "+f+" = "+y+"["+g+"]; ":" for (var "+f+" in "+u+") { ",r+=" var startErrs"+i+" = errors; ";var x=f,k=e.compositeRule;e.compositeRule=d.compositeRule=!0;var E=e.validate(d);d.baseId=w,e.util.varOccurences(E,v)<2?r+=" "+e.util.varReplace(E,v,x)+" ":r+=" var "+v+" = "+x+"; "+E+" ",e.compositeRule=d.compositeRule=k,r+=" if (!"+p+") { for (var "+m+"=startErrs"+i+"; "+m+"<errors; "+m+"++) { vErrors["+m+"].propertyName = "+f+"; }   var err =   ",!1!==e.createErrors?(r+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { propertyName: '"+_+"' } ",!1!==e.opts.messages&&(r+=" , message: 'property name \\'"+_+"\\' is invalid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),c&&(r+=" break; "),r+=" } }"}return c&&(r+="  if ("+h+" == errors) {"),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d=e.opts.$data&&s&&s.$data;d&&(r+=" var schema"+i+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ");var p="schema"+i;if(!d)if(s.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var f=[],g=s;if(g)for(var m,_=-1,v=g.length-1;_<v;){m=g[_+=1];var y=e.schema.properties[m];y&&e.util.schemaHasRules(y,e.RULES.all)||(f[f.length]=m)}}else f=s;if(d||f.length){var b=e.errorPath,w=d||f.length>=e.opts.loopRequired,x=e.opts.ownProperties;if(c)if(r+=" var missing"+i+"; ",w){d||(r+=" var "+p+" = validate.schema"+a+"; ");var k="' + "+(A="schema"+i+"["+(M="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,A,e.opts.jsonPointers)),r+=" var "+h+" = true; ",d&&(r+=" if (schema"+i+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+i+")) "+h+" = false; else {"),r+=" for (var "+M+" = 0; "+M+" < "+p+".length; "+M+"++) { "+h+" = "+u+"["+p+"["+M+"]] !== undefined ",x&&(r+=" &&   Object.prototype.hasOwnProperty.call("+u+", "+p+"["+M+"]) "),r+="; if (!"+h+") break; } ",d&&(r+="  }  "),r+="  if (!"+h+") {   ",(j=j||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+k+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+k+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var E=r;r=j.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+E+"]); ":r+=" validate.errors = ["+E+"]; return false; ":r+=" var err = "+E+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { "}else{r+=" if ( ";var S=f;if(S)for(var M=-1,C=S.length-1;M<C;){P=S[M+=1],M&&(r+=" || "),r+=" ( ( "+(D=u+(I=e.util.getProperty(P)))+" === undefined ",x&&(r+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(P)+"') "),r+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?P:I)+") ) "}r+=") {  ";var j;k="' + "+(A="missing"+i)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(b,A,!0):b+" + "+A),(j=j||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+k+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+k+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";E=r;r=j.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+E+"]); ":r+=" validate.errors = ["+E+"]; return false; ":r+=" var err = "+E+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { "}else if(w){d||(r+=" var "+p+" = validate.schema"+a+"; ");var A;k="' + "+(A="schema"+i+"["+(M="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,A,e.opts.jsonPointers)),d&&(r+=" if ("+p+" && !Array.isArray("+p+")) {  var err =   ",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+k+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+k+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),r+=" for (var "+M+" = 0; "+M+" < "+p+".length; "+M+"++) { if ("+u+"["+p+"["+M+"]] === undefined ",x&&(r+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+p+"["+M+"]) "),r+=") {  var err =   ",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+k+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+k+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",d&&(r+="  }  ")}else{var T=f;if(T)for(var P,O=-1,L=T.length-1;O<L;){P=T[O+=1];var I=e.util.getProperty(P),D=(k=e.util.escapeQuotes(P),u+I);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(b,P,e.opts.jsonPointers)),r+=" if ( "+D+" === undefined ",x&&(r+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(P)+"') "),r+=") {  var err =   ",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+k+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+k+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=b}else c&&(r+=" if (true) {");return r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(s||""),d="valid"+o,p=e.opts.$data&&a&&a.$data;if(p?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",r="schema"+o):r=a,(a||p)&&!1!==e.opts.uniqueItems){p&&(i+=" var "+d+"; if ("+r+" === false || "+r+" === undefined) "+d+" = true; else if (typeof "+r+" != 'boolean') "+d+" = false; else { "),i+=" var "+d+" = true; if ("+h+".length > 1) { var i = "+h+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+d+" = false; break outer; } } } } ",p&&(i+="  }  "),i+=" if (!"+d+") {   ";var f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema:  ",i+=p?"validate.schema"+l:""+a,i+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var g=i;i=f.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",u&&(i+=" else { ")}else u&&(i+=" if (true) { ");return i}},function(e,t,n){"use strict";var r=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,t){for(var n=0;n<t.length;n++){e=JSON.parse(JSON.stringify(e));var i,o=t[n].split("/"),s=e;for(i=1;i<o.length;i++)s=s[o[i]];for(i=0;i<r.length;i++){var a=r[i],l=s[a];l&&(s[a]={anyOf:[l,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#"}]})}}return e}},function(e,t,n){"use strict";e.exports=function(e){var t=e._opts.defaultMeta,n="string"==typeof t?{$ref:t}:e.getSchema("http://json-schema.org/draft-06/schema")?{$ref:"http://json-schema.org/draft-06/schema"}:{};e.addKeyword("patternGroups",{metaSchema:{type:"object",additionalProperties:{type:"object",required:["schema"],properties:{maximum:{type:"integer",minimum:0},minimum:{type:"integer",minimum:0},schema:n},additionalProperties:!1}}}),e.RULES.all.properties.implements.push("patternGroups")}},function(e,t,n){"use strict";var r=n(90).MissingRef;e.exports=function e(t,n,i){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof n&&(i=n,n=void 0);var s=a(t).then((function(){var e=o._addSchema(t,void 0,n);return e.validate||function e(t){try{return o._compile(t)}catch(e){if(e instanceof r)return i(e);throw e}function i(r){var i=r.missingSchema;if(c(i))throw new Error("Schema "+i+" is loaded but "+r.missingRef+" cannot be resolved");var s=o._loadingSchemas[i];return s||(s=o._loadingSchemas[i]=o._opts.loadSchema(i)).then(l,l),s.then((function(e){if(!c(i))return a(e).then((function(){c(i)||o.addSchema(e,i,void 0,n)}))})).then((function(){return e(t)}));function l(){delete o._loadingSchemas[i]}function c(e){return o._refs[e]||o._schemas[e]}}}(e)}));i&&s.then((function(e){i(null,e)}),i);return s;function a(t){var n=t.$schema;return n&&!o.getSchema(n)?e.call(o,{$ref:n},!0):Promise.resolve()}}},function(e,t,n){"use strict";var r=/^[a-z_$][a-z0-9_$\-]*$/i,i=n(362);e.exports={add:function(e,t){var n=this.RULES;if(n.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!r.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){if(t.macro&&void 0!==t.valid)throw new Error('"valid" option cannot be used with macro keywords');var o=t.type;if(Array.isArray(o)){var s,a=o.length;for(s=0;s<a;s++)h(o[s]);for(s=0;s<a;s++)u(e,o[s],t)}else o&&h(o),u(e,o,t);var l=!0===t.$data&&this._opts.$data;if(l&&!t.validate)throw new Error('$data support: "validate" function is not defined');var c=t.metaSchema;c&&(l&&(c={anyOf:[c,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#"}]}),t.validateSchema=this.compile(c,!0))}function u(e,t,r){for(var o,s=0;s<n.length;s++){var a=n[s];if(a.type==t){o=a;break}}o||(o={type:t,rules:[]},n.push(o));var l={keyword:e,definition:r,custom:!0,code:i,implements:r.implements};o.rules.push(l),n.custom[e]=l}function h(e){if(!n.types[e])throw new Error("Unknown type "+e)}n.keywords[e]=n.all[e]=!0},get:function(e){var t=this.RULES.custom[e];return t?t.definition:this.RULES.keywords[e]||!1},remove:function(e){var t=this.RULES;delete t.keywords[e],delete t.all[e],delete t.custom[e];for(var n=0;n<t.length;n++)for(var r=t[n].rules,i=0;i<r.length;i++)if(r[i].keyword==e){r.splice(i,1);break}}}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i,o=" ",s=e.level,a=e.dataLevel,l=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,h=!e.opts.allErrors,d="data"+(a||""),p="valid"+s,f="errs__"+s,g=e.opts.$data&&l&&l.$data;g?(o+=" var schema"+s+" = "+e.util.getData(l.$data,a,e.dataPathArr)+"; ",i="schema"+s):i=l;var m,_,v,y,b,w="definition"+s,x=this.definition,k="";if(g&&x.$data){b="keywordValidate"+s;var E=x.validateSchema;o+=" var "+w+" = RULES.custom['"+t+"'].definition; var "+b+" = "+w+".validate;"}else{if(!(y=e.useCustomRule(this,l,e.schema,e)))return;i="validate.schema"+c,b=y.code,m=x.compile,_=x.inline,v=x.macro}var S=b+".errors",M="i"+s,C="ruleErr"+s,j=x.async;if(j&&!e.async)throw new Error("async keyword in sync schema");if(_||v||(o+=S+" = null;"),o+="var "+f+" = errors;var "+p+";",g&&x.$data&&(k+="}",o+=" if ("+i+" === undefined) { "+p+" = true; } else { ",E&&(k+="}",o+=" "+p+" = "+w+".validateSchema("+i+"); if ("+p+") { ")),_)x.statements?o+=" "+y.validate+" ":o+=" "+p+" = "+y.validate+"; ";else if(v){var A=e.util.copy(e);k="";A.level++;var T="valid"+A.level;A.schema=y.validate,A.schemaPath="";var P=e.compositeRule;e.compositeRule=A.compositeRule=!0;var O=e.validate(A).replace(/validate\.schema/g,b);e.compositeRule=A.compositeRule=P,o+=" "+O}else{(R=R||[]).push(o),o="",o+="  "+b+".call( ",e.opts.passContext?o+="this":o+="self",m||!1===x.schema?o+=" , "+d+" ":o+=" , "+i+" , "+d+" , validate.schema"+e.schemaPath+" ",o+=" , (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var L=a?"data"+(a-1||""):"parentData",I=a?e.dataPathArr[a]:"parentDataProperty",D=o+=" , "+L+" , "+I+" , rootData )  ";o=R.pop(),!1===x.errors?(o+=" "+p+" = ",j&&(o+=""+e.yieldAwait),o+=D+"; "):o+=j?" var "+(S="customErrors"+s)+" = null; try { "+p+" = "+e.yieldAwait+D+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+S+" = e.errors; else throw e; } ":" "+S+" = null; "+p+" = "+D+"; "}if(x.modifying&&(o+=" if ("+L+") "+d+" = "+L+"["+I+"];"),o+=""+k,x.valid)h&&(o+=" if (true) { ");else{var R;o+=" if ( ",void 0===x.valid?(o+=" !",o+=v?""+T:""+p):o+=" "+!x.valid+" ",o+=") { ",r=this.keyword,(R=R||[]).push(o),o="",(R=R||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(r||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var B=o;o=R.pop(),!e.compositeRule&&h?e.async?o+=" throw new ValidationError(["+B+"]); ":o+=" validate.errors = ["+B+"]; return false; ":o+=" var err = "+B+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var z=o;o=R.pop(),_?x.errors?"full"!=x.errors&&(o+="  for (var "+M+"="+f+"; "+M+"<errors; "+M+"++) { var "+C+" = vErrors["+M+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+C+".schemaPath === undefined) { "+C+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(o+=" "+C+".schema = "+i+"; "+C+".data = "+d+"; "),o+=" } "):!1===x.errors?o+=" "+z+" ":(o+=" if ("+f+" == errors) { "+z+" } else {  for (var "+M+"="+f+"; "+M+"<errors; "+M+"++) { var "+C+" = vErrors["+M+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+C+".schemaPath === undefined) { "+C+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(o+=" "+C+".schema = "+i+"; "+C+".data = "+d+"; "),o+=" } } "):v?(o+="   var err =   ",!1!==e.createErrors?(o+=" { keyword: '"+(r||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ",o+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&h&&(e.async?o+=" throw new ValidationError(vErrors); ":o+=" validate.errors = vErrors; return false; ")):!1===x.errors?o+=" "+z+" ":(o+=" if (Array.isArray("+S+")) { if (vErrors === null) vErrors = "+S+"; else vErrors = vErrors.concat("+S+"); errors = vErrors.length;  for (var "+M+"="+f+"; "+M+"<errors; "+M+"++) { var "+C+" = vErrors["+M+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+";  "+C+'.schemaPath = "'+u+'";  ',e.opts.verbose&&(o+=" "+C+".schema = "+i+"; "+C+".data = "+d+"; "),o+=" } } else { "+z+" } "),o+=" } ",h&&(o+=" else { ")}return o}},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-06/schema#","$id":"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#","description":"Meta-schema for $data reference (JSON-schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),i=n(6);t.IStateDB=new r.Token("@jupyterlab/coreutils:IStateDB");var o=function(){function e(e){var t=this;this.maxLength=2e3,this._changed=new i.Signal(this);var n=e.namespace,r=e.transform;this.namespace=n,this._ready=r?r.then((function(e){var n=e.contents;switch(e.type){case"cancel":return;case"clear":return void t._clear();case"merge":return void t._merge(n||{});case"overwrite":return void t._overwrite(n||{});default:return}})):Promise.resolve(void 0)}return Object.defineProperty(e.prototype,"changed",{get:function(){return this._changed},enumerable:!0,configurable:!0}),e.prototype.clear=function(e){var t=this;return void 0===e&&(e=!1),this._ready.then((function(){t._clear(),e||t._changed.emit({id:null,type:"clear"})}))},e.prototype.fetch=function(e){var t=this;return this._ready.then((function(){var n=t.namespace+":"+e,r=window.localStorage.getItem(n);if(r)return JSON.parse(r).v}))},e.prototype.fetchNamespace=function(e){var t=this;return this._ready.then((function(){for(var n=window.localStorage,r=t.namespace+":"+e+":",i=[],o=n.length;o;){var s=n.key(--o);if(s&&0===s.indexOf(r)){var a=n.getItem(s);try{var l=JSON.parse(a);i.push({id:s.replace(t.namespace+":",""),value:l?l.v:void 0})}catch(e){console.warn(e),n.removeItem(s)}}}return i}))},e.prototype.remove=function(e){var t=this;return this._ready.then((function(){window.localStorage.removeItem(t.namespace+":"+e),t._changed.emit({id:e,type:"remove"})}))},e.prototype.save=function(e,t){var n=this;return this._ready.then((function(){n._save(e,t),n._changed.emit({id:e,type:"save"})}))},e.prototype.toJSON=function(){var e=this;return this._ready.then((function(){for(var t=window.localStorage,n=e.namespace+":",r={},i=t.length;i;){var o=t.key(--i);if(o&&0===o.indexOf(n)){var s=t.getItem(o);try{var a=JSON.parse(s);a&&(r[o.replace(n,"")]=a.v)}catch(e){console.warn(e),t.removeItem(o)}}}return r}))},e.prototype._clear=function(){for(var e=window.localStorage,t=this.namespace+":",n=e.length;n;){var r=e.key(--n);r&&0===r.indexOf(t)&&e.removeItem(r)}},e.prototype._merge=function(e){var t=this;Object.keys(e).forEach((function(n){t._save(n,e[n])}))},e.prototype._overwrite=function(e){this._clear(),this._merge(e)},e.prototype._save=function(e,t){var n=this.namespace+":"+e,r={v:t},i=JSON.stringify(r),o=i.length,s=this.maxLength;if(o>s)throw new Error("Data length ("+o+") exceeds maximum ("+s+")");window.localStorage.setItem(n,i)},e}();t.StateDB=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){var t="𝐚".length>1;e.jsIndexToCharIndex=function(e,n){if(t)return e;for(var r=e,i=0;i+1<n.length&&i<e;i++){var o=n.charCodeAt(i);if(o>=55296&&o<=56319){var s=n.charCodeAt(i+1);s>=56320&&s<=57343&&(r--,i++)}}return r},e.charIndexToJsIndex=function(e,n){if(t)return e;for(var r=e,i=0;i+1<n.length&&i<r;i++){var o=n.charCodeAt(i);if(o>=55296&&o<=56319){var s=n.charCodeAt(i+1);s>=56320&&s<=57343&&(r++,i++)}}return r}}(t.Text||(t.Text={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7);!function(e){e.formatHuman=function(e){var t=r(e).fromNow();return t="a few seconds ago"===t?"seconds ago":t},e.format=function(e,t){return void 0===t&&(t="YYYY-MM-DD HH:mm"),r(e).format(t)}}(t.Time||(t.Time={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uuid=function(e){void 0===e&&(e=32);for(var t=new Array(e),n="0123456789abcdef".length,r=0;r<e;r++)t[r]="0123456789abcdef".charAt(Math.floor(Math.random()*n));return t.join("")}},function(e,t,n){"use strict";function r(e,t,n){if(!e.hasOwnProperty(t))throw Error("Missing property '"+t+"'");if(void 0!==n){var r=!0,i=e[t];switch(n){case"array":r=Array.isArray(i);break;case"object":r=void 0!==i;break;default:r=typeof i===n}if(!r)throw new Error("Property '"+t+"' is not of type '"+n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.validateContentsModel=function(e){r(e,"name","string"),r(e,"path","string"),r(e,"type","string"),r(e,"created","string"),r(e,"last_modified","string"),r(e,"mimetype","object"),r(e,"content","object"),r(e,"format","object")},t.validateCheckpointModel=function(e){r(e,"id","string"),r(e,"last_modified","string")}},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(18),s=n(3),a=n(12),l=n(45),c=n(6),u=n(14),h=n(371),d=n(61),p=n(372),f=n(373),g=n(159),m=function(){function e(e,t){var n=this;this._createSocket=function(){var e=n.serverSettings,t=o.URLExt.join(e.wsUrl,"api/kernels",encodeURIComponent(n._id)),r=t.replace(/^((?:\w+:)?\/\/)(?:[^@\/]+@)/,"$1");console.log("Starting WebSocket:",r);var i=o.URLExt.join(t,"channels?session_id="+encodeURIComponent(n._clientId)),s=e.token;""!==s&&(i=i+"&token="+encodeURIComponent(s)),n._connectionPromise=new a.PromiseDelegate,n._wsStopped=!1,n._ws=new e.WebSocket(i),n._ws.binaryType="arraybuffer",n._ws.onmessage=n._onWSMessage,n._ws.onopen=n._onWSOpen,n._ws.onclose=n._onWSClose,n._ws.onerror=n._onWSClose},this._onWSOpen=function(e){n._reconnectAttempt=0,n._isReady=!0,n._updateStatus("connected"),n.requestKernelInfo().then((function(){n._connectionPromise.resolve(void 0)})).catch((function(e){n._connectionPromise.reject(e)})),n._isReady=!1},this._onWSMessage=function(e){if(!n._wsStopped){var t=f.deserialize(e.data);try{g.validateMessage(t)}catch(e){return void console.error("Invalid message: "+e.message)}var r=!1;if(t.parent_header&&"iopub"===t.channel)switch(t.header.msg_type){case"display_data":case"update_display_data":case"execute_result":var i=(t.content.transient||{}).display_id;i&&(r=n._handleDisplayId(i,t))}if(!r&&t.parent_header){var o=t.parent_header,s=n._futures&&n._futures.get(o.msg_id);if(s)s.handleMsg(t);else{var a=o.session===n.clientId;"iopub"!==t.channel&&a&&n._unhandledMessage.emit(t)}}if("iopub"===t.channel){switch(t.header.msg_type){case"status":n._updateStatus(t.content.execution_state);break;case"comm_open":n._handleCommOpen(t);break;case"comm_msg":n._handleCommMsg(t);break;case"comm_close":n._handleCommClose(t)}n._iopubMessage.emit(t)}}},this._onWSClose=function(e){if(!n._wsStopped&&n._ws)if(n._ws.onclose=n._noOp,n._ws.onerror=n._noOp,n._ws=null,n._reconnectAttempt<n._reconnectLimit){n._updateStatus("reconnecting");var t=Math.pow(2,n._reconnectAttempt);console.error("Connection lost, reconnecting in "+t+" seconds."),setTimeout(n._createSocket,1e3*t),n._reconnectAttempt+=1}else n._updateStatus("dead"),n._connectionPromise.reject(new Error("Could not establish connection"))},this._id="",this._name="",this._status="unknown",this._clientId="",this._isDisposed=!1,this._wsStopped=!1,this._ws=null,this._username="",this._reconnectLimit=7,this._reconnectAttempt=0,this._isReady=!1,this._targetRegistry=Object.create(null),this._info=null,this._pendingMessages=[],this._statusChanged=new c.Signal(this),this._iopubMessage=new c.Signal(this),this._unhandledMessage=new c.Signal(this),this._displayIdToParentIds=new Map,this._msgIdToDisplayIds=new Map,this._terminated=new c.Signal(this),this._noOp=function(){},this._name=e.name,this._id=t,this.serverSettings=e.serverSettings||u.ServerConnection.makeSettings(),this._clientId=e.clientId||o.uuid(),this._username=e.username||"",this._futures=new Map,this._commPromises=new Map,this._comms=new Map,this._createSocket(),i.runningKernels.push(this)}return Object.defineProperty(e.prototype,"terminated",{get:function(){return this._terminated},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"statusChanged",{get:function(){return this._statusChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iopubMessage",{get:function(){return this._iopubMessage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unhandledMessage",{get:function(){return this._unhandledMessage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"model",{get:function(){return{name:this.name,id:this.id}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"username",{get:function(){return this._username},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clientId",{get:function(){return this._clientId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this._status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"info",{get:function(){return this._info},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isReady",{get:function(){return this._isReady},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return this._connectionPromise.promise},enumerable:!0,configurable:!0}),e.prototype.getSpec=function(){var e=this;return this._specPromise||(this._specPromise=i.findSpecs(this.serverSettings).then((function(t){return t.kernelspecs[e._name]}))),this._specPromise},e.prototype.clone=function(){return new e({name:this._name,username:this._username,serverSettings:this.serverSettings},this._id)},e.prototype.dispose=function(){this.isDisposed||(this._isDisposed=!0,this._terminated.emit(void 0),this._status="dead",this._clearSocket(),this._futures.forEach((function(e,t){e.dispose()})),this._comms.forEach((function(e,t){e.dispose()})),this._displayIdToParentIds.clear(),this._msgIdToDisplayIds.clear(),s.ArrayExt.removeFirstOf(i.runningKernels,this),c.Signal.clearData(this))},e.prototype.sendShellMessage=function(e,t,n){var r=this;if(void 0===t&&(t=!1),void 0===n&&(n=!0),"dead"===this.status)throw new Error("Kernel is dead");this._isReady&&this._ws?this._ws.send(f.serialize(e)):this._pendingMessages.push(e);var i=new p.KernelFutureHandler((function(){var t=e.header.msg_id;r._futures.delete(t);var n=r._msgIdToDisplayIds.get(t);n&&(n.forEach((function(e){var n=r._displayIdToParentIds.get(e);if(n){var i=n.indexOf(t);if(-1===i)return;1===n.length?r._displayIdToParentIds.delete(e):(n.splice(i,1),r._displayIdToParentIds.set(e,n))}})),r._msgIdToDisplayIds.delete(t))}),e,t,n,this);return this._futures.set(e.header.msg_id,i),i},e.prototype.interrupt=function(){return i.interruptKernel(this,this.serverSettings)},e.prototype.restart=function(){return i.restartKernel(this,this.serverSettings)},e.prototype.handleRestart=function(){this._clearState(),this._updateStatus("restarting"),this._clearSocket()},e.prototype.reconnect=function(){return this._clearSocket(),this._updateStatus("reconnecting"),this._createSocket(),this._connectionPromise.promise},e.prototype.shutdown=function(){var e=this;return"dead"===this.status?Promise.reject(new Error("Kernel is dead")):i.shutdownKernel(this.id,this.serverSettings).then((function(){e._clearState(),e._clearSocket()}))},e.prototype.requestKernelInfo=function(){var e=this,t={msgType:"kernel_info_request",channel:"shell",username:this._username,session:this._clientId},n=d.KernelMessage.createShellMessage(t);return i.handleShellMessage(this,n).then((function(t){return e._info=t.content,t}))},e.prototype.requestComplete=function(e){var t={msgType:"complete_request",channel:"shell",username:this._username,session:this._clientId},n=d.KernelMessage.createShellMessage(t,e);return i.handleShellMessage(this,n)},e.prototype.requestInspect=function(e){var t={msgType:"inspect_request",channel:"shell",username:this._username,session:this._clientId},n=d.KernelMessage.createShellMessage(t,e);return i.handleShellMessage(this,n)},e.prototype.requestHistory=function(e){var t={msgType:"history_request",channel:"shell",username:this._username,session:this._clientId},n=d.KernelMessage.createShellMessage(t,e);return i.handleShellMessage(this,n)},e.prototype.requestExecute=function(e,t){void 0===t&&(t=!0);var n={msgType:"execute_request",channel:"shell",username:this._username,session:this._clientId};e=r({},{silent:!1,store_history:!0,user_expressions:{},allow_stdin:!0,stop_on_error:!1},e);var i=d.KernelMessage.createShellMessage(n,e);return this.sendShellMessage(i,!0,t)},e.prototype.requestIsComplete=function(e){var t={msgType:"is_complete_request",channel:"shell",username:this._username,session:this._clientId},n=d.KernelMessage.createShellMessage(t,e);return i.handleShellMessage(this,n)},e.prototype.requestCommInfo=function(e){var t={msgType:"comm_info_request",channel:"shell",username:this._username,session:this._clientId},n=d.KernelMessage.createShellMessage(t,e);return i.handleShellMessage(this,n)},e.prototype.sendInputReply=function(e){if("dead"===this.status)throw new Error("Kernel is dead");var t={msgType:"input_reply",channel:"stdin",username:this._username,session:this._clientId},n=d.KernelMessage.createMessage(t,e);this._isReady&&this._ws?this._ws.send(f.serialize(n)):this._pendingMessages.push(n)},e.prototype.registerMessageHook=function(e,t){var n=this,r=this._futures&&this._futures.get(e);return r&&r.registerMessageHook(t),new l.DisposableDelegate((function(){(r=n._futures&&n._futures.get(e))&&r.removeMessageHook(t)}))},e.prototype.registerCommTarget=function(e,t){var n=this;return this._targetRegistry[e]=t,new l.DisposableDelegate((function(){n.isDisposed||delete n._targetRegistry[e]}))},e.prototype.connectToComm=function(e,t){var n=this,r=t||o.uuid(),i=this._comms.get(r)||new h.CommHandler(e,r,this,(function(){n._unregisterComm(r)}));return this._comms.set(r,i),i},e.prototype._handleDisplayId=function(e,t){var n=this,r=t.parent_header.msg_id,i=this._displayIdToParentIds.get(e);if(i){var o={header:a.JSONExt.deepCopy(t.header),parent_header:a.JSONExt.deepCopy(t.parent_header),metadata:a.JSONExt.deepCopy(t.metadata),content:a.JSONExt.deepCopy(t.content),channel:t.channel,buffers:t.buffers?t.buffers.slice():[]};o.header.msg_type="update_display_data",i.map((function(e){var t=n._futures&&n._futures.get(e);t&&t.handleMsg(o)}))}if("update_display_data"===t.header.msg_type)return!0;-1===(i=this._displayIdToParentIds.get(e)||[]).indexOf(r)&&i.push(r),this._displayIdToParentIds.set(e,i);var s=this._msgIdToDisplayIds.get(r)||[];return-1===s.indexOf(r)&&s.push(r),this._msgIdToDisplayIds.set(r,s),!1},e.prototype._clearSocket=function(){this._wsStopped=!0,this._isReady=!1,null!==this._ws&&(this._ws.onopen=this._noOp,this._ws.onclose=this._noOp,this._ws.onerror=this._noOp,this._ws.onmessage=this._noOp,this._ws.close(),this._ws=null)},e.prototype._updateStatus=function(e){switch(e){case"starting":case"idle":case"busy":case"connected":this._isReady=!0;break;case"restarting":case"reconnecting":case"dead":this._isReady=!1;break;default:return void console.error("invalid kernel status:",e)}e!==this._status&&(this._status=e,i.logKernelStatus(this),this._statusChanged.emit(e),"dead"===e&&this.dispose()),this._isReady&&this._sendPending()},e.prototype._sendPending=function(){for(;this._ws&&this._pendingMessages.length>0;){var e=f.serialize(this._pendingMessages[0]);this._ws.send(e),this._pendingMessages.shift()}},e.prototype._clearState=function(){this._isReady=!1,this._pendingMessages=[],this._futures.forEach((function(e,t){e.dispose()})),this._comms.forEach((function(e,t){e.dispose()})),this._futures=new Map,this._commPromises=new Map,this._comms=new Map,this._displayIdToParentIds.clear(),this._msgIdToDisplayIds.clear()},e.prototype._handleCommOpen=function(e){var t=this,n=e.content;if(!this.isDisposed){var r=i.loadObject(n.target_name,n.target_module,this._targetRegistry).then((function(r){var i,o=new h.CommHandler(n.target_name,n.comm_id,t,(function(){t._unregisterComm(n.comm_id)}));try{i=r(o,e)}catch(e){throw o.close(),console.error("Exception opening new comm"),e}return Promise.resolve(i).then((function(){if(!t.isDisposed)return t._commPromises.delete(o.commId),t._comms.set(o.commId,o),o}))}));this._commPromises.set(n.comm_id,r)}},e.prototype._handleCommClose=function(e){var t=this,n=e.content,r=this._commPromises.get(n.comm_id);if(!r){var i=this._comms.get(n.comm_id);if(!i)return void console.error("Comm not found for comm id "+n.comm_id);r=Promise.resolve(i)}r.then((function(n){if(n){t._unregisterComm(n.commId);try{var r=n.onClose;r&&r(e),n.dispose()}catch(t){console.error("Exception closing comm: ",t,t.stack,e)}}}))},e.prototype._handleCommMsg=function(e){var t=e.content,n=this._commPromises.get(t.comm_id);if(n)n.then((function(t){if(t)try{var n=t.onMsg;n&&n(e)}catch(t){console.error("Exception handling comm msg: ",t,t.stack,e)}}));else{var r=this._comms.get(t.comm_id);if(!r)return;var i=r.onMsg;i&&i(e)}},e.prototype._unregisterComm=function(e){this._comms.delete(e),this._commPromises.delete(e)},e}();t.DefaultKernel=m,function(e){e.findById=function(e,t){return i.findById(e,t)},e.getSpecs=function(e){return i.getSpecs(e)},e.listRunning=function(e){return i.listRunning(e)},e.startNew=function(e){return i.startNew(e)},e.connectTo=function(e,t){return i.connectTo(e,t)},e.shutdown=function(e,t){return i.shutdownKernel(e,t)},e.shutdownAll=function(e){return i.shutdownAll(e)}}(m=t.DefaultKernel||(t.DefaultKernel={})),t.DefaultKernel=m,function(e){function t(t){t=t||u.ServerConnection.makeSettings();var n=o.URLExt.join(t.baseUrl,"api/kernelspecs"),r=u.ServerConnection.makeRequest(n,{},t).then((function(e){if(200!==e.status)throw new u.ServerConnection.ResponseError(e);return e.json()})).then((function(e){return g.validateSpecModels(e)}));return e.specs[t.baseUrl]=r,r}function n(e){e=e||u.ServerConnection.makeSettings();var t=o.URLExt.join(e.baseUrl,"api/kernels");return u.ServerConnection.makeRequest(t,{},e).then((function(e){if(200!==e.status)throw new u.ServerConnection.ResponseError(e);return e.json()})).then((function(e){if(!Array.isArray(e))throw new Error("Invalid kernel list");for(var t=0;t<e.length;t++)g.validateModel(e[t]);return i(e)}))}function i(t){return s.each(e.runningKernels,(function(e){s.find(t,(function(t){return e.id===t.id}))||"dead"===e.status||e.dispose()})),t}function a(t,n){n=n||u.ServerConnection.makeSettings();var r=o.URLExt.join(n.baseUrl,"api/kernels",encodeURIComponent(t));return u.ServerConnection.makeRequest(r,{method:"DELETE"},n).then((function(n){if(404===n.status)n.json().then((function(e){var n=e.message||'The kernel "'+t+'"" does not exist on the server';console.warn(n)}));else if(204!==n.status)throw new u.ServerConnection.ResponseError(n);!function(t){s.each(s.toArray(e.runningKernels),(function(e){e.id===t&&e.dispose()}))}(t)}))}function l(e,t){t=t||u.ServerConnection.makeSettings();var n=o.URLExt.join(t.baseUrl,"api/kernels",encodeURIComponent(e));return u.ServerConnection.makeRequest(n,{},t).then((function(e){if(200!==e.status)throw new u.ServerConnection.ResponseError(e);return e.json()})).then((function(e){return g.validateModel(e),e}))}e.runningKernels=[],e.specs=Object.create(null),e.findById=function(t,n){var r=s.find(e.runningKernels,(function(e){return e.id===t}));return r?Promise.resolve(r.model):l(t,n).catch((function(){throw new Error("No running kernel with id: "+t)}))},e.findSpecs=function(n){n=n||u.ServerConnection.makeSettings();var r=e.specs[n.baseUrl];return r||t(n)},e.getSpecs=t,e.listRunning=n,e.updateRunningKernels=i,e.startNew=function(e){var t=e.serverSettings||u.ServerConnection.makeSettings(),n=o.URLExt.join(t.baseUrl,"api/kernels"),i={method:"POST",body:JSON.stringify({name:e.name})};return u.ServerConnection.makeRequest(n,i,t).then((function(e){if(201!==e.status)throw new u.ServerConnection.ResponseError(e);return e.json()})).then((function(n){return g.validateModel(n),new m(r({},e,{name:n.name,serverSettings:t}),n.id)}))},e.connectTo=function(t,n){var r=n||u.ServerConnection.makeSettings(),i=s.find(e.runningKernels,(function(e){return e.id===t.id}));return i?Promise.resolve(i.clone()):Promise.resolve(new m({name:t.name,serverSettings:r},t.id))},e.restartKernel=function(t,n){if("dead"===t.status)return Promise.reject(new Error("Kernel is dead"));n=n||u.ServerConnection.makeSettings();var r=o.URLExt.join(n.baseUrl,"api/kernels",encodeURIComponent(t.id),"restart");return s.each(e.runningKernels,(function(e){e.id===t.id&&e.handleRestart()})),u.ServerConnection.makeRequest(r,{method:"POST"},n).then((function(e){if(200!==e.status)throw new u.ServerConnection.ResponseError(e);return e.json()})).then((function(n){return g.validateModel(n),s.each(e.runningKernels,(function(e){e!==t&&e.id===t.id&&e.reconnect()})),t.reconnect()}))},e.interruptKernel=function(e,t){if("dead"===e.status)return Promise.reject(new Error("Kernel is dead"));t=t||u.ServerConnection.makeSettings();var n=o.URLExt.join(t.baseUrl,"api/kernels",encodeURIComponent(e.id),"interrupt");return u.ServerConnection.makeRequest(n,{method:"POST"},t).then((function(e){if(204!==e.status)throw new u.ServerConnection.ResponseError(e)}))},e.shutdownKernel=a,e.shutdownAll=function(e){return n(e=e||u.ServerConnection.makeSettings()).then((function(t){s.each(t,(function(t){a(t.id,e)}))}))},e.getKernelModel=l,e.logKernelStatus=function(e){switch(e.status){case"idle":case"busy":case"unknown":return;default:console.log("Kernel: "+e.status+" ("+e.id+")")}},e.handleShellMessage=function(e,t){var n;try{n=e.sendShellMessage(t,!0)}catch(e){return Promise.reject(e)}return new Promise((function(e){n.onReply=e}))},e.loadObject=function(e,t,n){return new Promise((function(r,i){if(t){if("undefined"==typeof requirejs)throw new Error("requirejs not found");requirejs([t],(function(n){void 0===n[e]?i(new Error("Object '"+e+"' not found in module '"+t+"'")):r(n[e])}),i)}else n&&n[e]?r(n[e]):i(new Error("Object '"+e+"' not found in registry"))}))}}(i||(i={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(45),s=n(61),a=function(e){function t(t,n,r,i){var o=e.call(this,i)||this;return o._target="",o._id="",o._id=n,o._target=t,o._kernel=r,o}return i(t,e),Object.defineProperty(t.prototype,"commId",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"targetName",{get:function(){return this._target},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onClose",{get:function(){return this._onClose},set:function(e){this._onClose=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onMsg",{get:function(){return this._onMsg},set:function(e){this._onMsg=e},enumerable:!0,configurable:!0}),t.prototype.open=function(e,t,n){if(void 0===n&&(n=[]),this.isDisposed||this._kernel.isDisposed)throw new Error("Cannot open");var r={msgType:"comm_open",channel:"shell",username:this._kernel.username,session:this._kernel.clientId},i={comm_id:this._id,target_name:this._target,data:e||{}},o=s.KernelMessage.createShellMessage(r,i,t,n);return this._kernel.sendShellMessage(o,!1,!0)},t.prototype.send=function(e,t,n,r){if(void 0===n&&(n=[]),void 0===r&&(r=!0),this.isDisposed||this._kernel.isDisposed)throw new Error("Cannot send");var i={msgType:"comm_msg",channel:"shell",username:this._kernel.username,session:this._kernel.clientId},o={comm_id:this._id,data:e},a=s.KernelMessage.createShellMessage(i,o,t,n);return this._kernel.sendShellMessage(a,!1,!0)},t.prototype.close=function(e,t,n){if(void 0===n&&(n=[]),this.isDisposed||this._kernel.isDisposed)throw new Error("Cannot close");var r={msgType:"comm_msg",channel:"shell",username:this._kernel.username,session:this._kernel.clientId},i={comm_id:this._id,data:e||{}},o=s.KernelMessage.createShellMessage(r,i,t,n),a=this._kernel.sendShellMessage(o,!1,!0);r.channel="iopub";var l=this._onClose;l&&l(s.KernelMessage.createMessage(r,i,t,n));return this.dispose(),a},t}(o.DisposableDelegate);t.CommHandler=a},function(e,t,n){"use strict";(function(e){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(12),a=n(45),l=n(61),c=function(e){function t(t,n,r,i,a){var l=e.call(this,t)||this;return l._status=0,l._stdin=o.noOp,l._iopub=o.noOp,l._reply=o.noOp,l._done=new s.PromiseDelegate,l._hooks=new o.HookList,l._disposeOnDone=!0,l._msg=n,r||l._setFlag(o.KernelFutureFlag.GotReply),l._disposeOnDone=i,l._kernel=a,l}return i(t,e),Object.defineProperty(t.prototype,"msg",{get:function(){return this._msg},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"done",{get:function(){return this._done.promise},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onReply",{get:function(){return this._reply},set:function(e){this._reply=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onIOPub",{get:function(){return this._iopub},set:function(e){this._iopub=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onStdin",{get:function(){return this._stdin},set:function(e){this._stdin=e},enumerable:!0,configurable:!0}),t.prototype.registerMessageHook=function(e){this._hooks.add(e)},t.prototype.removeMessageHook=function(e){this.isDisposed||this._hooks.remove(e)},t.prototype.sendInputReply=function(e){this._kernel.sendInputReply(e)},t.prototype.dispose=function(){this._stdin=o.noOp,this._iopub=o.noOp,this._reply=o.noOp,this._testFlag(o.KernelFutureFlag.IsDone)||this._done.reject(new Error("Canceled")),e.prototype.dispose.call(this)},t.prototype.handleMsg=function(e){switch(e.channel){case"shell":this._handleReply(e);break;case"stdin":this._handleStdin(e);break;case"iopub":this._handleIOPub(e)}},t.prototype._handleReply=function(e){var t=this._reply;t&&t(e),this._replyMsg=e,this._setFlag(o.KernelFutureFlag.GotReply),this._testFlag(o.KernelFutureFlag.GotIdle)&&this._handleDone()},t.prototype._handleStdin=function(e){var t=this._stdin;t&&t(e)},t.prototype._handleIOPub=function(e){var t=this._hooks.process(e),n=this._iopub;t&&n&&n(e),l.KernelMessage.isStatusMsg(e)&&"idle"===e.content.execution_state&&(this._setFlag(o.KernelFutureFlag.GotIdle),this._testFlag(o.KernelFutureFlag.GotReply)&&this._handleDone())},t.prototype._handleDone=function(){this._testFlag(o.KernelFutureFlag.IsDone)||(this._setFlag(o.KernelFutureFlag.IsDone),this._done.resolve(this._replyMsg),this._disposeOnDone&&this.dispose())},t.prototype._testFlag=function(e){return 0!=(this._status&e)},t.prototype._setFlag=function(e){this._status|=e},t}(a.DisposableDelegate);t.KernelFutureHandler=c,function(t){t.noOp=function(){};var n="function"==typeof requestAnimationFrame?requestAnimationFrame:e,r=function(){function e(){this._hooks=[]}return e.prototype.add=function(e){this.remove(e),this._hooks.push(e)},e.prototype.remove=function(e){var t=this._hooks.indexOf(e);t>=0&&(this._hooks[t]=null,this._scheduleCompact())},e.prototype.process=function(e){for(var t,n=this._hooks.length-1;n>=0;n--){var r=this._hooks[n];if(null!==r){try{t=r(e)}catch(e){t=!0,console.error(e)}if(!1===t)return!1}}return!0},e.prototype._scheduleCompact=function(){var e=this;this._cleanupScheduled||(this._cleanupScheduled=!0,n((function(){e._cleanupScheduled=!1,e._compact()})))},e.prototype._compact=function(){for(var e=0,t=0,n=this._hooks.length;t<n;t++){var r=this._hooks[t];null===this._hooks[t]?e++:this._hooks[t-e]=r}this._hooks.length-=e},e}();t.HookList=r,function(e){e[e.GotReply=1]="GotReply",e[e.GotIdle=2]="GotIdle",e[e.IsDone=4]="IsDone",e[e.DisposeOnDone=8]="DisposeOnDone"}(t.KernelFutureFlag||(t.KernelFutureFlag={}))}(o||(o={}))}).call(this,n(57).setImmediate)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deserialize=function(e){return"string"==typeof e?JSON.parse(e):function(e){var t=new DataView(e),n=t.getUint32(0),r=[];if(n<2)throw new Error("Invalid incoming Kernel Message");for(var i=1;i<=n;i++)r.push(t.getUint32(4*i));var o=new Uint8Array(e.slice(r[0],r[1])),s=JSON.parse(new TextDecoder("utf8").decode(o));s.buffers=[];for(i=1;i<n;i++){var a=r[i],l=r[i+1]||e.byteLength;s.buffers.push(new DataView(e.slice(a,l)))}return s}(e)},t.serialize=function(e){return e.buffers&&e.buffers.length?function(e){var t=[],n=[],r=new TextEncoder("utf8"),i=[];void 0!==e.buffers&&(i=e.buffers,delete e.buffers);var o=r.encode(JSON.stringify(e));n.push(o.buffer);for(var s=0;s<i.length;s++){var a=i[s];n.push(a instanceof ArrayBuffer?a:a.buffer)}var l=n.length;t.push(4*(l+1));for(s=0;s+1<n.length;s++)t.push(t[t.length-1]+n[s].byteLength);var c=new Uint8Array(t[t.length-1]+n[n.length-1].byteLength),u=new DataView(c.buffer);u.setUint32(0,l);for(s=0;s<t.length;s++)u.setUint32(4*(s+1),t[s]);for(s=0;s<n.length;s++)c.set(new Uint8Array(n[s]),t[s]);return c.buffer}(e):JSON.stringify(e)}},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(12),s=n(6),a=n(14),l=n(158),c=function(){function e(e){void 0===e&&(e={});var t=this;this._models=[],this._kernels=new Set,this._specs=null,this._isDisposed=!1,this._modelsTimer=-1,this._specsTimer=-1,this._isReady=!1,this._specsChanged=new s.Signal(this),this._runningChanged=new s.Signal(this),this.serverSettings=e.serverSettings||a.ServerConnection.makeSettings(),this._readyPromise=this._refreshSpecs().then((function(){return t._refreshRunning()})),this._modelsTimer=setInterval((function(){t._refreshRunning()}),1e4),this._specsTimer=setInterval((function(){t._refreshSpecs()}),61e3)}return Object.defineProperty(e.prototype,"specsChanged",{get:function(){return this._specsChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"runningChanged",{get:function(){return this._runningChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(this._isDisposed=!0,clearInterval(this._modelsTimer),clearInterval(this._specsTimer),s.Signal.clearData(this),this._models=[])},Object.defineProperty(e.prototype,"specs",{get:function(){return this._specs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isReady",{get:function(){return this._isReady},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return this._readyPromise},enumerable:!0,configurable:!0}),e.prototype.running=function(){return i.iter(this._models)},e.prototype.refreshSpecs=function(){return this._refreshSpecs()},e.prototype.refreshRunning=function(){return this._refreshRunning()},e.prototype.startNew=function(e){var t=this;void 0===e&&(e={});var n=r({},e,{serverSettings:this.serverSettings});return l.Kernel.startNew(n).then((function(e){return t._onStarted(e),e}))},e.prototype.findById=function(e){return l.Kernel.findById(e,this.serverSettings)},e.prototype.connectTo=function(e){var t=this;return l.Kernel.connectTo(e,this.serverSettings).then((function(e){return t._onStarted(e),e}))},e.prototype.shutdown=function(e){var t=this,n=i.ArrayExt.findFirstIndex(this._models,(function(t){return t.id===e}));if(-1!==n)return this._models.splice(n,1),this._runningChanged.emit(this._models.slice()),l.Kernel.shutdown(e,this.serverSettings).then((function(){var n=[];t._kernels.forEach((function(t){t.id===e&&(t.dispose(),n.push(t))})),n.forEach((function(e){t._kernels.delete(e)}))}))},e.prototype.shutdownAll=function(){var e=this,t=this._models;return t.length>0&&(this._models=[],this._runningChanged.emit([])),this._refreshRunning().then((function(){return Promise.all(t.map((function(t){return l.Kernel.shutdown(t.id,e.serverSettings).then((function(){var t=[];e._kernels.forEach((function(e){e.dispose(),t.push(e)})),t.forEach((function(t){e._kernels.delete(t)}))}))}))).then((function(){}))}))},e.prototype._onTerminated=function(e){var t=i.ArrayExt.findFirstIndex(this._models,(function(t){return t.id===e}));-1!==t&&(this._models.splice(t,1),this._runningChanged.emit(this._models.slice()))},e.prototype._onStarted=function(e){var t=this,n=e.id;this._kernels.add(e),-1===i.ArrayExt.findFirstIndex(this._models,(function(e){return e.id===n}))&&(this._models.push(e.model),this._runningChanged.emit(this._models.slice())),e.terminated.connect((function(){t._onTerminated(n)}))},e.prototype._refreshSpecs=function(){var e=this;return l.Kernel.getSpecs(this.serverSettings).then((function(t){o.JSONExt.deepEqual(t,e._specs)||(e._specs=t,e._specsChanged.emit(t))}))},e.prototype._refreshRunning=function(){var e=this;return l.Kernel.listRunning(this.serverSettings).then((function(t){if(e._isReady=!0,!o.JSONExt.deepEqual(t,e._models)){var n=t.map((function(e){return e.id})),r=[];e._kernels.forEach((function(e){-1===n.indexOf(e.id)&&(e.dispose(),r.push(e))})),r.forEach((function(t){e._kernels.delete(t)})),e._models=t.slice(),e._runningChanged.emit(t)}}))},e}();t.KernelManager=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=n(376),o=n(157),s=n(160),a=n(162),l=n(163),c=n(46),u=n(164),h=function(){function e(e){void 0===e&&(e={});var t=this;this._isDisposed=!1,this._specsChanged=new r.Signal(this),this._isReady=!1,this.serverSettings=e.serverSettings||c.ServerConnection.makeSettings(),this.contents=new o.ContentsManager(e),this.sessions=new s.SessionManager(e),this.settings=new a.SettingManager(e),this.terminals=new l.TerminalManager(e),this.builder=new i.BuildManager(e),this.workspaces=new u.WorkspaceManager(e),this.sessions.specsChanged.connect((function(e,n){t._specsChanged.emit(n)})),this._readyPromise=this.sessions.ready.then((function(){if(t.terminals.isAvailable())return t.terminals.ready})),this._readyPromise.then((function(){t._isReady=!0}))}return Object.defineProperty(e.prototype,"specsChanged",{get:function(){return this._specsChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(this._isDisposed=!0,r.Signal.clearData(this),this.contents.dispose(),this.sessions.dispose(),this.terminals.dispose())},Object.defineProperty(e.prototype,"specs",{get:function(){return this.sessions.specs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isReady",{get:function(){return this._isReady},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return this._readyPromise},enumerable:!0,configurable:!0}),e}();t.ServiceManager=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),i=n(46),o=function(){function e(e){void 0===e&&(e={}),this.serverSettings=e.serverSettings||i.ServerConnection.makeSettings()}return Object.defineProperty(e.prototype,"isAvailable",{get:function(){return"true"===r.PageConfig.getOption("buildAvailable").toLowerCase()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shouldCheck",{get:function(){return"true"===r.PageConfig.getOption("buildCheck").toLowerCase()},enumerable:!0,configurable:!0}),e.prototype.getStatus=function(){var e=this.serverSettings.baseUrl,t=r.URLExt.join(e,"lab/api/build"),n=this.serverSettings;return i.ServerConnection.makeRequest(t,{},n).then((function(e){if(200!==e.status)throw new i.ServerConnection.ResponseError(e);return e.json()})).then((function(e){if("string"!=typeof e.status)throw new Error("Invalid data");if("string"!=typeof e.message)throw new Error("Invalid data");return e}))},e.prototype.build=function(){var e=this.serverSettings.baseUrl,t=r.URLExt.join(e,"lab/api/build"),n=this.serverSettings;return i.ServerConnection.makeRequest(t,{method:"POST"},n).then((function(e){if(400===e.status)throw new i.ServerConnection.ResponseError(e,"Build aborted");if(200!==e.status){throw new i.ServerConnection.ResponseError(e,"Build failed with ${response.status)`, please run `jupyter lab build` on the server for full output")}}))},e.prototype.cancel=function(){var e=this.serverSettings.baseUrl,t=r.URLExt.join(e,"lab/api/build"),n=this.serverSettings;return i.ServerConnection.makeRequest(t,{method:"DELETE"},n).then((function(e){if(204!==e.status)throw new i.ServerConnection.ResponseError(e)}))},e}();t.BuildManager=o},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(12),s=n(6),a=n(91),l=n(14),c=n(161),u=function(){function e(e){void 0===e&&(e={});var t=this;this._isDisposed=!1,this._models=[],this._sessions=new Set,this._specs=null,this._modelsTimer=-1,this._specsTimer=-1,this._specsChanged=new s.Signal(this),this._runningChanged=new s.Signal(this),this.serverSettings=e.serverSettings||l.ServerConnection.makeSettings(),this._readyPromise=this._refreshSpecs().then((function(){return t._refreshRunning()})),this._modelsTimer=setInterval((function(){t._refreshRunning()}),1e4),this._specsTimer=setInterval((function(){t._refreshSpecs()}),61e3)}return Object.defineProperty(e.prototype,"specsChanged",{get:function(){return this._specsChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"runningChanged",{get:function(){return this._runningChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"specs",{get:function(){return this._specs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isReady",{get:function(){return null!==this._specs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return this._readyPromise},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(this._isDisposed=!0,clearInterval(this._modelsTimer),clearInterval(this._specsTimer),s.Signal.clearData(this),this._models.length=0)},e.prototype.running=function(){return i.iter(this._models)},e.prototype.refreshSpecs=function(){return this._refreshSpecs()},e.prototype.refreshRunning=function(){return this._refreshRunning()},e.prototype.startNew=function(e){var t=this,n=this.serverSettings;return c.Session.startNew(r({},e,{serverSettings:n})).then((function(e){return t._onStarted(e),e}))},e.prototype.stopIfNeeded=function(e){var t=this;return c.Session.listRunning(this.serverSettings).then((function(n){var r=n.filter((function(t){return t.path===e}));if(1===r.length){var i=r[0].id;return t.shutdown(i).catch((function(){}))}})).catch((function(){return Promise.resolve(void 0)}))},e.prototype.findById=function(e){return c.Session.findById(e,this.serverSettings)},e.prototype.findByPath=function(e){return c.Session.findByPath(e,this.serverSettings)},e.prototype.connectTo=function(e){var t=this;return c.Session.connectTo(e,this.serverSettings).then((function(e){return t._onStarted(e),e}))},e.prototype.shutdown=function(e){var t=this,n=i.ArrayExt.findFirstIndex(this._models,(function(t){return t.id===e}));if(-1!==n)return this._models.splice(n,1),this._runningChanged.emit(this._models.slice()),c.Session.shutdown(e,this.serverSettings).then((function(){var n=[];t._sessions.forEach((function(t){t.id===e&&(t.dispose(),n.push(t))})),n.forEach((function(e){t._sessions.delete(e)}))}))},e.prototype.shutdownAll=function(){var e=this,t=this._models;return t.length>0&&(this._models=[],this._runningChanged.emit([])),this._refreshRunning().then((function(){return Promise.all(t.map((function(t){return c.Session.shutdown(t.id,e.serverSettings).then((function(){var t=[];e._sessions.forEach((function(e){e.dispose(),t.push(e)})),t.forEach((function(t){e._sessions.delete(t)}))}))}))).then((function(){}))}))},e.prototype._onTerminated=function(e){var t=i.ArrayExt.findFirstIndex(this._models,(function(t){return t.id===e}));-1!==t&&(this._models.splice(t,1),this._runningChanged.emit(this._models.slice()))},e.prototype._onStarted=function(e){var t=this,n=e.id,r=i.ArrayExt.findFirstIndex(this._models,(function(e){return e.id===n}));this._sessions.add(e),-1===r&&(this._models.push(e.model),this._runningChanged.emit(this._models.slice())),e.terminated.connect((function(e){t._onTerminated(n)})),e.propertyChanged.connect((function(n,r){t._onChanged(e.model)})),e.kernelChanged.connect((function(){t._onChanged(e.model)}))},e.prototype._onChanged=function(e){var t=i.ArrayExt.findFirstIndex(this._models,(function(t){return t.id===e.id}));-1!==t&&(this._models[t]=e,this._runningChanged.emit(this._models.slice()))},e.prototype._refreshSpecs=function(){var e=this;return a.Kernel.getSpecs(this.serverSettings).then((function(t){o.JSONExt.deepEqual(t,e._specs)||(e._specs=t,e._specsChanged.emit(t))}))},e.prototype._refreshRunning=function(){var e=this;return c.Session.listRunning(this.serverSettings).then((function(t){if(!o.JSONExt.deepEqual(t,e._models)){var n=t.map((function(e){return e.id})),r=[];e._sessions.forEach((function(e){-1===n.indexOf(e.id)&&(e.dispose(),r.push(e))})),r.forEach((function(t){e._sessions.delete(t)})),e._models=t.slice(),e._runningChanged.emit(t)}}))},e}();t.SessionManager=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(18),o=n(3),s=n(6),a=n(91),l=n(14),c=n(379),u=function(){function e(e,t,n){this._id="",this._path="",this._name="",this._type="",this._isDisposed=!1,this._updating=!1,this._kernelChanged=new s.Signal(this),this._statusChanged=new s.Signal(this),this._iopubMessage=new s.Signal(this),this._unhandledMessage=new s.Signal(this),this._propertyChanged=new s.Signal(this),this._terminated=new s.Signal(this),this._id=t,this._path=e.path,this._type=e.type||"file",this._name=e.name||"",this.serverSettings=e.serverSettings||l.ServerConnection.makeSettings(),r.addRunning(this),this.setupKernel(n)}return Object.defineProperty(e.prototype,"terminated",{get:function(){return this._terminated},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kernelChanged",{get:function(){return this._kernelChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"statusChanged",{get:function(){return this._statusChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iopubMessage",{get:function(){return this._iopubMessage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unhandledMessage",{get:function(){return this._unhandledMessage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"propertyChanged",{get:function(){return this._propertyChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kernel",{get:function(){return this._kernel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._path},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"model",{get:function(){return{id:this.id,kernel:this.kernel.model,path:this._path,type:this._type,name:this._name}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this._kernel?this._kernel.status:"dead"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return!0===this._isDisposed},enumerable:!0,configurable:!0}),e.prototype.clone=function(){var t=this;return a.Kernel.connectTo(this.kernel.model,this.serverSettings).then((function(n){return new e({path:t._path,name:t._name,type:t._type,serverSettings:t.serverSettings},t._id,n)}))},e.prototype.update=function(e){var t=this;if(this._updating)return Promise.resolve(void 0);var n=this.model;return this._path=e.path,this._name=e.name,this._type=e.type,this._kernel.isDisposed||e.kernel.id!==this._kernel.id?a.Kernel.connectTo(e.kernel,this.serverSettings).then((function(e){t.setupKernel(e),t._kernelChanged.emit(e),t._handleModelChange(n)})):(this._handleModelChange(n),Promise.resolve(void 0))},e.prototype.dispose=function(){this.isDisposed||(this._isDisposed=!0,this._kernel.dispose(),this._statusChanged.emit("dead"),this._terminated.emit(void 0),r.removeRunning(this),s.Signal.clearData(this))},e.prototype.setPath=function(e){if(this.isDisposed)return Promise.reject(new Error("Session is disposed"));var t=JSON.stringify({path:e});return this._patch(t).then((function(){}))},e.prototype.setName=function(e){if(this.isDisposed)return Promise.reject(new Error("Session is disposed"));var t=JSON.stringify({name:e});return this._patch(t).then((function(){}))},e.prototype.setType=function(e){if(this.isDisposed)return Promise.reject(new Error("Session is disposed"));var t=JSON.stringify({type:e});return this._patch(t).then((function(){}))},e.prototype.changeKernel=function(e){var t=this;if(this.isDisposed)return Promise.reject(new Error("Session is disposed"));var n=JSON.stringify({kernel:e});return this._kernel.dispose(),this._statusChanged.emit("restarting"),this._patch(n).then((function(){return t.kernel}))},e.prototype.shutdown=function(){return this.isDisposed?Promise.reject(new Error("Session is disposed")):r.shutdownSession(this.id,this.serverSettings)},e.prototype.setupKernel=function(e){this._kernel=e,e.statusChanged.connect(this.onKernelStatus,this),e.unhandledMessage.connect(this.onUnhandledMessage,this),e.iopubMessage.connect(this.onIOPubMessage,this)},e.prototype.onKernelStatus=function(e,t){this._statusChanged.emit(t)},e.prototype.onIOPubMessage=function(e,t){this._iopubMessage.emit(t)},e.prototype.onUnhandledMessage=function(e,t){this._unhandledMessage.emit(t)},e.prototype._patch=function(e){var t=this;this._updating=!0;var n=this.serverSettings,i=r.getSessionUrl(n.baseUrl,this._id),o={method:"PATCH",body:e};return l.ServerConnection.makeRequest(i,o,n).then((function(e){if(t._updating=!1,200!==e.status)throw new l.ServerConnection.ResponseError(e);return e.json()})).then((function(e){var t=c.validateModel(e);return r.updateFromServer(t,n.baseUrl)}),(function(e){throw t._updating=!1,e}))},e.prototype._handleModelChange=function(e){e.name!==this._name&&this._propertyChanged.emit("name"),e.type!==this._type&&this._propertyChanged.emit("type"),e.path!==this._path&&this._propertyChanged.emit("path")},e}();t.DefaultSession=u,function(e){e.listRunning=function(e){return r.listRunning(e)},e.startNew=function(e){return r.startNew(e)},e.findById=function(e,t){return r.findById(e,t)},e.findByPath=function(e,t){return r.findByPath(e,t)},e.connectTo=function(e,t){return r.connectTo(e,t)},e.shutdown=function(e,t){return r.shutdownSession(e,t)},e.shutdownAll=function(e){return r.shutdownAll(e)}}(u=t.DefaultSession||(t.DefaultSession={})),t.DefaultSession=u,function(e){var t=new Map;function n(e,t){return t=t||l.ServerConnection.makeSettings(),a.Kernel.connectTo(e.kernel,t).then((function(n){return new u({path:e.path,type:e.type,name:e.name,serverSettings:t},e.id,n)}))}function r(e,t){var n=s((t=t||l.ServerConnection.makeSettings()).baseUrl,e);return l.ServerConnection.makeRequest(n,{},t).then((function(e){if(200!==e.status)throw new l.ServerConnection.ResponseError(e);return e.json()})).then((function(e){return c.validateModel(e),f(e,t.baseUrl)}))}function s(e,t){return i.URLExt.join(e,"api/sessions",t)}function h(e){e=e||l.ServerConnection.makeSettings();var t=i.URLExt.join(e.baseUrl,"api/sessions");return l.ServerConnection.makeRequest(t,{},e).then((function(e){if(200!==e.status)throw new l.ServerConnection.ResponseError(e);return e.json()})).then((function(t){if(!Array.isArray(t))throw new Error("Invalid Session list");for(var n=0;n<t.length;n++)c.validateModel(t[n]);return g(t,e.baseUrl)}))}function d(e,n){var r=s((n=n||l.ServerConnection.makeSettings()).baseUrl,e);return l.ServerConnection.makeRequest(r,{method:"DELETE"},n).then((function(r){if(404===r.status)r.json().then((function(t){var n=t.message||'The session "'+e+'"" does not exist on the server';console.warn(n)}));else{if(410===r.status)throw new l.ServerConnection.ResponseError(r,"The kernel was deleted but the session was not");if(204!==r.status)throw new l.ServerConnection.ResponseError(r)}!function(e,n){var r=t.get(n)||[];o.each(r.slice(),(function(t){t.id===e&&t.dispose()}))}(e,n.baseUrl)}))}function p(e){var t=e.serverSettings||l.ServerConnection.makeSettings(),n={kernel:{name:e.kernelName,id:e.kernelId},path:e.path,type:e.type||"",name:e.name||""},r=i.URLExt.join(t.baseUrl,"api/sessions"),o={method:"POST",body:JSON.stringify(n)};return l.ServerConnection.makeRequest(r,o,t).then((function(e){if(201!==e.status)throw new l.ServerConnection.ResponseError(e);return e.json()})).then((function(e){return c.validateModel(e),f(e,t.baseUrl)}))}function f(e,n){var r=[],i=t.get(n)||[];return o.each(i.slice(),(function(t){t.id===e.id&&r.push(t.update(e))})),Promise.all(r).then((function(){return e}))}function g(e,n){var r=[],i=t.get(n)||[];return o.each(i.slice(),(function(t){o.find(e,(function(e){return t.id===e.id&&(r.push(t.update(e)),!0)}))||"dead"===t.status||t.dispose()})),Promise.all(r).then((function(){return e}))}e.addRunning=function(e){var n=t.get(e.serverSettings.baseUrl)||[];n.push(e),t.set(e.serverSettings.baseUrl,n)},e.removeRunning=function(e){var n=t.get(e.serverSettings.baseUrl);n&&o.ArrayExt.removeFirstOf(n,e)},e.connectTo=function(e,r){r=r||l.ServerConnection.makeSettings();var i=t.get(r.baseUrl)||[],s=o.find(i,(function(t){return t.id===e.id}));return s?Promise.resolve(s.clone()):n(e,r)},e.createSession=n,e.findById=function(e,n){n=n||l.ServerConnection.makeSettings();var i=t.get(n.baseUrl)||[],s=o.find(i,(function(t){return t.id===e}));return s?Promise.resolve(s.model):r(e,n).catch((function(){throw new Error("No running session for id: "+e)}))},e.findByPath=function(e,n){n=n||l.ServerConnection.makeSettings();var r=t.get(n.baseUrl)||[],i=o.find(r,(function(t){return t.path===e}));return i?Promise.resolve(i.model):h(n).then((function(t){var n=o.find(t,(function(t){return t.path===e}));if(n)return n;throw new Error("No running session for path: "+e)}))},e.getSessionModel=r,e.getSessionUrl=s,e.listRunning=h,e.shutdownSession=d,e.shutdownAll=function(e){return h(e=e||l.ServerConnection.makeSettings()).then((function(t){o.each(t,(function(t){d(t.id,e)}))}))},e.startNew=function(e){return void 0===e.path?Promise.reject(new Error("Must specify a path")):p(e).then((function(t){return n(t,e.serverSettings)}))},e.startSession=p,e.updateFromServer=f,e.updateRunningSessions=g}(r||(r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(159);function i(e,t,n){if(!e.hasOwnProperty(t))throw Error("Missing property '"+t+"'");if(void 0!==n){var r=!0,i=e[t];switch(n){case"array":r=Array.isArray(i);break;case"object":r=void 0!==i;break;default:r=typeof i===n}if(!r)throw new Error("Property '"+t+"' is not of type '"+n+"'")}}t.validateModel=function(e){var t={id:e.id,kernel:e.kernel,name:e.name,path:e.path,type:e.type};return void 0===e.path&&void 0!==e.notebook&&(t.path=e.notebook.path,t.type="notebook",t.name=""),i(t,"id","string"),i(t,"type","string"),i(t,"name","string"),i(t,"path","string"),i(t,"kernel","object"),r.validateModel(t.kernel),t}},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(12),s=n(6),a=n(14),l=n(92),c=function(){function e(e){void 0===e&&(e={});var t=this;this._models=[],this._sessions=new Set,this._isDisposed=!1,this._isReady=!1,this._refreshTimer=-1,this._runningChanged=new s.Signal(this),this.serverSettings=e.serverSettings||a.ServerConnection.makeSettings(),l.TerminalSession.isAvailable()&&(this._readyPromise=this._refreshRunning(),this._refreshTimer=setInterval((function(){t._refreshRunning()}),1e4))}return Object.defineProperty(e.prototype,"runningChanged",{get:function(){return this._runningChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isReady",{get:function(){return this._isReady},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(this._isDisposed=!0,clearInterval(this._refreshTimer),s.Signal.clearData(this),this._models=[])},Object.defineProperty(e.prototype,"ready",{get:function(){return this._readyPromise||Promise.reject("Terminals unavailable")},enumerable:!0,configurable:!0}),e.prototype.isAvailable=function(){return l.TerminalSession.isAvailable()},e.prototype.running=function(){return i.iter(this._models)},e.prototype.startNew=function(e){var t=this;return l.TerminalSession.startNew(this._getOptions(e)).then((function(e){return t._onStarted(e),e}))},e.prototype.connectTo=function(e,t){var n=this;return l.TerminalSession.connectTo(e,this._getOptions(t)).then((function(e){return n._onStarted(e),e}))},e.prototype.shutdown=function(e){var t=this,n=i.ArrayExt.findFirstIndex(this._models,(function(t){return t.name===e}));if(-1!==n)return this._models.splice(n,1),this._runningChanged.emit(this._models.slice()),l.TerminalSession.shutdown(e,this.serverSettings).then((function(){var n=[];t._sessions.forEach((function(t){t.name===e&&(t.dispose(),n.push(t))})),n.forEach((function(e){t._sessions.delete(e)}))}))},e.prototype.shutdownAll=function(){var e=this,t=this._models;return t.length>0&&(this._models=[],this._runningChanged.emit([])),this._refreshRunning().then((function(){return Promise.all(t.map((function(t){return l.TerminalSession.shutdown(t.name,e.serverSettings).then((function(){var t=[];e._sessions.forEach((function(e){e.dispose(),t.push(e)})),t.forEach((function(t){e._sessions.delete(t)}))}))}))).then((function(){}))}))},e.prototype.refreshRunning=function(){return this._refreshRunning()},e.prototype._onTerminated=function(e){var t=i.ArrayExt.findFirstIndex(this._models,(function(t){return t.name===e}));-1!==t&&(this._models.splice(t,1),this._runningChanged.emit(this._models.slice()))},e.prototype._onStarted=function(e){var t=this,n=e.name;this._sessions.add(e),-1===i.ArrayExt.findFirstIndex(this._models,(function(e){return e.name===n}))&&(this._models.push(e.model),this._runningChanged.emit(this._models.slice())),e.terminated.connect((function(){t._onTerminated(n)}))},e.prototype._refreshRunning=function(){var e=this;return l.TerminalSession.listRunning(this.serverSettings).then((function(t){if(e._isReady=!0,!o.JSONExt.deepEqual(t,e._models)){var n=t.map((function(e){return e.name})),r=[];e._sessions.forEach((function(e){-1===n.indexOf(e.name)&&(e.dispose(),r.push(e))})),r.forEach((function(t){e._sessions.delete(t)})),e._models=t.slice(),e._runningChanged.emit(t)}}))},e.prototype._getOptions=function(e){return void 0===e&&(e={}),r({},e,{serverSettings:this.serverSettings})},e}();t.TerminalManager=c},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(18),s=n(3),a=n(6),l=n(14),c=n(92),u=function(){function e(e,t){void 0===t&&(t={}),this._isDisposed=!1,this._isReady=!1,this._messageReceived=new a.Signal(this),this._terminated=new a.Signal(this),this._ws=null,this._noOp=function(){},this._name=e,this.serverSettings=t.serverSettings||l.ServerConnection.makeSettings(),this._readyPromise=this._initializeSocket()}return Object.defineProperty(e.prototype,"terminated",{get:function(){return this._terminated},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"messageReceived",{get:function(){return this._messageReceived},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"model",{get:function(){return{name:this._name}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isReady",{get:function(){return this._isReady},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return this._readyPromise},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._isDisposed||(this.terminated.emit(void 0),this._isDisposed=!0,this._ws&&(this._ws.close(),this._ws=null),delete i.running[this._url],a.Signal.clearData(this))},e.prototype.send=function(e){var t=this;if(!this._isDisposed&&e.content){var n=[e.type].concat(e.content),r=this._ws,i=JSON.stringify(n);this._isReady&&r?r.send(i):this.ready.then((function(){var e=t._ws;e&&e.send(i)}))}},e.prototype.reconnect=function(){return this._readyPromise=this._initializeSocket(),this._readyPromise},e.prototype.shutdown=function(){var t=this.name,n=this.serverSettings;return e.shutdown(t,n)},e.prototype.clone=function(){return new e(this.name,{serverSettings:this.serverSettings})},e.prototype._initializeSocket=function(){var e=this,t=this._name,n=this._ws;return n&&(n.onopen=this._noOp,n.onclose=this._noOp,n.onerror=this._noOp,n.onmessage=this._noOp,n.close(),this._ws=null),this._isReady=!1,new Promise((function(r,s){var a=e.serverSettings,l=e.serverSettings.token;e._url=i.getTermUrl(a.baseUrl,e._name),i.running[e._url]=e;var c=o.URLExt.join(a.wsUrl,"terminals/websocket/"+t);l&&(c=c+"?token="+l),(n=e._ws=new a.WebSocket(c)).onmessage=function(t){if(!e._isDisposed){var n=JSON.parse(t.data);e._messageReceived.emit({type:n[0],content:n.slice(1)})}},n.onopen=function(t){e._isDisposed||(e._isReady=!0,r(void 0))},n.onerror=function(t){e._isDisposed||s(t)}}))},e}();t.DefaultTerminalSession=u,function(e){function t(e){if(!c.TerminalSession.isAvailable())return Promise.reject(i.unavailableMsg);e=e||l.ServerConnection.makeSettings();var t=i.getServiceUrl(e.baseUrl);return l.ServerConnection.makeRequest(t,{},e).then((function(e){if(200!==e.status)throw new l.ServerConnection.ResponseError(e);return e.json()})).then((function(e){if(!Array.isArray(e))throw new Error("Invalid terminal data");var n=s.toArray(s.map(e,(function(e){return o.URLExt.join(t,e.name)})));return s.each(Object.keys(i.running),(function(e){-1===n.indexOf(e)&&i.running[e].dispose()})),e}))}function n(e,t){if(!c.TerminalSession.isAvailable())return Promise.reject(i.unavailableMsg);t=t||l.ServerConnection.makeSettings();var n=i.getTermUrl(t.baseUrl,e);return l.ServerConnection.makeRequest(n,{method:"DELETE"},t).then((function(e){if(404===e.status)return e.json().then((function(e){console.warn(e.message),i.killTerminal(n)}));if(204!==e.status)throw new l.ServerConnection.ResponseError(e);i.killTerminal(n)}))}e.isAvailable=function(){return"true"===String(o.PageConfig.getOption("terminalsAvailable")).toLowerCase()},e.startNew=function(t){if(void 0===t&&(t={}),!c.TerminalSession.isAvailable())throw i.unavailableMsg;var n=t.serverSettings||l.ServerConnection.makeSettings(),o=i.getServiceUrl(n.baseUrl);return l.ServerConnection.makeRequest(o,{method:"POST"},n).then((function(e){if(200!==e.status)throw new l.ServerConnection.ResponseError(e);return e.json()})).then((function(i){var o=i.name;return new e(o,r({},t,{serverSettings:n}))}))},e.connectTo=function(n,o){if(void 0===o&&(o={}),!c.TerminalSession.isAvailable())return Promise.reject(i.unavailableMsg);var a=o.serverSettings||l.ServerConnection.makeSettings(),u=i.getTermUrl(a.baseUrl,n);return u in i.running?Promise.resolve(i.running[u].clone()):t(a).then((function(t){if(-1!==s.ArrayExt.findFirstIndex(t,(function(e){return e.name===n}))){var i=new e(n,r({},o,{serverSettings:a}));return Promise.resolve(i)}return Promise.reject("Could not find session")}))},e.listRunning=t,e.shutdown=n,e.shutdownAll=function(e){return t(e=e||l.ServerConnection.makeSettings()).then((function(t){s.each(t,(function(t){n(t.name,e)}))}))}}(u=t.DefaultTerminalSession||(t.DefaultTerminalSession={})),t.DefaultTerminalSession=u,function(e){e.running=Object.create(null),e.unavailableMsg="Terminals Unavailable",e.getTermUrl=function(e,t){return o.URLExt.join(e,"api/terminals",t)},e.getServiceUrl=function(e){return o.URLExt.join(e,"api/terminals")},e.killTerminal=function(t){e.running[t]&&e.running[t].dispose()}}(i||(i={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(108),s=n(9),a=n(481),l=n(5),c=n(54),u=n(497),h=function(e){function t(t){var n=e.call(this)||this;return n.loader=t&&t.loader,n.renderMime=new c.RenderMimeRegistry({initialFactories:c.standardRendererFactories}),n.renderMime.addFactory({safe:!1,mimeTypes:[u.WIDGET_MIMETYPE],createRenderer:function(e){return new u.WidgetRenderer(e,n)}},0),n}return i(t,e),t.prototype.display_view=function(e,t,n){return Promise.resolve(t).then((function(e){return l.Widget.attach(e.pWidget,n.el),e.on("remove",(function(){console.log("View removed",e)})),e}))},t.prototype._get_comm_info=function(){return Promise.resolve({})},t.prototype._create_comm=function(e,t,n,r,i){return Promise.resolve({on_close:function(){},on_msg:function(){},close:function(){}})},t.prototype.loadClass=function(e,t,n){var r=this;return new Promise((function(e,i){"@jupyter-widgets/base"===t?e(s):"@jupyter-widgets/controls"===t?e(o):"@jupyter-widgets/output"===t?e(a):void 0!==r.loader?e(r.loader(t,n)):i("Could not load module "+t+"@"+n)})).then((function(r){return r[e]?r[e]:Promise.reject("Class "+e+" not found in module "+t+"@"+n)}))},t}(s.ManagerBase);t.HTMLManager=h},function(e,t,n){var r=n(384),i=n(48);e.exports=function e(t,n,o,s,a){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,s,e,a))}},function(e,t,n){var r=n(385),i=n(171),o=n(419),s=n(423),a=n(444),l=n(95),c=n(172),u=n(173),h="[object Object]",d=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,p,f,g){var m=l(e),_=l(t),v=m?"[object Array]":a(e),y=_?"[object Array]":a(t),b=(v="[object Arguments]"==v?h:v)==h,w=(y="[object Arguments]"==y?h:y)==h,x=v==y;if(x&&c(e)){if(!c(t))return!1;m=!0,b=!1}if(x&&!b)return g||(g=new r),m||u(e)?i(e,t,n,p,f,g):o(e,t,v,n,p,f,g);if(!(1&n)){var k=b&&d.call(e,"__wrapped__"),E=w&&d.call(t,"__wrapped__");if(k||E){var S=k?e.value():e,M=E?t.value():t;return g||(g=new r),f(S,M,n,p,g)}}return!!x&&(g||(g=new r),s(e,t,n,p,f,g))}},function(e,t,n){var r=n(62),i=n(391),o=n(392),s=n(393),a=n(394),l=n(395);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=l,e.exports=c},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(63),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(63);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(63);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(63);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(62);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(62),i=n(93),o=n(170);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(166),i=n(399),o=n(168),s=n(169),a=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,h=c.hasOwnProperty,d=RegExp("^"+u.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:a).test(s(e))}},function(e,t,n){var r=n(94),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,i=n(400),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(27)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(403),i=n(62),o=n(93);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(e,t,n){var r=n(404),i=n(405),o=n(406),s=n(407),a=n(408);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},function(e,t,n){var r=n(64);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(64),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(64),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},function(e,t,n){var r=n(64);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(65);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(65);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(65);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(65);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},function(e,t,n){var r=n(170),i=n(415),o=n(416);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(94),i=n(420),o=n(165),s=n(171),a=n(421),l=n(422),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,h,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!h(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var f=1&r;if(p||(p=l),e.size!=t.size&&!f)return!1;var g=d.get(e);if(g)return g==t;r|=2,d.set(e,t);var m=s(p(e),p(t),r,c,h,d);return d.delete(e),m;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},function(e,t,n){var r=n(27).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(424),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,s,a){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var h=u;h--;){var d=c[h];if(!(l?d in t:i.call(t,d)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=l;++h<u;){var _=e[d=c[h]],v=t[d];if(o)var y=l?o(v,_,d,t,e,a):o(_,v,d,e,t,a);if(!(void 0===y?_===v||s(_,v,n,o,a):y)){g=!1;break}m||(m="constructor"==d)}if(g&&!m){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(g=!1)}return a.delete(e),a.delete(t),g}},function(e,t,n){var r=n(425),i=n(427),o=n(430);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(426),i=n(95);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(428),i=n(429),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(431),i=n(440),o=n(443);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t,n){var r=n(432),i=n(433),o=n(95),s=n(172),a=n(436),l=n(173),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&i(e),h=!n&&!u&&s(e),d=!n&&!u&&!h&&l(e),p=n||u||h||d,f=p?r(e.length,String):[],g=f.length;for(var m in e)!t&&!c.call(e,m)||p&&("length"==m||h&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||f.push(m);return f}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(434),i=n(48),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},function(e,t,n){var r=n(47),i=n(48);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(47),i=n(174),o=n(48),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(167),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a}).call(this,n(88)(e))},function(e,t,n){var r=n(441),i=n(442),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(175)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(166),i=n(174);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){var r=n(445),i=n(93),o=n(446),s=n(447),a=n(448),l=n(47),c=n(169),u=c(r),h=c(i),d=c(o),p=c(s),f=c(a),g=l;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=g(new i)||o&&"[object Promise]"!=g(o.resolve())||s&&"[object Set]"!=g(new s)||a&&"[object WeakMap]"!=g(new a))&&(g=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case u:return"[object DataView]";case h:return"[object Map]";case d:return"[object Promise]";case p:return"[object Set]";case f:return"[object WeakMap]"}return t}),e.exports=g},function(e,t,n){var r=n(35)(n(27),"DataView");e.exports=r},function(e,t,n){var r=n(35)(n(27),"Promise");e.exports=r},function(e,t,n){var r=n(35)(n(27),"Set");e.exports=r},function(e,t,n){var r=n(35)(n(27),"WeakMap");e.exports=r},function(e,t,n){var r=n(175)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.copyText=function(e){var t=document.body,n=function(r){r.preventDefault(),r.stopPropagation(),r.clipboardData.setData("text",e),t.removeEventListener("copy",n,!0)};t.addEventListener("copy",n,!0),document.execCommand("copy")}}(t.ClipboardExt||(t.ClipboardExt={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.boxSizing=function(e){var t=window.getComputedStyle(e),n=parseFloat(t.borderTopWidth)||0,r=parseFloat(t.borderLeftWidth)||0,i=parseFloat(t.borderRightWidth)||0,o=parseFloat(t.borderBottomWidth)||0,s=parseFloat(t.paddingTop)||0,a=parseFloat(t.paddingLeft)||0,l=parseFloat(t.paddingRight)||0,c=parseFloat(t.paddingBottom)||0;return{borderTop:n,borderLeft:r,borderRight:i,borderBottom:o,paddingTop:s,paddingLeft:a,paddingRight:l,paddingBottom:c,horizontalSum:r+a+l+i,verticalSum:n+s+c+o}},e.sizeLimits=function(e){var t=window.getComputedStyle(e),n=parseFloat(t.minWidth)||0,r=parseFloat(t.minHeight)||0,i=parseFloat(t.maxWidth)||1/0,o=parseFloat(t.maxHeight)||1/0;return{minWidth:n,minHeight:r,maxWidth:i=Math.max(n,i),maxHeight:o=Math.max(r,o)}},e.hitTest=function(e,t,n){var r=e.getBoundingClientRect();return t>=r.left&&t<r.right&&n>=r.top&&n<r.bottom},e.scrollIntoViewIfNeeded=function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect();r.top<=n.top&&r.bottom>=n.bottom||(r.top<n.top&&r.height<=n.height||r.bottom>n.bottom&&r.height>=n.height?e.scrollTop-=n.top-r.top:(r.top<n.top&&r.height>n.height||r.bottom>n.bottom&&r.height<n.height)&&(e.scrollTop-=n.bottom-r.bottom))}}(t.ElementExt||(t.ElementExt={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.IS_MAC=!!navigator.platform.match(/Mac/i),e.IS_WIN=!!navigator.platform.match(/Win/i),e.IS_IE=/Trident/.test(navigator.userAgent),e.IS_EDGE=/Edge/.test(navigator.userAgent),e.accelKey=function(t){return e.IS_MAC?t.metaKey:t.ctrlKey}}(t.Platform||(t.Platform={}))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.calculateSpecificity=function(e){if(e in r.specificityCache)return r.specificityCache[e];var t=r.calculateSingle(e);return r.specificityCache[e]=t},e.isValid=function(e){if(e in r.validityCache)return r.validityCache[e];var t=!0;try{r.testElem.querySelector(e)}catch(e){t=!1}return r.validityCache[e]=t},e.matches=function(e,t){return r.protoMatchFunc.call(e,t)}}(t.Selector||(t.Selector={})),function(e){var t;e.specificityCache=Object.create(null),e.validityCache=Object.create(null),e.testElem=document.createElement("div"),e.protoMatchFunc=(t=Element.prototype).matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector||function(e){var t=this.ownerDocument.querySelectorAll(e);return-1!==Array.prototype.indexOf.call(t,this)},e.calculateSingle=function(e){var t=0,u=0,h=0;function d(t){var n=e.match(t);return null!==n&&(e=e.slice(n[0].length),!0)}for(e=(e=e.split(",",1)[0]).replace(c," $1 ");e.length>0;)if(d(n))t++;else if(d(r))u++;else if(d(i))u++;else if(d(s))h++;else if(d(a))u++;else if(d(o))h++;else if(!d(l))return 0;return(t=Math.min(t,255))<<16|(u=Math.min(u,255))<<8|(h=Math.min(h,255))};var n=/^#[^\s\+>~#\.\[:]+/,r=/^\.[^\s\+>~#\.\[:]+/,i=/^\[[^\]]+\]/,o=/^[^\s\+>~#\.\[:]+/,s=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,a=/^:[^\s\+>~#\.\[:]+/,l=/^[\s\+>~\*]+/,c=/:not\(([^\)]+)\)/g}(r||(r={}))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(455)),r(n(456))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(3),o=function(){function e(e){this._root=new r.LeafNode,this.cmp=e}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this._root.size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._root.size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"first",{get:function(){var e=r.firstLeaf(this._root);return e.size>0?e.items[0]:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){var e=r.lastLeaf(this._root);return e.size>0?e.items[e.size-1]:void 0},enumerable:!0,configurable:!0}),e.prototype.iter=function(){return r.iterItems(this._root)},e.prototype.retro=function(){return r.retroItems(this._root)},e.prototype.slice=function(e,t){return r.sliceItems(this._root,e,t)},e.prototype.retroSlice=function(e,t){return r.retroSliceItems(this._root,e,t)},e.prototype.at=function(e){return r.itemAt(this._root,e)},e.prototype.has=function(e,t){return r.hasItem(this._root,e,t)},e.prototype.indexOf=function(e,t){return r.indexOf(this._root,e,t)},e.prototype.get=function(e,t){return r.getItem(this._root,e,t)},e.prototype.assign=function(e){this.clear(),this.update(e)},e.prototype.insert=function(e){var t=r.insertItem(this._root,e,this.cmp);return this._root=r.maybeSplitRoot(this._root),t},e.prototype.update=function(e){var t=this;i.each(e,(function(e){t.insert(e)}))},e.prototype.delete=function(e,t){var n=r.deleteItem(this._root,e,t);return this._root=r.maybeExtractRoot(this._root),n},e.prototype.remove=function(e){var t=r.removeItem(this._root,e);return this._root=r.maybeExtractRoot(this._root),t},e.prototype.clear=function(){r.clear(this._root),this._root=new r.LeafNode},e}();t.BPlusTree=o,function(e){e.from=function(t,n){var r=new e(n);return r.assign(t),r}}(o=t.BPlusTree||(t.BPlusTree={})),t.BPlusTree=o,function(e){var t=function(){function e(){this.items=[],this.sizes=[],this.children=[]}return Object.defineProperty(e.prototype,"type",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.sizes[this.sizes.length-1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.children.length},enumerable:!0,configurable:!0}),e}();e.BranchNode=t;var n=function(){function e(){this.next=null,this.prev=null,this.items=[]}return Object.defineProperty(e.prototype,"type",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.items.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.items.length},enumerable:!0,configurable:!0}),e}();function r(e){for(;0===e.type;)e=e.children[0];return e}function o(e){for(;0===e.type;)e=e.children[e.children.length-1];return e}function s(e){0===e.type?(i.each(e.children,s),e.children.length=0,e.sizes.length=0,e.items.length=0):(e.items.length=0,e.next=null,e.prev=null)}e.LeafNode=n,e.firstLeaf=r,e.lastLeaf=o,e.iterItems=function(e){var t=r(e);return new c(t,0,-1)},e.retroItems=function(e){var t=o(e);return new u(t,t.size-1,-1)},e.sliceItems=function(e,t,n){t=void 0===t?0:t<0?Math.max(0,t+e.size):Math.min(t,e.size),n=void 0===n?e.size:n<0?Math.max(0,n+e.size):Math.min(n,e.size);var r=Math.max(0,n-t);if(0===r)return i.empty();for(;0===e.type;){var o=h(e.sizes,t);o>0&&(t-=e.sizes[o-1]),e=e.children[o]}return new c(e,t,r)},e.retroSliceItems=function(e,t,n){t=void 0===t?e.size-1:t<0?Math.max(-1,t+e.size):Math.min(t,e.size-1),n=void 0===n?-1:n<0?Math.max(-1,n+e.size):Math.min(n,e.size-1);var r=Math.max(0,t-n);if(0===r)return i.empty();for(;0===e.type;){var o=h(e.sizes,t);o>0&&(t-=e.sizes[o-1]),e=e.children[o]}return new u(e,t,r)},e.itemAt=function(e,t){if(t<0&&(t+=e.size),!(t<0||t>=e.size)){for(;0===e.type;){var n=h(e.sizes,t);n>0&&(t-=e.sizes[n-1]),e=e.children[n]}return e.items[t]}},e.hasItem=function(e,t,n){for(;0===e.type;){var r=d(e.items,t,n);e=e.children[r]}return p(e.items,t,n)>=0},e.indexOf=function(e,t,n){for(var r=0;0===e.type;){var i=d(e.items,t,n);i>0&&(r+=e.sizes[i-1]),e=e.children[i]}var o=p(e.items,t,n);return o>=0?r+o:-r+o},e.getItem=function(e,t,n){for(;0===e.type;){var r=d(e.items,t,n);e=e.children[r]}var i=p(e.items,t,n);return i>=0?e.items[i]:void 0},e.insertItem=function e(t,n,r){if(1===t.type){var o,s=p(t.items,n,r);return s>=0?(o=t.items[s],t.items[s]=n):(o=void 0,i.ArrayExt.insert(t.items,-s-1,n)),o}var l=d(t.items,n,r),c=t.children[l],u=c.size,h=e(c,n,r),m=c.size;if(t.items[l]=c.items[0],u===m)return h;if(c.width>a){var _=g(c);i.ArrayExt.insert(t.children,l+1,_),i.ArrayExt.insert(t.items,l+1,_.items[0])}return f(t,l),h},e.deleteItem=function e(t,n,r){if(1===t.type){var o=p(t.items,n,r);if(o<0)return;return i.ArrayExt.removeAt(t.items,o)}var s=d(t.items,n,r),a=t.children[s],c=a.size,u=e(a,n,r);return c===a.size||(t.items[s]=a.items[0],a.width<l&&(s=m(t,s)),f(t,s)),u},e.removeItem=function e(t,n){if(n<0&&(n+=t.size),!(n<0||n>=t.size)){if(1===t.type)return i.ArrayExt.removeAt(t.items,n);var r=h(t.sizes,n);r>0&&(n-=t.sizes[r]);var o=t.children[r],s=e(o,n);return t.items[r]=o.items[0],o.width<l&&(r=m(t,r)),f(t,r),s}},e.clear=s,e.maybeSplitRoot=function(e){if(e.width<=a)return e;var n=new t,r=g(e);return n.sizes[0]=e.size,n.sizes[1]=e.size+r.size,n.children[0]=e,n.children[1]=r,n.items[0]=e.items[0],n.items[1]=r.items[0],n},e.maybeExtractRoot=function(e){if(1===e.type)return e;if(e.children.length>1)return e;var t=e.children.pop();return s(e),t};var a=32,l=a>>1,c=function(){function e(e,t,n){this._node=e,this._index=t,this._count=n}return e.prototype.iter=function(){return this},e.prototype.clone=function(){return new e(this._node,this._index,this._count)},e.prototype.next=function(){if(null!==this._node&&0!==this._count)return this._index>=this._node.size?(this._node=this._node.next,this._index=0,this.next()):(this._count>0&&this._count--,this._node.items[this._index++])},e}(),u=function(){function e(e,t,n){this._node=e,this._index=t,this._count=n}return e.prototype.iter=function(){return this},e.prototype.clone=function(){return new e(this._node,this._index,this._count)},e.prototype.next=function(){if(null!==this._node&&0!==this._count)return this._index>=this._node.size&&(this._index=this._node.size-1),this._index<0?(this._node=this._node.prev,this._index=this._node?this._node.size-1:-1,this.next()):(this._count>0&&this._count--,this._node.items[this._index--])},e}();function h(e,t){for(var n=e.length,r=0;r<n;++r)if(e[r]>t)return r;return n-1}function d(e,t,n){for(var r=e.length,i=1;i<r;++i)if(n(e[i],t)>0)return i-1;return r-1}function p(e,t,n){for(var r=e.length,i=0;i<r;++i){var o=n(e[i],t);if(0===o)return i;if(o>0)return-i-1}return-r-1}function f(e,t){for(var n=e.sizes,r=e.children,i=t>0?n[t-1]:0,o=r.length;t<o;++t)i=n[t]=i+r[t].size;n.length=r.length}function g(e){if(1===e.type){for(var r=new n,i=e.items,o=r.items,s=l,a=i.length;s<a;++s)o.push(i[s]);return i.length=l,e.next&&(e.next.prev=r),r.next=e.next,r.prev=e,e.next=r,r}var c=new t,u=e.children,h=c.children;for(s=l,a=u.length;s<a;++s)h.push(u[s]);u.length=l;var d=e.items,p=c.items;for(s=l,a=d.length;s<a;++s)p.push(d[s]);return d.length=l,f(e,l),f(c,0),c}function m(e,t){var n,r,o,a,c,u,h=e.children[t],d=0===t?e.children[t+1]:e.children[t-1],p=0===t,g=1===h.type,m=d.width>l;if(g&&m&&p){var _=d;return(v=h).items.push(_.items.shift()),e.items[t+1]=_.items[0],t}if(g&&m&&!p){_=d;return(v=h).items.unshift(_.items.pop()),e.items[t]=v.items[0],t-1}if(g&&!m&&p){var v=h;return(n=(_=d).items).unshift.apply(n,v.items),i.ArrayExt.removeAt(e.children,t),i.ArrayExt.removeAt(e.items,t+1),v.prev&&(v.prev.next=_),_.prev=v.prev,s(v),t}if(g&&!m&&!p){v=h;return(r=(_=d).items).push.apply(r,v.items),i.ArrayExt.removeAt(e.children,t),i.ArrayExt.removeAt(e.items,t),v.next&&(v.next.prev=_),_.next=v.next,s(v),t-1}if(!g&&m&&p){_=d;return(v=h).children.push(_.children.shift()),v.items.push(_.items.shift()),e.items[t+1]=_.items[0],f(v,v.width-1),f(_,0),t}if(!g&&m&&!p){_=d;return(v=h).children.unshift(_.children.pop()),v.items.unshift(_.items.pop()),e.items[t]=v.items[0],f(v,0),f(_,_.width-1),t-1}if(!g&&!m&&p){v=h;return(o=(_=d).children).unshift.apply(o,v.children),(a=_.items).unshift.apply(a,v.items),i.ArrayExt.removeAt(e.children,t),i.ArrayExt.removeAt(e.items,t+1),f(_,0),v.children.length=0,s(v),t}if(!g&&!m&&!p){v=h;return(c=(_=d).children).push.apply(c,v.children),(u=_.items).push.apply(u,v.items),i.ArrayExt.removeAt(e.children,t),i.ArrayExt.removeAt(e.items,t),f(_,0),v.children.length=0,s(v),t-1}throw"unreachable"}}(r||(r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(3),o=function(){function e(){this._first=null,this._last=null,this._size=0}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this._size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"first",{get:function(){return this._first?this._first.value:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){return this._last?this._last.value:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstNode",{get:function(){return this._first},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastNode",{get:function(){return this._last},enumerable:!0,configurable:!0}),e.prototype.iter=function(){return new e.ForwardValueIterator(this._first)},e.prototype.retro=function(){return new e.RetroValueIterator(this._last)},e.prototype.nodes=function(){return new e.ForwardNodeIterator(this._first)},e.prototype.retroNodes=function(){return new e.RetroNodeIterator(this._last)},e.prototype.assign=function(e){var t=this;this.clear(),i.each(e,(function(e){t.addLast(e)}))},e.prototype.push=function(e){this.addLast(e)},e.prototype.pop=function(){return this.removeLast()},e.prototype.shift=function(e){this.addFirst(e)},e.prototype.unshift=function(){return this.removeFirst()},e.prototype.addFirst=function(e){var t=new r.LinkedListNode(this,e);return this._first?(t.next=this._first,this._first.prev=t,this._first=t):(this._first=t,this._last=t),this._size++,t},e.prototype.addLast=function(e){var t=new r.LinkedListNode(this,e);return this._last?(t.prev=this._last,this._last.next=t,this._last=t):(this._first=t,this._last=t),this._size++,t},e.prototype.insertBefore=function(e,t){if(!t||t===this._first)return this.addFirst(e);if(!(t instanceof r.LinkedListNode)||t.list!==this)throw new Error("Reference node is not owned by the list.");var n=new r.LinkedListNode(this,e),i=t,o=i.prev;return n.next=i,n.prev=o,i.prev=n,o.next=n,this._size++,n},e.prototype.insertAfter=function(e,t){if(!t||t===this._last)return this.addLast(e);if(!(t instanceof r.LinkedListNode)||t.list!==this)throw new Error("Reference node is not owned by the list.");var n=new r.LinkedListNode(this,e),i=t,o=i.next;return n.next=o,n.prev=i,i.next=n,o.prev=n,this._size++,n},e.prototype.removeFirst=function(){var e=this._first;if(e)return e===this._last?(this._first=null,this._last=null):(this._first=e.next,this._first.prev=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value},e.prototype.removeLast=function(){var e=this._last;if(e)return e===this._first?(this._first=null,this._last=null):(this._last=e.prev,this._last.next=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value},e.prototype.removeNode=function(e){if(!(e instanceof r.LinkedListNode)||e.list!==this)throw new Error("Node is not owned by the list.");var t=e;t===this._first&&t===this._last?(this._first=null,this._last=null):t===this._first?(this._first=t.next,this._first.prev=null):t===this._last?(this._last=t.prev,this._last.next=null):(t.next.prev=t.prev,t.prev.next=t.next),t.list=null,t.next=null,t.prev=null,this._size--},e.prototype.clear=function(){for(var e=this._first;e;){var t=e.next;e.list=null,e.prev=null,e.next=null,e=t}this._first=null,this._last=null,this._size=0},e}();t.LinkedList=o,function(e){e.from=function(t){var n=new e;return n.assign(t),n};var t=function(){function e(e){this._node=e}return e.prototype.iter=function(){return this},e.prototype.clone=function(){return new e(this._node)},e.prototype.next=function(){if(this._node){var e=this._node;return this._node=e.next,e.value}},e}();e.ForwardValueIterator=t;var n=function(){function e(e){this._node=e}return e.prototype.iter=function(){return this},e.prototype.clone=function(){return new e(this._node)},e.prototype.next=function(){if(this._node){var e=this._node;return this._node=e.prev,e.value}},e}();e.RetroValueIterator=n;var r=function(){function e(e){this._node=e}return e.prototype.iter=function(){return this},e.prototype.clone=function(){return new e(this._node)},e.prototype.next=function(){if(this._node){var e=this._node;return this._node=e.next,e}},e}();e.ForwardNodeIterator=r;var i=function(){function e(e){this._node=e}return e.prototype.iter=function(){return this},e.prototype.clone=function(){return new e(this._node)},e.prototype.next=function(){if(this._node){var e=this._node;return this._node=e.prev,e}},e}();e.RetroNodeIterator=i}(o=t.LinkedList||(t.LinkedList={})),t.LinkedList=o,function(e){var t=function(e,t){this.list=null,this.next=null,this.prev=null,this.list=e,this.value=t};e.LinkedListNode=t}(r||(r={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(96),a=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,{layout:o.createLayout(t)})||this;return n.addClass("p-BoxPanel"),n}return i(t,e),Object.defineProperty(t.prototype,"direction",{get:function(){return this.layout.direction},set:function(e){this.layout.direction=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"alignment",{get:function(){return this.layout.alignment},set:function(e){this.layout.alignment=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){return this.layout.spacing},set:function(e){this.layout.spacing=e},enumerable:!0,configurable:!0}),t.prototype.onChildAdded=function(e){e.child.addClass("p-BoxPanel-child")},t.prototype.onChildRemoved=function(e){e.child.removeClass("p-BoxPanel-child")},t}(n(66).Panel);t.BoxPanel=a,function(e){e.getStretch=function(e){return s.BoxLayout.getStretch(e)},e.setStretch=function(e,t){s.BoxLayout.setStretch(e,t)},e.getSizeBasis=function(e){return s.BoxLayout.getSizeBasis(e)},e.setSizeBasis=function(e,t){s.BoxLayout.setSizeBasis(e,t)}}(a=t.BoxPanel||(t.BoxPanel={})),t.BoxPanel=a,function(e){e.createLayout=function(e){return e.layout||new s.BoxLayout(e)}}(o||(o={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s,a=n(3),l=n(12),c=n(7),u=n(16),h=n(67),d=n(15),p=function(e){function t(n){var r=e.call(this,{node:s.createNode()})||this;return r._activeIndex=-1,r._items=[],r._results=null,r.addClass("p-CommandPalette"),r.setFlag(d.Widget.Flag.DisallowLayout),r.commands=n.commands,r.renderer=n.renderer||t.defaultRenderer,r.commands.commandChanged.connect(r._onGenericChange,r),r.commands.keyBindingChanged.connect(r._onGenericChange,r),r}return i(t,e),t.prototype.dispose=function(){this._items.length=0,this._results=null,e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"searchNode",{get:function(){return this.node.getElementsByClassName("p-CommandPalette-search")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputNode",{get:function(){return this.node.getElementsByClassName("p-CommandPalette-input")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("p-CommandPalette-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),t.prototype.addItem=function(e){var t=s.createItem(this.commands,e);return this._items.push(t),this.refresh(),t},t.prototype.removeItem=function(e){this.removeItemAt(this._items.indexOf(e))},t.prototype.removeItemAt=function(e){a.ArrayExt.removeAt(this._items,e)&&this.refresh()},t.prototype.clearItems=function(){0!==this._items.length&&(this._items.length=0,this.refresh())},t.prototype.refresh=function(){this._results=null,this.update()},t.prototype.handleEvent=function(e){switch(e.type){case"click":this._evtClick(e);break;case"keydown":this._evtKeyDown(e);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused()}},t.prototype.onBeforeAttach=function(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),this.node.addEventListener("input",this),this.node.addEventListener("focus",this,!0),this.node.addEventListener("blur",this,!0)},t.prototype.onAfterDetach=function(e){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),this.node.removeEventListener("input",this),this.node.removeEventListener("focus",this,!0),this.node.removeEventListener("blur",this,!0)},t.prototype.onActivateRequest=function(e){if(this.isAttached){var t=this.inputNode;t.focus(),t.select()}},t.prototype.onUpdateRequest=function(e){var t=this.inputNode.value,n=this.contentNode,r=this._results;if(r||(r=this._results=s.search(this._items,t),this._activeIndex=t?a.ArrayExt.findFirstIndex(r,s.canActivate):-1),t||0!==r.length)if(t&&0===r.length){var i=this.renderer.renderEmptyMessage({query:t});h.VirtualDOM.render(i,n)}else{for(var o=this.renderer,l=this._activeIndex,c=new Array(r.length),d=0,p=r.length;d<p;++d){var f=r[d];if("header"===f.type){var g=f.indices,m=f.category;c[d]=o.renderHeader({category:m,indices:g})}else{var _=f.item,v=(g=f.indices,d===l);c[d]=o.renderItem({item:_,indices:g,active:v})}}if(h.VirtualDOM.render(c,n),l<0||l>=r.length)n.scrollTop=0;else{var y=n.children[l];u.ElementExt.scrollIntoViewIfNeeded(n,y)}}else h.VirtualDOM.render(null,n)},t.prototype._evtClick=function(e){if(0===e.button){var t=a.ArrayExt.findFirstIndex(this.contentNode.children,(function(t){return t.contains(e.target)}));-1!==t&&(e.preventDefault(),e.stopPropagation(),this._execute(t))}},t.prototype._evtKeyDown=function(e){if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey))switch(e.keyCode){case 13:e.preventDefault(),e.stopPropagation(),this._execute(this._activeIndex);break;case 38:e.preventDefault(),e.stopPropagation(),this._activatePreviousItem();break;case 40:e.preventDefault(),e.stopPropagation(),this._activateNextItem()}},t.prototype._activateNextItem=function(){if(this._results&&0!==this._results.length){var e=this._activeIndex,t=this._results.length,n=e<t-1?e+1:0,r=0===n?t-1:n-1;this._activeIndex=a.ArrayExt.findFirstIndex(this._results,s.canActivate,n,r),this.update()}},t.prototype._activatePreviousItem=function(){if(this._results&&0!==this._results.length){var e=this._activeIndex,t=this._results.length,n=e<=0?t-1:e-1,r=n===t-1?0:n+1;this._activeIndex=a.ArrayExt.findLastIndex(this._results,s.canActivate,n,r),this.update()}},t.prototype._execute=function(e){if(this._results){var t=this._results[e];if(t){if("header"===t.type){var n=this.inputNode;return n.value=t.category.toLowerCase()+" ",n.focus(),void this.refresh()}t.item.isEnabled&&(this.commands.execute(t.item.command,t.item.args),this.inputNode.value="",this.refresh())}}},t.prototype._toggleFocused=function(){var e=document.activeElement===this.inputNode;this.toggleClass("p-mod-focused",e)},t.prototype._onGenericChange=function(){this.refresh()},t}(d.Widget);t.CommandPalette=p,function(e){var t=function(){function e(){}return e.prototype.renderHeader=function(e){var t=this.formatHeader(e);return h.h.li({className:"p-CommandPalette-header"},t)},e.prototype.renderItem=function(e){var t=this.createItemClass(e),n=this.createItemDataset(e);return h.h.li({className:t,dataset:n},this.renderItemIcon(e),this.renderItemContent(e),this.renderItemShortcut(e))},e.prototype.renderEmptyMessage=function(e){var t=this.formatEmptyMessage(e);return h.h.li({className:"p-CommandPalette-emptyMessage"},t)},e.prototype.renderItemIcon=function(e){var t=this.createIconClass(e);return h.h.div({className:t},e.item.iconLabel)},e.prototype.renderItemContent=function(e){return h.h.div({className:"p-CommandPalette-itemContent"},this.renderItemLabel(e),this.renderItemCaption(e))},e.prototype.renderItemLabel=function(e){var t=this.formatItemLabel(e);return h.h.div({className:"p-CommandPalette-itemLabel"},t)},e.prototype.renderItemCaption=function(e){var t=this.formatItemCaption(e);return h.h.div({className:"p-CommandPalette-itemCaption"},t)},e.prototype.renderItemShortcut=function(e){var t=this.formatItemShortcut(e);return h.h.div({className:"p-CommandPalette-itemShortcut"},t)},e.prototype.createItemClass=function(e){var t="p-CommandPalette-item";e.item.isEnabled||(t+=" p-mod-disabled"),e.item.isToggled&&(t+=" p-mod-toggled"),e.active&&(t+=" p-mod-active");var n=e.item.className;return n&&(t+=" "+n),t},e.prototype.createItemDataset=function(e){return o({},e.item.dataset,{command:e.item.command})},e.prototype.createIconClass=function(e){var t="p-CommandPalette-itemIcon",n=e.item.iconClass;return n?t+" "+n:t},e.prototype.formatHeader=function(e){return e.indices&&0!==e.indices.length?a.StringExt.highlight(e.category,e.indices,h.h.mark):e.category},e.prototype.formatEmptyMessage=function(e){return"No commands found that match '"+e.query+"'"},e.prototype.formatItemShortcut=function(e){var t=e.item.keyBinding;return t?t.keys.map(c.CommandRegistry.formatKeystroke).join(", "):null},e.prototype.formatItemLabel=function(e){return e.indices&&0!==e.indices.length?a.StringExt.highlight(e.item.label,e.indices,h.h.mark):e.item.label},e.prototype.formatItemCaption=function(e){return e.item.caption},e}();e.Renderer=t,e.defaultRenderer=new t}(p=t.CommandPalette||(t.CommandPalette={})),t.CommandPalette=p,function(e){function t(e,t){for(var n=e.category.toLowerCase(),r=n+" "+e.label.toLowerCase(),i=1/0,o=null,s=/\b\w/g;;){var l=s.exec(r);if(!l)break;var c=a.StringExt.matchSumOfDeltas(r,t,l.index);if(!c)break;c&&c.score<=i&&(i=c.score,o=c.indices)}if(!o||i===1/0)return null;for(var u=n.length+1,h=a.ArrayExt.lowerBound(o,u,(function(e,t){return e-t})),d=o.slice(0,h),p=o.slice(h),f=0,g=p.length;f<g;++f)p[f]-=u;return 0===d.length?{matchType:0,categoryIndices:null,labelIndices:p,score:i,item:e}:0===p.length?{matchType:1,categoryIndices:d,labelIndices:null,score:i,item:e}:{matchType:2,categoryIndices:d,labelIndices:p,score:i,item:e}}function n(e,t){var n=e.matchType-t.matchType;if(0!==n)return n;var r=e.score-t.score;if(0!==r)return r;var i=0,o=0;switch(e.matchType){case 0:i=e.labelIndices[0],o=t.labelIndices[0];break;case 1:case 2:i=e.categoryIndices[0],o=t.categoryIndices[0]}if(i!==o)return i-o;var s=e.item.category.localeCompare(t.item.category);if(0!==s)return s;var a=e.item.rank,l=t.item.rank;return a!==l?a<l?-1:1:e.item.label.localeCompare(t.item.label)}e.createNode=function(){var e=document.createElement("div"),t=document.createElement("div"),n=document.createElement("div"),r=document.createElement("input"),i=document.createElement("ul");return t.className="p-CommandPalette-search",n.className="p-CommandPalette-wrapper",r.className="p-CommandPalette-input",i.className="p-CommandPalette-content",r.spellcheck=!1,n.appendChild(r),t.appendChild(n),e.appendChild(t),e.appendChild(i),e},e.createItem=function(e,t){return new r(e,t)},e.search=function(e,r){var i=function(e,n){r=n,n=r.replace(/\s+/g,"").toLowerCase();var r;for(var i=[],o=0,s=e.length;o<s;++o){var a=e[o];if(a.isVisible)if(n){var l=t(a,n);l&&(a.isEnabled||(l.score+=1e3),i.push(l))}else i.push({matchType:3,categoryIndices:null,labelIndices:null,score:0,item:a})}return i}(e,r);return i.sort(n),function(e){var t=new Array(e.length);a.ArrayExt.fill(t,!1);for(var n=[],r=0,i=e.length;r<i;++r)if(!t[r]){var o=e[r],s=o.item,l=o.categoryIndices,c=s.category;n.push({type:"header",category:c,indices:l});for(var u=r;u<i;++u)if(!t[u]){var h=e[u],d=h.item,p=h.labelIndices;d.category===c&&(n.push({type:"item",item:d,indices:p}),t[u]=!0)}}return n}(i)},e.canActivate=function(e){return"item"===e.type&&e.item.isEnabled};var r=function(){function e(e,t){this._commands=e,this.category=t.category.trim().replace(/\s+/g," "),this.command=t.command,this.args=t.args||l.JSONExt.emptyObject,this.rank=void 0!==t.rank?t.rank:1/0}return Object.defineProperty(e.prototype,"label",{get:function(){return this._commands.label(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iconClass",{get:function(){return this._commands.iconClass(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iconLabel",{get:function(){return this._commands.iconLabel(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"caption",{get:function(){return this._commands.caption(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{get:function(){return this._commands.className(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataset",{get:function(){return this._commands.dataset(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._commands.isEnabled(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isToggled",{get:function(){return this._commands.isToggled(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isVisible",{get:function(){return this._commands.isVisible(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keyBinding",{get:function(){var e=this.command,t=this.args;return a.ArrayExt.findLastValue(this._commands.keyBindings,(function(n){return n.command===e&&l.JSONExt.deepEqual(n.args,t)}))||null},enumerable:!0,configurable:!0}),e}()}(s||(s={}))},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(3),s=n(45),a=n(16),l=n(176),c=function(){function e(e){this._idTick=0,this._items=[],this.menu=new l.Menu(e)}return e.prototype.addItem=function(e){var t=this,n=i.createItem(e,this._idTick++);return this._items.push(n),new s.DisposableDelegate((function(){o.ArrayExt.removeFirstOf(t._items,n)}))},e.prototype.open=function(e){var t=this;if(this.menu.clearItems(),0===this._items.length)return!1;var n=i.matchItems(this._items,e);return!(!n||0===n.length)&&(o.each(n,(function(e){t.menu.addItem(e)})),this.menu.open(e.clientX,e.clientY),!0)},e}();t.ContextMenu=c,function(e){function t(e,t){var n=a.Selector.calculateSpecificity(e.selector),r=a.Selector.calculateSpecificity(t.selector);if(n!==r)return r-n;var i=e.rank,o=t.rank;return i!==o?i<o?-1:1:e.id-t.id}e.createItem=function(e,t){var n=function(e){if(-1!==e.indexOf(","))throw new Error("Selector cannot contain commas: "+e);if(!a.Selector.isValid(e))throw new Error("Invalid selector: "+e);return e}(e.selector),i=void 0!==e.rank?e.rank:1/0;return r({},e,{selector:n,rank:i,id:t})},e.matchItems=function(e,n){var r=n.target;if(!r)return null;var i=n.currentTarget;if(!i)return null;if(!(i.contains(r)||(r=document.elementFromPoint(n.clientX,n.clientY))&&i.contains(r)))return null;for(var o=[],s=e.slice();null!==r;){for(var l=[],c=0,u=s.length;c<u;++c){var h=s[c];h&&(a.Selector.matches(r,h.selector)&&(l.push(h),s[c]=null))}if(0!==l.length&&(l.sort(t),o.push.apply(o,l)),r===i)break;r=r.parentElement}return o}}(i||(i={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(3),a=n(12),l=n(16),c=n(7),u=n(10),h=n(36),d=n(6),p=n(178),f=n(98),g=n(15),m=function(e){function t(n){void 0===n&&(n={});var r=e.call(this)||this;r._drag=null,r._pressData=null,r._layoutModified=new d.Signal(r),r.addClass("p-DockPanel"),r._mode=n.mode||"multiple-document",r._renderer=n.renderer||t.defaultRenderer,r._edges=n.edges||o.DEFAULT_EDGES,r.dataset.mode=r._mode;var i={createTabBar:function(){return r._createTabBar()},createHandle:function(){return r._createHandle()}};return r.layout=new p.DockLayout({renderer:i,spacing:n.spacing}),r.overlay=n.overlay||new t.Overlay,r.node.appendChild(r.overlay.node),r}return i(t,e),t.prototype.dispose=function(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"layoutModified",{get:function(){return this._layoutModified},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderer",{get:function(){return this.layout.renderer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){return this.layout.spacing},set:function(e){this.layout.spacing=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return this._mode},set:function(e){if(this._mode!==e){this._mode=e,this.dataset.mode=e;var t=this.layout;switch(e){case"multiple-document":s.each(t.tabBars(),(function(e){e.show()}));break;case"single-document":t.restoreLayout(o.createSingleDocumentConfig(this));break;default:throw"unreachable"}u.MessageLoop.postMessage(this,o.LayoutModified)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this.layout.isEmpty},enumerable:!0,configurable:!0}),t.prototype.widgets=function(){return this.layout.widgets()},t.prototype.selectedWidgets=function(){return this.layout.selectedWidgets()},t.prototype.tabBars=function(){return this.layout.tabBars()},t.prototype.handles=function(){return this.layout.handles()},t.prototype.selectWidget=function(e){var t=s.find(this.tabBars(),(function(t){return-1!==t.titles.indexOf(e.title)}));if(!t)throw new Error("Widget is not contained in the dock panel.");t.currentTitle=e.title},t.prototype.activateWidget=function(e){this.selectWidget(e),e.activate()},t.prototype.saveLayout=function(){return this.layout.saveLayout()},t.prototype.restoreLayout=function(e){this._mode="multiple-document",this.layout.restoreLayout(e),(l.Platform.IS_EDGE||l.Platform.IS_IE)&&u.MessageLoop.flush(),u.MessageLoop.postMessage(this,o.LayoutModified)},t.prototype.addWidget=function(e,t){void 0===t&&(t={}),"single-document"===this._mode?this.layout.addWidget(e):this.layout.addWidget(e,t),u.MessageLoop.postMessage(this,o.LayoutModified)},t.prototype.processMessage=function(t){"layout-modified"===t.type?this._layoutModified.emit(void 0):e.prototype.processMessage.call(this,t)},t.prototype.handleEvent=function(e){switch(e.type){case"p-dragenter":this._evtDragEnter(e);break;case"p-dragleave":this._evtDragLeave(e);break;case"p-dragover":this._evtDragOver(e);break;case"p-drop":this._evtDrop(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseup":this._evtMouseUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}},t.prototype.onBeforeAttach=function(e){this.node.addEventListener("p-dragenter",this),this.node.addEventListener("p-dragleave",this),this.node.addEventListener("p-dragover",this),this.node.addEventListener("p-drop",this),this.node.addEventListener("mousedown",this)},t.prototype.onAfterDetach=function(e){this.node.removeEventListener("p-dragenter",this),this.node.removeEventListener("p-dragleave",this),this.node.removeEventListener("p-dragover",this),this.node.removeEventListener("p-drop",this),this.node.removeEventListener("mousedown",this),this._releaseMouse()},t.prototype.onChildAdded=function(e){o.isGeneratedTabBarProperty.get(e.child)||e.child.addClass("p-DockPanel-widget")},t.prototype.onChildRemoved=function(e){o.isGeneratedTabBarProperty.get(e.child)||(e.child.removeClass("p-DockPanel-widget"),u.MessageLoop.postMessage(this,o.LayoutModified))},t.prototype._evtDragEnter=function(e){e.mimeData.hasData("application/vnd.phosphor.widget-factory")&&(e.preventDefault(),e.stopPropagation())},t.prototype._evtDragLeave=function(e){e.preventDefault(),e.stopPropagation(),this.overlay.hide(1)},t.prototype._evtDragOver=function(e){e.preventDefault(),e.stopPropagation(),"invalid"===this._showOverlay(e.clientX,e.clientY)?e.dropAction="none":e.dropAction=e.proposedAction},t.prototype._evtDrop=function(e){if(e.preventDefault(),e.stopPropagation(),this.overlay.hide(0),"none"!==e.proposedAction){var t=e.clientX,n=e.clientY,r=o.findDropTarget(this,t,n,this._edges),i=r.zone,s=r.target;if("invalid"!==i){var a=e.mimeData.getData("application/vnd.phosphor.widget-factory");if("function"==typeof a){var l=a();if(l instanceof g.Widget)if(l.contains(this))e.dropAction="none";else{var c=s?o.getDropRef(s.tabBar):null;switch(i){case"root-all":this.addWidget(l);break;case"root-top":this.addWidget(l,{mode:"split-top"});break;case"root-left":this.addWidget(l,{mode:"split-left"});break;case"root-right":this.addWidget(l,{mode:"split-right"});break;case"root-bottom":this.addWidget(l,{mode:"split-bottom"});break;case"widget-all":this.addWidget(l,{mode:"tab-after",ref:c});break;case"widget-top":this.addWidget(l,{mode:"split-top",ref:c});break;case"widget-left":this.addWidget(l,{mode:"split-left",ref:c});break;case"widget-right":this.addWidget(l,{mode:"split-right",ref:c});break;case"widget-bottom":this.addWidget(l,{mode:"split-bottom",ref:c});break;case"widget-tab":this.addWidget(l,{mode:"tab-after",ref:c});break;default:throw"unreachable"}e.dropAction=e.proposedAction,this.activateWidget(l)}else e.dropAction="none"}else e.dropAction="none"}else e.dropAction="none"}else e.dropAction="none"},t.prototype._evtKeyDown=function(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&(this._releaseMouse(),u.MessageLoop.postMessage(this,o.LayoutModified))},t.prototype._evtMouseDown=function(e){if(0===e.button){var t=this.layout,n=e.target,r=s.find(t.handles(),(function(e){return e.contains(n)}));if(r){e.preventDefault(),e.stopPropagation(),document.addEventListener("keydown",this,!0),document.addEventListener("mouseup",this,!0),document.addEventListener("mousemove",this,!0),document.addEventListener("contextmenu",this,!0);var i=r.getBoundingClientRect(),o=e.clientX-i.left,a=e.clientY-i.top,l=window.getComputedStyle(r),u=c.Drag.overrideCursor(l.cursor);this._pressData={handle:r,deltaX:o,deltaY:a,override:u}}}},t.prototype._evtMouseMove=function(e){if(this._pressData){e.preventDefault(),e.stopPropagation();var t=this.node.getBoundingClientRect(),n=e.clientX-t.left-this._pressData.deltaX,r=e.clientY-t.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,n,r)}},t.prototype._evtMouseUp=function(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse(),u.MessageLoop.postMessage(this,o.LayoutModified))},t.prototype._releaseMouse=function(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,document.removeEventListener("keydown",this,!0),document.removeEventListener("mouseup",this,!0),document.removeEventListener("mousemove",this,!0),document.removeEventListener("contextmenu",this,!0))},t.prototype._showOverlay=function(e,t){var n,r,i,s,a=o.findDropTarget(this,e,t,this._edges),c=a.zone,u=a.target;if("invalid"===c)return this.overlay.hide(100),c;var h=l.ElementExt.boxSizing(this.node),d=this.node.getBoundingClientRect();switch(c){case"root-all":n=h.paddingTop,r=h.paddingLeft,i=h.paddingRight,s=h.paddingBottom;break;case"root-top":n=h.paddingTop,r=h.paddingLeft,i=h.paddingRight,s=d.height*o.GOLDEN_RATIO;break;case"root-left":n=h.paddingTop,r=h.paddingLeft,i=d.width*o.GOLDEN_RATIO,s=h.paddingBottom;break;case"root-right":n=h.paddingTop,r=d.width*o.GOLDEN_RATIO,i=h.paddingRight,s=h.paddingBottom;break;case"root-bottom":n=d.height*o.GOLDEN_RATIO,r=h.paddingLeft,i=h.paddingRight,s=h.paddingBottom;break;case"widget-all":n=u.top,r=u.left,i=u.right,s=u.bottom;break;case"widget-top":n=u.top,r=u.left,i=u.right,s=u.bottom+u.height/2;break;case"widget-left":n=u.top,r=u.left,i=u.right+u.width/2,s=u.bottom;break;case"widget-right":n=u.top,r=u.left+u.width/2,i=u.right,s=u.bottom;break;case"widget-bottom":n=u.top+u.height/2,r=u.left,i=u.right,s=u.bottom;break;case"widget-tab":var p=u.tabBar.node.getBoundingClientRect().height;n=u.top,r=u.left,i=u.right,s=u.bottom+u.height-p;break;default:throw"unreachable"}return this.overlay.show({top:n,left:r,right:i,bottom:s}),c},t.prototype._createTabBar=function(){var e=this._renderer.createTabBar();return o.isGeneratedTabBarProperty.set(e,!0),"single-document"===this._mode&&e.hide(),e.tabsMovable=!0,e.allowDeselect=!1,e.removeBehavior="select-previous-tab",e.insertBehavior="select-tab-if-needed",e.tabMoved.connect(this._onTabMoved,this),e.currentChanged.connect(this._onCurrentChanged,this),e.tabCloseRequested.connect(this._onTabCloseRequested,this),e.tabDetachRequested.connect(this._onTabDetachRequested,this),e.tabActivateRequested.connect(this._onTabActivateRequested,this),e},t.prototype._createHandle=function(){return this._renderer.createHandle()},t.prototype._onTabMoved=function(){u.MessageLoop.postMessage(this,o.LayoutModified)},t.prototype._onCurrentChanged=function(e,t){var n=t.previousTitle,r=t.currentTitle;n&&n.owner.hide(),r&&r.owner.show(),(l.Platform.IS_EDGE||l.Platform.IS_IE)&&u.MessageLoop.flush(),u.MessageLoop.postMessage(this,o.LayoutModified)},t.prototype._onTabActivateRequested=function(e,t){t.title.owner.activate()},t.prototype._onTabCloseRequested=function(e,t){t.title.owner.close()},t.prototype._onTabDetachRequested=function(e,t){var n=this;if(!this._drag){e.releaseMouse();var r=t.title,i=t.tab,o=t.clientX,s=t.clientY,l=new a.MimeData;l.setData("application/vnd.phosphor.widget-factory",(function(){return r.owner}));var u=i.cloneNode(!0);this._drag=new c.Drag({mimeData:l,dragImage:u,proposedAction:"move",supportedActions:"move"}),i.classList.add("p-mod-hidden");this._drag.start(o,s).then((function(){n._drag=null,i.classList.remove("p-mod-hidden")}))}},t}(g.Widget);t.DockPanel=m,function(e){var t=function(){function e(){this._timer=-1,this._hidden=!0,this.node=document.createElement("div"),this.node.classList.add("p-DockPanel-overlay"),this.node.classList.add("p-mod-hidden"),this.node.style.position="absolute"}return e.prototype.show=function(e){var t=this.node.style;t.top=e.top+"px",t.left=e.left+"px",t.right=e.right+"px",t.bottom=e.bottom+"px",clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("p-mod-hidden"))},e.prototype.hide=function(e){var t=this;if(!this._hidden)return e<=0?(clearTimeout(this._timer),this._timer=-1,this._hidden=!0,void this.node.classList.add("p-mod-hidden")):void(-1===this._timer&&(this._timer=window.setTimeout((function(){t._timer=-1,t._hidden=!0,t.node.classList.add("p-mod-hidden")}),e)))},e}();e.Overlay=t;var n=function(){function e(){}return e.prototype.createTabBar=function(){var e=new f.TabBar;return e.addClass("p-DockPanel-tabBar"),e},e.prototype.createHandle=function(){var e=document.createElement("div");return e.className="p-DockPanel-handle",e},e}();e.Renderer=n,e.defaultRenderer=new n}(m=t.DockPanel||(t.DockPanel={})),t.DockPanel=m,function(e){e.GOLDEN_RATIO=.618,e.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},e.LayoutModified=new u.ConflatableMessage("layout-modified"),e.isGeneratedTabBarProperty=new h.AttachedProperty({name:"isGeneratedTabBar",create:function(){return!1}}),e.createSingleDocumentConfig=function(e){if(e.isEmpty)return{main:null};var t=s.toArray(e.widgets()),n=e.selectedWidgets().next(),r=n?t.indexOf(n):-1;return{main:{type:"tab-area",widgets:t,currentIndex:r}}},e.findDropTarget=function(e,t,n,r){if(!l.ElementExt.hitTest(e.node,t,n))return{zone:"invalid",target:null};var i=e.layout;if(i.isEmpty)return{zone:"root-all",target:null};if("multiple-document"===e.mode){var o=e.node.getBoundingClientRect(),s=t-o.left+1,a=n-o.top+1,c=o.right-t,u=o.bottom-n;switch(Math.min(a,c,u,s)){case a:if(a<r.top)return{zone:"root-top",target:null};break;case c:if(c<r.right)return{zone:"root-right",target:null};break;case u:if(u<r.bottom)return{zone:"root-bottom",target:null};break;case s:if(s<r.left)return{zone:"root-left",target:null};break;default:throw"unreachable"}}var h=i.hitTestTabAreas(t,n);if(!h)return{zone:"invalid",target:null};if("single-document"===e.mode)return{zone:"widget-all",target:h};var d=h.x-h.left+1,p=h.y-h.top+1,f=h.left+h.width-h.x,g=h.top+h.height-h.y;if(p<h.tabBar.node.getBoundingClientRect().height)return{zone:"widget-tab",target:h};var m,_=Math.round(h.width/3),v=Math.round(h.height/3);if(d>_&&f>_&&p>v&&g>v)return{zone:"widget-all",target:h};switch(d/=_,p/=v,f/=_,g/=v,Math.min(d,p,f,g)){case d:m="widget-left";break;case p:m="widget-top";break;case f:m="widget-right";break;case g:m="widget-bottom";break;default:throw"unreachable"}return{zone:m,target:h}},e.getDropRef=function(e){return 0===e.titles.length?null:e.currentTitle?e.currentTitle.owner:e.titles[e.titles.length-1].owner}}(o||(o={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(6),o=function(){function e(){this._counter=0,this._widgets=[],this._activeWidget=null,this._currentWidget=null,this._numbers=new Map,this._nodes=new Map,this._activeChanged=new i.Signal(this),this._currentChanged=new i.Signal(this)}return e.prototype.dispose=function(){var e=this;this._counter<0||(this._counter=-1,i.Signal.clearData(this),r.each(this._widgets,(function(t){t.node.removeEventListener("focus",e,!0),t.node.removeEventListener("blur",e,!0)})),this._activeWidget=null,this._currentWidget=null,this._nodes.clear(),this._numbers.clear(),this._widgets.length=0)},Object.defineProperty(e.prototype,"currentChanged",{get:function(){return this._currentChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeChanged",{get:function(){return this._activeChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._counter<0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentWidget",{get:function(){return this._currentWidget},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeWidget",{get:function(){return this._activeWidget},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"widgets",{get:function(){return this._widgets},enumerable:!0,configurable:!0}),e.prototype.focusNumber=function(e){var t=this._numbers.get(e);return void 0===t?-1:t},e.prototype.has=function(e){return this._numbers.has(e)},e.prototype.add=function(e){if(!this._numbers.has(e)){var t=e.node.contains(document.activeElement),n=t?this._counter++:-1;this._widgets.push(e),this._numbers.set(e,n),this._nodes.set(e.node,e),e.node.addEventListener("focus",this,!0),e.node.addEventListener("blur",this,!0),e.disposed.connect(this._onWidgetDisposed,this),t&&this._setWidgets(e,e)}},e.prototype.remove=function(e){var t=this;if(this._numbers.has(e)&&(e.disposed.disconnect(this._onWidgetDisposed,this),e.node.removeEventListener("focus",this,!0),e.node.removeEventListener("blur",this,!0),r.ArrayExt.removeFirstOf(this._widgets,e),this._nodes.delete(e.node),this._numbers.delete(e),this._currentWidget===e)){var n=r.filter(this._widgets,(function(e){return-1!==t._numbers.get(e)})),i=r.max(n,(function(e,n){return t._numbers.get(e)-t._numbers.get(n)}))||null;this._setWidgets(i,null)}},e.prototype.handleEvent=function(e){switch(e.type){case"focus":this._evtFocus(e);break;case"blur":this._evtBlur(e)}},e.prototype._setWidgets=function(e,t){var n=this._currentWidget;this._currentWidget=e;var r=this._activeWidget;this._activeWidget=t,n!==e&&this._currentChanged.emit({oldValue:n,newValue:e}),r!==t&&this._activeChanged.emit({oldValue:r,newValue:t})},e.prototype._evtFocus=function(e){var t=this._nodes.get(e.currentTarget);t!==this._currentWidget&&this._numbers.set(t,this._counter++),this._setWidgets(t,t)},e.prototype._evtBlur=function(e){var t=this._nodes.get(e.currentTarget),n=e.relatedTarget;n&&(t.node.contains(n)||r.find(this._widgets,(function(e){return e.node.contains(n)})))||this._setWidgets(this._currentWidget,null)},e.prototype._onWidgetDisposed=function(e){this.remove(e)},e}();t.FocusTracker=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(3),a=n(16),l=n(10),c=n(36),u=n(49),h=n(30),d=n(15),p=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n._dirty=!1,n._rowSpacing=4,n._columnSpacing=4,n._items=[],n._rowStarts=[],n._columnStarts=[],n._rowSizers=[new u.BoxSizer],n._columnSizers=[new u.BoxSizer],n._box=null,void 0!==t.rowCount&&o.reallocSizers(n._rowSizers,t.rowCount),void 0!==t.columnCount&&o.reallocSizers(n._columnSizers,t.columnCount),void 0!==t.rowSpacing&&(n._rowSpacing=o.clampValue(t.rowSpacing)),void 0!==t.columnSpacing&&(n._columnSpacing=o.clampValue(t.columnSpacing)),n}return i(t,e),t.prototype.dispose=function(){s.each(this._items,(function(e){var t=e.widget;e.dispose(),t.dispose()})),this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"rowCount",{get:function(){return this._rowSizers.length},set:function(e){e!==this.rowCount&&(o.reallocSizers(this._rowSizers,e),this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnCount",{get:function(){return this._columnSizers.length},set:function(e){e!==this.columnCount&&(o.reallocSizers(this._columnSizers,e),this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowSpacing",{get:function(){return this._rowSpacing},set:function(e){e=o.clampValue(e),this._rowSpacing!==e&&(this._rowSpacing=e,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnSpacing",{get:function(){return this._columnSpacing},set:function(e){e=o.clampValue(e),this._columnSpacing!==e&&(this._columnSpacing=e,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),t.prototype.rowStretch=function(e){var t=this._rowSizers[e];return t?t.stretch:-1},t.prototype.setRowStretch=function(e,t){var n=this._rowSizers[e];n&&(t=o.clampValue(t),n.stretch!==t&&(n.stretch=t,this.parent&&this.parent.update()))},t.prototype.columnStretch=function(e){var t=this._columnSizers[e];return t?t.stretch:-1},t.prototype.setColumnStretch=function(e,t){var n=this._columnSizers[e];n&&(t=o.clampValue(t),n.stretch!==t&&(n.stretch=t,this.parent&&this.parent.update()))},t.prototype.iter=function(){return s.map(this._items,(function(e){return e.widget}))},t.prototype.addWidget=function(e){-1===s.ArrayExt.findFirstIndex(this._items,(function(t){return t.widget===e}))&&(this._items.push(new h.LayoutItem(e)),this.parent&&this.attachWidget(e))},t.prototype.removeWidget=function(e){var t=s.ArrayExt.findFirstIndex(this._items,(function(t){return t.widget===e}));if(-1===t){var n=s.ArrayExt.removeAt(this._items,t);this.parent&&this.detachWidget(e),n.dispose()}},t.prototype.init=function(){var t=this;e.prototype.init.call(this),s.each(this,(function(e){t.attachWidget(e)}))},t.prototype.attachWidget=function(e){this.parent.isAttached&&l.MessageLoop.sendMessage(e,d.Widget.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&l.MessageLoop.sendMessage(e,d.Widget.Msg.AfterAttach),this.parent.fit()},t.prototype.detachWidget=function(e){this.parent.isAttached&&l.MessageLoop.sendMessage(e,d.Widget.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&l.MessageLoop.sendMessage(e,d.Widget.Msg.AfterDetach),this.parent.fit()},t.prototype.onBeforeShow=function(t){e.prototype.onBeforeShow.call(this,t),this.parent.update()},t.prototype.onBeforeAttach=function(t){e.prototype.onBeforeAttach.call(this,t),this.parent.fit()},t.prototype.onChildShown=function(e){this.parent.fit()},t.prototype.onChildHidden=function(e){this.parent.fit()},t.prototype.onResize=function(e){this.parent.isVisible&&this._update(e.width,e.height)},t.prototype.onUpdateRequest=function(e){this.parent.isVisible&&this._update(-1,-1)},t.prototype.onFitRequest=function(e){this.parent.isAttached&&this._fit()},t.prototype._fit=function(){for(var e=0,n=this.rowCount;e<n;++e)this._rowSizers[e].minSize=0;for(e=0,n=this.columnCount;e<n;++e)this._columnSizers[e].minSize=0;var r=this._items.filter((function(e){return!e.isHidden}));for(e=0,n=r.length;e<n;++e)r[e].fit();var i=this.rowCount-1,s=this.columnCount-1;r.sort(o.rowSpanCmp);for(e=0,n=r.length;e<n;++e){var c=r[e],u=t.getCellConfig(c.widget),h=Math.min(u.row,i),p=Math.min(u.row+u.rowSpan-1,i);o.distributeMin(this._rowSizers,h,p,c.minHeight)}r.sort(o.columnSpanCmp);for(e=0,n=r.length;e<n;++e){c=r[e],u=t.getCellConfig(c.widget);var f=Math.min(u.column,s),g=Math.min(u.column+u.columnSpan-1,s);o.distributeMin(this._columnSizers,f,g,c.minWidth)}if("set-no-constraint"!==this.fitPolicy){var m=i*this._rowSpacing,_=s*this._columnSpacing;for(e=0,n=this.rowCount;e<n;++e)m+=this._rowSizers[e].minSize;for(e=0,n=this.columnCount;e<n;++e)_+=this._columnSizers[e].minSize;var v=this._box=a.ElementExt.boxSizing(this.parent.node);_+=v.horizontalSum,m+=v.verticalSum;var y=this.parent.node.style;y.minWidth=_+"px",y.minHeight=m+"px",this._dirty=!0,this.parent.parent&&l.MessageLoop.sendMessage(this.parent.parent,d.Widget.Msg.FitRequest),this._dirty&&l.MessageLoop.sendMessage(this.parent,d.Widget.Msg.UpdateRequest)}else l.MessageLoop.sendMessage(this.parent,d.Widget.Msg.UpdateRequest)},t.prototype._update=function(e,n){this._dirty=!1,e<0&&(e=this.parent.node.offsetWidth),n<0&&(n=this.parent.node.offsetHeight),this._box||(this._box=a.ElementExt.boxSizing(this.parent.node));var r=this._box.paddingTop,i=this._box.paddingLeft,o=e-this._box.horizontalSum,s=n-this._box.verticalSum,l=this.rowCount-1,c=this.columnCount-1,h=l*this._rowSpacing,d=c*this._columnSpacing;u.BoxEngine.calc(this._rowSizers,Math.max(0,s-h)),u.BoxEngine.calc(this._columnSizers,Math.max(0,o-d));for(var p=0,f=r,g=this.rowCount;p<g;++p)this._rowStarts[p]=f,f+=this._rowSizers[p].size+this._rowSpacing;for(p=0,f=i,g=this.columnCount;p<g;++p)this._columnStarts[p]=f,f+=this._columnSizers[p].size+this._columnSpacing;for(p=0,g=this._items.length;p<g;++p){var m=this._items[p];if(!m.isHidden){var _=t.getCellConfig(m.widget),v=Math.min(_.row,l),y=Math.min(_.column,c),b=Math.min(_.row+_.rowSpan-1,l),w=Math.min(_.column+_.columnSpan-1,c),x=this._columnStarts[y],k=this._rowStarts[v],E=this._columnStarts[w]+this._columnSizers[w].size-x,S=this._rowStarts[b]+this._rowSizers[b].size-k;m.update(x,k,E,S)}}},t}(h.Layout);t.GridLayout=p,function(e){e.getCellConfig=function(e){return o.cellConfigProperty.get(e)},e.setCellConfig=function(e,t){o.cellConfigProperty.set(e,o.normalizeConfig(t))}}(p=t.GridLayout||(t.GridLayout={})),t.GridLayout=p,function(e){e.cellConfigProperty=new c.AttachedProperty({name:"cellConfig",create:function(){return{row:0,column:0,rowSpan:1,columnSpan:1}},changed:function(e){e.parent&&e.parent.layout instanceof p&&e.parent.fit()}}),e.normalizeConfig=function(e){return{row:Math.max(0,Math.floor(e.row||0)),column:Math.max(0,Math.floor(e.column||0)),rowSpan:Math.max(1,Math.floor(e.rowSpan||0)),columnSpan:Math.max(1,Math.floor(e.columnSpan||0))}},e.clampValue=function(e){return Math.max(0,Math.floor(e))},e.rowSpanCmp=function(t,n){var r=e.cellConfigProperty.get(t.widget),i=e.cellConfigProperty.get(n.widget);return r.rowSpan-i.rowSpan},e.columnSpanCmp=function(t,n){var r=e.cellConfigProperty.get(t.widget),i=e.cellConfigProperty.get(n.widget);return r.columnSpan-i.columnSpan},e.reallocSizers=function(e,t){for(t=Math.max(1,Math.floor(t));e.length<t;)e.push(new u.BoxSizer);e.length>t&&(e.length=t)},e.distributeMin=function(e,t,n,r){if(!(n<t))if(t!==n){for(var i=0,o=t;o<=n;++o)i+=e[o].minSize;if(!(i>=r)){var s=(r-i)/(n-t+1);for(o=t;o<=n;++o)e[o].minSize+=s}}else{var a=e[t];a.minSize=Math.max(a.minSize,r)}}}(o||(o={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(3),a=n(16),l=n(177),c=n(10),u=n(67),h=n(15),d=function(e){function t(n){void 0===n&&(n={});var r=e.call(this,{node:o.createNode()})||this;return r._activeIndex=-1,r._menus=[],r._childMenu=null,r.addClass("p-MenuBar"),r.setFlag(h.Widget.Flag.DisallowLayout),r.renderer=n.renderer||t.defaultRenderer,r}return i(t,e),t.prototype.dispose=function(){this._closeChildMenu(),this._menus.length=0,e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"childMenu",{get:function(){return this._childMenu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("p-MenuBar-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeMenu",{get:function(){return this._menus[this._activeIndex]||null},set:function(e){this.activeIndex=e?this._menus.indexOf(e):-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(e){(e<0||e>=this._menus.length)&&(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"menus",{get:function(){return this._menus},enumerable:!0,configurable:!0}),t.prototype.openActiveMenu=function(){-1!==this._activeIndex&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))},t.prototype.addMenu=function(e){this.insertMenu(this._menus.length,e)},t.prototype.insertMenu=function(e,t){this._closeChildMenu();var n=this._menus.indexOf(t),r=Math.max(0,Math.min(e,this._menus.length));if(-1===n)return s.ArrayExt.insert(this._menus,r,t),t.addClass("p-MenuBar-menu"),t.aboutToClose.connect(this._onMenuAboutToClose,this),t.menuRequested.connect(this._onMenuMenuRequested,this),t.title.changed.connect(this._onTitleChanged,this),void this.update();r===this._menus.length&&r--,n!==r&&(s.ArrayExt.move(this._menus,n,r),this.update())},t.prototype.removeMenu=function(e){this.removeMenuAt(this._menus.indexOf(e))},t.prototype.removeMenuAt=function(e){this._closeChildMenu();var t=s.ArrayExt.removeAt(this._menus,e);t&&(t.aboutToClose.disconnect(this._onMenuAboutToClose,this),t.menuRequested.disconnect(this._onMenuMenuRequested,this),t.title.changed.disconnect(this._onTitleChanged,this),t.removeClass("p-MenuBar-menu"),this.update())},t.prototype.clearMenus=function(){if(0!==this._menus.length){this._closeChildMenu();for(var e=0,t=this._menus;e<t.length;e++){var n=t[e];n.aboutToClose.disconnect(this._onMenuAboutToClose,this),n.menuRequested.disconnect(this._onMenuMenuRequested,this),n.title.changed.disconnect(this._onTitleChanged,this),n.removeClass("p-MenuBar-menu")}this._menus.length=0,this.update()}},t.prototype.handleEvent=function(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseleave":this._evtMouseLeave(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}},t.prototype.onBeforeAttach=function(e){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("mouseleave",this),this.node.addEventListener("contextmenu",this)},t.prototype.onAfterDetach=function(e){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("mouseleave",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()},t.prototype.onActivateRequest=function(e){this.isAttached&&this.node.focus()},t.prototype.onUpdateRequest=function(e){for(var t=this._menus,n=this.renderer,r=this._activeIndex,i=new Array(t.length),o=0,s=t.length;o<s;++o){var a=t[o].title,l=o===r;i[o]=n.renderItem({title:a,active:l})}u.VirtualDOM.render(i,this.contentNode)},t.prototype._evtKeyDown=function(e){e.preventDefault(),e.stopPropagation();var t=e.keyCode;if(13!==t&&38!==t&&40!==t){if(27===t)return this._closeChildMenu(),this.activeIndex=-1,void this.node.blur();if(37!==t)if(39!==t){var n=l.getKeyboardLayout().keyForKeydownEvent(e);if(n){var r=this._activeIndex+1,i=o.findMnemonic(this._menus,n,r);-1===i.index||i.multiple?-1!==i.index?this.activeIndex=i.index:-1!==i.auto&&(this.activeIndex=i.auto):(this.activeIndex=i.index,this.openActiveMenu())}}else{s=this._activeIndex,a=this._menus.length;this.activeIndex=s===a-1?0:s+1}else{var s=this._activeIndex,a=this._menus.length;this.activeIndex=0===s?a-1:s-1}}else this.openActiveMenu()},t.prototype._evtMouseDown=function(e){if(a.ElementExt.hitTest(this.node,e.clientX,e.clientY)){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();var t=s.ArrayExt.findFirstIndex(this.contentNode.children,(function(t){return a.ElementExt.hitTest(t,e.clientX,e.clientY)}));-1!==t?0===e.button&&(this._childMenu?(this._closeChildMenu(),this.activeIndex=t):(this.activeIndex=t,this._openChildMenu())):this._closeChildMenu()}},t.prototype._evtMouseMove=function(e){var t=s.ArrayExt.findFirstIndex(this.contentNode.children,(function(t){return a.ElementExt.hitTest(t,e.clientX,e.clientY)}));t!==this._activeIndex&&(-1===t&&this._childMenu||(this.activeIndex=t,this._childMenu&&this._openChildMenu()))},t.prototype._evtMouseLeave=function(e){this._childMenu||(this.activeIndex=-1)},t.prototype._openChildMenu=function(){var e=this.activeMenu;if(e){var t=this._childMenu;if(t!==e){this._childMenu=e,t?t.close():(this.addClass("p-mod-active"),document.addEventListener("mousedown",this,!0)),c.MessageLoop.sendMessage(this,h.Widget.Msg.UpdateRequest);var n=this.contentNode.children[this._activeIndex].getBoundingClientRect(),r=n.left,i=n.bottom;e.open(r,i,{forceX:!0,forceY:!0})}}else this._closeChildMenu()},t.prototype._closeChildMenu=function(){if(this._childMenu){this.removeClass("p-mod-active"),document.removeEventListener("mousedown",this,!0);var e=this._childMenu;this._childMenu=null,e.close(),this.activeIndex=-1}},t.prototype._onMenuAboutToClose=function(e){e===this._childMenu&&(this.removeClass("p-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)},t.prototype._onMenuMenuRequested=function(e,t){if(e===this._childMenu){var n=this._activeIndex,r=this._menus.length;switch(t){case"next":this.activeIndex=n===r-1?0:n+1;break;case"previous":this.activeIndex=0===n?r-1:n-1}this.openActiveMenu()}},t.prototype._onTitleChanged=function(){this.update()},t}(h.Widget);t.MenuBar=d,function(e){var t=function(){function e(){}return e.prototype.renderItem=function(e){var t=this.createItemClass(e),n=this.createItemDataset(e);return u.h.li({className:t,dataset:n},this.renderIcon(e),this.renderLabel(e))},e.prototype.renderIcon=function(e){var t=this.createIconClass(e);return u.h.div({className:t},e.title.iconLabel)},e.prototype.renderLabel=function(e){var t=this.formatLabel(e);return u.h.div({className:"p-MenuBar-itemLabel"},t)},e.prototype.createItemClass=function(e){var t="p-MenuBar-item";return e.title.className&&(t+=" "+e.title.className),e.active&&(t+=" p-mod-active"),t},e.prototype.createItemDataset=function(e){return e.title.dataset},e.prototype.createIconClass=function(e){var t="p-MenuBar-itemIcon",n=e.title.iconClass;return n?t+" "+n:t},e.prototype.formatLabel=function(e){var t=e.title,n=t.label,r=t.mnemonic;if(r<0||r>=n.length)return n;var i=n.slice(0,r),o=n.slice(r+1),s=n[r];return[i,u.h.span({className:"p-MenuBar-itemMnemonic"},s),o]},e}();e.Renderer=t,e.defaultRenderer=new t}(d=t.MenuBar||(t.MenuBar={})),t.MenuBar=d,function(e){e.createNode=function(){var e=document.createElement("div"),t=document.createElement("ul");return t.className="p-MenuBar-content",e.appendChild(t),e.tabIndex=-1,e},e.findMnemonic=function(e,t,n){for(var r=-1,i=-1,o=!1,s=t.toUpperCase(),a=0,l=e.length;a<l;++a){var c=(a+n)%l,u=e[c].title;if(0!==u.label.length){var h=u.mnemonic;h>=0&&h<u.label.length?u.label[h].toUpperCase()===s&&(-1===r?r=c:o=!0):-1===i&&u.label[0].toUpperCase()===s&&(i=c)}}return{index:r,multiple:o,auto:i}}}(o||(o={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(16),a=n(7),l=n(6),c=n(15),u=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,{node:o.createNode()})||this;return n._onRepeat=function(){if(n._repeatTimer=-1,n._pressData){var e=n._pressData.part;if("thumb"!==e){n._repeatTimer=window.setTimeout(n._onRepeat,20);var t=n._pressData.mouseX,r=n._pressData.mouseY;if("decrement"!==e)if("increment"!==e){if("track"===e){if(!s.ElementExt.hitTest(n.trackNode,t,r))return;var i=n.thumbNode;if(s.ElementExt.hitTest(i,t,r))return;var o=i.getBoundingClientRect(),a=void 0;return a="horizontal"===n._orientation?t<o.left?"decrement":"increment":r<o.top?"decrement":"increment",void n._pageRequested.emit(a)}}else{if(!s.ElementExt.hitTest(n.incrementNode,t,r))return;n._stepRequested.emit("increment")}else{if(!s.ElementExt.hitTest(n.decrementNode,t,r))return;n._stepRequested.emit("decrement")}}}},n._value=0,n._page=10,n._maximum=100,n._repeatTimer=-1,n._pressData=null,n._thumbMoved=new l.Signal(n),n._stepRequested=new l.Signal(n),n._pageRequested=new l.Signal(n),n.addClass("p-ScrollBar"),n.setFlag(c.Widget.Flag.DisallowLayout),n._orientation=t.orientation||"vertical",n.dataset.orientation=n._orientation,void 0!==t.maximum&&(n._maximum=Math.max(0,t.maximum)),void 0!==t.page&&(n._page=Math.max(0,t.page)),void 0!==t.value&&(n._value=Math.max(0,Math.min(t.value,n._maximum))),n}return i(t,e),Object.defineProperty(t.prototype,"thumbMoved",{get:function(){return this._thumbMoved},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stepRequested",{get:function(){return this._stepRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pageRequested",{get:function(){return this._pageRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orientation",{get:function(){return this._orientation},set:function(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){e=Math.max(0,Math.min(e,this._maximum)),this._value!==e&&(this._value=e,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this._page},set:function(e){e=Math.max(0,e),this._page!==e&&(this._page=e,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maximum",{get:function(){return this._maximum},set:function(e){e=Math.max(0,e),this._maximum!==e&&(this._maximum=e,this._value=Math.min(this._value,e),this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"decrementNode",{get:function(){return this.node.getElementsByClassName("p-ScrollBar-button")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"incrementNode",{get:function(){return this.node.getElementsByClassName("p-ScrollBar-button")[1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trackNode",{get:function(){return this.node.getElementsByClassName("p-ScrollBar-track")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"thumbNode",{get:function(){return this.node.getElementsByClassName("p-ScrollBar-thumb")[0]},enumerable:!0,configurable:!0}),t.prototype.handleEvent=function(e){switch(e.type){case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseup":this._evtMouseUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}},t.prototype.onBeforeAttach=function(e){this.node.addEventListener("mousedown",this),this.update()},t.prototype.onAfterDetach=function(e){this.node.removeEventListener("mousedown",this),this._releaseMouse()},t.prototype.onUpdateRequest=function(e){var t=100*this._value/this._maximum,n=100*this._page/(this._page+this._maximum);t=Math.max(0,Math.min(t,100)),n=Math.max(0,Math.min(n,100));var r=this.thumbNode.style;"horizontal"===this._orientation?(r.top="",r.height="",r.left=t+"%",r.width=n+"%",r.transform="translate("+-t+"%, 0%)"):(r.left="",r.width="",r.top=t+"%",r.height=n+"%",r.transform="translate(0%, "+-t+"%)")},t.prototype._evtKeyDown=function(e){if(e.preventDefault(),e.stopPropagation(),27===e.keyCode){var t=this._pressData?this._pressData.value:-1;this._releaseMouse(),-1!==t&&this._moveThumb(t)}},t.prototype._evtMouseDown=function(e){if(0===e.button&&(this.activate(),!this._pressData)){var t=o.findPart(this,e.target);if(t){e.preventDefault(),e.stopPropagation();var n=a.Drag.overrideCursor("default");if(this._pressData={part:t,override:n,delta:-1,value:-1,mouseX:e.clientX,mouseY:e.clientY},document.addEventListener("mousemove",this,!0),document.addEventListener("mouseup",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0),"thumb"===t){var r=this.thumbNode,i=r.getBoundingClientRect();return"horizontal"===this._orientation?this._pressData.delta=e.clientX-i.left:this._pressData.delta=e.clientY-i.top,r.classList.add("p-mod-active"),void(this._pressData.value=this._value)}if("track"===t){i=this.thumbNode.getBoundingClientRect();var s=void 0;return s="horizontal"===this._orientation?e.clientX<i.left?"decrement":"increment":e.clientY<i.top?"decrement":"increment",this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._pageRequested.emit(s)}return"decrement"===t?(this.decrementNode.classList.add("p-mod-active"),this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._stepRequested.emit("decrement")):"increment"===t?(this.incrementNode.classList.add("p-mod-active"),this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._stepRequested.emit("increment")):void 0}}},t.prototype._evtMouseMove=function(e){if(this._pressData&&(e.preventDefault(),e.stopPropagation(),this._pressData.mouseX=e.clientX,this._pressData.mouseY=e.clientY,"thumb"===this._pressData.part)){var t,n,r=this.thumbNode.getBoundingClientRect(),i=this.trackNode.getBoundingClientRect();"horizontal"===this._orientation?(t=e.clientX-i.left-this._pressData.delta,n=i.width-r.width):(t=e.clientY-i.top-this._pressData.delta,n=i.height-r.height);var o=0===n?0:t*this._maximum/n;this._moveThumb(o)}},t.prototype._evtMouseUp=function(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())},t.prototype._releaseMouse=function(){this._pressData&&(clearTimeout(this._repeatTimer),this._repeatTimer=-1,this._pressData.override.dispose(),this._pressData=null,document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("contextmenu",this,!0),this.thumbNode.classList.remove("p-mod-active"),this.decrementNode.classList.remove("p-mod-active"),this.incrementNode.classList.remove("p-mod-active"))},t.prototype._moveThumb=function(e){e=Math.max(0,Math.min(e,this._maximum)),this._value!==e&&(this._value=e,this.update(),this._thumbMoved.emit(e))},t}(c.Widget);t.ScrollBar=u,function(e){e.createNode=function(){var e=document.createElement("div"),t=document.createElement("div"),n=document.createElement("div"),r=document.createElement("div"),i=document.createElement("div");return t.className="p-ScrollBar-button",n.className="p-ScrollBar-button",t.dataset.action="decrement",n.dataset.action="increment",r.className="p-ScrollBar-track",i.className="p-ScrollBar-thumb",r.appendChild(i),e.appendChild(t),e.appendChild(r),e.appendChild(n),e},e.findPart=function(e,t){return e.thumbNode.contains(t)?"thumb":e.trackNode.contains(t)?"track":e.decrementNode.contains(t)?"decrement":e.incrementNode.contains(t)?"increment":null}}(o||(o={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),s=n(10),a=n(30),l=n(15),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._widget=null,t}return i(t,e),t.prototype.dispose=function(){if(this._widget){var t=this._widget;this._widget=null,t.dispose()}e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"widget",{get:function(){return this._widget},set:function(e){e&&(e.parent=this.parent),this._widget!==e&&(this._widget&&this._widget.dispose(),this._widget=e,this.parent&&e&&this.attachWidget(e))},enumerable:!0,configurable:!0}),t.prototype.iter=function(){return this._widget?o.once(this._widget):o.empty()},t.prototype.removeWidget=function(e){this._widget===e&&(this._widget=null,this.parent&&this.detachWidget(e))},t.prototype.init=function(){var t=this;e.prototype.init.call(this),o.each(this,(function(e){t.attachWidget(e)}))},t.prototype.attachWidget=function(e){this.parent.isAttached&&s.MessageLoop.sendMessage(e,l.Widget.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&s.MessageLoop.sendMessage(e,l.Widget.Msg.AfterAttach)},t.prototype.detachWidget=function(e){this.parent.isAttached&&s.MessageLoop.sendMessage(e,l.Widget.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&s.MessageLoop.sendMessage(e,l.Widget.Msg.AfterDetach)},t}(a.Layout);t.SingletonLayout=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(3),a=n(7),l=n(66),c=n(179),u=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,{layout:o.createLayout(t)})||this;return n._pressData=null,n.addClass("p-SplitPanel"),n}return i(t,e),t.prototype.dispose=function(){this._releaseMouse(),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"orientation",{get:function(){return this.layout.orientation},set:function(e){this.layout.orientation=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"alignment",{get:function(){return this.layout.alignment},set:function(e){this.layout.alignment=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){return this.layout.spacing},set:function(e){this.layout.spacing=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderer",{get:function(){return this.layout.renderer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"handles",{get:function(){return this.layout.handles},enumerable:!0,configurable:!0}),t.prototype.relativeSizes=function(){return this.layout.relativeSizes()},t.prototype.setRelativeSizes=function(e){this.layout.setRelativeSizes(e)},t.prototype.handleEvent=function(e){switch(e.type){case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseup":this._evtMouseUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}},t.prototype.onBeforeAttach=function(e){this.node.addEventListener("mousedown",this)},t.prototype.onAfterDetach=function(e){this.node.removeEventListener("mousedown",this),this._releaseMouse()},t.prototype.onChildAdded=function(e){e.child.addClass("p-SplitPanel-child"),this._releaseMouse()},t.prototype.onChildRemoved=function(e){e.child.removeClass("p-SplitPanel-child"),this._releaseMouse()},t.prototype._evtKeyDown=function(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&this._releaseMouse()},t.prototype._evtMouseDown=function(e){if(0===e.button){var t=this.layout,n=s.ArrayExt.findFirstIndex(t.handles,(function(t){return t.contains(e.target)}));if(-1!==n){var r;e.preventDefault(),e.stopPropagation(),document.addEventListener("mouseup",this,!0),document.addEventListener("mousemove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);var i=t.handles[n],o=i.getBoundingClientRect();r="horizontal"===t.orientation?e.clientX-o.left:e.clientY-o.top;var l=window.getComputedStyle(i),c=a.Drag.overrideCursor(l.cursor);this._pressData={index:n,delta:r,override:c}}}},t.prototype._evtMouseMove=function(e){var t;e.preventDefault(),e.stopPropagation();var n=this.layout,r=this.node.getBoundingClientRect();t="horizontal"===n.orientation?e.clientX-r.left-this._pressData.delta:e.clientY-r.top-this._pressData.delta,n.moveHandle(this._pressData.index,t)},t.prototype._evtMouseUp=function(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())},t.prototype._releaseMouse=function(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,document.removeEventListener("mouseup",this,!0),document.removeEventListener("mousemove",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("contextmenu",this,!0))},t}(l.Panel);t.SplitPanel=u,function(e){var t=function(){function e(){}return e.prototype.createHandle=function(){var e=document.createElement("div");return e.className="p-SplitPanel-handle",e},e}();e.Renderer=t,e.defaultRenderer=new t,e.getStretch=function(e){return c.SplitLayout.getStretch(e)},e.setStretch=function(e,t){c.SplitLayout.setStretch(e,t)}}(u=t.SplitPanel||(t.SplitPanel={})),t.SplitPanel=u,function(e){e.createLayout=function(e){return e.layout||new c.SplitLayout({renderer:e.renderer||u.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing})}}(o||(o={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=n(16),a=n(10),l=n(6),c=n(96),u=n(181),h=n(98),d=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;n._currentChanged=new l.Signal(n),n.addClass("p-TabPanel"),n.tabBar=new h.TabBar(t),n.tabBar.addClass("p-TabPanel-tabBar"),n.stackedPanel=new u.StackedPanel,n.stackedPanel.addClass("p-TabPanel-stackedPanel"),n.tabBar.tabMoved.connect(n._onTabMoved,n),n.tabBar.currentChanged.connect(n._onCurrentChanged,n),n.tabBar.tabCloseRequested.connect(n._onTabCloseRequested,n),n.tabBar.tabActivateRequested.connect(n._onTabActivateRequested,n),n.stackedPanel.widgetRemoved.connect(n._onWidgetRemoved,n),n._tabPlacement=t.tabPlacement||"top";var r=o.directionFromPlacement(n._tabPlacement),i=o.orientationFromPlacement(n._tabPlacement);n.tabBar.orientation=i,n.tabBar.dataset.placement=n._tabPlacement;var s=new c.BoxLayout({direction:r,spacing:0});return c.BoxLayout.setStretch(n.tabBar,0),c.BoxLayout.setStretch(n.stackedPanel,1),s.addWidget(n.tabBar),s.addWidget(n.stackedPanel),n.layout=s,n}return i(t,e),Object.defineProperty(t.prototype,"currentChanged",{get:function(){return this._currentChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentIndex",{get:function(){return this.tabBar.currentIndex},set:function(e){this.tabBar.currentIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentWidget",{get:function(){var e=this.tabBar.currentTitle;return e?e.owner:null},set:function(e){this.tabBar.currentTitle=e?e.title:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabsMovable",{get:function(){return this.tabBar.tabsMovable},set:function(e){this.tabBar.tabsMovable=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabPlacement",{get:function(){return this._tabPlacement},set:function(e){if(this._tabPlacement!==e){this._tabPlacement=e;var t=o.directionFromPlacement(e),n=o.orientationFromPlacement(e);this.tabBar.orientation=n,this.tabBar.dataset.placement=e,this.layout.direction=t}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"widgets",{get:function(){return this.stackedPanel.widgets},enumerable:!0,configurable:!0}),t.prototype.addWidget=function(e){this.insertWidget(this.widgets.length,e)},t.prototype.insertWidget=function(e,t){t!==this.currentWidget&&t.hide(),this.stackedPanel.insertWidget(e,t),this.tabBar.insertTab(e,t.title)},t.prototype._onCurrentChanged=function(e,t){var n=t.previousIndex,r=t.previousTitle,i=t.currentIndex,o=t.currentTitle,l=r?r.owner:null,c=o?o.owner:null;l&&l.hide(),c&&c.show(),this._currentChanged.emit({previousIndex:n,previousWidget:l,currentIndex:i,currentWidget:c}),(s.Platform.IS_EDGE||s.Platform.IS_IE)&&a.MessageLoop.flush()},t.prototype._onTabActivateRequested=function(e,t){t.title.owner.activate()},t.prototype._onTabCloseRequested=function(e,t){t.title.owner.close()},t.prototype._onTabMoved=function(e,t){this.stackedPanel.insertWidget(t.toIndex,t.title.owner)},t.prototype._onWidgetRemoved=function(e,t){this.tabBar.removeTab(t.title)},t}(n(15).Widget);t.TabPanel=d,function(e){e.orientationFromPlacement=function(e){return t[e]},e.directionFromPlacement=function(e){return n[e]};var t={top:"horizontal",left:"vertical",right:"vertical",bottom:"horizontal"},n={top:"top-to-bottom",left:"left-to-right",right:"right-to-left",bottom:"bottom-to-top"}}(o||(o={}))},function(e,t,n){var r,i,o;
/*!
 * jQuery UI Slider 1.13.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */!function(s){"use strict";i=[n(11),n(469),n(471),n(51),n(182)],void 0===(o="function"==typeof(r=function(e){return e.widget("ui.slider",e.ui.mouse,{version:"1.13.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,n,r=this.options,i=this.element.find(".ui-slider-handle"),o=[];for(n=r.values&&r.values.length||1,i.length>n&&(i.slice(n).remove(),i=i.slice(0,n)),t=i.length;t<n;t++)o.push("<span tabindex='0'></span>");this.handles=i.add(e(o.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each((function(t){e(this).data("ui-slider-handle-index",t).attr("tabIndex",0)}))},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:Array.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=e("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var n,r,i,o,s,a,l,c=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:t.pageX,y:t.pageY},r=this._normValueFromMouse(n),i=this._valueMax()-this._valueMin()+1,this.handles.each((function(t){var n=Math.abs(r-c.values(t));(i>n||i===n&&(t===c._lastChangedValue||c.values(t)===u.min))&&(i=n,o=e(this),s=t)})),!1!==this._start(t,s)&&(this._mouseSliding=!0,this._handleIndex=s,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),a=o.offset(),l=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-a.left-o.width()/2,top:t.pageY-a.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,s,r),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,r,i,o;return"horizontal"===this.orientation?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(r=n/t)>1&&(r=1),r<0&&(r=0),"vertical"===this.orientation&&(r=1-r),i=this._valueMax()-this._valueMin(),o=this._valueMin()+r*i,this._trimAlignValue(o)},_uiHash:function(e,t,n){var r={handle:this.handles[e],handleIndex:e,value:void 0!==t?t:this.value()};return this._hasMultipleValues()&&(r.value=void 0!==t?t:this.values(e),r.values=n||this.values()),r},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(e,t){return this._trigger("start",e,this._uiHash(t))},_slide:function(e,t,n){var r,i=this.value(),o=this.values();this._hasMultipleValues()&&(r=this.values(t?0:1),i=this.values(t),2===this.options.values.length&&!0===this.options.range&&(n=0===t?Math.min(r,n):Math.max(r,n)),o[t]=n),n!==i&&!1!==this._trigger("slide",e,this._uiHash(t,n,o))&&(this._hasMultipleValues()?this.values(t,n):this.value(n))},_stop:function(e,t){this._trigger("stop",e,this._uiHash(t))},_change:function(e,t){this._keySliding||this._mouseSliding||(this._lastChangedValue=t,this._trigger("change",e,this._uiHash(t)))},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,t){var n,r,i;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(t),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!Array.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(n=this.options.values,r=arguments[0],i=0;i<n.length;i+=1)n[i]=this._trimAlignValue(r[i]),this._change(null,i);this._refreshValue()},_setOption:function(e,t){var n,r=0;switch("range"===e&&!0===this.options.range&&("min"===t?(this.options.value=this._values(0),this.options.values=null):"max"===t&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(r=this.options.values.length),this._super(e,t),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(t),this.handles.css("horizontal"===t?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=r-1;n>=0;n--)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(e){this._super(e),this._toggleClass(null,"ui-state-disabled",!!e)},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,n,r;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this._hasMultipleValues()){for(n=this.options.values.slice(),r=0;r<n.length;r+=1)n[r]=this._trimAlignValue(n[r]);return n}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,r=e-n;return 2*Math.abs(n)>=t&&(r+=n>0?t:-t),parseFloat(r.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),n=this.options.step;(e=Math.round((e-t)/n)*n+t)>this.options.max&&(e-=n),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return-1===n?0:t.length-n-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,n,r,i,o,s=this.options.range,a=this.options,l=this,c=!this._animateOff&&a.animate,u={};this._hasMultipleValues()?this.handles.each((function(r){n=(l.values(r)-l._valueMin())/(l._valueMax()-l._valueMin())*100,u["horizontal"===l.orientation?"left":"bottom"]=n+"%",e(this).stop(1,1)[c?"animate":"css"](u,a.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===r&&l.range.stop(1,1)[c?"animate":"css"]({left:n+"%"},a.animate),1===r&&l.range[c?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:a.animate})):(0===r&&l.range.stop(1,1)[c?"animate":"css"]({bottom:n+"%"},a.animate),1===r&&l.range[c?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:a.animate}))),t=n})):(r=this.value(),i=this._valueMin(),o=this._valueMax(),n=o!==i?(r-i)/(o-i)*100:0,u["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[c?"animate":"css"](u,a.animate),"min"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:n+"%"},a.animate),"max"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:100-n+"%"},a.animate),"min"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:n+"%"},a.animate),"max"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:100-n+"%"},a.animate))},_handleEvents:{keydown:function(t){var n,r,i,o=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(e(t.target),null,"ui-state-active"),!1===this._start(t,o)))return}switch(i=this.options.step,n=r=this._hasMultipleValues()?this.values(o):this.value(),t.keyCode){case e.ui.keyCode.HOME:r=this._valueMin();break;case e.ui.keyCode.END:r=this._valueMax();break;case e.ui.keyCode.PAGE_UP:r=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:r=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(n===this._valueMax())return;r=this._trimAlignValue(n+i);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(n===this._valueMin())return;r=this._trimAlignValue(n-i)}this._slide(t,o,r)},keyup:function(t){var n=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,n),this._change(t,n),this._removeClass(e(t.target),null,"ui-state-active"))}}})})?r.apply(t,i):r)||(e.exports=o)}()},function(e,t,n){var r,i,o;
/*!
 * jQuery UI Mouse 1.13.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */!function(s){"use strict";i=[n(11),n(470),n(51),n(182)],void 0===(o="function"==typeof(r=function(e){var t=!1;return e(document).on("mouseup",(function(){t=!1})),e.widget("ui.mouse",{version:"1.13.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,(function(e){return t._mouseDown(e)})).on("click."+this.widgetName,(function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!t){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var r=this,i=1===n.which,o=!("string"!=typeof this.options.cancel||!n.target.nodeName)&&e(n.target).closest(this.options.cancel).length;return!(i&&!o&&this._mouseCapture(n))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){r.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=!1!==this._mouseStart(n),!this._mouseStarted)?(n.preventDefault(),!0):(!0===e.data(n.target,this.widgetName+".preventClickEvent")&&e.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return r._mouseMove(e)},this._mouseUpDelegate=function(e){return r._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),t=!0,!0))}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(n){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,n.target===this._mouseDownEvent.target&&e.data(n.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(n)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,t=!1,n.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})?r.apply(t,i):r)||(e.exports=o)}()},function(e,t,n){var r,i,o;!function(s){"use strict";i=[n(11),n(51)],void 0===(o="function"==typeof(r=function(e){return e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())})?r.apply(t,i):r)||(e.exports=o)}()},function(e,t,n){var r,i,o;
/*!
 * jQuery UI Keycode 1.13.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */!function(s){"use strict";i=[n(11),n(51)],void 0===(o="function"==typeof(r=function(e){return e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})?r.apply(t,i):r)||(e.exports=o)}()},function(e){e.exports=JSON.parse('{"name":"@jupyter-widgets/controls","version":"1.5.3","description":"Jupyter interactive widgets","repository":{"type":"git","url":"https://github.com/jupyter-widgets/ipywidgets.git"},"license":"BSD-3-Clause","author":"Project Jupyter","files":["lib/**/*.d.ts","lib/**/*.js","css/*.css","dist/"],"main":"lib/index.js","typings":"lib/index.d.ts","scripts":{"build":"npm run build:src && npm run build:css","build:css":"postcss --use postcss-import --use postcss-cssnext -o css/widgets.built.css css/widgets.css","build:src":"tsc","build:test":"tsc --project test && webpack --config test/webpack.conf.js","clean":"npm run clean:src","clean:src":"rimraf lib && rimraf tsconfig.tsbuildinfo","lint":"tslint --project tslint.json --format stylish","prepublish":"npm run clean && npm run build","test":"npm run test:unit","test:coverage":"npm run build:test && webpack --config test/webpack-cov.conf.js && karma start test/karma-cov.conf.js","test:unit":"npm run test:unit:firefox && npm run test:unit:chrome","test:unit:chrome":"npm run test:unit:default -- --browsers=Chrome","test:unit:default":"npm run build:test && karma start test/karma.conf.js --log-level debug","test:unit:firefox":"npm run test:unit:default -- --browsers=Firefox","test:unit:ie":"npm run test:unit:default -- --browsers=IE"},"dependencies":{"@jupyter-widgets/base":"^2.0.2","@phosphor/algorithm":"^1.1.0","@phosphor/domutils":"^1.1.0","@phosphor/messaging":"^1.2.1","@phosphor/signaling":"^1.2.0","@phosphor/widgets":"^1.3.0","d3-format":"^1.3.0","jquery":"^3.1.1","jquery-ui":"^1.12.1","underscore":"^1.8.3"},"devDependencies":{"@jupyterlab/services":"^2.0.0 || ^3.0.0 || ^4.0.0","@types/d3-format":"^1.3.1","@types/expect.js":"^0.3.29","@types/mathjax":"^0.0.35","@types/mocha":"^5.2.7","@types/node":"^12.0.10","chai":"^4.0.0","css-loader":"^3.0.0","expect.js":"^0.3.1","file-loader":"^4.0.0","istanbul-instrumenter-loader":"^3.0.1","json-loader":"^0.5.7","karma":"^4.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-firefox-launcher":"^1.1.0","karma-ie-launcher":"^1.0.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-webpack":"^4.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","postcss-cli":"^6.1.2","postcss-cssnext":"^3.1.0","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","rimraf":"^2.6.1","sinon":"^7.3.2","sinon-chai":"^3.3.0","style-loader":"^0.23.1","tslint":"^5.18.0","typescript":"~3.5.2","url-loader":"^2.0.0","webpack":"^4.35.0"},"gitHead":"92d7d42c00a1b0d9ce921533acb08beefdea3eb2"}')},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,a)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(37),a=n(99),l=a.PROTOCOL_VERSION.split(".",1)[0],c=function(){function e(){this.comm_target_name="jupyter.widget",this._models=Object.create(null)}return e.prototype.display_model=function(e,t,n){var r=this;return void 0===n&&(n={}),this.create_view(t,n).then((function(t){return r.display_view(e,t,n)})).catch(s.reject("Could not create view",!0))},e.prototype.setViewOptions=function(e){return void 0===e&&(e={}),e},e.prototype.create_view=function(e,t){var n=this;void 0===t&&(t={});var r=e.state_change=e.state_change.then((function(){return n.loadClass(e.get("_view_name"),e.get("_view_module"),e.get("_view_module_version")).then((function(r){var i=new r({model:e,options:n.setViewOptions(t)});return i.listenTo(e,"destroy",i.remove),Promise.resolve(i.render()).then((function(){return i}))})).catch(s.reject("Could not create a view for model id "+e.model_id,!0))})),i=s.uuid();return e.views[i]=r,r.then((function(e){e.once("remove",(function(){delete e.model.views[i]}),n)})),e.state_change},e.prototype.callbacks=function(e){return{}},e.prototype.get_model=function(e){return this._models[e]},e.prototype.handle_comm_open=function(e,t){var n=(t.metadata||{}).version||"";if(n.split(".",1)[0]!==l){var r="Wrong widget protocol version: received protocol version '"+n+"', but was expecting major version '"+l+"'";return console.error(r),Promise.reject(r)}var i=t.content.data,o=i.buffer_paths||[],a=(t.buffers||[]).map((function(e){return e instanceof DataView?e:new DataView(e instanceof ArrayBuffer?e:e.buffer)}));return s.put_buffers(i.state,o,a),this.new_model({model_name:i.state._model_name,model_module:i.state._model_module,model_module_version:i.state._model_module_version,comm:e},i.state).catch(s.reject("Could not create a model.",!0))},e.prototype.new_widget=function(e,t){var n,i=this;if(void 0===t&&(t={}),void 0===e.view_name||void 0===e.view_module||void 0===e.view_module_version)return Promise.reject("new_widget(...) must be given view information in the options.");n=e.comm?Promise.resolve(e.comm):this._create_comm(this.comm_target_name,e.model_id,{state:{_model_module:e.model_module,_model_module_version:e.model_module_version,_model_name:e.model_name,_view_module:e.view_module,_view_module_version:e.view_module_version,_view_name:e.view_name}},{version:a.PROTOCOL_VERSION});var o=r({},e);return n.then((function(e){return o.comm=e,i.new_model(o,t).then((function(e){return e.sync("create",e),e}))}),(function(){return o.model_id||(o.model_id=s.uuid()),i.new_model(o,t)}))},e.prototype.register_model=function(e,t){var n=this;this._models[e]=t,t.then((function(t){t.once("comm:close",(function(){delete n._models[e]}))}))},e.prototype.new_model=function(e,t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){var n,r;return o(this,(function(i){switch(i.label){case 0:if(e.model_id)n=e.model_id;else{if(!e.comm)throw new Error("Neither comm nor model_id provided in options object. At least one must exist.");n=e.model_id=e.comm.comm_id}return r=this._make_model(e,t),this.register_model(n,r),[4,r];case 1:return[2,i.sent()]}}))}))},e.prototype._make_model=function(e,t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){var n,r,i,s,a,l,c;return o(this,(function(o){switch(o.label){case 0:n=e.model_id,r=this.loadClass(e.model_name,e.model_module,e.model_module_version),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r];case 2:return i=o.sent(),[3,4];case 3:throw s=o.sent(),console.error("Could not instantiate widget"),s;case 4:if(!i)throw new Error("Cannot find model module "+e.model_module+"@"+e.model_module_version+", "+e.model_name);return[4,i._deserialize_state(t,this)];case 5:return a=o.sent(),l={widget_manager:this,model_id:n,comm:e.comm},(c=new i(a,l)).name=e.model_name,c.module=e.model_module,[2,c]}}))}))},e.prototype.clear_state=function(){var e=this;return s.resolvePromisesDict(this._models).then((function(t){Object.keys(t).forEach((function(e){return t[e].close()})),e._models=Object.create(null)}))},e.prototype.get_state=function(e){var t=this;void 0===e&&(e={});var n=Object.keys(this._models).map((function(e){return t._models[e]}));return Promise.all(n).then((function(t){return u(t,e)}))},e.prototype.set_state=function(e){var t=this;if(!(e.version_major&&e.version_major<=2))throw"Unsupported widget state format";var n=e.state;return this._get_comm_info().then((function(e){return Promise.all(Object.keys(n).map((function(r){var i={base64:s.base64ToBuffer,hex:s.hexToBuffer},o=n[r],a=o.state;if(o.buffers){var l=o.buffers.map((function(e){return e.path})),c=o.buffers.map((function(e){return new DataView(i[e.encoding](e.data))}));s.put_buffers(o.state,l,c)}if(t._models[r])return t._models[r].then((function(e){return e.constructor._deserialize_state(a||{},t).then((function(t){return e.set_state(t),e}))}));var u={model_id:r,model_name:o.model_name,model_module:o.model_module,model_module_version:o.model_module_version};return e.hasOwnProperty(r)?t._create_comm(t.comm_target_name,r).then((function(e){return u.comm=e,t.new_model(u)})):t.new_model(u,a)})))}))},e.prototype.disconnect=function(){var e=this;Object.keys(this._models).forEach((function(t){e._models[t].then((function(e){e.comm_live=!1}))}))},e.prototype.resolveUrl=function(e){return Promise.resolve(e)},e.prototype.filterExistingModelState=function(e){var t=this,n=e.state;return n=Object.keys(n).filter((function(e){return!t._models[e]})).reduce((function(e,t){return e[t]=n[t],e}),{}),r({},e,{state:n})},e}();function u(e,t){void 0===t&&(t={});var n={};return e.forEach((function(e){var r=e.model_id,i=s.remove_buffers(e.serialize(e.get_state(t.drop_defaults))),o=i.buffers.map((function(e,t){return{data:s.bufferToBase64(e),path:i.buffer_paths[t],encoding:"base64"}}));n[r]={model_name:e.name,model_module:e.module,model_module_version:e.get("_model_module_version"),state:i.state},o.length>0&&(n[r].buffers=o)})),{version_major:2,version_minor:0,state:n}}t.ManagerBase=c,t.serialize_state=u},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(37);t.set=function(e,t,n){if(null==e)return this;var o;if("object"==typeof e?(o=e,n=t):(o={})[e]=t,n||(n={}),!this._validate(o,n))return!1;var s=n.unset,a=n.silent,l=[],c=this._changing;this._changing=!0,c||(this._previousAttributes=r({},this.attributes),this.changed={});var u=this.attributes,h=this.changed,d=this._previousAttributes;for(var p in o)t=o[p],i.isEqual(u[p],t)||l.push(p),i.isEqual(d[p],t)?delete h[p]:h[p]=t,s?delete u[p]:u[p]=t;if(this.id=this.get(this.idAttribute),!a){l.length&&(this._pending=n);for(var f=0;f<l.length;f++)this.trigger("change:"+l[f],this,u[l[f]],n)}if(c)return this;if(!a)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(38),s=Element.prototype,a=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1},l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._removeElement=function(){this.undelegateEvents(),this.el.parentNode&&this.el.parentNode.removeChild(this.el)},t.prototype._setElement=function(e){this.el=e},t.prototype._setAttributes=function(e){for(var t in e)t in this.el?this.el[t]=e[t]:this.el.setAttribute(t,e[t])},t.prototype.delegate=function(e,t,n){"string"!=typeof t&&(n=t,t=null),void 0===this._domEvents&&(this._domEvents=[]);var r=this.el,i=t?function(e){for(var i=e.target||e.srcElement;i&&i!==r;i=i.parentNode)if(a.call(i,t))return e.delegateTarget=i,n.handleEvent?n.handleEvent(e):n(e)}:n;return this.el.addEventListener(e,i,!1),this._domEvents.push({eventName:e,handler:i,listener:n,selector:t}),i},t.prototype.undelegate=function(e,t,n){if("function"==typeof t&&(n=t,t=null),this.el&&this._domEvents)for(var r=this._domEvents.slice(),i=r.length;i--;){var o=r[i];!(o.eventName!==e||n&&o.listener!==n||t&&o.selector!==t)&&(this.el.removeEventListener(o.eventName,o.handler,!1),this._domEvents.splice(i,1))}return this},t.prototype.undelegateEvents=function(){if(this.el&&this._domEvents){for(var e=this._domEvents.length,t=0;t<e;t++){var n=this._domEvents[t];this.el.removeEventListener(n.eventName,n.handler,!1)}this._domEvents.length=0}return this},t}(o.View);t.NativeView=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(37),s=n(100),a={align_content:null,align_items:null,align_self:null,border:null,bottom:null,display:null,flex:null,flex_flow:null,height:null,justify_content:null,justify_items:null,left:null,margin:null,max_height:null,max_width:null,min_height:null,min_width:null,overflow:null,overflow_x:null,overflow_y:null,order:null,padding:null,right:null,top:null,visibility:null,width:null,grid_auto_columns:null,grid_auto_flow:null,grid_auto_rows:null,grid_gap:null,grid_template_rows:null,grid_template_columns:null,grid_template_areas:null,grid_row:null,grid_column:null,grid_area:null},l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.defaults=function(){return o.assign(e.prototype.defaults.call(this),{_model_name:"LayoutModel",_view_name:"LayoutView"},a)},t}(s.WidgetModel);t.LayoutModel=l;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.initialize=function(t){this._traitNames=[],e.prototype.initialize.call(this,t);for(var n=0,r=Object.keys(a);n<r.length;n++){var i=r[n];this.registerTrait(i)}},t.prototype.registerTrait=function(e){var t=this;if(this._traitNames.push(e),"overflow_x"===e||"overflow_y"===e)return this.listenTo(this.model,"change:"+e,(function(n,r){t.handleOverflowChange(e,r)})),void this.handleOverflowChange(e,this.model.get(e));this.listenTo(this.model,"change:"+e,(function(n,r){t.handleChange(e,r)})),this.handleChange(e,this.model.get(e))},t.prototype.css_name=function(e){return e.replace(/_/g,"-")},t.prototype.handleChange=function(e,t){var n=this.options.parent;n?null===t?n.el.style.removeProperty(this.css_name(e)):n.el.style[this.css_name(e)]=t:console.warn("Style not applied because a parent view does not exist")},t.prototype.handleOverflowChange=function(e,t){var n=this.options.parent;n?null===t?null===this.model.get("overflow")&&n.el.style.removeProperty(this.css_name(e)):n.el.style[this.css_name(e)]=t:console.warn("Style not applied because a parent view does not exist")},t.prototype.unlayout=function(){var e=this,t=this.options.parent;this._traitNames.forEach((function(n){t?t.el.style.removeProperty(e.css_name(n)):console.warn("Style not removed because a parent view does not exist")}),this)},t}(s.WidgetView);t.LayoutView=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(37),s=n(100),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.defaults=function(){var t=this.constructor;return o.assign(e.prototype.defaults.call(this),{_model_name:"StyleModel",_view_name:"StyleView"},Object.keys(t.styleProperties).reduce((function(e,n){return e[n]=t.styleProperties[n].default,e}),{}))},t.styleProperties={},t}(s.WidgetModel);t.StyleModel=a;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.initialize=function(t){this._traitNames=[],e.prototype.initialize.call(this,t);for(var n=this.model.constructor,r=0,i=Object.keys(n.styleProperties);r<i.length;r++){var o=i[r];this.registerTrait(o)}this.style()},t.prototype.registerTrait=function(e){var t=this;this._traitNames.push(e),this.listenTo(this.model,"change:"+e,(function(n,r){t.handleChange(e,r)}))},t.prototype.handleChange=function(e,t){var n=this.options.parent;if(n){var r=this.model.constructor.styleProperties,i=r[e].attribute,o=r[e].selector,s=o?n.el.querySelectorAll(o):[n.el];if(null===t)for(var a=0;a!==s.length;++a)s[a].style.removeProperty(i);else for(a=0;a!==s.length;++a)s[a].style[i]=t}else console.warn("Style not applied because a parent view does not exist")},t.prototype.style=function(){for(var e=0,t=this._traitNames;e<t.length;e++){var n=t[e];this.handleChange(n,this.model.get(n))}},t.prototype.unstyle=function(){var e=this.options.parent,t=this.model.constructor.styleProperties;this._traitNames.forEach((function(n){if(e)for(var r=t[n].attribute,i=t[n].selector,o=i?e.el.querySelectorAll(i):[e.el],s=0;s!==o.length;++s)o[s].style.removeProperty(r);else console.warn("Style not removed because a parent view does not exist")}),this)},t}(s.WidgetView);t.StyleView=l},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,a)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),function(e){!function(e){var t=function(){function e(e){this.targets=Object.create(null),this.comms=Object.create(null),this.kernel=null,this.jsServicesKernel=null,this.init_kernel(e)}return e.prototype.init_kernel=function(e){this.kernel=e,this.jsServicesKernel=e},e.prototype.new_comm=function(e,t,o,s,a,l){return r(this,void 0,void 0,(function(){var r,c;return i(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve(this.jsServicesKernel.connectToComm(e,a))];case 1:return r=i.sent(),c=new n(r),this.register_comm(c),c.open(t,o,s,l),[2,c]}}))}))},e.prototype.register_target=function(e,t){var r=this,i=this.jsServicesKernel.registerCommTarget(e,(function(e,i){var o=new n(e);r.register_comm(o);try{return t(o,i)}catch(e){o.close(),console.error(e),console.error(new Error("Exception opening new comm"))}}));this.targets[e]=i},e.prototype.unregister_target=function(e,t){this.targets[e].dispose(),delete this.targets[e]},e.prototype.register_comm=function(e){return this.comms[e.comm_id]=Promise.resolve(e),e.kernel=this.kernel,e.comm_id},e}();e.CommManager=t;var n=function(){function e(e){this.jsServicesComm=null,this.kernel=null,this.jsServicesComm=e}return Object.defineProperty(e.prototype,"comm_id",{get:function(){return this.jsServicesComm.commId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target_name",{get:function(){return this.jsServicesComm.targetName},enumerable:!0,configurable:!0}),e.prototype.open=function(e,t,n,r){var i=this.jsServicesComm.open(e,n,r);return this._hookupCallbacks(i,t),i.msg.header.msg_id},e.prototype.send=function(e,t,n,r){var i=this.jsServicesComm.send(e,n,r);return this._hookupCallbacks(i,t),i.msg.header.msg_id},e.prototype.close=function(e,t,n,r){var i=this.jsServicesComm.close(e,n,r);return this._hookupCallbacks(i,t),i.msg.header.msg_id},e.prototype.on_msg=function(e){this.jsServicesComm.onMsg=e.bind(this)},e.prototype.on_close=function(e){this.jsServicesComm.onClose=e.bind(this)},e.prototype._hookupCallbacks=function(e,t){t&&(e.onReply=function(e){t.shell&&t.shell.reply&&t.shell.reply(e)},e.onStdin=function(e){t.input&&t.input(e)},e.onIOPub=function(e){if(t.iopub)if(t.iopub.status&&"status"===e.header.msg_type)t.iopub.status(e);else if(t.iopub.clear_output&&"clear_output"===e.header.msg_type)t.iopub.clear_output(e);else if(t.iopub.output)switch(e.header.msg_type){case"display_data":case"execute_result":t.iopub.output(e)}})},e}();e.Comm=n}(e.services||(e.services={}))}(t.shims||(t.shims={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){this.initialize(e,t,n)}return e.prototype.initialize=function(e,t,n){this._handler_context=n||this,this._models=[],this.views=[],this._create_view=e,this._remove_view=t||function(e){e.remove()}},e.prototype.update=function(e,t,n,r){var i=n||this._remove_view,o=t||this._create_view;r=r||this._handler_context;for(var s=0;s<e.length&&!(s>=this._models.length||e[s]!==this._models[s]);s++);for(var a=s,l=this.views.splice(a,this.views.length-a),c=0;c<l.length;c++)l[c].then((function(e){i.call(r,e)}));for(;s<e.length;s++)this.views.push(Promise.resolve(o.call(r,e[s],s)));return this._models=e.slice(),Promise.all(this.views)},e.prototype.remove=function(){var e=this;return Promise.all(this.views).then((function(t){t.forEach((function(t){return e._remove_view.call(e._handler_context,t)})),e.views=[],e._models=[]}))},e.prototype.dispose=function(){this.views=null,this._models=null},e}();t.ViewList=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12);t.IJupyterWidgetRegistry=new r.Token("jupyter.extensions.jupyterWidgetRegistry")},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var s=n(72),a=n(5),l=n(55),c=n(11);n(495);var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.defaults=function(){return o({},e.prototype.defaults.call(this),{msg_id:""})},t.prototype.initialize=function(t,n){e.prototype.initialize.call(this,t,n),this._outputs=new l.OutputAreaModel({values:t.outputs,trusted:!0})},Object.defineProperty(t.prototype,"outputs",{get:function(){return this._outputs},enumerable:!0,configurable:!0}),t}(s.OutputModel);t.OutputModel=u;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._createElement=function(e){return this.pWidget=new a.Panel,this.pWidget.node},t.prototype._setElement=function(e){if(this.el||e!==this.pWidget.node)throw new Error("Cannot reset the DOM element.");this.el=this.pWidget.node,this.$el=c(this.pWidget.node)},t.prototype.render=function(){var e=this.model.widget_manager.renderMime;this._outputView=new l.OutputArea({rendermime:e,model:this.model.outputs}),this.pWidget.insertWidget(0,this._outputView),this.pWidget.addClass("jupyter-widgets"),this.pWidget.addClass("widget-output"),this.update()},t}(s.OutputView);t.OutputView=h},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9);t.OUTPUT_WIDGET_VERSION="1.0.0";var a=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return i(n,e),n.prototype.defaults=function(){return o({},e.prototype.defaults.call(this),{_model_name:"OutputModel",_view_name:"OutputView",_model_module:"@jupyter-widgets/output",_view_module:"@jupyter-widgets/output",_model_module_version:t.OUTPUT_WIDGET_VERSION,_view_module_version:t.OUTPUT_WIDGET_VERSION})},n}(s.DOMWidgetModel);t.OutputModel=a;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(s.DOMWidgetView);t.OutputView=l},function(e,t,n){var r=n(484);"string"==typeof r&&(r=[[e.i,r,""]]);var i={transform:void 0};n(40)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(25)(!1)).push([e.i,"/*-----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|----------------------------------------------------------------------------*/\n\n/*-----------------------------------------------------------------------------\n| Private CSS variables\n|----------------------------------------------------------------------------*/\n\n\n:root {\n}\n\n\n/*-----------------------------------------------------------------------------\n| Main OutputArea\n| OutputArea has a list of Outputs\n|----------------------------------------------------------------------------*/\n\n\n.jp-OutputArea {\n  overflow-y: auto;\n}\n\n\n.jp-OutputArea-child {\n  display: flex;\n  flex-direction: row;\n}\n\n\n\n.jp-OutputPrompt {\n  flex: 0 0 var(--jp-cell-prompt-width);\n  color: var(--jp-cell-outprompt-font-color);\n  font-family: var(--jp-cell-prompt-font-family);\n  padding: var(--jp-code-padding);\n  letter-spacing: var(--jp-cell-prompt-letter-spacing);\n  line-height: var(--jp-code-line-height);\n  font-size: var(--jp-code-font-size);\n  border: var(--jp-border-width) solid transparent;\n  opacity: var(--jp-cell-prompt-opacity);\n    /* Right align prompt text, don't wrap to handle large prompt numbers */\n  text-align: right;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  /* Disable text selection */\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n\n.jp-OutputArea-output {\n  flex-grow: 1;\n  flex-shrink: 1;\n  height: auto;\n  overflow-x: auto;\n  user-select: text;\n  -moz-user-select: text;\n  -webkit-user-select: text;\n  -ms-user-select: text;\n}\n\n\n/**\n * Isolated output.\n */\n .jp-OutputArea-output.jp-mod-isolated {\n  width: 100%;\n  display: block;\n}\n\n\n/*\nWhen drag events occur, `p-mod-override-cursor` is added to the body.\nBecause iframes steal all cursor events, the following two rules are necessary\nto suppress pointer events while resize drags are occuring. There may be a\nbetter solution to this problem.\n*/\nbody.p-mod-override-cursor .jp-OutputArea-output.jp-mod-isolated {\n  position: relative;\n}\n\nbody.p-mod-override-cursor .jp-OutputArea-output.jp-mod-isolated:before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: transparent;\n}\n\n\n/* pre */\n\n.jp-OutputArea-output pre {\n  border: none;\n  margin: 0px;\n  padding: 0px;\n  overflow-x: auto;\n  overflow-y: auto;\n  word-break: break-all;\n  word-wrap: break-word;\n  white-space: pre-wrap;\n}\n\n\n/* tables */\n\n.jp-OutputArea-output.jp-RenderedHTMLCommon table {\n  margin-left: 0;\n  margin-right: 0;\n}\n\n\n/* Hide the gutter in case of\n *  - nested output areas (e.g. in the case of output widgets)\n *  - mirrored output areas\n */\n.jp-OutputArea .jp-OutputArea .jp-OutputArea-prompt {\n  display: none;\n}\n\n/*-----------------------------------------------------------------------------\n| executeResult is added to any Output-result for the display of the object\n| returned by a cell\n|----------------------------------------------------------------------------*/\n\n\n.jp-OutputArea-output.jp-OutputArea-executeResult {\n  margin-left: 0px;\n  flex: 1 1 auto;\n}\n\n\n.jp-OutputArea-executeResult.jp-RenderedText {\n  padding-top: var(--jp-code-padding);\n}\n\n\n\n/*-----------------------------------------------------------------------------\n| The Stdin output\n|----------------------------------------------------------------------------*/\n\n\n.jp-OutputArea-stdin {\n  line-height: var(--jp-code-line-height);\n  padding-top: var(--jp-code-padding);\n  display: flex;\n}\n\n\n.jp-Stdin-prompt {\n  padding-right: var(--jp-code-padding);\n  vertical-align: baseline;\n  flex: 0 0 auto;\n}\n\n\n.jp-Stdin-input {\n  font-family: var(--jp-code-font-family);\n  font-size: inherit;\n  color: inherit;\n  width: auto;\n  /* make sure input baseline aligns with prompt */\n  vertical-align: baseline;\n  /* padding + margin = 0.5em between prompt and cursor */\n  padding: 0em 0.25em;\n  margin: 0em 0.25em;\n  flex: 0 0 70%;\n}\n\n\n.jp-Stdin-input:focus {\n    box-shadow: none;\n}\n",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(6),o=n(18),s=n(183),a=n(54),l=function(){function e(t){void 0===t&&(t={});var n=this;this.clearNext=!1,this.list=null,this._trusted=!1,this._isDisposed=!1,this._stateChanged=new i.Signal(this),this._changed=new i.Signal(this),this._modelDB=null,this._serialized=null,this._changeGuard=!1,this._trusted=!!t.trusted,this.contentFactory=t.contentFactory||e.defaultContentFactory,this.list=new s.ObservableList,t.values&&r.each(t.values,(function(e){n._add(e)})),this.list.changed.connect(this._onListChanged,this),t.modelDB&&(this._modelDB=t.modelDB,this._serialized=this._modelDB.createValue("outputs"),this._serialized.get()?this.fromJSON(this._serialized.get()):this._serialized.set(this.toJSON()),this._serialized.changed.connect(this._onSerializedChanged,this))}return Object.defineProperty(e.prototype,"stateChanged",{get:function(){return this._stateChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"changed",{get:function(){return this._changed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.list?this.list.length:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trusted",{get:function(){return this._trusted},set:function(e){if(e!==this._trusted)for(var t=this._trusted=e,n=0;n<this.list.length;n++){var r=this.list.get(n),i=r.toJSON();r.dispose(),r=this._createItem({value:i,trusted:t}),this.list.set(n,r)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(this._isDisposed=!0,this.list.dispose(),i.Signal.clearData(this))},e.prototype.get=function(e){return this.list.get(e)},e.prototype.set=function(e,t){this._normalize(t);var n=this._createItem({value:t,trusted:this._trusted});this.list.set(e,n)},e.prototype.add=function(e){return this.clearNext&&(this.clear(),this.clearNext=!1),this._add(e)},e.prototype.clear=function(e){void 0===e&&(e=!1),this._lastStream="",e?this.clearNext=!0:(r.each(this.list,(function(e){e.dispose()})),this.list.clear())},e.prototype.fromJSON=function(e){var t=this;this.clear(),r.each(e,(function(e){t._add(e)}))},e.prototype.toJSON=function(){return r.toArray(r.map(this.list,(function(e){return e.toJSON()})))},e.prototype._add=function(e){var t=this._trusted;if(this._normalize(e),o.nbformat.isStream(e)&&this._lastStream&&e.name===this._lastName){this._lastStream+=e.text,e.text=this._lastStream,this._removeOverwrittenChars(e);var n=this._createItem({value:e,trusted:t}),r=this.length-1;return this.list.get(r).dispose(),this.list.set(r,n),r}o.nbformat.isStream(e)&&this._removeOverwrittenChars(e);var i=this._createItem({value:e,trusted:t});return o.nbformat.isStream(e)?(this._lastStream=e.text,this._lastName=e.name):this._lastStream="",this.list.push(i)},e.prototype._normalize=function(e){o.nbformat.isStream(e)&&Array.isArray(e.text)&&(e.text=e.text.join("\n"))},e.prototype._fixBackspace=function(e){var t=e;do{t=(e=t).replace(/[^\n]\x08/gm,"")}while(t.length<e.length);return e},e.prototype._fixCarriageReturn=function(e){var t=e;t=t.replace(/\r\r+\n/gm,"\r\n");do{t=t.replace(/^[^\n]*(?:\r(?!\n))+/gm,"")}while(t.search(/\r(?!\n)/)>-1);do{t=t.replace(/\r\n/gm,"\n")}while(t.indexOf("\r\n")>-1);return t},e.prototype._removeOverwrittenChars=function(e){var t=e.text;e.text=this._fixCarriageReturn(this._fixBackspace(t))},e.prototype._createItem=function(e){var t=this.contentFactory.createOutputModel(e);return t.changed.connect(this._onGenericChange,this),t.changed.connect(this._onGenericChange,this),t},e.prototype._onListChanged=function(e,t){this._serialized&&!this._changeGuard&&(this._changeGuard=!0,this._serialized.set(this.toJSON()),this._changeGuard=!1),this._changed.emit(t),this._stateChanged.emit(void 0)},e.prototype._onSerializedChanged=function(e,t){this._changeGuard||(this._changeGuard=!0,this.fromJSON(t.newValue),this._changeGuard=!1)},e.prototype._onGenericChange=function(){this._stateChanged.emit(void 0)},e}();t.OutputAreaModel=l,function(e){var t=function(){function e(){}return e.prototype.createOutputModel=function(e){return new a.OutputModel(e)},e}();e.ContentFactory=t,e.defaultContentFactory=new t}(l=t.OutputAreaModel||(t.OutputAreaModel={})),t.OutputAreaModel=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(45),i=n(6),o=n(12),s=n(101),a=n(184),l=n(185),c=n(186),u=function(){function e(e){void 0===e&&(e=null),this._value=null,this._changed=new i.Signal(this),this._isDisposed=!1,this._value=e}return Object.defineProperty(e.prototype,"type",{get:function(){return"Value"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"changed",{get:function(){return this._changed},enumerable:!0,configurable:!0}),e.prototype.get=function(){return this._value},e.prototype.set=function(e){var t=this._value;o.JSONExt.deepEqual(t,e)||(this._value=e,this._changed.emit({oldValue:t,newValue:e}))},e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,i.Signal.clearData(this),this._value=null)},e}();t.ObservableValue=u,function(e){var t=function(){};e.IChangedArgs=t}(u=t.ObservableValue||(t.ObservableValue={})),t.ObservableValue=u;var h=function(){function e(e){void 0===e&&(e={}),this.isPrepopulated=!1,this.isCollaborative=!1,this.connected=Promise.resolve(void 0),this._toDispose=!1,this._isDisposed=!1,this._disposables=new r.DisposableSet,this._basePath=e.basePath||"",e.baseDB?this._db=e.baseDB:(this._db=new s.ObservableMap,this._toDispose=!0)}return Object.defineProperty(e.prototype,"basePath",{get:function(){return this._basePath},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),e.prototype.get=function(e){return this._db.get(this._resolvePath(e))},e.prototype.has=function(e){return this._db.has(this._resolvePath(e))},e.prototype.createString=function(e){var t=new l.ObservableString;return this._disposables.add(t),this.set(e,t),t},e.prototype.createList=function(e){var t=new c.ObservableUndoableList(new c.ObservableUndoableList.IdentitySerializer);return this._disposables.add(t),this.set(e,t),t},e.prototype.createMap=function(e){var t=new a.ObservableJSON;return this._disposables.add(t),this.set(e,t),t},e.prototype.createValue=function(e){var t=new u;return this._disposables.add(t),this.set(e,t),t},e.prototype.getValue=function(e){var t=this.get(e);if(!t||"Value"!==t.type)throw Error("Can only call getValue for an ObservableValue");return t.get()},e.prototype.setValue=function(e,t){var n=this.get(e);if(!n||"Value"!==n.type)throw Error("Can only call setValue on an ObservableValue");n.set(t)},e.prototype.view=function(t){var n=new e({basePath:t,baseDB:this});return this._disposables.add(n),n},e.prototype.set=function(e,t){this._db.set(this._resolvePath(e),t)},e.prototype.dispose=function(){this.isDisposed||(this._isDisposed=!0,this._toDispose&&this._db.dispose(),this._disposables.dispose())},e.prototype._resolvePath=function(e){return this._basePath&&(e=this._basePath+"."+e),e},e}();t.ModelDB=h},function(e,t,n){var r=n(488);"string"==typeof r&&(r=[[e.i,r,""]]);var i={transform:void 0};n(40)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(25)(!1)).push([e.i,'/*-----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|----------------------------------------------------------------------------*/\n\n\n/*-----------------------------------------------------------------------------\n| RenderedText\n|----------------------------------------------------------------------------*/\n\n\n.jp-RenderedText {\n  text-align: left;\n  padding-left: var(--jp-code-padding);\n  font-size: var(--jp-code-font-size);\n  line-height: var(--jp-code-line-height);\n  font-family: var(--jp-code-font-family);\n}\n\n\n.jp-RenderedText pre,\n.jp-RenderedHTMLCommon pre {\n  color: var(--jp-content-font-color1);\n  border: none;\n  margin: 0px;\n  padding: 0px;\n}\n\n\n/* ansi_up creates classed spans for console foregrounds and backgrounds. */\n.jp-RenderedText pre .ansi-black-fg { color: #3E424D; }\n.jp-RenderedText pre .ansi-red-fg { color: #E75C58; }\n.jp-RenderedText pre .ansi-green-fg { color: #00A250; }\n.jp-RenderedText pre .ansi-yellow-fg { color: #DDB62B; }\n.jp-RenderedText pre .ansi-blue-fg { color: #208FFB; }\n.jp-RenderedText pre .ansi-magenta-fg { color: #D160C4; }\n.jp-RenderedText pre .ansi-cyan-fg { color: #60C6C8; }\n.jp-RenderedText pre .ansi-white-fg { color: #C5C1B4; }\n\n.jp-RenderedText pre .ansi-black-bg { background-color: #3E424D; }\n.jp-RenderedText pre .ansi-red-bg { background-color: #E75C58; }\n.jp-RenderedText pre .ansi-green-bg { background-color: #00A250; }\n.jp-RenderedText pre .ansi-yellow-bg { background-color: #DDB62B; }\n.jp-RenderedText pre .ansi-blue-bg { background-color: #208FFB; }\n.jp-RenderedText pre .ansi-magenta-bg { background-color: #D160C4; }\n.jp-RenderedText pre .ansi-cyan-bg { background-color: #60C6C8; }\n.jp-RenderedText pre .ansi-white-bg { background-color: #C5C1B4; }\n\n.jp-RenderedText pre .ansi-bright-black-fg { color: #282C36; }\n.jp-RenderedText pre .ansi-bright-red-fg { color: #B22B31; }\n.jp-RenderedText pre .ansi-bright-green-fg { color: #007427; }\n.jp-RenderedText pre .ansi-bright-yellow-fg { color: #B27D12; }\n.jp-RenderedText pre .ansi-bright-blue-fg { color: #0065CA; }\n.jp-RenderedText pre .ansi-bright-magenta-fg { color: #A03196; }\n.jp-RenderedText pre .ansi-bright-cyan-fg { color: #258F8F; }\n.jp-RenderedText pre .ansi-bright-white-fg { color: #A1A6B2; }\n\n.jp-RenderedText pre .ansi-bright-black-bg { background-color: #282C36; }\n.jp-RenderedText pre .ansi-bright-red-bg { background-color: #B22B31; }\n.jp-RenderedText pre .ansi-bright-green-bg { background-color: #007427; }\n.jp-RenderedText pre .ansi-bright-yellow-bg { background-color: #B27D12; }\n.jp-RenderedText pre .ansi-bright-blue-bg { background-color: #0065CA; }\n.jp-RenderedText pre .ansi-bright-magenta-bg { background-color: #A03196; }\n.jp-RenderedText pre .ansi-bright-cyan-bg { background-color: #258F8F; }\n.jp-RenderedText pre .ansi-bright-white-bg { background-color: #A1A6B2; }\n\n\n.jp-RenderedText[data-mime-type="application/vnd.jupyter.stderr"] {\n  background: var(--jp-rendermime-error-background);\n}\n\n\n/*-----------------------------------------------------------------------------\n| RenderedLatex\n|----------------------------------------------------------------------------*/\n\n\n.jp-RenderedLatex {\n  color: var(--jp-content-font-color1);\n  font-size: var(--jp-content-font-size1);\n  line-height: var(--jp-content-line-height);\n}\n\n\n/*-----------------------------------------------------------------------------\n| RenderedHTML\n|----------------------------------------------------------------------------*/\n\n\n.jp-RenderedHTMLCommon {\n  color: var(--jp-content-font-color1);\n  font-size: var(--jp-content-font-size1);\n  line-height: var(--jp-content-line-height);\n  /* Give a bit more R padding on Markdown text to keep line lengths reasonable */\n  padding-right: 20px;\n}\n\n\n.jp-RenderedHTMLCommon .MathJax_Display {\n  margin: 0;\n}\n\n\n.jp-RenderedHTMLCommon em {\n  font-style: italic;\n}\n\n\n.jp-RenderedHTMLCommon strong {\n  font-weight: bold;\n}\n\n\n.jp-RenderedHTMLCommon u {\n  text-decoration: underline;\n}\n\n\n.jp-RenderedHTMLCommon a:link {\n  text-decoration: none;\n  color: var(--jp-content-link-color);\n}\n\n\n.jp-RenderedHTMLCommon a:hover {\n  text-decoration: underline;\n  color: var(--jp-content-link-color);\n}\n\n\n.jp-RenderedHTMLCommon a:visited {\n  text-decoration: none;\n  color: var(--jp-content-link-color);\n}\n\n\n/* Headings */\n\n.jp-RenderedHTMLCommon h1,\n.jp-RenderedHTMLCommon h2,\n.jp-RenderedHTMLCommon h3,\n.jp-RenderedHTMLCommon h4,\n.jp-RenderedHTMLCommon h5,\n.jp-RenderedHTMLCommon h6 {\n  line-height: var(--jp-content-heading-line-height);\n  font-weight: var(--jp-content-heading-font-weight);\n  font-style: normal;\n  margin: var(--jp-content-heading-margin-top) 0 var(--jp-content-heading-margin-bottom) 0;\n}\n\n\n.jp-RenderedHTMLCommon h1:first-child,\n.jp-RenderedHTMLCommon h2:first-child,\n.jp-RenderedHTMLCommon h3:first-child,\n.jp-RenderedHTMLCommon h4:first-child,\n.jp-RenderedHTMLCommon h5:first-child,\n.jp-RenderedHTMLCommon h6:first-child {\n  margin-top: calc( 0.5 * var(--jp-content-heading-margin-top) );\n}\n\n\n.jp-RenderedHTMLCommon h1:last-child,\n.jp-RenderedHTMLCommon h2:last-child,\n.jp-RenderedHTMLCommon h3:last-child,\n.jp-RenderedHTMLCommon h4:last-child,\n.jp-RenderedHTMLCommon h5:last-child,\n.jp-RenderedHTMLCommon h6:last-child {\n  margin-bottom: calc( 0.5 * var(--jp-content-heading-margin-bottom) );\n}\n\n\n.jp-RenderedHTMLCommon h1 {\n  font-size: var(--jp-content-font-size5);\n}\n\n\n.jp-RenderedHTMLCommon h2 {\n  font-size: var(--jp-content-font-size4);\n}\n\n\n.jp-RenderedHTMLCommon h3 {\n  font-size: var(--jp-content-font-size3);\n}\n\n\n.jp-RenderedHTMLCommon h4 {\n  font-size: var(--jp-content-font-size2);\n}\n\n\n.jp-RenderedHTMLCommon h5 {\n  font-size: var(--jp-content-font-size1);\n}\n\n\n.jp-RenderedHTMLCommon h6 {\n  font-size: var(--jp-content-font-size0);\n}\n\n/* Lists */\n\n.jp-RenderedHTMLCommon ul:not(.list-inline),\n.jp-RenderedHTMLCommon ol:not(.list-inline) {\n  padding-left: 2em;\n}\n\n\n.jp-RenderedHTMLCommon ul {\n  list-style: disc;\n}\n\n\n.jp-RenderedHTMLCommon ul ul {\n  list-style: square;\n}\n\n\n.jp-RenderedHTMLCommon ul ul ul {\n  list-style: circle;\n}\n\n\n.jp-RenderedHTMLCommon ol {\n  list-style: decimal;\n}\n\n\n.jp-RenderedHTMLCommon ol ol {\n  list-style: upper-alpha;\n}\n\n\n.jp-RenderedHTMLCommon ol ol ol {\n  list-style: lower-alpha;\n}\n\n\n.jp-RenderedHTMLCommon ol ol ol ol {\n  list-style: lower-roman;\n}\n\n\n.jp-RenderedHTMLCommon ol ol ol ol ol {\n  list-style: decimal;\n}\n\n\n.jp-RenderedHTMLCommon ol,\n.jp-RenderedHTMLCommon ul {\n  margin-bottom: 1em;\n}\n\n\n.jp-RenderedHTMLCommon ul ul,\n.jp-RenderedHTMLCommon ul ol,\n.jp-RenderedHTMLCommon ol ul,\n.jp-RenderedHTMLCommon ol ol {\n  margin-bottom: 0em;\n}\n\n\n.jp-RenderedHTMLCommon hr {\n  color: var(--jp-border-color2);\n  background-color: var(--jp-border-color1);\n  margin-top: 1em;\n  margin-bottom: 1em;\n}\n\n\n.jp-RenderedHTMLCommon > pre {\n  margin: 1.5em 2em;\n}\n\n\n.jp-RenderedHTMLCommon pre,\n.jp-RenderedHTMLCommon code {\n  border: 0;\n  background-color: var(--jp-layout-color0);\n  color: var(--jp-content-font-color1);\n  font-family: var(--jp-code-font-family);\n  font-size: var(--jp-code-font-size);\n  line-height: var(--jp-code-line-height);\n  padding: 0px;\n}\n\n/* Tables */\n\n.jp-RenderedHTMLCommon table {\n  border-collapse: collapse;\n  border-spacing: 0;\n  border: none;\n  color: var(--jp-ui-font-color1);\n  font-size: 12px;\n  table-layout: fixed;\n  margin-left: auto;\n  margin-right: auto;\n}\n\n\n.jp-RenderedHTMLCommon thead {\n  border-bottom: var(--jp-border-width) solid var(--jp-border-color1);\n  vertical-align: bottom;\n}\n\n\n.jp-RenderedHTMLCommon td,\n.jp-RenderedHTMLCommon th,\n.jp-RenderedHTMLCommon tr {\n  text-align: right;\n  vertical-align: middle;\n  padding: 0.5em 0.5em;\n  line-height: normal;\n  white-space: normal;\n  max-width: none;\n  border: none;\n}\n\n\n.jp-RenderedMarkdown.jp-RenderedHTMLCommon td,\n.jp-RenderedMarkdown.jp-RenderedHTMLCommon th {\n  max-width: none;\n}\n\n\n.jp-RenderedHTMLCommon th {\n  font-weight: bold;\n}\n\n\n.jp-RenderedHTMLCommon tbody tr:nth-child(odd) {\n  background: var(--jp-layout-color0);\n}\n\n\n.jp-RenderedHTMLCommon tbody tr:nth-child(even) {\n  background: var(  --jp-rendermime-table-row-background);\n}\n\n\n.jp-RenderedHTMLCommon tbody tr:hover {\n  background: var( --jp-rendermime-table-row-hover-background);\n}\n\n\n.jp-RenderedHTMLCommon table {\n  margin-bottom: 1em;\n}\n\n\n.jp-RenderedHTMLCommon p {\n  text-align: left;\n  margin: 0px;\n}\n\n\n.jp-RenderedHTMLCommon p {\n  margin-bottom: 1em;\n}\n\n\n.jp-RenderedHTMLCommon img {\n    -moz-force-broken-image-icon: 1;\n}\n\n\n/* Restrict to direct children as other images could be nested in other content. */\n.jp-RenderedHTMLCommon > img {\n  display: block;\n  margin-left: auto;\n  margin-right: auto;\n  margin-bottom: 1em;\n}\n\n\n.jp-RenderedHTMLCommon img,\n.jp-RenderedImage img,\n.jp-RenderedHTMLCommon svg,\n.jp-RenderedSVG svg {\n  max-width: 100%;\n  height: auto;\n}\n\n\n.jp-RenderedHTMLCommon img.jp-mod-unconfined,\n.jp-RenderedImage img.jp-mod-unconfined,\n.jp-RenderedHTMLCommon svg.jp-mod-unconfined,\n.jp-RenderedSVG svg.jp-mod-unconfined {\n  max-width: none;\n}\n\n\n.jp-RenderedHTMLCommon .alert {\n  margin-bottom: 1em;\n}\n\n\n.jp-RenderedHTMLCommon blockquote {\n  margin: 1em 2em;\n  padding: 0 1em;\n  border-left: 5px solid var(--jp-border-color2);\n}\n\na.jp-InternalAnchorLink {\n  visibility: hidden;\n  margin-left: 8px;\n  color: var(--md-blue-800);\n}\n\nh1:hover .jp-InternalAnchorLink,\nh2:hover .jp-InternalAnchorLink,\nh3:hover .jp-InternalAnchorLink,\nh4:hover .jp-InternalAnchorLink,\nh5:hover .jp-InternalAnchorLink,\nh6:hover .jp-InternalAnchorLink {\n  visibility: visible;\n}\n\n\n/* Most direct children of .jp-RenderedHTMLCommon have a margin-bottom of 1.0.\n * At the bottom of cells this is a bit too much as there is also spacing\n * between cells. Going all the way to 0 gets too tight between markdown and\n * code cells.\n */\n.jp-RenderedHTMLCommon > *:last-child {\n  margin-bottom: 0.5em;\n}\n\n\n\n/*-----------------------------------------------------------------------------\n| RenderedPDF\n|----------------------------------------------------------------------------*/\n\n.jp-RenderedPDF {\n  font-size: var(--jp-ui-font-size1);\n}\n',""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(188);t.htmlRendererFactory={safe:!0,mimeTypes:["text/html"],defaultRank:50,createRenderer:function(e){return new r.RenderedHTML(e)}},t.imageRendererFactory={safe:!0,mimeTypes:["image/bmp","image/png","image/jpeg","image/gif"],defaultRank:90,createRenderer:function(e){return new r.RenderedImage(e)}},t.latexRendererFactory={safe:!0,mimeTypes:["text/latex"],defaultRank:70,createRenderer:function(e){return new r.RenderedLatex(e)}},t.markdownRendererFactory={safe:!0,mimeTypes:["text/markdown"],defaultRank:60,createRenderer:function(e){return new r.RenderedMarkdown(e)}},t.svgRendererFactory={safe:!1,mimeTypes:["image/svg+xml"],defaultRank:80,createRenderer:function(e){return new r.RenderedSVG(e)}},t.textRendererFactory={safe:!0,mimeTypes:["text/plain","application/vnd.jupyter.stdout","application/vnd.jupyter.stderr"],defaultRank:120,createRenderer:function(e){return new r.RenderedText(e)}},t.javaScriptRendererFactory={safe:!1,mimeTypes:["text/javascript","application/javascript"],defaultRank:110,createRenderer:function(e){return new r.RenderedJavaScript(e)}},t.standardRendererFactories=[t.htmlRendererFactory,t.markdownRendererFactory,t.latexRendererFactory,t.svgRendererFactory,t.imageRendererFactory,t.javaScriptRendererFactory,t.textRendererFactory]},function(e,t,n){var r;!function(n,i){var o,s,a=void 0!==e,l=[[{color:"0, 0, 0",class:"ansi-black"},{color:"187, 0, 0",class:"ansi-red"},{color:"0, 187, 0",class:"ansi-green"},{color:"187, 187, 0",class:"ansi-yellow"},{color:"0, 0, 187",class:"ansi-blue"},{color:"187, 0, 187",class:"ansi-magenta"},{color:"0, 187, 187",class:"ansi-cyan"},{color:"255,255,255",class:"ansi-white"}],[{color:"85, 85, 85",class:"ansi-bright-black"},{color:"255, 85, 85",class:"ansi-bright-red"},{color:"0, 255, 0",class:"ansi-bright-green"},{color:"255, 255, 85",class:"ansi-bright-yellow"},{color:"85, 85, 255",class:"ansi-bright-blue"},{color:"255, 85, 255",class:"ansi-bright-magenta"},{color:"85, 255, 255",class:"ansi-bright-cyan"},{color:"255, 255, 255",class:"ansi-bright-white"}]];function c(){this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0}c.prototype.setup_palette=function(){s=[],function(){var e,t;for(e=0;e<2;++e)for(t=0;t<8;++t)s.push(l[e][t].color)}(),function(){var e,t,n,r=[0,95,135,175,215,255],i=function(e,t,n){return r[e]+", "+r[t]+", "+r[n]};for(e=0;e<6;++e)for(t=0;t<6;++t)for(n=0;n<6;++n)s.push(i.call(this,e,t,n))}(),function(){var e,t=8,n=function(e){return e+", "+e+", "+e};for(e=0;e<24;++e,t+=10)s.push(n.call(this,t))}()},c.prototype.escape_for_html=function(e){return e.replace(/[&<>]/gm,(function(e){return"&"==e?"&amp;":"<"==e?"&lt;":">"==e?"&gt;":void 0}))},c.prototype.linkify=function(e){return e.replace(/(https?:\/\/[^\s]+)/gm,(function(e){return'<a href="'+e+'">'+e+"</a>"}))},c.prototype.ansi_to_html=function(e,t){return this.process(e,t,!0)},c.prototype.ansi_to_text=function(e){return this.process(e,{},!1)},c.prototype.process=function(e,t,n){var r=this,i=e.split(/\033\[/),o=i.shift(),s=i.map((function(e){return r.process_chunk(e,t,n)}));return s.unshift(o),s.join("")},c.prototype.process_chunk=function(e,t,n){var r=void 0!==(t=void 0===t?{}:t).use_classes&&t.use_classes,i=r?"class":"color",o=e.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);if(!o)return e;var a=o[4],c=o[2].split(";");if(""!==o[1]||"m"!==o[3])return a;if(!n)return a;for(var u=this;c.length>0;){var h=c.shift(),d=parseInt(h);isNaN(d)||0===d?(u.fg=u.bg=null,u.bright=0):1===d?u.bright=1:39==d?u.fg=null:49==d?u.bg=null:d>=30&&d<38?u.fg=l[u.bright][d%10][i]:d>=90&&d<98?u.fg=l[1][d%10][i]:d>=40&&d<48?u.bg=l[0][d%10][i]:d>=100&&d<108?u.bg=l[1][d%10][i]:38!==d&&48!==d||function(){var e=38===d;if(c.length>=1){var t=c.shift();if("5"===t&&c.length>=1){var n=parseInt(c.shift());if(n>=0&&n<=255)if(r){var i=n>=16?"ansi-palette-"+n:l[n>7?1:0][n%8].class;e?u.fg=i:u.bg=i}else s||u.setup_palette.call(u),e?u.fg=s[n]:u.bg=s[n]}else if("2"===t&&c.length>=3){var o=parseInt(c.shift()),a=parseInt(c.shift()),h=parseInt(c.shift());if(o>=0&&o<=255&&a>=0&&a<=255&&h>=0&&h<=255){var p=o+", "+a+", "+h;r?e?(u.fg="ansi-truecolor",u.fg_truecolor=p):(u.bg="ansi-truecolor",u.bg_truecolor=p):e?u.fg=p:u.bg=p}}}}()}if(null===u.fg&&null===u.bg)return a;var p=[],f=[],g={},m=function(e){var t,n=[];for(t in e)e.hasOwnProperty(t)&&n.push("data-"+t+'="'+this.escape_for_html(e[t])+'"');return n.length>0?" "+n.join(" "):""};return u.fg&&(r?(f.push(u.fg+"-fg"),null!==u.fg_truecolor&&(g["ansi-truecolor-fg"]=u.fg_truecolor,u.fg_truecolor=null)):p.push("color:rgb("+u.fg+")")),u.bg&&(r?(f.push(u.bg+"-bg"),null!==u.bg_truecolor&&(g["ansi-truecolor-bg"]=u.bg_truecolor,u.bg_truecolor=null)):p.push("background-color:rgb("+u.bg+")")),r?'<span class="'+f.join(" ")+'"'+m.call(u,g)+">"+a+"</span>":'<span style="'+p.join(";")+'"'+m.call(u,g)+">"+a+"</span>"},o={escape_for_html:function(e){return(new c).escape_for_html(e)},linkify:function(e){return(new c).linkify(e)},ansi_to_html:function(e,t){return(new c).ansi_to_html(e,t)},ansi_to_text:function(e){return(new c).ansi_to_text(e)},ansi_to_html_obj:function(){return new c}},a&&(e.exports=o),"undefined"!=typeof window&&"undefined"==typeof ender&&(window.ansi_up=o),void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}(Date)},function(e,t,n){(function(t){!function(t){"use strict";var n={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:g,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:g,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:g,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n?(?!hr|heading|lheading| {0,3}>|tag)[^\n]+)+)/,text:/^[^\n]+/};function r(e){this.tokens=[],this.tokens.links={},this.options=e||_.defaults,this.rules=n.normal,this.options.gfm&&(this.options.tables?this.rules=n.tables:this.rules=n.gfm)}n._label=/(?:\\[\[\]]|[^\[\]])+/,n._title=/(?:"(?:\\"|[^"]|"[^"\n]*")*"|'\n?(?:[^'\n]+\n?)*'|\([^()]*\))/,n.def=h(n.def).replace("label",n._label).replace("title",n._title).getRegex(),n.bullet=/(?:[*+-]|\d+\.)/,n.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,n.item=h(n.item,"gm").replace(/bull/g,n.bullet).getRegex(),n.list=h(n.list).replace(/bull/g,n.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+n.def.source+")").getRegex(),n._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b",n.html=h(n.html).replace("comment",/<!--[\s\S]*?-->/).replace("closed",/<(tag)[\s\S]+?<\/\1>/).replace("closing",/<tag(?:"[^"]*"|'[^']*'|\s[^'"\/>\s]*)*?\/?>/).replace(/tag/g,n._tag).getRegex(),n.paragraph=h(n.paragraph).replace("hr",n.hr).replace("heading",n.heading).replace("lheading",n.lheading).replace("tag","<"+n._tag).getRegex(),n.blockquote=h(n.blockquote).replace("paragraph",n.paragraph).getRegex(),n.normal=m({},n),n.gfm=m({},n.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),n.gfm.paragraph=h(n.paragraph).replace("(?!","(?!"+n.gfm.fences.source.replace("\\1","\\2")+"|"+n.list.source.replace("\\1","\\3")+"|").getRegex(),n.tables=m({},n.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),r.rules=n,r.lex=function(e,t){return new r(t).lex(e)},r.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g,"    ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},r.prototype.token=function(e,t){var r,i,o,s,a,l,c,u,h,d,p;for(e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},u=0;u<l.align.length;u++)/^ *-+: *$/.test(l.align[u])?l.align[u]="right":/^ *:-+: *$/.test(l.align[u])?l.align[u]="center":/^ *:-+ *$/.test(l.align[u])?l.align[u]="left":l.align[u]=null;for(u=0;u<l.cells.length;u++)l.cells[u]=l.cells[u].split(/ *\| */);this.tokens.push(l)}else if(o=this.rules.hr.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"hr"});else if(o=this.rules.blockquote.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"blockquote_start"}),o=o[0].replace(/^ *> ?/gm,""),this.token(o,t),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),p=(s=o[2]).length>1,this.tokens.push({type:"list_start",ordered:p,start:p?+s:""}),r=!1,d=(o=o[0].match(this.rules.item)).length,u=0;u<d;u++)c=(l=o[u]).length,~(l=l.replace(/^ *([*+-]|\d+\.) +/,"")).indexOf("\n ")&&(c-=l.length,l=this.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+c+"}","gm"),"")),this.options.smartLists&&u!==d-1&&(s===(a=n.bullet.exec(o[u+1])[0])||s.length>1&&a.length>1||(e=o.slice(u+1).join("\n")+e,u=d-1)),i=r||/\n\n(?!\s*$)/.test(l),u!==d-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),this.tokens.push({type:i?"loose_item_start":"list_item_start"}),this.token(l,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),o[3]&&(o[3]=o[3].substring(1,o[3].length-1)),h=o[1].toLowerCase(),this.tokens.links[h]||(this.tokens.links[h]={href:o[2],title:o[3]});else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u<l.align.length;u++)/^ *-+: *$/.test(l.align[u])?l.align[u]="right":/^ *:-+: *$/.test(l.align[u])?l.align[u]="center":/^ *:-+ *$/.test(l.align[u])?l.align[u]="left":l.align[u]=null;for(u=0;u<l.cells.length;u++)l.cells[u]=l.cells[u].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(l)}else if(o=this.rules.lheading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:"="===o[2]?1:2,text:o[1]});else if(t&&(o=this.rules.paragraph.exec(e)))e=e.substring(o[0].length),this.tokens.push({type:"paragraph",text:"\n"===o[1].charAt(o[1].length-1)?o[1].slice(0,-1):o[1]});else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"text",text:o[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var i={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:g,tag:/^<!--[\s\S]*?-->|^<\/?[a-zA-Z0-9\-]+(?:"[^"]*"|'[^']*'|\s[^<'">\/\s]*)*?\/?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^_([^\s_](?:[^_]|__)+?[^\s_])_\b|^\*((?:\*\*|[^*])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:g,text:/^[\s\S]+?(?=[\\<!\[`*]|\b_| {2,}\n|$)/};function o(e,t){if(this.options=t||_.defaults,this.links=e,this.rules=i.normal,this.renderer=this.options.renderer||new s,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=i.breaks:this.rules=i.gfm:this.options.pedantic&&(this.rules=i.pedantic)}function s(e){this.options=e||{}}function a(){}function l(e){this.tokens=[],this.token=null,this.options=e||_.defaults,this.options.renderer=this.options.renderer||new s,this.renderer=this.options.renderer,this.renderer.options=this.options}function c(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function u(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}function h(e,t){return e=e.source,t=t||"",{replace:function(t,n){return n=(n=n.source||n).replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,n),this},getRegex:function(){return new RegExp(e,t)}}}function d(e,t){return p[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?p[" "+e]=e+"/":p[" "+e]=e.replace(/[^/]*$/,"")),e=p[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}i._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,i._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,i.autolink=h(i.autolink).replace("scheme",i._scheme).replace("email",i._email).getRegex(),i._inside=/(?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]]|\](?=[^\[]*\]))*/,i._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,i.link=h(i.link).replace("inside",i._inside).replace("href",i._href).getRegex(),i.reflink=h(i.reflink).replace("inside",i._inside).getRegex(),i.normal=m({},i),i.pedantic=m({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),i.gfm=m({},i.normal,{escape:h(i.escape).replace("])","~|])").getRegex(),url:h(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",i._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:h(i.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),i.breaks=m({},i.gfm,{br:h(i.br).replace("{2,}","*").getRegex(),text:h(i.gfm.text).replace("{2,}","*").getRegex()}),o.rules=i,o.output=function(e,t,n){return new o(t,n).output(e)},o.prototype.output=function(e){for(var t,n,r,i,o="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),o+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),r="@"===i[2]?"mailto:"+(n=c(this.mangle(i[1]))):n=c(i[1]),o+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(i[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):c(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,o+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),o+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),o+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),o+=this.renderer.codespan(c(i[2].trim(),!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),o+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),o+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),o+=this.renderer.text(c(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else i[0]=this.rules._backpedal.exec(i[0])[0],e=e.substring(i[0].length),"@"===i[2]?r="mailto:"+(n=c(i[0])):(n=c(i[0]),r="www."===i[1]?"http://"+n:n),o+=this.renderer.link(r,null,n);return o},o.prototype.outputLink=function(e,t){var n=c(t.href),r=t.title?c(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,c(e[1]))},o.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},o.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i<r;i++)t=e.charCodeAt(i),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},s.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'<pre><code class="'+this.options.langPrefix+c(t,!0)+'">'+(n?e:c(e,!0))+"\n</code></pre>\n":"<pre><code>"+(n?e:c(e,!0))+"\n</code></pre>"},s.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},s.prototype.html=function(e){return e},s.prototype.heading=function(e,t,n){return"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},s.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},s.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},s.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},s.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},s.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},s.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},s.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},s.prototype.strong=function(e){return"<strong>"+e+"</strong>"},s.prototype.em=function(e){return"<em>"+e+"</em>"},s.prototype.codespan=function(e){return"<code>"+e+"</code>"},s.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},s.prototype.del=function(e){return"<del>"+e+"</del>"},s.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(u(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return n}this.options.baseUrl&&!f.test(e)&&(e=d(this.options.baseUrl,e));var i='<a href="'+e+'"';return t&&(i+=' title="'+t+'"'),i+=">"+n+"</a>"},s.prototype.image=function(e,t,n){this.options.baseUrl&&!f.test(e)&&(e=d(this.options.baseUrl,e));var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},s.prototype.text=function(e){return e},a.prototype.strong=a.prototype.em=a.prototype.codespan=a.prototype.del=a.prototype.text=function(e){return e},a.prototype.link=a.prototype.image=function(e,t,n){return""+n},a.prototype.br=function(){return""},l.parse=function(e,t){return new l(t).parse(e)},l.prototype.parse=function(e){this.inline=new o(e.links,this.options),this.inlineText=new o(e.links,m({},this.options,{renderer:new a})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},l.prototype.next=function(){return this.token=this.tokens.pop()},l.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},l.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},l.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,u(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i="",o="";for(n="",e=0;e<this.token.header.length;e++)n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(i+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",r=0;r<t.length;r++)n+=this.renderer.tablecell(this.inline.output(t[r]),{header:!1,align:this.token.align[r]});o+=this.renderer.tablerow(n)}return this.renderer.table(i,o);case"blockquote_start":for(o="";"blockquote_end"!==this.next().type;)o+=this.tok();return this.renderer.blockquote(o);case"list_start":o="";for(var s=this.token.ordered,a=this.token.start;"list_end"!==this.next().type;)o+=this.tok();return this.renderer.list(o,s,a);case"list_item_start":for(o="";"list_item_end"!==this.next().type;)o+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(o);case"loose_item_start":for(o="";"list_item_end"!==this.next().type;)o+=this.tok();return this.renderer.listitem(o);case"html":var l=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(l);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}};var p={},f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(){}function m(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function _(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(n||"function"==typeof t){n||(n=t,t=null);var i,o,s=(t=m({},_.defaults,t||{})).highlight,a=0;try{i=r.lex(e,t)}catch(e){return n(e)}o=i.length;var u=function(e){if(e)return t.highlight=s,n(e);var r;try{r=l.parse(i,t)}catch(t){e=t}return t.highlight=s,e?n(e):n(null,r)};if(!s||s.length<3)return u();if(delete t.highlight,!o)return u();for(;a<i.length;a++)!function(e){"code"!==e.type?--o||u():s(e.text,e.lang,(function(t,n){return t?u(t):null==n||n===e.text?--o||u():(e.text=n,e.escaped=!0,void(--o||u()))}))}(i[a])}else try{return t&&(t=m({},_.defaults,t)),l.parse(r.lex(e,t),t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",(t||_.defaults).silent)return"<p>An error occurred:</p><pre>"+c(e.message+"",!0)+"</pre>";throw e}}g.exec=g,_.options=_.setOptions=function(e){return m(_.defaults,e),_},_.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new s,xhtml:!1,baseUrl:null},_.Parser=l,_.parser=l.parse,_.Renderer=s,_.TextRenderer=a,_.Lexer=r,_.lexer=r.lex,_.InlineLexer=o,_.inlineLexer=o.output,_.parse=_,e.exports=_}(this||"undefined"!=typeof window&&window)}).call(this,n(17))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(12),o=n(6),s=n(18),a=n(183),l=function(){function e(e){this._changed=new o.Signal(this),this._raw={};var t=r.getBundleOptions(e),n=t.data,i=t.metadata,l=t.trusted;this._data=new a.ObservableJSON({values:n}),this._rawData=n,this._metadata=new a.ObservableJSON({values:i}),this._rawMetadata=i,this.trusted=l;var c=e.value;for(var u in c)switch(u){case"data":case"metadata":break;default:this._raw[u]=r.extract(c,u)}this.type=c.output_type,s.nbformat.isExecuteResult(c)?this.executionCount=c.execution_count:this.executionCount=null}return Object.defineProperty(e.prototype,"changed",{get:function(){return this._changed},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._data.dispose(),this._metadata.dispose(),o.Signal.clearData(this)},Object.defineProperty(e.prototype,"data",{get:function(){return this._rawData},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this._rawMetadata},enumerable:!0,configurable:!0}),e.prototype.setData=function(e){e.data&&(this._updateObservable(this._data,e.data),this._rawData=e.data),e.metadata&&(this._updateObservable(this._metadata,e.metadata),this._rawMetadata=e.metadata),this._changed.emit(void 0)},e.prototype.toJSON=function(){var e={};for(var t in this._raw)e[t]=r.extract(this._raw,t);switch(this.type){case"display_data":case"execute_result":case"update_display_data":e.data=this.data,e.metadata=this.metadata}return delete e.transient,e},e.prototype._updateObservable=function(e,t){for(var n=e.keys(),r=Object.keys(t),i=0,o=n;i<o.length;i++){var s=o[i];-1===r.indexOf(s)&&e.delete(s)}for(var a=0,l=r;a<l.length;a++){s=l[a];var c=e.get(s),u=t[s];c!==u&&e.set(s,u)}},e}();t.OutputModel=l,function(e){e.getData=function(e){return r.getData(e)},e.getMetadata=function(e){return r.getMetadata(e)}}(l=t.OutputModel||(t.OutputModel={})),t.OutputModel=l,function(e){function t(e){var t={};if(s.nbformat.isExecuteResult(e)||s.nbformat.isDisplayData(e)||s.nbformat.isDisplayUpdate(e))t=e.data;else if(s.nbformat.isStream(e))"stderr"===e.name?t["application/vnd.jupyter.stderr"]=e.text:t["application/vnd.jupyter.stdout"]=e.text;else if(s.nbformat.isError(e)){var n=e.traceback.join("\n");t["application/vnd.jupyter.stderr"]=n||e.ename+": "+e.evalue}return function(e){var t=Object.create(null);for(var n in e){var r=e[n];i.JSONExt.isArray(r)?r=r.join("\n"):i.JSONExt.isPrimitive(r)||(r=JSON.parse(JSON.stringify(r))),t[n]=r}return t}(t)}function n(e){var t=Object.create(null);if(s.nbformat.isExecuteResult(e)||s.nbformat.isDisplayData(e))for(var n in e.metadata)t[n]=r(e.metadata,n);return t}function r(e,t){var n=e[t];return i.JSONExt.isPrimitive(n)?n:JSON.parse(JSON.stringify(n))}e.getData=t,e.getMetadata=n,e.getBundleOptions=function(e){return{data:t(e.value),metadata:n(e.value),trusted:!!e.trusted}},e.extract=r}(r||(r={}))},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),o=n(7),s=n(12),a=n(191);t.IRenderMimeRegistry=new s.Token("@jupyterlab/rendermime:IRenderMimeRegistry"),t.ILatexTypesetter=new s.Token("@jupyterlab/rendermime:ILatexTypesetter");var l,c=function(){function e(e){if(void 0===e&&(e={}),this._id=0,this._ranks={},this._types=null,this._factories={},this.resolver=e.resolver||null,this.linkHandler=e.linkHandler||null,this.latexTypesetter=e.latexTypesetter||null,this.sanitizer=e.sanitizer||o.defaultSanitizer,e.initialFactories)for(var t=0,n=e.initialFactories;t<n.length;t++){var r=n[t];this.addFactory(r)}}return Object.defineProperty(e.prototype,"mimeTypes",{get:function(){return this._types||(this._types=l.sortedTypes(this._ranks))},enumerable:!0,configurable:!0}),e.prototype.preferredMimeType=function(e,t){if(t)for(var n=0,r=this.mimeTypes;n<r.length;n++){if((s=r[n])in e&&this._factories[s].safe)return s}for(var i=0,o=this.mimeTypes;i<o.length;i++){var s;if((s=o[i])in e)return s}},e.prototype.createRenderer=function(e){if(!(e in this._factories))throw new Error("No factory for mime type: '"+e+"'");return this._factories[e].createRenderer({mimeType:e,resolver:this.resolver,sanitizer:this.sanitizer,linkHandler:this.linkHandler,latexTypesetter:this.latexTypesetter})},e.prototype.createModel=function(e){return void 0===e&&(e={}),new a.MimeModel(e)},e.prototype.clone=function(t){void 0===t&&(t={});var n=new e({resolver:t.resolver||this.resolver||void 0,sanitizer:t.sanitizer||this.sanitizer||void 0,linkHandler:t.linkHandler||this.linkHandler||void 0,latexTypesetter:t.latexTypesetter||this.latexTypesetter});return n._factories=r({},this._factories),n._ranks=r({},this._ranks),n._id=this._id,n},e.prototype.getFactory=function(e){return this._factories[e]},e.prototype.addFactory=function(e,t){void 0===t&&void 0===(t=e.defaultRank)&&(t=100);for(var n=0,r=e.mimeTypes;n<r.length;n++){var i=r[n];this._factories[i]=e,this._ranks[i]={rank:t,id:this._id++}}this._types=null},e.prototype.removeMimeType=function(e){delete this._factories[e],delete this._ranks[e],this._types=null},e.prototype.getRank=function(e){var t=this._ranks[e];return t&&t.rank},e.prototype.setRank=function(e,t){if(this._ranks[e]){var n=this._id++;this._ranks[e]={rank:t,id:n},this._types=null}},e}();t.RenderMimeRegistry=c,function(e){var t=function(){function e(e){this._session=e.session,this._contents=e.contents}return e.prototype.resolveUrl=function(e){if(i.URLExt.isLocal(e)){var t=i.PathExt.dirname(this._session.path);e=i.PathExt.resolve(t,e)}return Promise.resolve(e)},e.prototype.getDownloadUrl=function(e){return i.URLExt.isLocal(e)?this._contents.getDownloadUrl(e):Promise.resolve(e)},e}();e.UrlResolver=t}(c=t.RenderMimeRegistry||(t.RenderMimeRegistry={})),t.RenderMimeRegistry=c,function(e){e.sortedTypes=function(e){return Object.keys(e).sort((function(t,n){var r=e[t],i=e[n];return r.rank!==i.rank?r.rank-i.rank:r.id-i.id}))}}(l||(l={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),s=n(5),a=n(5),l=n(14),c=function(e){function t(n){var r=e.call(this)||this;r.outputLengthChanged=new o.Signal(r),r._onIOPub=function(e){var t,n,i=r.model,o=e.header.msg_type,s=(e.content.transient||{}).display_id;switch(o){case"execute_result":case"display_data":case"stream":case"error":(t=e.content).output_type=o,i.add(t);break;case"clear_output":var a=e.content.wait;i.clear(a);break;case"update_display_data":if((t=e.content).output_type="display_data",n=r._displayIdMap.get(s))for(var l=0,c=n;l<c.length;l++){var u=c[l];i.set(u,t)}}s&&"display_data"===o&&((n=r._displayIdMap.get(s)||[]).push(i.length-1),r._displayIdMap.set(s,n))},r._onExecuteReply=function(e){var t=r.model,n=e.content,i=n&&n.payload;if(i&&i.length){var o=i.filter((function(e){return"page"===e.source}));if(o.length){var s={output_type:"display_data",data:JSON.parse(JSON.stringify(o[0])).data,metadata:{}};t.add(s)}}},r._minHeightTimeout=null,r._future=null,r._displayIdMap=new Map;var i=r.model=n.model;r.addClass("jp-OutputArea"),r.rendermime=n.rendermime,r.contentFactory=n.contentFactory||t.defaultContentFactory,r.layout=new s.PanelLayout;for(var a=0;a<i.length;a++){var l=i.get(a);r._insertOutput(a,l)}return i.changed.connect(r.onModelChanged,r),r}return i(t,e),Object.defineProperty(t.prototype,"widgets",{get:function(){return this.layout.widgets},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"future",{get:function(){return this._future},set:function(e){var t=this;if(this.model.isDisposed)throw Error("Model is disposed");this._future!==e&&(this._future&&this._future.dispose(),this._future=e,this.model.clear(),this.widgets.length&&(this._clear(),this.outputLengthChanged.emit(this.model.length)),e.onIOPub=this._onIOPub,e.onReply=this._onExecuteReply,e.onStdin=function(n){l.KernelMessage.isInputRequestMsg(n)&&t._onInputRequest(n,e)})},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._future&&this._future.dispose(),this._future=null,this._displayIdMap.clear(),e.prototype.dispose.call(this)},t.prototype.onModelChanged=function(e,t){var n;switch(t.type){case"add":n=this._modelToLayoutIndex(t.newIndex),this._insertOutput(n,t.newValues[0]),this.outputLengthChanged.emit(this.model.length);break;case"remove":this.widgets.length&&(this._clear(),this.outputLengthChanged.emit(this.model.length));break;case"set":n=this._modelToLayoutIndex(t.newIndex),this._setOutput(n,t.newValues[0]),this.outputLengthChanged.emit(this.model.length)}},t.prototype._clear=function(){var e=this;if(this.widgets.length){for(var t=this.widgets.length,n=0;n<t;n++){var r=this.widgets[0];r.parent=null,r.dispose()}this._displayIdMap.clear();var i=this.node.getBoundingClientRect();this.node.style.minHeight=i.height+"px",this._minHeightTimeout&&clearTimeout(this._minHeightTimeout),this._minHeightTimeout=window.setTimeout((function(){e.isDisposed||(e.node.style.minHeight="")}),50)}},t.prototype._onInputRequest=function(e,t){var n=this.contentFactory,r=e.content.prompt,i=e.content.password,o=new s.Panel;o.addClass("jp-OutputArea-child"),o.addClass("jp-OutputArea-stdin-item");var a=n.createOutputPrompt();a.addClass("jp-OutputArea-prompt"),o.addWidget(a);var l=n.createStdin({prompt:r,password:i,future:t});l.addClass("jp-OutputArea-output"),o.addWidget(l),this.layout.addWidget(o)},t.prototype._setOutput=function(e,t){this.layout.widgets[e].dispose(),this._insertOutput(e,t)},t.prototype._insertOutput=function(e,t){var n=this._createOutputItem(t);n.toggleClass("jp-OutputArea-executeResult",null!==t.executionCount),this.layout.insertWidget(e,n)},t.prototype._modelToLayoutIndex=function(e){var t,n=this.widgets,r=-1;for(t=0;t<n.length&&(n[t].hasClass("jp-OutputArea-stdin-item")||++r!==e);t++);return t},t.prototype._createOutputItem=function(e){var t=new s.Panel;t.addClass("jp-OutputArea-child");var n=this.contentFactory.createOutputPrompt();n.executionCount=e.executionCount,n.addClass("jp-OutputArea-prompt"),t.addWidget(n);var r=this.rendermime.preferredMimeType(e.data,!e.trusted);if(r){var i=e.metadata,o=i[r],a=!1;a=o&&void 0!==o.isolated?o.isolated:i.isolated;var l=this.rendermime.createRenderer(r);!0===a&&(l=new h.IsolatedRenderer(l)),l.renderModel(e),l.addClass("jp-OutputArea-output"),t.addWidget(l)}return t},t}(a.Widget);t.OutputArea=c,function(e){e.execute=function(e,t,n){var r={code:e,stop_on_error:!0};if(!n.kernel)return Promise.reject("Session has no kernel.");var i=n.kernel.requestExecute(r,!1);return t.future=i,i.done};var t=function(){function e(){}return e.prototype.createOutputPrompt=function(){return new u},e.prototype.createStdin=function(e){return new d(e)},e}();e.ContentFactory=t,e.defaultContentFactory=new t}(c=t.OutputArea||(t.OutputArea={})),t.OutputArea=c;var u=function(e){function t(){var t=e.call(this)||this;return t._executionCount=null,t.addClass("jp-OutputPrompt"),t}return i(t,e),Object.defineProperty(t.prototype,"executionCount",{get:function(){return this._executionCount},set:function(e){this._executionCount=e,this.node.textContent=null===e?"":"Out["+e+"]:"},enumerable:!0,configurable:!0}),t}(a.Widget);t.OutputPrompt=u;var h,d=function(e){function t(t){var n=e.call(this,{node:h.createInputWidgetNode(t.prompt,t.password)})||this;return n._future=null,n._input=null,n.addClass("jp-Stdin"),n._input=n.node.getElementsByTagName("input")[0],n._input.focus(),n._future=t.future,n}return i(t,e),t.prototype.handleEvent=function(e){var t=this._input;if("keydown"===e.type&&13===e.keyCode){this._future.sendInputReply({value:t.value});var n=document.createElement("span");n.className="jp-Stdin-rendered","password"===t.type?n.textContent=Array(t.value.length+1).join("·"):n.textContent=t.value,t.parentElement.replaceChild(n,t)}},t.prototype.onAfterAttach=function(e){this._input.addEventListener("keydown",this),this.update()},t.prototype.onUpdateRequest=function(e){this._input.focus()},t.prototype.onBeforeDetach=function(e){this._input.removeEventListener("keydown",this)},t}(a.Widget);t.Stdin=d,function(e){e.createInputWidgetNode=function(e,t){var n=document.createElement("div"),r=document.createElement("pre");r.className="jp-Stdin-prompt",r.textContent=e;var i=document.createElement("input");return i.className="jp-Stdin-input",t&&(i.type="password"),n.appendChild(r),r.appendChild(i),n};var t=function(e){function t(t){var n=e.call(this,{node:document.createElement("iframe")})||this;n.addClass("jp-mod-isolated"),n._wrapped=t;var r=n.node;return r.frameBorder="0",r.scrolling="auto",r.addEventListener("load",(function(){r.contentDocument.open(),r.contentDocument.write(n._wrapped.node.innerHTML),r.contentDocument.close();var e=r.contentDocument.body;r.style.height=e.scrollHeight+"px"})),n}return i(t,e),t.prototype.renderModel=function(e){var t=this;return this._wrapped.renderModel(e).then((function(){var e=t.node.contentWindow;e&&e.location.reload()}))},t}(a.Widget);e.IsolatedRenderer=t}(h||(h={}))},function(e,t,n){var r=n(496);"string"==typeof r&&(r=[[e.i,r,""]]);var i={transform:void 0};n(40)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(25)(!1)).push([e.i,"/*-----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|----------------------------------------------------------------------------*/\n\n.jp-OutputArea-child {\n    margin-top: 1em;\n    margin-bottom: 1em;\n}\n\n.jp-RenderedText pre {\n    padding-left: 1em;\n    padding-top: 0.8em;\n    padding-bottom: 0.8em;\n}\n",""])},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,a)}l((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(5);t.WIDGET_MIMETYPE="application/vnd.jupyter.widget-view+json";var l=function(e){function t(t,n){var r=e.call(this)||this;return r.mimeType=t.mimeType,r._manager=n,r}return i(t,e),t.prototype.renderModel=function(e){return o(this,void 0,void 0,(function(){var t,n,r,i;return s(this,(function(o){switch(o.label){case 0:if(t=e.data[this.mimeType],!(n=this._manager.get_model(t.model_id)))return[3,6];o.label=1;case 1:return o.trys.push([1,4,,5]),[4,n];case 2:return r=o.sent(),[4,this._manager.display_model(null,r,{el:this.node})];case 3:return o.sent(),[3,5];case 4:return i=o.sent(),console.log("Error displaying widget"),console.log(i),this.node.textContent="Error displaying widget",[3,5];case 5:return[3,7];case 6:return this.node.textContent="Error creating widget: could not find model",[2,Promise.resolve()];case 7:return[2]}}))}))},t}(a.Widget);t.WidgetRenderer=l},function(e){e.exports=JSON.parse('{"name":"@jupyter-widgets/html-manager","version":"0.11.10","description":"Standalone package for rendering Jupyter widgets outside notebooks","main":"lib/index.js","typings":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/jupyter-widgets/ipywidgets.git"},"files":["lib/**/*.d.ts","lib/**/*.js","dist/","css/*.css"],"scripts":{"clean":"rimraf lib && rimraf dist","build:src":"tsc --project src","build:embed-amd":"node scripts/concat-amd-build.js && rimraf dist/amd","build:test":"tsc --project test/src && webpack --config test/webpack.conf.js","build":"npm run build:src && webpack && npm run build:embed-amd","lint":"tslint --project tslint.json --format stylish","test":"npm run test:unit","test:unit":"npm run test:unit:firefox && npm run test:unit:chrome","test:unit:default":"npm run build:test && karma start test/karma.conf.js --log-level debug --browsers=Firefox","test:unit:firefox":"npm run test:unit:default -- --browsers=Firefox","test:unit:chrome":"npm run test:unit:default -- --browsers=Chrome","prepublish":"npm run clean && npm run build"},"author":"Jupyter Project","license":"BSD-3-Clause","bugs":{"url":"https://github.com/jupyter-widgets/ipywidgets/issues"},"homepage":"https://github.com/jupyter-widgets/ipywidgets#readme","dependencies":{"@jupyter-widgets/base":"^1.1.8","@jupyter-widgets/controls":"^1.1.6","@jupyter-widgets/output":"^1.0.15","@jupyter-widgets/schema":"^0.3.2","@jupyterlab/outputarea":"^0.15.0","@jupyterlab/rendermime":"^0.15.0","@jupyterlab/rendermime-interfaces":"^1.0.1","@phosphor/widgets":"^1.3.0","ajv":"^5.2.2","font-awesome":"^4.7.0","jquery":"^3.1.1"},"devDependencies":{"@types/mocha":"^2.2.41","@types/requirejs":"^2.1.28","chai":"^4.0.0","css-loader":"^0.28.4","file-loader":"^0.11.2","json-loader":"^0.5.4","karma":"^1.6.0","karma-chrome-launcher":"^2.0.0","karma-firefox-launcher":"^1.0.1","karma-ie-launcher":"^1.0.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.3","mocha":"^3.3.0","postcss":"^6.0.2","postcss-cssnext":"^3.0.2","postcss-import":"^10.0.0","postcss-loader":"^2.0.6","rimraf":"^2.6.1","style-loader":"^0.18.1","tslint":"^5.8.0","typescript":"~2.6.2","url-loader":"^0.5.9","webpack":"^3.5.5"}}')},function(e,t,n){n(1);var r=n(0),i=n(20),o=i.MarkModel.extend({defaults:function(){return r.extend(i.MarkModel.prototype.defaults(),{_model_name:"GridHeatMapModel",_view_name:"GridHeatMap",row:[],column:[],color:null,scales_metadata:{row:{orientation:"vertical",dimension:"y"},column:{orientation:"horizontal",dimension:"x"},color:{dimension:"color"}},null_color:"black",row_align:"start",column_align:"start",stroke:"black",opacity:1,anchor_style:{fill:"white",stroke:"blue"}})},initialize:function(){o.__super__.initialize.apply(this,arguments),this.on_some_change(["row","column","color"],this.update_data,this),this.on_some_change(["preserve_domain"],this.update_domains,this),this.update_data(),this.update_domains()},update_data:function(){this.dirty=!0;var e=this;this.colors=this.get_typed_field("color"),this.rows=this.get_typed_field("row"),this.columns=this.get_typed_field("column");this.colors.length;var t=this.colors[0].length,n=[];n=n.concat.apply(n,this.colors),this.mark_data=n.map((function(n,r){var i=Math.floor(r/t),o=r%t;return{row_num:i,row:e.rows[i],column:e.columns[o],column_num:o,color:n,_cell_num:r}})),this.identify_modes(),this.update_domains(),this.dirty=!1,this.trigger("data_updated")},update_domains:function(){if(this.mark_data){var e=this.get("scales"),t=e.row,n=e.column,r=e.color;this.get("preserve_domain").row?t.del_domain([],this.model_id+"_row"):t.compute_and_set_domain(this.rows,this.model_id+"_row"),this.get("preserve_domain").column?n.del_domain([],this.model_id+"_column"):n.compute_and_set_domain(this.columns,this.model_id+"_column"),null!=r&&(this.get("preserve_domain").color?r.del_domain([],this.model_id+"_color"):r.compute_and_set_domain(this.mark_data.map((function(e){return e.color})),this.model_id+"_color"))}},get_data_dict:function(e,t){return e},identify_modes:function(){var e={},t=this.get("scales"),n=t.row,r=t.column,i=this.colors.length,o=this.colors[0].length;"ordinal"===n.type?e.row="middle":i===this.rows.length-1?e.row="boundaries":i===this.rows.length?e.row="expand_one":i===this.rows.length+1&&(e.row="expand_two"),"ordinal"===r.type?e.column="middle":o===this.columns.length-1?e.column="boundaries":o===this.columns.length?e.column="expand_one":o===this.columns.length+1&&(e.column="expand_two"),this.modes=e}});e.exports={GridHeatMapModel:o}},function(e,t,n){var r=n(9),i=(n(1),n(0)),o=n(28),s="^"+n(21).version,a=o.BaseModel.extend({defaults:function(){return i.extend(r.WidgetModel.prototype.defaults(),{_model_name:"AxisModel",_view_name:"Axis",_model_module:"bqplot",_view_module:"bqplot",_model_module_version:s,_view_module_version:s,orientation:"horizontal",side:null,label:"",grid_lines:"solid",tick_format:null,scale:void 0,num_ticks:null,tick_values:[],offset:{},label_location:"middle",label_color:null,grid_color:null,color:null,label_offset:null,visible:!0,tick_style:{},tick_rotate:0})},initialize:function(){a.__super__.initialize.apply(this,arguments),this.on("change:side",this.validate_orientation,this),this.on("change:orientation",this.validate_side,this),this.validate_orientation(),this.validate_side()},validate_side:function(){var e=this.get("orientation"),t=this.get("side");"vertical"===e?"left"!==t&&"right"!==t&&this.set("side","left"):"bottom"!==t&&"top"!==t&&this.set("side","bottom"),this.save_changes()},validate_orientation:function(){this.get("orientation");var e=this.get("side");e&&("left"===e||"right"===e?this.set("orientation","vertical"):this.set("orientation","horizontal"),this.save_changes())}},{serializers:i.extend({scale:{deserialize:r.unpack_models},offset:{deserialize:r.unpack_models}},r.WidgetModel.serializers)}),l=a.extend({defaults:function(){return i.extend(a.prototype.defaults(),{_model_name:"ColorAxisModel",_view_name:"ColorAxis"})}});e.exports={AxisModel:a,ColorAxisModel:l}},function(e,t,n){var r=n(1),i=n(13),o=n(68).Interaction.extend({render:function(){o.__super__.render.apply(this),this.d3el.style({cursor:"crosshair"}),this.active=!1;var e=this;this.set_lines_view().then((function(){e.d3el.on("mousedown",(function(){return e.mousedown()})),e.set_limits()})),this.update_line_index(),this.listenTo(this.model,"change:line_index",this.update_line_index,this),this.model.on_some_change(["min_x","max_x"],this.set_limits,this)},set_lines_view:function(){var e=this.parent,t=this.model.get("lines"),n=this;return Promise.all(e.mark_views.views).then((function(r){var i=e.mark_views._models.map((function(e){return e.model_id})).indexOf(t.model_id);n.lines_view=r[i]}))},mousedown:function(){this.active=!0,this.mouse_entry(!1);var e=this;this.d3el.on("mousemove",(function(){e.mousemove()})),this.d3el.on("mouseleave",(function(){e.mouseup()})),this.d3el.on("mouseup",(function(){e.mouseup()}))},mouseup:function(){if(this.active){this.mouse_entry(!0);var e=this.model.get("lines");e.set_typed_field("y",i.deepCopy(e.y_data)),this.lines_view.touch(),this.active=!1,this.d3el.on("mousemove",null),this.d3el.on("mouseleave",null),this.d3el.on("mouseup",null)}},mousemove:function(){this.mouse_entry(!0)},mouse_entry:function(e){if(this.active){var t=this.model.get("lines"),n=Math.min(this.line_index,t.x_data.length-1),i=r.mouse(this.el);e&&"previous_pos"in this||(this.previous_pos=i);for(var o=this.lines_view.scales.x.scale,s=this.lines_view.scales.y.scale,a=o.invert(i[0]),l=s.invert(i[1]),c=o.invert(this.previous_pos[0]),u=(s.invert(this.previous_pos[1]),this.nns(t.x_data[n],c)),h=this.nns(t.x_data[n],a),d=Math.min(u,h),p=Math.max(u,h),f=d;f<=p;++f)(!this.valid_min||t.x_data[n][f]>=this.min_x)&&(!this.valid_max||t.x_data[n][f]<=this.max_x)&&(t.y_data[this.line_index][f]=l);var g=this,m=t.x_data[n].map((function(e,n){return{x:e,y:t.y_data[g.line_index][n]}}));this.lines_view.d3el.select("#curve"+(g.line_index+1)).attr("d",(function(e){return g.lines_view.line(m)})),this.previous_pos=i}},capnfloor:function(e){return Math.max(Math.min(e,this.model.get("max_x")),this.model.get("min_x"))},set_limits:function(){"date"==this.lines_view.scales.x.model.type?(this.min_x=this.model.get_date_elem("min_x"),this.valid_min=!(null===this.min_x||void 0===this.min_x||isNaN(this.min_x.getTime())),this.max_x=this.model.get_date_elem("max_x"),this.valid_max=!(null===this.max_x||void 0===this.max_x||isNaN(this.max_x.getTime()))):(this.min_x=this.model.get("min_x"),this.max_x=this.model.get("max_x"),this.valid_min=!(null===this.min_x||void 0===this.min_x),this.valid_max=!(null===this.max_x||void 0===this.max_x))},nns:function(e,t){var n=this.lines_view.bisect(e,t);return t-e[n-1]>e[n]-t?n:n-1},update_line_index:function(){this.line_index=this.model.get("line_index")}});e.exports={HandDraw:o}},function(e,t,n){var r=n(1),i=n(0),o=n(19),s=n(13),a=o.Mark.extend({render:function(){this.padding=this.model.get("padding");var e=a.__super__.render.apply(this);this.set_internal_scales(),this.selected_indices=this.model.get("selected"),this.selected_style=this.model.get("selected_style"),this.unselected_style=this.model.get("unselected_style"),this.display_el_classes=["bar","legendtext"];var t=this;return this.displayed.then((function(){t.parent.tooltip_div.node().appendChild(t.tooltip_div.node()),t.create_tooltip()})),e.then((function(){t.event_listeners={},t.process_interactions(),t.create_listeners(),t.compute_view_padding(),t.draw()}))},set_scale_orientation:function(){this.model.get("orientation");this.dom_scale=this.scales.x,this.range_scale=this.scales.y},set_ranges:function(){var e=this.model.get("orientation");this.set_scale_orientation();var t=this.dom_scale,n=this.range_scale,r="vertical"===e?"x":"y",i="vertical"===e?"y":"x";"ordinal"!==t.model.type?t.set_range(this.parent.padded_range(r,t.model)):t.set_range(this.parent.padded_range(r,t.model),this.padding),n.set_range(this.parent.padded_range(i,n.model)),this.dom_offset=0,this.range_offset="vertical"===e?n.offset:-n.offset},set_positional_scales:function(){var e=this.scales.x,t=this.scales.y;this.listenTo(e,"domain_changed",(function(){this.model.dirty||this.draw()})),this.listenTo(t,"domain_changed",(function(){this.model.dirty||this.draw()}))},set_internal_scales:function(){this.x=r.scale.ordinal(),this.x1=r.scale.ordinal()},adjust_offset:function(){"ordinal"!==this.dom_scale.model.type?"center"===this.model.get("align")?this.dom_offset=-(this.x.rangeBand()/2).toFixed(2):"left"===this.model.get("align")?this.dom_offset=-this.x.rangeBand().toFixed(2):this.dom_offset=0:"center"===this.model.get("align")?this.dom_offset=0:"left"===this.model.get("align")?this.dom_offset=-this.x.rangeBand()/2:this.dom_offset=this.x.rangeBand()/2},create_listeners:function(){a.__super__.create_listeners.apply(this),this.d3el.on("mouseover",i.bind((function(){this.event_dispatcher("mouse_over")}),this)).on("mousemove",i.bind((function(){this.event_dispatcher("mouse_move")}),this)).on("mouseout",i.bind((function(){this.event_dispatcher("mouse_out")}),this)),this.listenTo(this.model,"data_updated",(function(){this.draw(!0)}),this),this.listenTo(this.model,"change:colors",this.update_colors,this),this.listenTo(this.model,"colors_updated",this.update_colors,this),this.listenTo(this.model,"change:type",this.update_type,this),this.listenTo(this.model,"change:align",this.realign,this),this.listenTo(this.model,"change:orientation",this.relayout,this),this.listenTo(this.model,"change:padding",this.relayout,this),this.listenTo(this.model,"change:tooltip",this.create_tooltip,this),this.model.on_some_change(["stroke","opacities"],this.update_stroke_and_opacities,this),this.listenTo(this.model,"change:selected",this.update_selected),this.listenTo(this.model,"change:interactions",this.process_interactions),this.listenTo(this.parent,"bg_clicked",(function(){this.event_dispatcher("parent_clicked")}))},process_interactions:function(){var e=this.model.get("interactions");i.isEmpty(e)?this.reset_interactions():(void 0!==e.click&&null!==e.click?"tooltip"===e.click?(this.event_listeners.element_clicked=function(){return this.refresh_tooltip(!0)},this.event_listeners.parent_clicked=this.hide_tooltip):"select"===e.click&&(this.event_listeners.parent_clicked=this.reset_selection,this.event_listeners.element_clicked=this.bar_click_handler):this.reset_click(),void 0!==e.hover&&null!==e.hover?"tooltip"===e.hover&&(this.event_listeners.mouse_over=this.refresh_tooltip,this.event_listeners.mouse_move=this.move_tooltip,this.event_listeners.mouse_out=this.hide_tooltip):this.reset_hover(),void 0!==e.legend_click&&null!==e.legend_click?"tooltip"===e.legend_click&&(this.event_listeners.legend_clicked=function(){return this.refresh_tooltip(!0)},this.event_listeners.parent_clicked=this.hide_tooltip):this.event_listeners.legend_clicked=function(){},void 0!==e.legend_hover&&null!==e.legend_hover?"highlight_axes"===e.legend_hover&&(this.event_listeners.legend_mouse_over=i.bind(this.highlight_axes,this),this.event_listeners.legend_mouse_out=i.bind(this.unhighlight_axes,this)):this.reset_legend_hover())},realign:function(){this.relayout()},draw_zero_line:function(){this.set_scale_orientation();var e=this.range_scale;"vertical"===this.model.get("orientation")?this.d3el.select(".zeroLine").attr("x1",0).attr("x2",this.parent.plotarea_width).attr("y1",e.scale(this.model.base_value)).attr("y2",e.scale(this.model.base_value)):this.d3el.select(".zeroLine").attr("x1",e.scale(this.model.base_value)).attr("x2",e.scale(this.model.base_value)).attr("y1",0).attr("y2",this.parent.plotarea_height)},relayout:function(){this.set_ranges(),this.compute_view_padding();this.range_scale;this.draw_zero_line(),this.x.rangeRoundBands(this.set_x_range(),this.padding),this.adjust_offset(),this.x1.rangeRoundBands([0,this.x.rangeBand().toFixed(2)]),this.draw_bars()},invert_point:function(e){if(void 0===e)return this.model.set("selected",null),void this.touch();var t=this.x_pixels.map((function(t){return Math.abs(t-e)}));this.model.set("selected",[t.indexOf(r.min(t))]),this.touch()},selector_changed:function(e,t){if(void 0===e)return this.model.set("selected",null),this.touch(),[];var n=this.pixel_coords,r=i.range(n.length),o=i.filter(r,(function(e){for(var r=n[e],i=0;i<r.length;i++)if(t(r[i]))return!0;return!1}));this.model.set("selected",o),this.touch()},update_selected:function(e,t){this.selected_indices=t,this.apply_styles()},draw:function(e){this.set_ranges();this.model.get("colors");var t=this,n=this.d3el.selectAll(".bargroup").data(this.model.mark_data,(function(e){return e.key})),r=this.dom_scale;this.range_scale;if("ordinal"!==r.model.type){var o=this.model.mark_data.map((function(e){return e.key}));this.x.domain(o)}else this.x.domain(r.scale.domain());this.x.rangeRoundBands(this.set_x_range(),this.padding),this.adjust_offset(),this.x1.rangeRoundBands([0,this.x.rangeBand().toFixed(2)]),this.model.mark_data.length>0&&this.x1.domain(i.range(this.model.mark_data[0].values.length)).rangeRoundBands([0,this.x.rangeBand().toFixed(2)]),n.enter().append("g").attr("class","bargroup"),n.order(),n.on("click",(function(e,n){return t.event_dispatcher("element_clicked",{data:e,index:n})})),n.exit().remove();var s=n.selectAll(".bar").data((function(e){return e.values}));s.enter().append("rect").attr("class","bar").attr("width",0).attr("height",0),s.exit().remove(),this.draw_bars(e),this.apply_styles(),this.d3el.selectAll(".zeroLine").remove(),this.d3el.append("g").append("line").attr("class","zeroLine"),this.draw_zero_line()},draw_bars:function(e){var t=this.d3el.selectAll(".bargroup"),n=t.selectAll(".bar"),i=!0===e?this.parent.model.get("animation_duration"):0,o=this,s=this.model.get("orientation"),a=this.dom_scale,l=this.range_scale,c="vertical"===s?"x":"y",u="vertical"===s?"y":"x",h="vertical"===s?"width":"height",d="vertical"===s?"height":"width";if("ordinal"===a.model.type){var p=r.max(this.parent.range(c));t.attr("transform",(function(e){return"vertical"===s?"translate("+((void 0!==a.scale(e.key)?a.scale(e.key):p)+o.dom_offset)+", 0)":"translate(0, "+((void 0!==a.scale(e.key)?a.scale(e.key):p)+o.dom_offset)+")"}))}else t.attr("transform",(function(e){return"vertical"===s?"translate("+(a.scale(e.key)+o.dom_offset)+", 0)":"translate(0, "+(a.scale(e.key)+o.dom_offset)+")"}));var f="stacked"===this.model.get("type");f?n.transition("draw_bars").duration(i).attr(c,0).attr(h,this.x.rangeBand().toFixed(2)).attr(u,(function(e){return"y"===u?l.scale(e.y1):l.scale(e.y0)})).attr(d,(function(e){return Math.abs(l.scale(e.y1+e.y_ref)-l.scale(e.y1))})):n.transition("draw_bars").duration(i).attr(c,(function(e,t){return o.x1(t)})).attr(h,this.x1.rangeBand().toFixed(2)).attr(u,(function(e){return r.min([l.scale(e.y),l.scale(o.model.base_value)])})).attr(d,(function(e){return Math.abs(l.scale(o.model.base_value)-l.scale(e.y_ref))})),this.pixel_coords=this.model.mark_data.map((function(e){var t=e.key,n=a.scale(t)+o.dom_offset;return e.values.map((function(e){var t={};return t[c]=f?n:n+o.x1(e.sub_index),t[u]=f?"y"===u?l.scale(e.y1):l.scale(e.y0):r.min([l.scale(e.y),l.scale(o.model.base_value)]),t[h]=f?o.x.rangeBand():o.x1.rangeBand(),t[d]=f?Math.abs(l.scale(e.y1+e.y_ref)-l.scale(e.y1)):Math.abs(l.scale(o.model.base_value)-l.scale(e.y_ref)),[[t.x,t.x+t.width],[t.y,t.y+t.height]]}))})),this.x_pixels=this.model.mark_data.map((function(e){return a.scale(e.key)+a.offset}))},update_type:function(e,t){this.model.update_domains(),this.draw()},update_stroke_and_opacities:function(){var e=this.model.get("stroke"),t=this.model.get("opacities");this.d3el.selectAll(".bar").style("stroke",e).style("opacity",(function(e,n){return t[n]}))},update_colors:function(){var e=this,t=this.scales.color;this.model.mark_data.length>0&&(this.model.is_y_2d?this.d3el.selectAll(".bargroup").selectAll(".bar").style("fill",(function(n,r){return void 0!==n.color&&void 0!==t?t.scale(n.color):e.get_colors(n.color_index)})):this.d3el.selectAll(".bar").style("fill",(function(n,r){return void 0!==n.color&&void 0!==t?t.scale(n.color):e.get_colors(n.color_index)}))),this.legend_el&&(this.legend_el.selectAll(".legendrect").style("fill",(function(n,r){return n.color&&t?t.scale(n.color):e.get_colors(n.color_index)})),this.legend_el.selectAll(".legendtext").style("fill",(function(n,r){return void 0!==n.color&&void 0!==t?t.scale(n.color):e.get_colors(n.color_index)})))},draw_legend:function(e,t,n,o,s){if(!this.model.is_y_2d&&1!==this.model.get("colors").length&&"element"!==this.model.get("color_mode"))return[0,0];var a=this.model.mark_data[0].values.map((function(e){return{index:e.sub_index,color:e.color,color_index:e.color_index}})),l=this.scales.color;this.legend_el=e.selectAll(".legend"+this.uuid).data(a);var c=this,u=.8*s;this.legend_el.enter().append("g").attr("class","legend"+this.uuid).attr("transform",(function(e,t){return"translate(0, "+(t*s+n)+")"})).on("mouseover",i.bind((function(){this.event_dispatcher("legend_mouse_over")}),this)).on("mouseout",i.bind((function(){this.event_dispatcher("legend_mouse_out")}),this)).on("click",i.bind((function(){this.event_dispatcher("legend_clicked")}),this)).append("rect").classed("legendrect",!0).style("fill",(function(e,t){return void 0!==e.color&&void 0!==l?l.scale(e.color):c.get_colors(e.color_index)})).attr({x:0,y:0,width:u,height:u}),this.legend_el.append("text").attr("class","legendtext").attr("x",1.2*u).attr("y",u/2).attr("dy","0.35em").text((function(e,t){return c.model.get("labels")[t]})).style("fill",(function(e,t){return void 0!==e.color&&void 0!==l?l.scale(e.color):c.get_colors(e.color_index)}));var h=r.max(this.model.get("labels"),(function(e){return e.length}));return this.legend_el.exit().remove(),[this.model.mark_data[0].values.length,h]},clear_style:function(e,t){var n=this.d3el.selectAll(".bargroup");void 0!==t&&(n=n.filter((function(e,n){return-1!==t.indexOf(n)})));var r={};for(var i in e)r[i]=null;n.selectAll(".bar").style(r)},set_style_on_elements:function(e,t){if(null!=t&&0!==t.length&&0!==Object.keys(e).length){var n=this.d3el.selectAll(".bargroup");(n=n.filter((function(e,n){return-1!==t.indexOf(n)}))).selectAll(".bar").style(e)}},set_default_style:function(e){this.update_colors(),this.update_stroke_and_opacities()},set_x_range:function(){var e=this.dom_scale;return"ordinal"===e.model.type?e.scale.rangeExtent():[e.scale(r.min(this.x.domain())),e.scale(r.max(this.x.domain()))]},bar_click_handler:function(e){e.data;var t=e.index,n=this.model.get("selected"),o=n?s.deepCopy(n):[],a=o.indexOf(t),l=r.event.ctrlKey||r.event.metaKey;if(a>-1&&l)o.splice(a,1);else if(r.event.shiftKey){if(a>-1)return;var c=0!==o.length?r.min(o):-1,u=0!==o.length?r.max(o):this.model.mark_data.length;t>u?i.range(u+1,t+1).forEach((function(e){o.push(e)})):t<c&&i.range(t,c).forEach((function(e){o.push(e)}))}else l?o.push(t):(o=[]).push(t);this.model.set("selected",0===o.length?null:o,{updated_view:this}),this.touch(),r.event||(r.event=window.event);var h=r.event;void 0!==h.cancelBubble&&(h.cancelBubble=!0),h.stopPropagation&&h.stopPropagation(),h.preventDefault()},reset_selection:function(){this.model.set("selected",null),this.selected_indices=null,this.touch()},compute_view_padding:function(){var e=this.dom_scale,t=this.model.get("orientation"),n=0,r="vertical"===t?this.parent.plotarea_width:this.parent.plotarea_height;e&&null!==this.x&&void 0!==this.x&&0!==this.x.domain().length&&("ordinal"!==e.model.type?"center"===this.model.get("align")?n=r/(2*this.x.domain().length)+1:"left"!==this.model.get("align")&&"right"!==this.model.get("align")||(n=r/this.x.domain().length+1):"left"!==this.model.get("align")&&"right"!==this.model.get("align")||(n=(this.x.rangeBand()/2).toFixed(2))),"vertical"===t?n!==this.x_padding&&(this.x_padding=n,this.trigger("mark_padding_updated")):n!==this.y_padding&&(this.y_padding=n,this.trigger("mark_padding_updated"))}});e.exports={Bars:a}},function(e,t,n){var r=n(9),i=n(0),o=n(28),s="^"+n(21).version,a=o.BaseModel.extend({defaults:function(){return i.extend(r.WidgetModel.prototype.defaults(),{_model_name:"HandDrawModel",_view_name:"HandDraw",_model_module:"bqplot",_view_module:"bqplot",_model_module_version:s,_view_module_version:s,lines:null,line_index:0,min_x:null,max_x:null})}},{serializers:i.extend({lines:{deserialize:r.unpack_models}},o.BaseModel.serializers)});e.exports={HandDrawModel:a}},function(e,t,n){var r=n(1),i=n(0),o=n(19).Mark.extend({render:function(){var e=o.__super__.render.apply(this),t=this;return this.displayed.then((function(){t.parent.tooltip_div.node().appendChild(t.tooltip_div.node()),t.create_tooltip()})),e.then((function(){t.create_listeners(),t.draw()}),null)},set_ranges:function(){var e=this.scales.x;e&&e.set_range(this.parent.padded_range("x",e.model));var t=this.scales.y;t&&t.set_range(this.parent.padded_range("y",t.model))},set_positional_scales:function(){var e=this.scales.x,t=this.scales.y;this.listenTo(e,"domain_changed",(function(){this.model.dirty||this.draw()})),this.listenTo(t,"domain_changed",(function(){this.model.dirty||this.draw()}))},create_listeners:function(){o.__super__.create_listeners.apply(this),this.d3el.on("mouseover",i.bind(this.mouse_over,this)).on("mousemove",i.bind(this.mouse_move,this)).on("mouseout",i.bind(this.mouse_out,this)),this.listenTo(this.model,"change:stroke",this.update_stroke,this),this.listenTo(this.model,"change:stroke_width",this.update_stroke_width,this),this.listenTo(this.model,"change:colors",this.update_colors,this),this.listenTo(this.model,"change:opacities",this.update_opacities,this),this.listenTo(this.model,"change:marker",this.update_marker,this),this.listenTo(this.model,"format_updated",this.draw,this),this.listenTo(this.model,"data_updated",this.draw)},update_stroke:function(){var e=this.model.get("stroke");this.d3el.selectAll(".stick").style("stroke",e),this.legend_el&&(this.legend_el.selectAll("path").style("stroke",e),this.legend_el.selectAll("text").style("fill",e))},update_stroke_width:function(){var e=this.model.get("stroke_width");this.d3el.selectAll(".stick").attr("stroke-width",e)},update_colors:function(){var e=this,t=this.model.get("colors"),n=t[0]?t[0]:"none",r=t[1]?t[1]:"none";this.d3el.selectAll(".stick").style("fill",(function(t){return t.y[e.model.px.o]>t.y[e.model.px.c]?r:n})),this.legend_el&&this.legend_el.selectAll("path").style("fill",n)},update_opacities:function(){var e=this.model.get("opacities");this.d3el.selectAll(".stick").style("opacity",(function(t,n){return e[n]})),this.legend_el&&this.legend_el.selectAll("path").attr("opacity",(function(t,n){return e[n]}))},update_marker:function(){var e=this.model.get("marker");this.legend_el&&this.rect_dim&&this.draw_legend_icon(this.rect_dim,this.legend_el),this.draw_mark_paths(e,this.d3el,this.model.mark_data.map((function(e,t){return e[1]})))},update_selected_colors:function(e,t){this.d3el.selectAll(".stick");var n=i.range(e,t+1);n.length==this.model.mark_data.length&&(n=[]);var r=this,o=this.model.get("stroke"),s=this.model.get("colors"),a=s[0]?s[0]:o,l=s[1]?s[1]:o,c=this.model.px;i.range(0,this.model.mark_data.length).forEach((function(e){r.d3el.selectAll("#stick"+e).style("stroke",o)})),n.forEach((function(e){r.d3el.selectAll("#stick"+e).style("stroke",(function(e){return e[c.o]>e[c.c]?l:a}))}))},invert_range:function(e,t){if(void 0===e||void 0===t||0===this.model.mark_data.length)return this.update_selected_colors(-1,-1),o=[];var n=i.range(this.model.mark_data.length),r=this,o=i.filter(n,(function(n){var i=r.x_pixels[n];return i>=e&&i<=t})),s=this.scales.x,a=-1,l=-1;return o.length>0&&(e!==s.scale.range()[0]||t!==s.scale.range()[1])&&(a=o[0],l=o[o.length-1]),this.update_selected_colors(a,l),this.model.set("selected",o),this.touch(),o},invert_point:function(e){this.scales.x;var t=this.x_pixels.map((function(t){return Math.abs(t-e)})),n=t.indexOf(r.min(t));return this.update_selected_colors(n,n),this.model.set("selected",[n]),this.touch(),n},draw:function(){var e=this.scales.x,t=this.scales.y;this.set_ranges();var n=this.model.get("colors"),i=this.model.get("opacities"),o=n[0]?n[0]:"none",s=n[1]?n[1]:"none",a=this.model.px,l=this.d3el.selectAll(".stick").data(this.model.mark_data.map((function(e,t){return{x:e[0],y:e[1],index:t}}))),c=l.enter().append("g").attr("class","stick").attr("id",(function(e,t){return"stick"+t})).style("stroke",this.model.get("stroke")).style("opacity",(function(e,t){return i[t]}));c.append("path").attr("class","stick_head"),c.append("path").attr("class","stick_tail"),c.append("path").attr("class","stick_body"),l.exit().remove();var u=this,h=a.h;if(-1===a.h&&(h=a.o),this.d3el.selectAll(".stick").style("fill",(function(e,t){return e.y[a.o]>e.y[a.c]?s:o})).attr("stroke-width",this.model.get("stroke_width")),"ordinal"===e.model.type){var d=r.max(this.parent.range("x"));this.d3el.selectAll(".stick").attr("transform",(function(n,r){return"translate("+((void 0!==e.scale(u.model.mark_data[r][0])?e.scale(u.model.mark_data[r][0]):d)+e.scale.rangeBand()/2)+","+(t.scale(n.y[h])+t.offset)+")"}))}else this.d3el.selectAll(".stick").attr("transform",(function(n,r){return"translate("+(e.scale(u.model.mark_data[r][0])+e.offset)+","+(t.scale(n.y[h])+t.offset)+")"}));this.draw_mark_paths(this.model.get("marker"),this.d3el,this.model.mark_data.map((function(e){return e[1]}))),this.x_pixels=this.model.mark_data.map((function(t){return e.scale(t[0])+e.offset}))},draw_mark_paths:function(e,t,n){for(var r,i,o=this.model.px,s=this,a=[],l=[],c=[],u=[],h=[],d=[],p=[],f=[],g=this.calculate_mark_width(),m=this.scales.x,_=this.scales.y,v=0;v<n.length;v++)-1===o.o?a[v]=void 0:a[v]=_.scale(n[v][o.o]),-1===o.c?u[v]=void 0:u[v]=_.scale(n[v][o.c]),-1!==o.o&&-1!==o.c&&(h[v]=n[v][o.o]>n[v][o.c]?a[v]:u[v],d[v]=n[v][o.o]<n[v][o.c]?a[v]:u[v]),-1===o.h||-1===o.l?(l[v]=a[v],c[v]=u[v]):(l[v]=_.scale(n[v][o.h]),c[v]=_.scale(n[v][o.l])),i=s.model.mark_data[v][0],g instanceof Date&&(g=g.getTime()),i instanceof Date&&(i=i.getTime()),r=i+g,"ordinal"===m.model.type?f[v]=.75*m.scale.rangeBand():f[v]=.75*(m.scale(r)-m.scale(i)),p[v]=-1*f[v]/2;"candle"==e&&-1!==o.o&&-1!==o.c?(-1!==o.h||-1!==o.l?(t.selectAll(".stick_head").attr("d",(function(e,t){return s.head_path_candle(h[t]-l[t])})),t.selectAll(".stick_tail").attr("d",(function(e,t){return s.tail_path_candle(d[t]-l[t],c[t]-d[t])}))):(t.selectAll(".stick_head").attr("d",""),t.selectAll(".stick_tail").attr("d","")),t.selectAll(".stick_body").attr("d",(function(e,t){return s.body_path_candle(p[t],a[t]-l[t],f[t],u[t]-a[t])}))):(-1!==o.o?t.selectAll(".stick_head").attr("d",(function(e,t){return s.head_path_bar(p[t],a[t]-l[t],-1*p[t])})):t.selectAll(".stick_head").attr("d",""),-1!==o.c?t.selectAll(".stick_tail").attr("d",(function(e,t){return s.tail_path_bar(u[t]-l[t],-1*p[t])})):t.selectAll(".stick_tail").attr("d",""),t.selectAll(".stick_body").attr("d",(function(e,t){return s.body_path_bar(c[t]-l[t])})))},head_path_candle:function(e){return"m0,0 l0,"+e},tail_path_candle:function(e,t){return"m0,"+e+" l0,"+t},body_path_candle:function(e,t,n,r){return"m"+e+","+t+" l"+n+",0 l0,"+r+" l"+-1*n+",0 z"},head_path_bar:function(e,t,n){return"m"+e+","+t+" l"+n+",0"},tail_path_bar:function(e,t){return"m0,"+e+" l"+t+",0"},body_path_bar:function(e){return"m0,0 l0,"+e},calculate_mark_width:function(){for(var e=Number.POSITIVE_INFINITY,t=this.model.get("scales").x,n=1;n<this.model.mark_data.length;n++){var r=this.model.mark_data[n][0]-this.model.mark_data[n-1][0];r<e&&(e=r)}return e===Number.POSITIVE_INFINITY&&(e=(t.domain[1]-t.domain[0])/2),e<0&&(e*=-1),e},relayout:function(){o.__super__.relayout.apply(this),this.set_ranges(),this.d3el.select(".intselmouse").attr("width",this.width).attr("height",this.height),this.draw()},draw_legend:function(e,t,n,o,s){var a=this.model.get("stroke"),l=this.model.get("colors"),c=l[0]?l[0]:"none";l[1]&&l[1];this.rect_dim=.8*s;var u=this;this.legend_el=e.selectAll("#legend"+this.uuid).data([this.model.mark_data]);var h=this.legend_el.enter().append("g").attr("transform",(function(e,t){return"translate(0, "+(t*s+n)+")"})).attr("class","legend").attr("id","legend"+this.uuid).style("fill",c).on("mouseover",i.bind(this.highlight_axes,this)).on("mouseout",i.bind(this.unhighlight_axes,this));h.append("path").attr("class","stick_head stick"),h.append("path").attr("class","stick_tail stick"),h.append("path").attr("class","stick_body stick").style("fill",c),h.selectAll("path").style("stroke",a).attr("transform","translate("+u.rect_dim/2+",0)"),this.draw_legend_icon(u.rect_dim,h),this.legend_el.append("text").attr("class","legendtext sticktext").attr("x",1.2*u.rect_dim).attr("y",u.rect_dim/2).attr("dy","0.35em").text((function(e,t){return u.model.get("labels")[t]})).style("fill",a);var d=r.max(this.model.get("labels"),(function(e){return e.length}));return this.legend_el.exit().remove(),[1,d]},draw_legend_icon:function(e,t){var n=e,r=e/2,i=3*e/4,o=e/4;"candle"===this.model.get("marker")?(t.selectAll(".stick_head").attr("d",this.head_path_candle(r/2)),t.selectAll(".stick_tail").attr("d",this.tail_path_candle(i,r/2)),t.selectAll(".stick_body").attr("d",this.body_path_candle(-1*r/2,o,r,n/2))):(t.selectAll(".stick_head").attr("d",this.head_path_bar(-1*r/2,i,r/2)),t.selectAll(".stick_tail").attr("d",this.tail_path_bar(o,r/2)),t.selectAll(".stick_body").attr("d",this.body_path_bar(n)))}});e.exports={OHLC:o}},function(e,t,n){var r=n(1),i=n(0),o=n(20),s=o.MarkModel.extend({defaults:function(){return i.extend(o.MarkModel.prototype.defaults(),{_model_name:"BarsModel",_view_name:"Bars",x:[],y:[],color:null,scales_metadata:{x:{orientation:"horizontal",dimension:"x"},y:{orientation:"vertical",dimension:"y"},color:{dimension:"color"}},color_mode:"auto",type:"stacked",colors:r.scale.category10().range(),padding:.05,stroke:null,base:0,opacities:[],orientation:"vertical",align:"center"})},initialize:function(){s.__super__.initialize.apply(this,arguments),this.is_y_2d=!1,this.on_some_change(["x","y","base"],this.update_data,this),this.on("change:color",(function(){this.update_color(),this.trigger("colors_updated")}),this),this.on_some_change(["preserve_domain"],this.update_domains,this),this.update_data(),this.update_color(),this.update_domains()},update_data:function(){var e=this.get_typed_field("x"),t=this.get_typed_field("y"),n=this.get("scales");n.x,n.y;t=0===t.length||t[0]instanceof Array?t:[t];var i=this;this.base_value=this.get("base"),void 0!==this.base_value&&null!==this.base_value||(this.base_value=0),0===e.length||0===t.length?(this.mark_data=[],this.is_y_2d=!1):(e=e.slice(0,r.min(t.map((function(e){return e.length})))),this.mark_data=e.map((function(e,n){var r={},o=i.base_value,s=i.base_value,a=i.base_value;return r.key=e,r.values=t.map((function(t,r){var l=t[n]-i.base_value,c=l>=0;return{index:n,sub_index:r,x:e,y0:c?o:a+=l,y1:c?o+=l:(s+=l)-l,y_ref:l,y:t[n]}})),r.pos_max=o,r.neg_max=s,r})),this.is_y_2d=this.mark_data[0].values.length>1,this.update_color()),this.update_domains(),this.trigger("data_updated")},get_data_dict:function(e,t,n){return e},update_color:function(){if(this.mark_data){var e=this.get_typed_field("color"),t=this.get("scales").color,n=this.get("color_mode"),r="group"===n||"auto"===n&&!this.is_y_2d;this.mark_data.forEach((function(t,n){t.values.forEach((function(t,i){t.color_index=r?n:i,t.color=e[t.color_index]}))})),t&&e.length>0&&(this.get("preserve_domain").color?t.del_domain([],this.model_id+"_color"):t.compute_and_set_domain(e,this.model_id+"_color"))}},update_domains:function(){if(this.mark_data){var e=this.get("scales"),t=(this.get("orientation"),e.x),n=e.y;if(this.get("preserve_domain").x?t.del_domain([],this.model_id+"_x"):t.compute_and_set_domain(this.mark_data.map((function(e){return e.key})),this.model_id+"_x"),this.get("preserve_domain").y)n.del_domain([],this.model_id+"_y");else if("stacked"===this.get("type"))n.compute_and_set_domain([r.min(this.mark_data,(function(e){return e.neg_max})),r.max(this.mark_data,(function(e){return e.pos_max})),this.base_value],this.model_id+"_y");else{var i=r.min(this.mark_data,(function(e){return r.min(e.values,(function(e){return e.y_ref}))})),o=r.max(this.mark_data,(function(e){return r.max(e.values,(function(e){return e.y_ref}))}));n.compute_and_set_domain([i,o,this.base_value],this.model_id+"_y")}}}});e.exports={BarsModel:s}},function(e,t,n){var r=n(0),i=n(1),o=n(13),s=n(19).Mark.extend({render:function(){var e=s.__super__.render.apply(this);this.bars_selected=[],this.display_el_classes=["rect","legendtext"];var t=this;return this.displayed.then((function(){t.parent.tooltip_div.node().appendChild(t.tooltip_div.node()),t.create_tooltip()})),e.then((function(){t.event_listeners={},t.process_interactions(),t.create_listeners(),t.draw(),t.update_selected(t.model,t.model.get("selected"))}))},set_ranges:function(){var e=this.scales.sample;e&&e.set_range(this.parent.padded_range("x",e.model));var t=this.scales.count;t&&t.set_range(this.parent.padded_range("y",t.model))},set_positional_scales:function(){var e=this.scales.sample,t=this.scales.count;this.listenTo(e,"domain_changed",(function(){this.model.dirty||this.model.update_data()})),this.listenTo(t,"domain_changed",(function(){this.model.dirty||this.draw()}))},create_listeners:function(){s.__super__.create_listeners.apply(this),this.d3el.on("mouseover",r.bind((function(){this.event_dispatcher("mouse_over")}),this)).on("mousemove",r.bind((function(){this.event_dispatcher("mouse_move")}),this)).on("mouseout",r.bind((function(){this.event_dispatcher("mouse_out")}),this)),this.listenTo(this.model,"change:tooltip",this.create_tooltip,this),this.listenTo(this.model,"data_updated",this.draw,this),this.listenTo(this.model,"change:colors",this.update_colors,this),this.model.on_some_change(["stroke","opacities"],this.update_stroke_and_opacities,this),this.listenTo(this.model,"change:selected",this.update_selected,this),this.listenTo(this.model,"change:interactions",this.process_interactions),this.listenTo(this.parent,"bg_clicked",(function(){this.event_dispatcher("parent_clicked")}))},process_interactions:function(){var e=this.model.get("interactions");r.isEmpty(e)?this.reset_interactions():(void 0!==e.click&&null!==e.click?"tooltip"===e.click?(this.event_listeners.element_clicked=function(){return this.refresh_tooltip(!0)},this.event_listeners.parent_clicked=this.hide_tooltip):"select"===e.click&&(this.event_listeners.parent_clicked=this.reset_selection,this.event_listeners.element_clicked=this.bar_click_handler):this.reset_click(),void 0!==e.hover&&null!==e.hover?"tooltip"===e.hover&&(this.event_listeners.mouse_over=this.refresh_tooltip,this.event_listeners.mouse_move=this.move_tooltip,this.event_listeners.mouse_out=this.hide_tooltip):this.reset_hover(),void 0!==e.legend_click&&null!==e.legend_click?"tooltip"===e.legend_click&&(this.event_listeners.legend_clicked=function(){return this.refresh_tooltip(!0)},this.event_listeners.parent_clicked=this.hide_tooltip):this.event_listeners.legend_clicked=function(){},void 0!==e.legend_hover&&null!==e.legend_hover?"highlight_axes"===e.legend_hover&&(this.event_listeners.legend_mouse_over=r.bind(this.highlight_axes,this),this.event_listeners.legend_mouse_out=r.bind(this.unhighlight_axes,this)):this.reset_legend_hover())},update_colors:function(e,t){this.d3el.selectAll(".bargroup").selectAll("rect").style("fill",this.get_colors(0)),e.get("labels")&&t.length>1&&this.d3el.selectAll(".bargroup").selectAll("text").style("fill",this.get_colors(1)),this.legend_el&&(this.legend_el.selectAll("rect").style("fill",this.get_colors(0)),this.legend_el.selectAll("text").style("fill",this.get_colors(0)))},update_stroke_and_opacities:function(){var e=this.model.get("stroke"),t=this.model.get("opacities");this.d3el.selectAll(".rect").style("stroke",e).style("opacity",(function(e,n){return t[n]}))},calculate_bar_width:function(){var e=this.scales.sample,t=(e.scale(this.model.max_x)-e.scale(this.model.min_x))/this.model.num_bins;return t>=10&&(t-=2),t},relayout:function(){this.set_ranges();var e=this.scales.sample,t=this.scales.count;this.d3el.selectAll(".bargroup").attr("transform",(function(n){return"translate("+e.scale(n.x)+","+t.scale(n.y)+")"}));var n=this.calculate_bar_width();this.d3el.selectAll(".bargroup").select("rect").transition("relayout").duration(this.parent.model.get("animation_duration")).attr("x",2).attr("width",n).attr("height",(function(e){return t.scale(0)-t.scale(e.y)}))},draw:function(){this.set_ranges();var e=this.model.get("colors"),t=e[0],n=(e.length>1&&e[1],[]);this.model.mark_data.forEach((function(e,t){n.push(t)}));var r=this.scales.sample,i=this.scales.count,o=this,s=this.calculate_bar_width(),a=this.d3el.selectAll(".bargroup").data(this.model.mark_data);a.enter().append("g").attr("class","bargroup").append("rect").attr("class","rect").attr("x",2).attr("width",0).attr("height",0),a.attr("transform",(function(e){return"translate("+r.scale(e.x)+","+i.scale(e.y)+")"})),a.select(".rect").style("fill",t).on("click",(function(e,t){return o.event_dispatcher("element_clicked",{data:e,index:t})})).attr("id",(function(e,t){return"rect"+t})).transition("draw").duration(this.parent.model.get("animation_duration")).attr("width",s).attr("height",(function(e){return i.scale(0)-i.scale(e.y)})),a.exit().remove(),this.bin_pixels=this.model.x_bins.map((function(e){return r.scale(e)+r.offset})),this.pixel_coords=this.model.mark_data.map((function(e){var t=r.scale(e.x);return[[t,t+s],[0,e.y].map(i.scale)]})),this.update_stroke_and_opacities()},bar_click_handler:function(e){e.data;var t=e.index,n=this.bars_selected,s=n?o.deepCopy(n):[],a=s.indexOf(t),l=i.event.ctrlKey||i.event.metaKey;if(a>-1&&l)s.splice(a,1);else if(i.event.shiftKey){if(a>-1)return;var c=0!==s.length?i.min(s):-1,u=0!==s.length?i.max(s):this.model.mark_data.length;t>u?r.range(u+1,t+1).forEach((function(e){s.push(e)})):t<c&&r.range(t,c).forEach((function(e){s.push(e)}))}else l?s.push(t):(s=[]).push(t);this.bars_selected=s,this.model.set("selected",0===s.length?null:this.calc_data_indices(s),{updated_view:this}),this.touch(),i.event||(i.event=window.event);var h=i.event;void 0!==h.cancelBubble&&(h.cancelBubble=!0),h.stopPropagation&&h.stopPropagation(),h.preventDefault()},draw_legend:function(e,t,n,o,s){this.legend_el=e.selectAll(".legend"+this.uuid).data([this.model.mark_data[0]]);var a=this,l=.8*s;this.legend_el.enter().append("g").attr("class","legend"+this.uuid).attr("transform",(function(e,t){return"translate(0, "+(t*s+n)+")"})).on("mouseover",r.bind((function(){this.event_dispatcher("legend_mouse_over")}),this)).on("mouseout",r.bind((function(){this.event_dispatcher("legend_mouse_out")}),this)).on("click",r.bind((function(){this.event_dispatcher("legend_clicked")}),this)).append("rect").style("fill",(function(e,t){return a.get_colors(t)})).attr({x:0,y:0,width:l,height:l}),this.legend_el.append("text").attr("class","legendtext").attr("x",1.2*l).attr("y",l/2).attr("dy","0.35em").text((function(e,t){return a.model.get("labels")[t]})).style("fill",(function(e,t){return a.get_colors(t)}));var c=i.max(this.model.get("labels"),(function(e){return e.length}));return this.legend_el.exit().remove(),[1,c]},reset_colors:function(e,t){this.d3el.selectAll("#rect"+e).style("fill",t)},update_selected:function(e,t){if(null!=t&&0!==t.length){var n=this.calc_bar_indices_from_data_idx(t);this.update_selected_colors(n)}else this.update_selected_colors([])},update_selected_colors:function(e){var t=this.model.get("colors"),n=t.length>1?t[1]:"red",i=t[0],o=(this.d3el.selectAll(".bargroup"),this);r.difference(r.range(0,this.model.num_bins),e).forEach((function(e){o.d3el.selectAll("#rect"+e).style("fill",i)})),e.forEach((function(e){o.d3el.selectAll("#rect"+e).style("fill",n)}))},invert_point:function(e){if(void 0===e)return this.model.set("selected",null),void this.touch();var t=this.calculate_bar_width(),n=(this.scales.sample,this.bin_pixels.map((function(n){return Math.abs(n+t/2-e)}))),r=n.indexOf(i.min(n));this.model.set("selected",this.calc_data_indices([r])),this.touch()},selector_changed:function(e,t){if(void 0===e)return this.model.set("selected",null),this.touch(),[];var n=this.pixel_coords,i=r.range(n.length),o=r.filter(i,(function(e){return t(n[e])}));this.model.set("selected",this.calc_data_indices(o)),this.touch()},calc_data_indices:function(e){var t=this.reduce_intervals(e);if(0===t.length)return[];var n=this.model.get_typed_field("sample"),i=t.length;return r.filter(r.range(n.length),(function(e){var r=n[e],o=0;for(o=0;o<i;o++)if(r<=t[o][1]&&r>=t[o][0])return!0;return!1}))},reduce_intervals:function(e){var t=[];if(0!==e.length){e.sort();for(var n=e[0],r=e[0],i=1;i<e.length;i++)e[i]===r+1?r++:(t.push([this.model.x_bins[n],this.model.x_bins[r+1]]),n=r=e[i]);t.push([this.model.x_bins[n],this.model.x_bins[r+1]])}return t},calc_data_indices_from_data_range:function(e,t){this.scales.sample;var n=i.max([0,i.bisectLeft(this.bin_pixels,e)-1]),o=i.min([this.model.num_bins,i.bisectRight(this.bin_pixels,t)]),s=this.model.get_typed_field("sample"),a=this;return r.filter(r.range(s.length),(function(e){return s[e]>=a.model.x_bins[n]&&s[e]<=a.model.x_bins[o]}))},calc_bar_indices_from_data_idx:function(e){for(var t=this.model.get_typed_field("sample"),n=e.map((function(e){return t[e]})),i=[],o=0;o<n.length;o++){var s=Math.min(r.indexOf(this.model.x_bins,n[o],!0),this.model.x_bins.length-2);-1===s&&(s=r.sortedIndex(this.model.x_bins,n[o])-1),i.push(s)}return i.sort(),i=r.uniq(i,!0)},reset_selection:function(){this.bars_selected=[],this.model.set("selected",null),this.touch()}});e.exports={Hist:s}},function(e,t,n){var r=n(1),i=n(0),o=n(20),s=o.MarkModel.extend({defaults:function(){return i.extend(o.MarkModel.prototype.defaults(),{_model_name:"OHLCModel",_view_name:"OHLC",x:[],y:[],scales_metadata:{x:{orientation:"horizontal",dimension:"x"},y:{orientation:"vertical",dimension:"y"}},stroke:null,box_fill_color:"dodgerblue",outlier_fill_color:"gray",opacities:[]})},initialize:function(){s.__super__.initialize.apply(this,arguments),this.on_some_change(["x","y"],this.update_data,this),this.on_some_change(["preserve_domain"],this.update_domains,this),this.on("change:format",this.update_format,this),this.px={o:-1,h:-1,l:-1,c:-1},this.mark_data=[],this.display_el_classes=["stick_body"],this.update_data(),this.update_domains(),this.update_format()},update_format:function(){this.update_data(),this.trigger("format_updated")},update_data:function(){var e=this.get_typed_field("x"),t=this.get_typed_field("y"),n=this.get("format");function o(e){console&&console.error("Invalid OHLC format: '"+e+"'")}if(this.px=n.toLowerCase().split("").reduce((function(r,i,s){return-1!==r[i]&&(o(n),e=[],t=[]),r[i]=s,r}),{o:-1,h:-1,l:-1,c:-1}),-1!==this.px.h&&-1===this.px.l||-1===this.px.h&&-1!==this.px.l||n.length<2||n.length>4)o(n),e=[],t=[];else{var s=this.px;(-1===this.px.h||t.every((function(e){return e[s.h]===r.max(e)&&e[s.l]===r.min(e)})))&&t.every((function(e){return e.length===n.length}))||(e=[],t=[],console&&console.error("Invalid OHLC data"))}e.length>t.length?e=e.slice(0,t.length):e.length<t.length&&(t=t.slice(0,e.length)),this.mark_data=i.zip(e,t),this.mark_data.forEach((function(e,t){e.index=t})),this.update_domains(),this.trigger("data_updated")},update_domains:function(){if(this.mark_data){for(var e,t,n=this.get("scales"),i=n.x,o=n.y,s=Number.POSITIVE_INFINITY,a=0,l=0,c=0,u=0;u<this.mark_data.length;u++)u>0&&(l=this.mark_data[u][0]-this.mark_data[u-1][0])<s&&(s=l),(c=this.mark_data[u][this.px.h]-this.mark_data[u][this.px.l])>a&&(a=c);if(this.mark_data.length<2&&(s=0),this.get("preserve_domain").x||0===this.mark_data.length?i.del_domain([],this.model_id+"_x"):"ordinal"===i.type?i.compute_and_set_domain(this.mark_data.map((function(e){return e[0]}))):(e=r.min(this.mark_data.map((function(e){return e[0]}))),(t=r.max(this.mark_data.map((function(e){return e[0]}))))instanceof Date&&(t=t.getTime()),i.set_domain([e-s/2,t+s/2],this.model_id+"_x")),this.get("preserve_domain").y||0===this.mark_data.length)o.del_domain([],this.model_id+"_y");else{var h=this.px.h,d=this.px.l;-1!==h&&-1!==d||(h=this.px.o,d=this.px.c),e=r.min(this.mark_data.map((function(e){return e[1][d]<e[1][h]?e[1][d]:e[1][h]}))),(t=r.max(this.mark_data.map((function(e){return e[1][h]>e[1][d]?e[1][h]:e[1][d]}))))instanceof Date&&(t=t.getTime()),o.set_domain([e-a,t+a],this.model_id+"_y")}}},get_data_dict:function(e,t){var n=this,r={};return r.index=t,r.x=e.x,["open","low","high","close"].forEach((function(t){r[t]=e.y[n.px[t.substr(0,1)]]})),r}});e.exports={OHLCModel:s}},function(e,t,n){var r=n(0),i=n(1),o=n(20),s=o.MarkModel.extend({defaults:function(){return r.extend(o.MarkModel.prototype.defaults(),{_model_name:"HistModel",_view_name:"Hist",sample:[],count:[],scales_metadata:{sample:{orientation:"horizontal",dimension:"x"},count:{orientation:"vertical",dimension:"y"}},bins:10,midpoints:[],colors:i.scale.category10().range(),stroke:null,opacities:[],normalized:!1})},initialize:function(){s.__super__.initialize.apply(this,arguments),this.mark_data=[],this.on_some_change(["bins","sample","preserve_domain"],this.update_data,this),this.update_data(),this.on("change:normalized",(function(){this.normalize_data(!0)}),this),this.normalize_data(!0)},update_data:function(){var e=this.get_typed_field("sample"),t=this.get("scales").sample;if(this.num_bins=this.get("bins"),0==e.length)this.mark_data=[],this.x_mid=[],this.count=[],this.x_bins=[];else{this.get("preserve_domain").sample?t.del_domain([],this.model_id+"_sample"):t.compute_and_set_domain(e,this.model_id+"_sample"),this.min_x=t.domain[0],this.max_x=t.domain[1];var n=this,r=(e=e.filter((function(e){return e<=n.max_x&&e>=n.min_x}))).map((function(e,t){return{index:t,value:e}}));this.x_bins=this.create_uniform_bins(this.min_x,this.max_x,this.num_bins),this.x_mid=this.x_bins.map((function(e,t){return.5*(e+n.x_bins[t-1])})).slice(1),this.mark_data=i.layout.histogram().bins(this.x_bins).value((function(e){return e.value}))(r),this.mark_data.forEach((function(e,t){e.index=t}))}this.normalize_data(!1),this.set("midpoints",this.x_mid),this.set_typed_field("count",this.count),this.update_domains(),this.save_changes(),this.trigger("data_updated")},normalize_data:function(e){if(this.count=this.mark_data.map((function(e){return e.length})),this.get("normalized")){var t=1;this.mark_data.length>0&&(t=this.mark_data[0].dx);var n=this.count.reduce((function(e,t){return e+t}),0);0!=n&&(this.count=this.count.map((function(e){return e/(n*t)})))}var r=this;this.mark_data.forEach((function(e,t){e.y=r.count[t]})),e&&(this.set_typed_field("count",this.count),this.update_domains(),this.save_changes(),this.trigger("data_updated"))},get_data_dict:function(e,t){var n={};return n.midpoint=this.x_mid[t],n.bin_start=this.x_bins[t],n.bin_end=this.x_bins[t+1],n.index=t,n.count=this.count[t],n},update_domains:function(){if(this.mark_data){var e=this.get("scales").count;this.get("preserve_domain").count||e.set_domain([0,1.05*i.max(this.mark_data,(function(e){return e.y}))],this.model_id+"_count")}},create_uniform_bins:function(e,t,n){for(var r=(t-e)/n,i=[],o=0;o<n;o++)i[o]=e+o*r;return i[n]=t,i}});e.exports={HistModel:s}},function(e,t,n){var r=n(9),i=n(0),o=n(28),s="^"+n(21).version,a=o.BaseModel.extend({defaults:function(){return i.extend(o.BaseModel.prototype.defaults(),{_model_name:"SelectorModel",_model_module:"bqplot",_view_module:"bqplot",_model_module_version:s,_view_module_version:s,marks:[]})}},{serializers:i.extend({marks:{deserialize:r.unpack_models}},o.BaseModel.serializers)}),l=a.extend({defaults:function(){return i.extend(a.prototype.defaults(),{_model_name:"OneDSelectorModel",scale:null})}},{serializers:i.extend({scale:{deserialize:r.unpack_models}},a.serializers)}),c=a.extend({defaults:function(){return i.extend(a.prototype.defaults(),{_model_name:"TwoDSelectorModel",x_scale:null,y_scale:null})}},{serializers:i.extend({x_scale:{deserialize:r.unpack_models},y_scale:{deserialize:r.unpack_models}},a.serializers)}),u=l.extend({defaults:function(){return i.extend(l.prototype.defaults(),{_model_name:"FastIntervalSelectorModel",_view_name:"FastIntervalSelector",selected:{},color:null,size:null})}}),h=l.extend({defaults:function(){return i.extend(l.prototype.defaults(),{_model_name:"IndexSelectorModel",_view_name:"IndexSelector",selected:{},line_width:2,color:null})}}),d=l.extend({defaults:function(){return i.extend(l.prototype.defaults(),{_model_name:"BrushIntervalSelectorModel",_view_name:"BrushIntervalSelector",brushing:!1,selected:{},color:null,orientation:"horizontal"})}}),p=c.extend({defaults:function(){return i.extend(c.prototype.defaults(),{_model_name:"BrushSelectorModel",_view_name:"BrushSelector",clear:!1,brushing:!1,selected_x:{},selected_y:{},color:null})}}),f=l.extend({defaults:function(){return i.extend(l.prototype.defaults(),{_model_name:"MultiSelectorModel",_view_name:"MultiSelector",names:[],brushing:!1,selected:{},_selected:{},show_names:!0})}}),g=c.extend({defaults:function(){return i.extend(l.prototype.defaults(),{_model_name:"LassoSelectorModel",_view_name:"LassoSelector",color:null})}});e.exports={SelectorModel:a,OneDSelectorModel:l,TwoDSelectorModel:c,FastIntervalSelectorModel:u,IndexSelectorModel:h,BrushIntervalSelectorModel:d,BrushSelectorModel:p,MultiSelectorModel:f,LassoSelectorModel:g}},function(e,t,n){var r=n(1),i=n(0),o=n(19).Mark.extend({render:function(){var e=o.__super__.render.apply(this),t=this;return e.then((function(){t.create_listeners(),t.draw()}),null)},set_ranges:function(){var e=this.scales.x;e&&e.set_range(this.parent.padded_range("x",e.model));var t=this.scales.y;t&&t.set_range(this.parent.padded_range("y",t.model))},set_positional_scales:function(){var e=this.scales.x;this.listenTo(e,"domain_changed",(function(){this.model.dirty||this.draw()}));var t=this.scales.y;this.listenTo(t,"domain_changed",(function(){this.model.dirty||this.draw()}))},create_listeners:function(){o.__super__.create_listeners.apply(this),this.listenTo(this.model,"change:stroke",this.update_stroke,this),this.listenTo(this.model,"change:opacities",this.update_opacities,this),this.listenTo(this.model,"change:marker",this.update_marker,this),this.listenTo(this.model,"change:outlier_fill_color",this.update_outlier_fill_color,this),this.listenTo(this.model,"change:box_fill_color",this.update_box_fill_color,this),this.listenTo(this.model,"data_updated",this.draw,this),this.listenTo(this.model,"change:box_width",this.update_box_width,this)},update_stroke:function(){var e=this.model.get("stroke");this.d3el.selectAll(".boxplot").selectAll("path, rect").style("stroke",e),this.d3el.selectAll(".outlier").style("stroke",e),this.legend_el&&(this.legend_el.selectAll("path").attr("stroke",e),this.legend_el.selectAll("text").style("fill",e))},update_outlier_fill_color:function(){this.d3el.selectAll(".outlier").style("fill",this.model.get("outlier_fill_color"))},update_box_fill_color:function(){this.d3el.selectAll(".box").style("fill",this.model.get("box_fill_color"))},update_opacities:function(){var e=this.model.get("opacities");this.d3el.selectAll(".boxplot").style("opacity",(function(t,n){return e[n]})),this.legend_el&&this.legend_el.selectAll("path").attr("opacity",(function(t,n){return e[n]}))},update_marker:function(){var e=this.model.get("marker");if(this.legend_el&&this.rect_dim){var t=[1/4*this.rect_dim,0,this.rect_dim,3/4*this.rect_dim];this.draw_mark_paths(e,this.rect_dim/2,this.legend_el,[t])}this.draw_mark_paths(e,this.calculate_mark_max_width(),this.d3el,this.model.mark_data)},get_box_width:function(){var e=this.model.get("box_width");if(!e){var t=this.parent.plotarea_width,n=t/10;e=t/(this.model.mark_data.length+1)/1.5,e=Math.min(e,n)}return e},compute_view_padding:function(){var e=this.get_box_width()/2+1;e!==this.x_padding&&(this.x_padding=e,this.trigger("mark_padding_updated"))},update_box_width:function(){this.compute_view_padding(),this.draw()},update_idx_selected:function(e,t){this.selected_indices=t,this.apply_styles(t)},apply_styles:function(e){var t=i.range(this.model.mark_data.length);this.set_default_style(t),this.set_style_on_elements(this.selected_style,this.selected_indices);var n=void 0===e?[]:i.difference(t,e);this.set_style_on_elements(this.unselected_style,n)},set_style_on_elements:function(e,t){if(void 0!==t&&0!==t.length){var n=this.d3el.selectAll(".boxplot");(n=n.filter((function(e,n){return-1!=t.indexOf(n)}))).style(e)}},set_default_style:function(e){if(void 0!==e&&0!==e.length){var t=this.model.get("color"),n=this.model.get("stroke"),r=this.model.get("opacities"),i=this.d3el.selectAll(".boxplot").filter((function(t,n){return-1!=e.indexOf(n)}));i.style("fill",(function(e){return e[0]>e[3]?t:"none"})).style("opacity",(function(e,t){return r[t]})),i.selectAll("path, rect").style("stroke",n),i.selectAll(".outliers").style("stroke",n)}},clear_style:function(e,t){var n=this.d3el.selectAll(".boxplot");void 0!==t&&(n=n.filter((function(e,n){return-1!=t.indexOf(n)})));var r={};for(var i in e)r[i]=null;n.style(r)},style_updated:function(e,t){this.set_default_style(t),this.set_style_on_elements(e,t)},selected_style_updated:function(e,t){this.selected_style=t,this.style_updated(t,this.selected_indices)},unselected_style_updated:function(e,t){this.unselected_style=t;var n=this.selected_indices,r=n?i.range(this.model.mark_data.length).filter((function(e){return-1==n.indexOf(e)})):[];this.style_updated(t,r)},update_selected_colors:function(e){var t=this.model.get("stroke"),n=t;this.d3el.selectAll(".boxplot").style("stroke",(function(r,i){return e.indexOf(i)>-1?n:t}))},selector_changed:function(e,t){if(void 0===e)return this.model.set("selected",null),this.touch(),this.update_selected_colors([]),[];var n=this.pixel_coords,r=i.range(n.length),o=i.filter(r,(function(e){return t(n[e])}));this.update_selected_colors(o),this.model.set("selected",o),this.touch()},invert_point:function(e){if(void 0===e)return this.update_selected_colors([]),this.model.set("selected",null),void this.touch();var t=this.x_pixels.map((function(t){return Math.abs(t-e)})),n=t.indexOf(r.min(t));return this.model.set("selected",[n]),this.update_selected_colors([n]),this.touch(),n},prepareBoxPlots:function(){var e=this.scales.x,t=this.scales.y;this.plotData=[];for(var n=0;n<this.model.mark_data.length;++n){var i=this.model.mark_data[n],o={};o.x=e.scale(i[0]),o.boxUpper=t.scale(r.quantile(i[1],.75)),o.boxLower=t.scale(r.quantile(i[1],.25)),o.boxMedian=t.scale(r.quantile(i[1],.5));var s=o.boxLower-o.boxUpper,a=o.boxLower+1.5*s,l=o.boxUpper-1.5*s;o.outliers=[],o.whiskerMax=Number.MAX_VALUE,o.whiskerMin=Number.MIN_VALUE;for(var c=0;c<i[1].length;++c){var u=t.scale(i[1][c]);u>a||u<l?o.outliers.push(u):(u>o.whiskerMin&&(o.whiskerMin=u),u<o.whiskerMax&&(o.whiskerMax=u))}this.plotData.push(o)}},draw:function(){this.set_ranges();var e=this.scales.x;this.prepareBoxPlots();var t=this.plotData;this.draw_mark_paths(".boxplot",this.d3el,t),this.x_pixels=this.model.mark_data.map((function(t){return e.scale(t[0])+e.offset}));var n=this.get_box_width()/2;this.pixel_coords=t.map((function(e){return[[e.x-n,e.x+n],[e.boxLower,e.boxUpper]]}))},draw_mark_paths:function(e,t,n){this.calculate_mark_max_width();var r=this.model.get("color"),i=this.d3el.selectAll(e).data(n),o=this.model.get("box_fill_color"),s=(this.model.get("start_time"),i.enter().append("g").attr("class","boxplot").attr("id",(function(e,t){return"boxplot"+t})));s.append("path").attr("class","whisker_max"),s.append("path").attr("class","whisker_max_end"),s.append("path").attr("class","whisker_min"),s.append("path").attr("class","whisker_min_end"),s.append("rect").attr("class","box"),s.append("path").attr("class","median_line"),s.append("g").attr("class","outliers");var a=0,l=this.scales.x;"ordinal"===l.model.type&&(a=l.scale.rangeBand()/2),t.selectAll(".boxplot").style("stroke",this.model.get("stroke")).style("opacity",r).attr("transform",(function(e,t){return"translate("+(e.x+a)+", 0)"}));var c=this.get_box_width();t.selectAll(".box").style("fill",o).attr("x",-c/2).attr("width",c).attr("y",(function(e,t){return e.boxUpper})).attr("height",(function(e,t){return e.boxLower-e.boxUpper})),t.selectAll(".median_line").style("stroke-width",2).attr("d",(function(e,t){var n=e.boxMedian;return"M"+(0-c/2)+","+n+" L"+(0+c/2)+","+n})),t.selectAll(".whisker_max").attr("d",(function(e,t){return"M0,"+e.whiskerMax+" L0,"+e.boxUpper})).attr("stroke-dasharray",(function(e,t){return"5,5"})),t.selectAll(".whisker_max_end").attr("d",(function(e,t){var n=e.whiskerMax;return"M"+(0-c/2)+","+n+" L"+(0+c/2)+","+n})),t.selectAll(".whisker_min").attr("d",(function(e,t){return"M0,"+e.whiskerMin+" L0,"+e.boxLower})).attr("stroke-dasharray",(function(e,t){return"5,5"})),t.selectAll(".whisker_min_end").attr("d",(function(e,t){var n=e.whiskerMin;return"M"+(0-c/2)+","+n+" L"+(0+c/2)+","+n}));var u=t.selectAll(".outliers").selectAll("circle").data((function(e){return e.outliers}));u.enter().append("circle").attr("class","outlier"),t.selectAll(".outlier").style("fill",this.model.get("outlier_fill_color")).attr("class","outlier").attr("cx",0).attr("r",3).attr("cy",(function(e){return e})),u.exit().remove(),i.exit().remove(),this.apply_styles(this.selected_indices)},calculate_mark_max_width:function(){for(var e=1/0,t=this.scales.x,n=1;n<this.model.mark_data.length;n++){var r=t.scale(this.model.mark_data[n][0])-t.scale(this.model.mark_data[n-1][0]);(r=r<0?-1*r:r)<e&&(e=r)}return e==1/0?(t.scale(this.model.max_x)-t.scale(this.model.min_x))/2:e},relayout:function(){o.__super__.relayout.apply(this),this.set_ranges(),this.compute_view_padding(),this.d3el.select(".intselmouse").attr("width",this.width).attr("height",this.height),this.draw()},draw_legend:function(e,t,n,o,s){var a=this.model.get("stroke");this.model.get("colors");this.rect_dim=.8*s;var l=this;this.legend_el=e.selectAll(".legend"+this.uuid).data([this.model.mark_data]),this.legend_el.enter().append("g").attr("transform",(function(e,t){return"translate(0, "+(t*s+n)+")"})).attr("class","legend"+this.uuid).on("mouseover",i.bind(this.highlight_axes,this)).on("mouseout",i.bind(this.unhighlight_axes,this)).selectAll("path").attr("stroke",a).attr("transform","translate("+l.rect_dim/2+",0)"),this.legend_el.append("text").attr("class","legendtext").attr("x",1.2*l.rect_dim).attr("y",l.rect_dim/2).attr("dy","0.35em").text((function(e,t){return l.model.get("labels")[t]})).style("fill",a);var c=r.max(this.model.get("labels"),(function(e){return e.length}));return this.legend_el.exit().remove(),[1,c]}});e.exports={Boxplot:o}},function(e,t,n){var r=n(1),i=n(0),o=n(52).BaseXSelector.extend({render:function(){o.__super__.render.apply(this),this.active=!1,this.dirty=!1;var e=this,t=this.create_scales();Promise.all([this.mark_views_promise,t]).then((function(){e.line=e.d3el.append("line").attr("class","selector indsel").attr("x1",0).attr("y1",0).attr("x2",0).attr("y2",e.height).attr("stroke-width",e.model.get("line_width")).attr("pointer-events","none").attr("visibility","hidden"),e.color_change(),e.background=e.d3el.append("rect").attr("x",0).attr("y",0).attr("width",e.width).attr("height",e.height).attr("class","selector selectormouse").attr("pointer-events","all").attr("visibility","hidden"),e.background.on("mousemove",i.bind(e.mousemove,e)).on("click",i.bind(e.initial_click,e)),e.create_listeners(),e.selected_changed()}))},create_listeners:function(){o.__super__.create_listeners.apply(this),this.listenTo(this.model,"change:color",this.color_change,this)},color_change:function(){null!==this.model.get("color")&&this.line.style("stroke",this.model.get("color"))},initial_click:function(){this.line.attr("visibility","visible"),this.click(),this.background.on("click",i.bind(this.click,this))},click:function(){this.active=!this.active},mousemove:function(){if(this.active){this.dirty=!0;var e=r.mouse(this.background.node())[0];this.line.attr({x1:e,x2:e}),this.model.set_typed_field("selected",[this.invert_pixel(e)]),i.each(this.mark_views,(function(t){t.invert_point(e)})),this.touch(),this.dirty=!1}},invert_pixel:function(e){return this.scale.invert(e)},reset:function(){this.active=!1,void 0!==this.line&&null!==this.line&&this.line.attr({x1:0,x2:0,visibility:"hidden"}),void 0!==this.background&&null!==this.background&&this.background.on("click",i.bind(this.initial_click,this)),this.model.set_typed_field("selected",{}),i.each(this.mark_views,(function(e){e.invert_point()})),this.touch()},update_scale_domain:function(e){o.__super__.update_scale_domain.apply(this),!0!==e&&this.selected_changed()},selected_changed:function(e,t){if(!this.dirty){var n=this.model.get_typed_field("selected");if(0===n.length)this.reset();else{if(1!=n.length)return;var r=this.scale.scale(n[0]);void 0!==this.line&&null!==this.line&&this.line.attr({x1:r,x2:r,visibility:"visible"}),this.background.on("click",i.bind(this.click,this)),i.each(this.mark_views,(function(e){e.invert_point(r)}))}}},relayout:function(){o.__super__.relayout.apply(this),this.line.attr("y1",0).attr("y2",this.height),this.background.attr("width",this.width).attr("height",this.height),this.set_range([this.scale])},scale_changed:function(){this.reset(),this.scale=this.parent.x_scale},set_range:function(e){for(var t=0;t<e.length;t++)e[t].set_range([0,this.width])}});e.exports={IndexSelector:o}},function(e,t,n){n(1);var r=n(193),i=n(102),o=r.OrdinalScale.extend({render:function(){o.__super__.render.apply(this),this.listenTo(this.model,"domain_changed",this.model_domain_changed,this),this.listenTo(this.model,"set_ticks",this.model_ticks_changed,this),this.model.on_some_change(["colors","scheme"],this.colors_changed,this),this.set_range()},set_range:function(){this.model.get("colors").length>0?this.scale.range(i.cycle_colors(this.model.get("colors"),this.scale.domain().length)):this.scale.range(i.get_ordinal_scale_range(this.model.get("scheme"),this.scale.domain().length)),this.trigger("color_scale_range_changed")},model_domain_changed:function(){o.__super__.model_domain_changed.apply(this),this.set_range()},colors_changed:function(){this.set_range()}});e.exports={OrdinalColorScale:o}},function(e,t,n){var r=n(1),i=n(0),o=n(20),s=o.MarkModel.extend({defaults:function(){return i.extend(o.MarkModel.prototype.defaults(),{_model_name:"BoxplotModel",_view_name:"Boxplot",x:[],y:[],scales_metadata:{x:{orientation:"horizontal",dimension:"x"},y:{orientation:"vertical",dimension:"y"}},stroke:null,box_fill_color:"dodgerblue",outlier_fill_color:"gray",opacities:[],box_width:null})},initialize:function(){s.__super__.initialize.apply(this,arguments),this.on_some_change(["x","y"],this.update_data,this),this.on_some_change(["preserve_domain"],this.update_domains,this),this.update_data(),this.update_domains()},update_data:function(){var e=this.get_typed_field("x"),t=this.get_typed_field("y");t.forEach((function(e){e.sort((function(e,t){return e-t}))})),e.length>t.length?e=e.slice(0,t.length):e.length<t.length&&(t=t.slice(0,e.length)),this.mark_data=i.zip(e,t),this.update_domains(),this.trigger("data_updated")},update_domains:function(){var e=this.get("scales"),t=e.x,n=e.y;e.size,e.opacity;if(!this.get("preserve_domain").x&&this.mark_data?t.compute_and_set_domain(this.mark_data.map((function(e){return e[0]})),this.model_id+"_x"):t.del_domain([],this.model_id+"_x"),!this.get("preserve_domain").y&&this.mark_data){var i=r.min(this.mark_data.map((function(e){return e[1][0]}))),o=r.max(this.mark_data.map((function(e){var t=e[1];return t[t.length-1]})));n.set_domain([i,o],this.model_id+"_y")}else n.del_domain([],this.model_id+"_y")}});e.exports={BoxplotModel:s}},function(e,t,n){var r=n(1),i=n(195).ScatterBase.extend({create_listeners:function(){i.__super__.create_listeners.apply(this),this.model.on_some_change(["font_weight","font_size","colors","align","font_unit"],this.update_style,this),this.model.on_some_change(["x","y","x_offset","y_offset","rotate_angle"],this.update_position,this)},update_default_opacities:function(e){if(!this.model.dirty){this.model.get("default_opacities").length;var t=!0===e?this.parent.model.get("animation_duration"):0,n=this;this.d3el.selectAll(".label").transition("update_default_opacities").duration(t).style("opacity",(function(e,t){return n.get_element_opacity(e,t)}))}},update_default_size:function(e){if(this.compute_view_padding(),!this.model.dirty){var t=!0===e?this.parent.model.get("animation_duration"):0,n=this;this.d3el.selectAll(".label").transition("update_default_size").duration(t).style("font-size",(function(e,t){return n.get_element_size(e)}))}},create_listeners:function(){i.__super__.create_listeners.apply(this),this.model.on_some_change(["font_weight","default_size","colors","align","font_unit"],this.update_style,this),this.model.on_some_change(["x","y","x_offset","y_offset","rotate_angle"],this.update_position,this)},relayout:function(){this.set_ranges(),this.update_position()},draw_elements:function(e,t){t.append("text").classed("label element",!0),this.update_text(),this.update_style(),this.update_default_opacities(!0)},update_text:function(){this.d3el.selectAll(".object_grp").select(".label").text((function(e){return e.text}))},get_element_size:function(e){var t=this.scales.size,n=this.model.get("font_unit");return t&&void 0!==e.size?t.scale(e.size)+n:this.model.get("default_size")+n},get_element_rotation:function(e){var t=this.scales.rotation;return t&&e.rotation?"rotate("+t.scale(e.rotation)+")":"rotate("+this.model.get("rotate_angle")+")"},update_position:function(){var e=this,t=this.x_scale,n=this.y_scale,r=("date"===t.model.type?this.model.get_date_elem("x"):this.model.get("x"),"date"===n.model.type?this.model.get_date_elem("y"):this.model.get("y"),this.model.get("x_offset")),i=this.model.get("y_offset");this.d3el.selectAll(".object_grp").attr("transform",(function(o){return"translate("+(t.scale(o.x)+t.offset+r)+","+(n.scale(o.y)+n.offset+i)+")"+e.get_element_rotation(o)}))},update_style:function(){var e=this;this.d3el.selectAll(".object_grp").select("text").attr("dominant-baseline","central").style("font-size",(function(t,n){return e.get_element_size(t)})).style("font-weight",this.model.get("font_weight")).style("text-anchor",this.model.get("align")),this.d3el.selectAll(".label").style("fill",(function(t,n){return e.get_element_color(t,n)}))},color_scale_updated:function(e){var t=this,n=!0===e?this.parent.model.get("animation_duration"):0;this.d3el.selectAll(".object_grp").select("text").transition("color_scale_updated").duration(n).style("fill",(function(e,n){return t.get_element_color(e,n)}))},set_default_style:function(e){if(e&&0!==e.length){var t=this.d3el.selectAll(".element").filter((function(t,n){return-1!==e.indexOf(n)})),n=this;t.style("font-size",(function(e,t){return n.get_element_size(e)})).style("font-weight",this.model.get("font_weight")).style("text-anchor",this.model.get("align")).style("fill",(function(e,t){return n.get_element_color(e,t)}))}},set_drag_style:function(e,t,n){var i=this.model.get("drag_size")*this.model.get("default_size")+this.model.get("font_unit");r.select(n).select("text").classed("drag_label",!0).transition("set_drag_style").style("font-size",i)},reset_drag_style:function(e,t,n){r.select(n).select("text").classed("drag_label",!1).transition("reset_drag_style").style("font-size",this.get_element_size(e))}});e.exports={Label:i}},function(e,t,n){n(1);var r=n(0),i=n(196),o=i.ScatterBaseModel.extend({defaults:function(){return r.extend(i.ScatterBaseModel.prototype.defaults(),{_model_name:"LabelModel",_view_name:"Label",x_offset:0,y_offset:0,rotate_angle:0,text:[],font_size:16,font_unit:"px",drag_size:1,font_weight:"bold",align:"start"})},initialize:function(){o.__super__.initialize.apply(this,arguments),this.on("change:text",this.update_data,this)},update_mark_data:function(){o.__super__.update_mark_data.apply(this);var e=this.get_typed_field("text");this.mark_data.forEach((function(t,n){t.text=e[n]}))},update_unique_ids:function(){this.mark_data.forEach((function(e,t){e.unique_id="Label"+t}))}});e.exports={LabelModel:o}},function(e,t,n){var r=n(0),i=(n(1),n(70)),o=i.ScaleModel.extend({defaults:function(){return r.extend(i.ScaleModel.prototype.defaults(),{_model_name:"OrdinalScaleModel",_view_name:"OrdinalScale",min:null,max:null})},initialize:function(){o.__super__.initialize.apply(this,arguments)},set_init_state:function(){this.type="ordinal",this.min_from_data=!0,this.max_from_data=!0},set_listeners:function(){this.on("change:domain",this.domain_changed,this),this.domain_changed(),this.on("change:reverse",this.reverse_changed,this),this.reverse_changed()},domain_changed:function(){this.ord_domain=this.get("domain"),null!==this.ord_domain&&0!==this.ord_domain.length?(this.max_from_data=!1,this.min_from_data=!1,this.domain=this.ord_domain.map((function(e){return e})),this.trigger("domain_changed")):(this.max_from_data=!0,this.min_from_data=!0,this.domain=[],this.update_domain())},reverse_changed:function(e,t,n){var r=void 0!==e&&e.previous("reverse");this.reverse=this.get("reverse");var i=(r+this.reverse)%2;this.domain.length>0&&1===i&&(this.domain.reverse(),this.trigger("domain_changed",this.domain))},update_domain:function(){var e=[];for(var t in this.domains)e=r.union(e,this.domains[t]);this.domain.length===e.length&&r.intersection(this.domain,e).length===e.length||(this.domain=e,this.trigger("domain_changed",e))},compute_and_set_domain:function(e,t){if(this.min_from_data||this.max_from_data)if(0!==e.length){var n=r.flatten(e);this.get("reverse")&&n.reverse(),this.set_domain(n,t)}else this.set_domain([],t)}});e.exports={OrdinalScaleModel:o}},function(e,t,n){var r=n(1),i=n(0),o=n(52),s=n(13),a=n(103),l={brush_render:function(){var e=this,t=this.create_scales();this.brushing=!1,Promise.all([this.mark_views_promise,t]).then((function(){e.brush=r.svg.brush().on("brushstart",i.bind(e.brush_start,e)).on("brush",i.bind(e.brush_move,e)).on("brushend",i.bind(e.brush_end,e)),e.set_brush_scale(),e.d3el.attr("class","selector brushintsel"),e.brushsel=e.d3el.call(e.brush),e.adjust_rectangle(),e.color_change(),e.create_listeners(),e.selected_changed()}))},color_change:function(){null!==this.model.get("color")&&this.brushsel.style("fill",this.model.get("color"))},brush_start:function(){this.model.set("brushing",!0),this.touch(),this.brushing=!0},brush_move:function(){var e=this.brush.empty()?[]:this.brush.extent();this.convert_and_save(e)},brush_end:function(){var e=this.brush.empty()?[]:this.brush.extent();this.model.set("brushing",!1),this.convert_and_save(e),this.brushing=!1},scale_changed:function(){this.brush.clear(),this.create_scales(),this.set_brush_scale()},adjust_rectangle:function(){"vertical"==this.model.get("orientation")?this.d3el.selectAll("rect").attr("x",0).attr("width",this.width):this.d3el.selectAll("rect").attr("y",0).attr("height",this.height)},_update_brush:function(){this.brushsel=this.d3el.call(this.brush),this.d3el.call(this.brush.event)},update_mark_selected:function(e,t){if(void 0!==e&&0!==e.length){if(void 0===t)var n=this.model.get("orientation"),r="vertical"==n?[]:e,o="vertical"==n?e:[];else r=e,o=t;var s=function(e){return a.point_in_rectangle(e,r,o)},l=function(e){return a.rect_inter_rect(e[0],e[1],r,o)};i.each(this.mark_views,(function(e){e.selector_changed(s,l)}),this)}else i.each(this.mark_views,(function(e){return e.selector_changed()}))}},c=o.BaseXYSelector.extend(l).extend({render:function(){c.__super__.render.apply(this),this.brush_render()},create_listeners:function(){c.__super__.create_listeners.apply(this),this.listenTo(this.model,"change:color",this.color_change,this),this.listenTo(this.model,"change:selected_x",this.selected_changed),this.listenTo(this.model,"change:selected_y",this.selected_changed)},reset:function(){this.brush.clear(),this._update_brush(),this.model.set("selected_x",{}),this.model.set("selected_y",{}),this.update_mark_selected(),this.touch()},convert_and_save:function(e){if(0!==e.length){var t=[e[0][0],e[1][0]],n=[e[0][1],e[1][1]],r="ordinal"===this.x_scale.model.type,i="ordinal"===this.y_scale.model.type,o=r?t:t.map(this.x_scale.scale),s=i?n:n.map(this.y_scale.scale);t=r?this.x_scale.invert_range(t):t,n=i?this.y_scale.invert_range(n):n,this.update_mark_selected(o,s),this.model.set_typed_field("selected_x",t),this.model.set_typed_field("selected_y",n),this.touch()}else this.update_mark_selected([])},selected_changed:function(e,t){if(!this.brushing){var n=this.model.get_typed_field("selected_x"),r=this.model.get_typed_field("selected_y");if(0===n.length||0===r.length)this.reset();else{if(2!=n.length||2!=r.length)return;var i=[[n[0],r[0]],[n[1],r[1]]];this.brush.extent(i),this._update_brush();var o=n.map(this.x_scale.scale).sort((function(e,t){return e-t})),s=r.map(this.y_scale.scale).sort((function(e,t){return e-t}));this.update_mark_selected(o,s)}}},relayout:function(){c.__super__.relayout.apply(this),this.d3el.select(".background").attr("width",this.width).attr("height",this.height),this.set_x_range([this.x_scale]),this.set_y_range([this.y_scale])},adjust_rectangle:function(){},set_brush_scale:function(){this.brush.y(this.y_scale.scale).x(this.x_scale.scale)},update_xscale_domain:function(){c.__super__.update_xscale_domain.apply(this),void 0!==this.brush&&null!==this.brush&&this.brush.x(this.x_scale.scale)},update_yscale_domain:function(){c.__super__.update_yscale_domain.apply(this),void 0!==this.brush&&null!==this.brush&&this.brush.y(this.y_scale.scale)}}),u=o.BaseXSelector.extend(l).extend({render:function(){u.__super__.render.apply(this),this.brush_render()},create_listeners:function(){u.__super__.create_listeners.apply(this),this.listenTo(this.model,"change:color",this.change_color,this)},reset:function(){this.brush.clear(),this._update_brush(),this.model.set("selected",{}),this.update_mark_selected(),this.touch()},convert_and_save:function(e){if(0!==e.length){var t="ordinal"===this.scale.model.type,n=t?e:e.map(this.scale.scale);e=t?this.scale.invert_range(e):e,this.update_mark_selected(n),this.model.set_typed_field("selected",e),this.touch()}else this.update_mark_selected([])},update_scale_domain:function(e){u.__super__.update_scale_domain.apply(this),void 0!==this.brush&&null!==this.brush&&this.set_brush_scale(),!0!==e&&this.selected_changed()},set_brush_scale:function(){"vertical"==this.model.get("orientation")?this.brush.y(this.scale.scale):this.brush.x(this.scale.scale)},selected_changed:function(e,t){if(!this.brushing){var n=this.model.get_typed_field("selected");if(0===n.length)this.reset();else{if(2!=n.length)return;var r=[n[0],n[1]];this.brush.extent(r),this._update_brush();var i=r.map(this.scale.scale).sort((function(e,t){return e-t}));this.update_mark_selected(i)}}},remove:function(){this.brush.clear(),u.__super__.remove.apply(this)},relayout:function(){u.__super__.relayout.apply(this),this.adjust_rectangle(),this.d3el.select(".background").attr("width",this.width).attr("height",this.height),this.set_range([this.scale])}}),h=function(e,t,n){n&&n.forEach((function(t){e.classed(t,!1)})),t&&t.forEach((function(t){e.classed(t,!0)}))},d=o.BaseXSelector.extend(l).extend({render:function(){d.__super__.render.apply(this);var e=this;this.names=this.model.get("names"),this.curr_index=0;var t=this.create_scales();Promise.all([this.mark_views_promise,t]).then((function(){e.d3el.attr("class","multiselector"),e.create_brush(),e.selecting_brush=!1,e.create_listeners()}))},create_listeners:function(){d.__super__.create_listeners.apply(this),this.listenTo(this.model,"change:names",this.labels_change,this),this.listenTo(this.model,"change:color",this.color_change,this)},labels_change:function(e,t){var n=e.previous("names");this.names=t;var r=i.range(this.curr_index+1),o=this,a=s.deepCopy(this.model.get("selected"));r.forEach((function(e){var t=o.get_label(e),r=o.get_label(e,n);r!==t&&(o.d3el.select(".brush_text_"+e).text(t),a[t]=a[r],delete a[r])})),this.model.set_typed_field("_selected",a),this.touch()},create_brush:function(e){var t=this,n=this.curr_index,i=r.svg.brush().on("brushstart",(function(){t.brush_start()})).on("brush",(function(){t.brush_move(n,this)})).on("brushend",(function(){t.brush_end(n,this)})),o=this.d3el.append("g").attr("class","selector brushintsel active");o.append("text").text(this.get_label(this.curr_index)).attr("class","brush_text_"+this.curr_index).style("text-anchor","middle").style("stroke","yellow").style("font-size","16px").style("display","none"),"vertical"==this.model.get("orientation")?(i.y(this.scale.scale),o.select("text").attr("x",30)):(i.x(this.scale.scale),o.select("text").attr("y",30)),o.call(i),this.color_change(),this.adjust_rectangle();var s=o.on("mousedown.brush");o.on("mousedown.brush",(function(){h(t.d3el.selectAll(".selector"),["inactive"],["visible"]),h(r.select(this),["active"],["inactive"]),s.call(this),r.select(this).on("mousedown.brush",(function(){var e=r.event.ctrlKey||r.event.metaKey;r.event.shiftKey&&e&&r.event.altKey?t.reset():e?(h(r.select(this),["inactive"],["active"]),t.create_brush(r.event)):r.event.shiftKey&&!1===t.selecting_brush?(h(t.d3el.selectAll(".selector"),["visible"],["active","inactive"]),t.selecting_brush=!0):(h(t.d3el.selectAll(".selector"),["inactive"],["visible"]),h(r.select(this),["active"],["inactive"]),s.call(this),t.selecting_brush=!1)}))})),this.curr_index=this.curr_index+1},get_label:function(e,t){return null==t&&(t=this.names),t.length>e?t[e]:e},brush_start:function(){this.model.set("brushing",!0),this.touch()},brush_move:function(e,t){var n=r.event.target,i=n.empty()?this.scale.scale.domain():n.extent(),o=!this.model.get("show_names");r.select(t).select("text").style("display",n.empty()||o?"none":"inline"),this.set_text_location(t,i),this.convert_and_save(i,e)},set_text_location:function(e,t){var n=(t[0]+t[1])/2;"date"===this.scale.model.type&&(n=new Date((t[0].getTime()+t[1].getTime())/2));var i="vertical"==this.model.get("orientation")?"y":"x";r.select(e).select("text").attr(i,this.scale.scale(n))},brush_end:function(e,t){var n=r.event.target,i=n.empty()?this.scale.scale.domain():n.extent();this.model.set("brushing",!1),this.convert_and_save(i,e)},reset:function(){this.d3el.selectAll(".selector").remove(),this.model.set("_selected",{}),this.curr_index=0,this.touch(),this.create_brush()},convert_and_save:function(e,t){var n=s.deepCopy(this.model.get("_selected"));n[this.get_label(t)]=e;var r=e.map(this.scale.scale);this.update_mark_selected(r),this.model.set("_selected",n),this.touch()},scale_changed:function(){this.d3el.selectAll(".selector").remove(),this.curr_index=0,this.create_scale(),this.create_brush()},color_change:function(){null!==this.model.get("color")&&this.d3el.selectAll(".selector").style("fill",this.model.get("color"))},relayout:function(){d.__super__.relayout.apply(this),this.adjust_rectangle(),this.d3el.select(".background").attr("width",this.width).attr("height",this.height),this.set_range([this.scale])},remove:function(){this.model.off("change:names",null,this),d.__super__.remove.apply(this)}});e.exports={BrushSelector:c,BrushIntervalSelector:u,MultiSelector:d}},function(e,t,n){var r=n(1),i=n(0),o=(n(13),n(52)),s=n(103),a=o.BaseXYSelector.extend({render:function(){a.__super__.render.apply(this);var e=this.create_scales();this.line=r.svg.line(),this.all_vertices={},this.lasso_counter=0;var t=this;Promise.all([this.mark_views_promise,e]).then((function(){var e=r.behavior.drag().on("dragstart",i.bind(t.drag_start,t)).on("drag",i.bind(t.drag_move,t)).on("dragend",i.bind(t.drag_end,t));r.select(window).on("keydown",i.bind(t.keydown,t)),t.d3el.attr("class","lassoselector"),t.background=t.d3el.append("rect").attr("x",0).attr("y",0).attr("width",t.width).attr("height",t.height).attr("visibility","hidden").attr("pointer-events","all").style("cursor","crosshair").call(e),t.create_listeners()}))},create_listeners:function(){a.__super__.create_listeners.apply(this),this.listenTo(this.model,"change:color",this.change_color,this)},change_color:function(e,t){t&&this.d3el.selectAll("path").style("stroke",t)},create_new_lasso:function(){var e=this.d3el.append("path").attr("id","l"+ ++this.lasso_counter).on("click",(function(){var e=r.select(this);e.classed("selected",!e.classed("selected"))})),t=this.model.get("color");t&&e.style("stroke",t)},drag_start:function(){this.current_vertices=[],this.create_new_lasso()},drag_move:function(){this.current_vertices.push(r.mouse(this.background.node())),this.d3el.select("#l"+this.lasso_counter).attr("d",this.line(this.current_vertices))},drag_end:function(){var e="l"+this.lasso_counter;this.d3el.select("#"+e).attr("d",this.line(this.current_vertices)+"Z"),this.all_vertices[e]=this.current_vertices,this.update_mark_selected(this.all_vertices)},update_mark_selected:function(e){void 0!==e&&0!==e.length||i.each(this.mark_views,(function(e){return e.selector_changed()}));var t=function(t){for(var n in e)if(s.point_in_lasso(t,e[n]))return!0;return!1},n=function(t){for(var n in e)if(s.lasso_inter_rect(t[0],t[1],e[n]))return!0;return!1};i.each(this.mark_views,(function(e){e.selector_changed(t,n)}),this)},relayout:function(){a.__super__.relayout.apply(this),this.background.attr("width",this.width).attr("height",this.height)},keydown:function(){if(46===r.event.keyCode){var e=this.d3el.selectAll(".selected"),t=this.all_vertices;e.each((function(){var e=r.select(this).attr("id");delete t[e]})),e.remove(),this.update_mark_selected(this.all_vertices)}},reset:function(){this.lasso_counter=0,this.all_vertices={},this.d3el.selectAll("path").remove(),this.update_mark_selected()}});e.exports={LassoSelector:a}},function(e,t,n){var r=n(9),i=n(0),o=n(1),s=n(68).Interaction.extend({render:function(){s.__super__.render.apply(this);var e=this;this.d3el.style({cursor:"move"}).on("mousedown",(function(){e.mousedown()})).on("mousemove",(function(){e.mousemove()})).on("mouseup",(function(){e.mouseup()})).on("mousewheel",(function(){e.mousewheel()})).on("DOMMouseScroll.zoom",(function(){e.mousewheel()})).on("mousewheel.zoom",null).on("wheel.zoom",null),this.active=!1,this.update_scales(),this.listenTo(this.model,"change:scales",this.update_scales,this),this.set_ranges(),this.listenTo(this.parent,"margin_updated",this.set_ranges,this)},update_scales:function(){var e=this.model.get("scales"),t=this;this.scale_promises=r.resolvePromisesDict({x:Promise.all((e.x||[]).map((function(e){return t.create_child_view(e)}))),y:Promise.all((e.y||[]).map((function(e){return t.create_child_view(e)})))}),r.resolvePromisesDict(this.scale_promises).then(i.bind(this.set_ranges,this))},set_ranges:function(){var e,t=this;this.scale_promises.then((function(n){var r=n.x;for(e=0;e<r.length;e++)r[e].set_range(t.parent.padded_range("x",r[e].model));var i=n.y;for(e=0;e<i.length;e++)i[e].set_range(t.parent.padded_range("y",i[e].model))}))},mousedown:function(){var e=this.model.get("scales");this.active=!0,this.d3el.style({cursor:"move"}),this.previous_pos=o.mouse(this.el),this.domains={x:(e.x||[]).map((function(e){return e.domain.slice(0)})),y:(e.y||[]).map((function(e){return e.domain.slice(0)}))}},mouseup:function(){this.active=!1},mousemove:function(){if(this.active&&this.model.get("allow_pan")){var e=o.mouse(this.el);"previous_pos"in this||(this.previous_pos=e);var t=this.model.get("scales"),n=this;this.scale_promises.then((function(r){var i,o,s,a,l=r.x,c=n.domains.x,u=l.map((function(t){if(t.scale.invert)return t.scale.invert(e[0])-t.scale.invert(n.previous_pos[0])}));for(i=0;i<l.length;i++)s=(o=c[i])[0]-u[i],a=o[1]-u[i],n.set_scale_attribute(t.x[i],"min",s),n.set_scale_attribute(t.x[i],"max",a),l[i].touch();var h=r.y,d=n.domains.y,p=h.map((function(t){if(t.scale.invert)return t.scale.invert(e[1])-t.scale.invert(n.previous_pos[1])}));for(i=0;i<h.length;i++)s=(o=d[i])[0]-p[i],a=o[1]-p[i],n.set_scale_attribute(t.y[i],"min",s),n.set_scale_attribute(t.y[i],"max",a),h[i].touch()}))}},mousewheel:function(){if(this.model.get("allow_zoom")){o.event.preventDefault();var e=o.event.wheelDelta||-40*o.event.detail,t=o.mouse(this.el);if(e){e>0?this.d3el.style({cursor:"zoom-in"}):this.d3el.style({cursor:"zoom-out"});var n=this.model.get("scales"),r=this;this.scale_promises.then((function(i){var o,s,a,l,c=i.x,u=c.map((function(e){return e.scale.invert(t[0])})),h=Math.exp(.001*-e);for(o=0;o<c.length;o++)a=(s=n.x[o].domain)[0],l=s[1],r.set_scale_attribute(n.x[o],"min",(1-h)*u[o]+h*a),r.set_scale_attribute(n.x[o],"max",(1-h)*u[o]+h*l),c[o].touch();var d=i.y,p=d.map((function(e){return e.scale.invert(t[1])}));for(o=0;o<d.length;o++)a=(s=n.y[o].domain)[0],l=s[1],r.set_scale_attribute(n.y[o],"min",(1-h)*p[o]+h*a),r.set_scale_attribute(n.y[o],"max",(1-h)*p[o]+h*l),d[o].touch()}))}}},set_scale_attribute:function(e,t,n){"date"==e.type?(n=n instanceof Date?n:new Date(n),e.set_date_elem(t,n)):e.set(t,n)}});e.exports={PanZoom:s}},function(e,t,n){var r=n(1),i=(n(0),n(13),n(192).Axis.extend({render:function(){this.parent=this.options.parent,this.margin=this.parent.margin,this.vertical="vertical"===this.model.get("orientation"),this.height=this.parent.height-(this.margin.top+this.margin.bottom),this.width=this.parent.width-(this.margin.left+this.margin.right);var e=this.set_scale(this.model.get("scale"));this.side=this.model.get("side"),this.x_offset=100,this.y_offset=40,this.bar_height=20,this.d3el.attr("class","ColorBar").attr("display",this.model.get("visible")?"inline":"none").attr("transform",this.get_topg_transform()),this.ordinal=!1,this.num_ticks=this.model.get("num_ticks");var t=this;e.then((function(){t.create_listeners(),t.tick_format=t.generate_tick_formatter(),t.set_scales_range(),t.append_axis()}))},create_listeners:function(){this.listenTo(this.model,"change:scale",(function(e,t){this.update_scale(e.previous("scale"),t),this.axis.scale(this.axis_scale.scale),this.rescale_axis()}),this),this.listenTo(this.model,"change:tick_format",this.tickformat_changed,this),this.axis_scale.on("domain_changed",this.redraw_axisline,this),this.axis_scale.on("color_scale_range_changed",this.redraw_axis,this),this.axis_scale.on("highlight_axis",this.highlight,this),this.axis_scale.on("unhighlight_axis",this.unhighlight,this),this.parent.on("margin_updated",this.parent_margin_updated,this),this.listenTo(this.model,"change:visible",this.update_visibility,this),this.listenTo(this.model,"change:label",this.update_label,this),this.model.on_some_change(["side","orientation"],this.update_display,this)},update_display:function(){this.side=this.model.get("side"),this.vertical="vertical"===this.model.get("orientation"),this.rescale_axis(),this.d3el.select("#colorBarG"+this.cid).attr("transform",this.get_colorbar_transform()),this.d3el.select("#colorBarG"+this.cid).select(".g-rect").attr("transform",this.vertical?"rotate(-90)":""),this.redraw_axisline()},set_scale:function(e){var t=this;return this.axis_scale&&this.axis_scale.remove(),this.create_child_view(e).then((function(e){t.displayed.then((function(){e.trigger("displayed")})),t.axis_scale=e,"date_color_linear"===t.axis_scale.model.type?t.axis_line_scale=r.time.scale().nice():"ordinal"===t.axis_scale.model.type?(t.axis_line_scale=r.scale.ordinal(),t.ordinal=!0):t.axis_line_scale=r.scale.linear()}))},append_axis:function(){void 0!==this.model.get("label")&&null!==this.model.get("label")&&this.d3el.append("g").attr("transform",this.get_label_transform()).attr("class","axis label_g").append("text").append("tspan").attr("id","text_elem").attr("dy","0.5ex").text(this.model.get("label")).attr("class","axislabel").style("text-anchor",this.vertical?"middle":"end");var e=this.d3el.append("g").attr("id","colorBarG"+this.cid);this.draw_color_bar(),this.set_axisline_domain(),this.g_axisline=e.append("g").attr("class","axis"),this.axis=r.svg.axis().tickFormat(this.tick_format),this.redraw_axisline()},draw_color_bar:function(){var e=this.d3el.select("#colorBarG"+this.cid);e.attr("transform",this.get_colorbar_transform());var t=this;e.selectAll(".g-rect").remove(),e.selectAll(".g-defs").remove(),this.colors=this.axis_scale.scale.range();var n=100/(this.colors.length-1);if(this.ordinal){var r=this.get_color_bar_width()/this.colors.length,i=e.append("g").attr("class","g-rect axis").selectAll("rect").data(this.colors);i.enter().append("rect").attr("y",0).attr("height",this.bar_height).attr("width",r).style("fill",(function(e){return e})),this.vertical?i.attr("x",(function(e,n){return n*r-(t.height-2*t.x_offset)})):i.attr("x",(function(e,t){return t*r}))}else e.append("g").attr("class","g-defs").append("defs").append("linearGradient").attr({id:"colorBarGradient"+this.cid,x1:"0%",y1:"0%",x2:"100%",y2:"0%"}).selectAll("stop").data(this.colors).enter().append("stop").attr({offset:function(e,t){return n*t+"%"},"stop-color":function(e,n){return t.colors[n]},"stop-opacity":1}),e.append("g").attr("class","g-rect axis").append("rect").attr({width:this.get_color_bar_width(),height:this.bar_height,x:this.vertical?-(this.height-2*this.x_offset):0,y:0,"stroke-width":1}).style("fill","url(#colorBarGradient"+this.cid+")");this.vertical&&e.select(".g-rect").attr("transform","rotate(-90)")},get_topg_transform:function(){return this.vertical?"right"===this.side?"translate("+String(this.get_basic_transform()+this.margin.right/2-this.bar_height)+", 0)":"translate("+String(this.get_basic_transform()-this.margin.left/2+this.bar_height)+", 0)":"top"===this.side?"translate(0, "+String(this.get_basic_transform()-this.margin.top+this.bar_height+24)+")":"translate(0, "+String(this.get_basic_transform()+this.margin.bottom-this.bar_height-24)+")"},get_label_transform:function(){return this.vertical?"translate("+("right"===this.side?this.bar_height/2:-this.bar_height/2)+", "+(this.x_offset-15)+")":"translate("+(this.x_offset-5)+", "+this.bar_height/2+")"},get_colorbar_transform:function(){return this.vertical?"translate(0, "+String(this.x_offset)+")":"translate("+String(this.x_offset)+", 0)"},set_axisline_scale_range:function(){var e=this.vertical?[this.height-2*this.x_offset,0]:[0,this.width-2*this.x_offset];if(this.ordinal)this.axis_line_scale.rangeRoundBands(e,.05);else{var t=this.axis_scale.model.mid;null==t?this.axis_line_scale.range(e):this.axis_line_scale.range([e[0],.5*(e[0]+e[1]),e[1]])}},set_scales_range:function(){this.axis_scale.set_range(),this.set_axisline_scale_range()},get_color_bar_width:function(){return this.vertical?this.height-2*this.x_offset:this.width-2*this.x_offset},update_label:function(e,t){this.d3el.select("#text_elem").text(this.model.get("label"))},rescale_axis:function(){this.set_axisline_scale_range(),this.d3el.attr("transform",this.get_topg_transform());var e=this,t=this.get_color_bar_width()/this.colors.length;if(this.ordinal){var n=this.d3el.select("#colorBarG"+this.cid).select(".g-rect").selectAll("rect").attr("width",t);this.vertical?n.attr("x",(function(n,r){return r*t-(e.height-2*e.x_offset)})):n.attr("x",(function(e,n){return n*t}))}else this.d3el.select("#colorBarG"+this.cid).select(".g-rect").selectAll("rect").attr("width",this.get_color_bar_width()).attr("x",this.vertical?-(this.height-2*this.x_offset):0);void 0!==this.model.get("label")&&null!==this.model.get("label")&&this.d3el.select(".label_g").attr("transform",this.get_label_transform()).select("#text_elem").style("text-anchor",this.vertical?"middle":"end"),this.g_axisline.call(this.axis)},redraw_axisline:function(){var e;this.axis&&(this.set_axisline_domain(),this.set_axisline_scale_range(),this.axis.orient(this.side).scale(this.axis_line_scale),this.set_tick_values(),e=this.vertical?"translate("+("right"===this.side?this.bar_height:0)+", 0)":"translate(0, "+("top"===this.side?0:this.bar_height)+")",this.g_axisline.attr("transform",e).call(this.axis))},set_axisline_domain:function(){var e=this.axis_scale.scale.domain(),t=this.axis_scale.model.mid;null==t?this.axis_line_scale.domain([e[0],e[e.length-1]]):this.axis_line_scale.domain([e[0],t,e[e.length-1]])},redraw_axis:function(){this.draw_color_bar(),this.redraw_axisline()}}));e.exports={ColorAxis:i}},function(e,t,n){var r=n(9),i=n(0),o=n(28),s="^"+n(21).version,a=o.BaseModel.extend({defaults:function(){return i.extend(o.BaseModel.prototype.defaults(),{_model_name:"PanZoomModel",_view_name:"PanZoom",_model_module:"bqplot",_view_module:"bqplot",_model_module_version:s,_view_module_version:s,scales:{},allow_pan:!0,allow_zoom:!0})},initialize:function(){a.__super__.initialize.apply(this,arguments),this.on("change:scales",this.snapshot_scales,this),this.snapshot_scales()},reset_scales:function(){var e=this;r.resolvePromisesDict(this.get("scales")).then((function(t){i.each(Object.keys(t),(function(n){i.each(t[n],(function(t,r){t.set_state(e.scales_states[n][r])}),e)}),e)}))},snapshot_scales:function(){var e=this;r.resolvePromisesDict(this.get("scales")).then((function(t){e.scales_states=Object.keys(t).reduce((function(e,n){return e[n]=t[n].map((function(e){return e.get_state()})),e}),{})}))}},{serializers:i.extend({scales:{deserialize:r.unpack_models}},o.BaseModel.serializers)});e.exports={PanZoomModel:a}},function(e,t,n){var r=n(1),i=n(19),o=n(13),s=n(0),a=i.Mark.extend({render:function(){var e=a.__super__.render.apply(this);this.selected_indices=this.model.get("selected"),this.selected_style=this.model.get("selected_style"),this.unselected_style=this.model.get("unselected_style"),this.display_el_classes=["slice","text"];var t=this;this.pie_g=this.d3el.append("g").attr("class","pie"),this.pie_g.append("g").attr("class","slices"),this.pie_g.append("g").attr("class","labels"),this.pie_g.append("g").attr("class","lines");var n=this.model.get("radius"),i=this.model.get("inner_radius");return"outside"===this.model.get("display_labels")?(this.arc=r.svg.arc().outerRadius(.8*n).innerRadius(.8*i),this.outer_arc=r.svg.arc().innerRadius(.9*n).outerRadius(.9*n)):this.arc=r.svg.arc().outerRadius(n).innerRadius(i),this.displayed.then((function(){t.parent.tooltip_div.node().appendChild(t.tooltip_div.node()),t.create_tooltip()})),this.join_key=function(e){return e.data.label},e.then((function(){t.event_listeners={},t.process_interactions(),t.create_listeners(),t.compute_view_padding(),t.draw()}),null)},set_ranges:function(){var e=this.scales.x;e&&(e.set_range(this.parent.padded_range("x",e.model)),this.x_offset=e.offset);var t=this.scales.y;t&&(t.set_range(this.parent.padded_range("y",t.model)),this.y_offset=t.offset)},set_positional_scales:function(){var e=this.scales.x?this.scales.x:this.parent.scale_x,t=this.scales.y?this.scales.y:this.parent.scale_y,n=this;this.listenTo(e,"domain_changed",(function(){n.model.dirty||n.draw()})),this.listenTo(t,"domain_changed",(function(){n.model.dirty||n.draw()}))},create_listeners:function(){a.__super__.create_listeners.apply(this),this.d3el.on("mouseover",s.bind((function(){this.event_dispatcher("mouse_over")}),this)).on("mousemove",s.bind((function(){this.event_dispatcher("mouse_move")}),this)).on("mouseout",s.bind((function(){this.event_dispatcher("mouse_out")}),this)),this.listenTo(this.model,"data_updated",(function(){this.draw(!0)}),this),this.listenTo(this.model,"change:colors",this.update_colors,this),this.listenTo(this.model,"colors_updated",this.update_colors,this),this.model.on_some_change(["inner_radius","radius"],(function(){this.compute_view_padding();this.update_radii(!0)}),this),this.model.on_some_change(["stroke","opacities"],this.update_stroke_and_opacities,this),this.model.on_some_change(["x","y"],this.position_center,this),this.model.on_some_change(["display_labels","label_color","font_size","font_weight"],this.update_labels,this),this.model.on_some_change(["start_angle","end_angle","sort"],(function(){this.draw(!0)}),this),this.model.on_some_change(["display_values","values_format"],this.update_values,this),this.listenTo(this.model,"labels_updated",this.update_values,this),this.listenTo(this.model,"change:selected",(function(){this.selected_indices=this.model.get("selected"),this.apply_styles()}),this),this.listenTo(this.model,"change:interactions",this.process_interactions),this.listenTo(this.parent,"bg_clicked",(function(){this.event_dispatcher("parent_clicked")}))},process_interactions:function(){var e=this.model.get("interactions");s.isEmpty(e)?this.reset_interactions():(void 0!==e.click&&null!==e.click?"tooltip"===e.click?(this.event_listeners.element_clicked=function(){return this.refresh_tooltip(!0)},this.event_listeners.parent_clicked=this.hide_tooltip):"select"===e.click&&(this.event_listeners.parent_clicked=this.reset_selection,this.event_listeners.element_clicked=this.click_handler):this.reset_click(),void 0!==e.hover&&null!==e.hover?"tooltip"===e.hover&&(this.event_listeners.mouse_over=this.refresh_tooltip,this.event_listeners.mouse_move=this.move_tooltip,this.event_listeners.mouse_out=this.hide_tooltip):this.reset_hover(),void 0!==e.legend_click&&null!==e.legend_click?"tooltip"===e.legend_click&&(this.event_listeners.legend_clicked=function(){return this.refresh_tooltip(!0)},this.event_listeners.parent_clicked=this.hide_tooltip):this.event_listeners.legend_clicked=function(){},void 0!==e.legend_hover&&null!==e.legend_hover?"highlight_axes"===e.legend_hover&&(this.event_listeners.legend_mouse_over=s.bind(this.highlight_axes,this),this.event_listeners.legend_mouse_out=s.bind(this.unhighlight_axes,this)):this.reset_legend_hover())},relayout:function(){this.set_ranges(),this.position_center(),this.update_radii()},position_center:function(e){var t=!0===e?this.parent.model.get("animation_duration"):0,n=this.scales.x?this.scales.x:this.parent.scale_x,r=this.scales.y?this.scales.y:this.parent.scale_y,i="date"===n.model.type?this.model.get_date_elem("x"):this.model.get("x"),o="date"===r.model.type?this.model.get_date_elem("y"):this.model.get("y"),s="translate("+(n.scale(i)+n.offset)+", "+(r.scale(o)+r.offset)+")";this.pie_g.transition("position_center").duration(t).attr("transform",s)},update_radii:function(e){var t=!0===e?this.parent.model.get("animation_duration"):0,n=this.model.get("radius"),r=this.model.get("inner_radius"),i=this.model.get("display_labels");"inside"===i?this.arc.outerRadius(n).innerRadius(r):"outside"===i&&(this.arc.outerRadius(.8*n).innerRadius(.8*r),this.outer_arc.innerRadius(.9*n).outerRadius(.9*n));var o=this.pie_g.select(".slices"),s=this.pie_g.select(".labels"),a=this.pie_g.select(".lines"),l=this;o.selectAll("path.slice").transition("update_radii").duration(t).attr("d",this.arc),"inside"===i?s.selectAll("text").transition("update_radii").duration(t).attr("transform",(function(e){return"translate("+l.arc.centroid(e)+")"})):"outside"===i&&(s.selectAll("text").transition("update_radii").duration(t).attr("transform",(function(e){var t=l.outer_arc.centroid(e);return t[0]=n*(l.is_mid_angle_left(e)?-1:1),"translate("+t+")"})),a.selectAll("polyline").transition("update_radii").duration(t).attr("points",(function(e){var t=l.outer_arc.centroid(e);return t[0]=.95*n*(l.is_mid_angle_left(e)?-1:1),[l.arc.centroid(e),l.outer_arc.centroid(e),t]})))},outer_join:function(e,t){var n=r.set(e.concat(t).map((function(e){return e.label}))).values().sort(),i={};e.forEach((function(e){i[e.label]=e}));var s={};t.forEach((function(e){s[e.label]=e}));var a=[],l=[];return n.forEach((function(e){var t;e in i?a.push(i[e]):((t=o.deepCopy(s[e])).size=0,a.push(t));e in s?l.push(s[e]):((t=o.deepCopy(i[e])).size=0,l.push(t))})),{first:a,second:l}},is_mid_angle_left:function(e){var t=(e.startAngle+e.endAngle)/2;return t>Math.PI||t<0&&t>-Math.PI},draw:function(e){this.set_ranges(),this.position_center(e);var t=this.model.mark_data,n=this.pie_g.select(".slices").selectAll("path.slice").data().map((function(e){return e.data}));0===n.length&&(n=t);var i=this.outer_join(n,t),o=i.first,s=i.second,a=r.layout.pie().startAngle(2*this.model.get("start_angle")*Math.PI/360).endAngle(2*this.model.get("end_angle")*Math.PI/360).value((function(e){return e.size}));this.model.get("sort")||a.sort(null);var l=this,c=!0===e?this.parent.model.get("animation_duration"):0,u=this.pie_g.select(".slices").selectAll("path.slice").data(a(o),this.join_key);u.enter().insert("path").attr("class","slice").style("fill",(function(e,t){return l.get_colors(t)})).each((function(e){this._current=e})),(u=this.pie_g.select(".slices").selectAll("path.slice").data(a(s),this.join_key)).transition("draw").duration(c).attrTween("d",(function(e){var t=r.interpolate(this._current,e),n=this;return function(e){return n._current=t(e),l.arc(n._current)}})),(u=this.pie_g.select(".slices").selectAll("path.slice").data(a(t),this.join_key)).exit().transition("draw").delay(c).duration(0).remove();var h=this.pie_g.select(".labels").selectAll("text").data(a(o),this.join_key);h.enter().append("text").attr("dy",".35em").style("opacity",0).text((function(e){return e.data.label})).each((function(e){this._current=e}));var d=(h=this.pie_g.select(".labels").selectAll("text").data(a(s),this.join_key)).transition("draw").duration(c).style("opacity",(function(e){return 0===e.data.value?0:1})),p=this.model.get("display_labels");if("inside"===p?d.attr("transform",(function(e){return"translate("+l.arc.centroid(e)+")"})).style("text-anchor","middle"):"outside"===p&&d.attrTween("transform",(function(e){var t=r.interpolate(this._current,e),n=this;return function(e){var r=t(e);n._current=r;var i=l.outer_arc.centroid(r);return i[0]=l.model.get("radius")*(l.is_mid_angle_left(r)?-1:1),"translate("+i+")"}})).styleTween("text-anchor",(function(e){var t=r.interpolate(this._current,e);return function(e){var n=t(e);return l.is_mid_angle_left(n)?"end":"start"}})),(h=this.pie_g.select(".labels").selectAll("text").data(a(t),this.join_key)).exit().transition("draw").delay(c).remove(),"outside"===p){var f=this.pie_g.select(".lines").selectAll("polyline").data(a(o),this.join_key);f.enter().append("polyline").style("opacity",0).each((function(e){this._current=e})),(f=this.pie_g.select(".lines").selectAll("polyline").data(a(s),this.join_key)).transition("draw").duration(c).style("opacity",(function(e){return 0===e.data.value?0:.5})).attrTween("points",(function(e){this._current=this._current;var t=r.interpolate(this._current,e),n=this;return function(e){var r=t(e);n._current=r;var i=l.outer_arc.centroid(r);return i[0]=.95*l.model.get("radius")*(l.is_mid_angle_left(r)?-1:1),[l.arc.centroid(r),l.outer_arc.centroid(r),i]}})),(f=this.pie_g.select(".lines").selectAll("polyline").data(a(t),this.join_key)).exit().transition("draw").delay(c).remove()}u.order(),u.on("click",(function(e,t){return l.event_dispatcher("element_clicked",{data:e,index:t})})),this.update_labels(),this.update_values(),this.apply_styles()},update_stroke_and_opacities:function(){var e=this.model.get("stroke"),t=this.model.get("opacities");this.pie_g.selectAll("path.slice").style("stroke",e).style("opacity",(function(e,n){return t[n]}))},update_colors:function(){var e=this,t=this.scales.color;this.pie_g.select(".slices").selectAll("path.slice").style("fill",(function(n,r){return void 0!==n.data.color&&void 0!==t?t.scale(n.data.color):e.get_colors(n.data.index)}))},update_labels:function(){var e=this.model.get("display_labels"),t=this.pie_g.selectAll(".labels text").style("visibility","none"===e?"hidden":"visible").style("font-weight",this.model.get("font_weight")).style("font-size",this.model.get("font_size")),n=this.model.get("label_color");void 0!==n&&t.style("fill",n)},update_values:function(){var e=this.model.get("display_values"),t=r.format(this.model.get("values_format"));this.pie_g.selectAll(".labels text").text((function(n){return n.data.label+(e?": "+t(n.data.size):"")}))},clear_style:function(e,t){var n=this.pie_g.selectAll("path.slice");t&&(n=n.filter((function(e,n){return-1!==t.indexOf(n)})));var r={};for(var i in e)r[i]=null;n.style(r)},set_style_on_elements:function(e,t){if(null!=t&&0!==t.length){var n=this.pie_g.selectAll(".slice");(n=n.filter((function(e,n){return-1!==t.indexOf(n)}))).style(e)}},set_default_style:function(e){this.update_colors(),this.update_stroke_and_opacities()},click_handler:function(e){e.data;var t=e.index,n=this.model.get("selected"),i=n?o.deepCopy(n):[],a=i.indexOf(t),l=r.event.ctrlKey||r.event.metaKey;if(a>-1&&l)i.splice(a,1);else{if(r.event.shiftKey){if(a>-1)return;var c=0!==i.length?r.min(i):-1,u=0!==i.length?r.max(i):this.model.mark_data.length;t>u?s.range(u+1,t).forEach((function(e){i.push(e)})):t<c&&s.range(t+1,c).forEach((function(e){i.push(e)}))}else l||(i=[]);i.push(t)}this.model.set("selected",0===i.length?null:i,{updated_view:this}),this.touch(),r.event||(r.event=window.event);var h=r.event;void 0!==h.cancelBubble&&(h.cancelBubble=!0),h.stopPropagation&&h.stopPropagation(),h.preventDefault(),this.selected_indices=i,this.apply_styles()},reset_selection:function(){this.model.set("selected",null),this.touch(),this.selected_indices=null,this.clear_style(this.selected_style),this.clear_style(this.unselected_style),this.set_default_style()},compute_view_padding:function(){var e=this.model.get("scales"),t=r.max([this.model.get("radius"),this.model.get("inner_radius")]),n=e.x?t+1:0,i=e.y?t+1:0;n===this.x_padding&&i===this.y_padding||(this.x_padding=n,this.y_padding=i,this.trigger("mark_padding_updated"))}});e.exports={Pie:a}},function(e,t,n){var r=n(1),i=n(0),o=n(20),s=o.MarkModel.extend({defaults:function(){return i.extend(o.MarkModel.prototype.defaults(),{_model_name:"PieModel",_view_name:"Pie",sizes:[],color:null,x:.5,y:.5,scales_metadata:{color:{dimension:"color"}},sort:!1,colors:r.scale.category10().range(),stroke:null,opacities:[],radius:180,inner_radius:.1,start_angle:0,end_angle:360})},initialize:function(){s.__super__.initialize.apply(this,arguments),this.on("change:sizes",this.update_data,this),this.on("change:color",(function(){this.update_color(),this.trigger("colors_updated")}),this),this.on("change:labels",this.update_labels,this),this.on_some_change(["preserve_domain"],this.update_domains,this),this.update_data(),this.update_color(),this.update_labels(),this.update_domains()},update_data:function(){var e=this.get_typed_field("sizes"),t=this.get_typed_field("color"),n=this.get("labels");this.mark_data=e.map((function(e,r){return{size:e,color:t[r],label:null==n[r]?"S"+(r+1):n[r],index:r}})),this.update_color(),this.update_domains(),this.trigger("data_updated")},update_labels:function(){if(this.mark_data){var e=this.get("labels");this.mark_data.forEach((function(t,n){t.label=null==e[n]?"S"+(n+1):e[n]})),this.trigger("labels_updated")}},update_color:function(){if(this.mark_data){var e=this.get_typed_field("color"),t=this.get("scales").color;t&&(this.get("preserve_domain").color?t.del_domain([],this.model_id+"_color"):t.compute_and_set_domain(e,this.model_id+"_color"))}},update_domains:function(){if(this.mark_data){var e=this.get("scales"),t=e.x,n=e.y;if(t){var r="date"===t.type?this.get_date_elem("x"):this.get("x");this.get("preserve_domain").x?t.del_domain([],this.model_id+"_x"):t.compute_and_set_domain([r],this.model_id+"_x")}n&&(this.get("preserve_domain").y?n.del_domain([],this.model_id+"_y"):n.compute_and_set_domain([this.get("y")],this.model_id+"_y"))}},get_data_dict:function(e,t){return e.data}});e.exports={PieModel:s}},function(e,t,n){var r=n(1),i=n(198).ColorScale.extend({create_d3_scale:function(){this.scale=r.time.scale()}});e.exports={DateColorScale:i}},function(e,t,n){n(1);var r=n(0),i=n(199),o=i.ColorScaleModel.extend({defaults:function(){return r.extend(i.ColorScaleModel.prototype.defaults(),{_model_name:"DateColorScaleModel",_view_name:"DateColorScale"})},set_init_state:function(){this.type="date_color_linear",this.color_range=[],this.mid=null,this.global_min=(new Date).setTime(0),this.global_max=new Date},min_max_changed:function(){this.min=this.get_date_elem("min"),this.max=this.get_date_elem("max"),this.min_from_data=null===this.min,this.max_from_data=null===this.max,this.update_domain()}});e.exports={DateColorScaleModel:o}},function(e,t,n){var r=n(1),i=(n(0),n(104).LinearScale.extend({render:function(){this.scale=r.time.scale(),this.model.domain.length>0&&this.scale.domain(this.model.domain),this.offset=0,this.create_event_listeners()}}));e.exports={DateScale:i}},function(e,t,n){var r=n(195),i=n(105),o=n(1),s=i.symbol,a=r.ScatterBase.extend({render:function(){return this.dot=s().type(this.model.get("marker")).size(this.model.get("default_size")).skew(this.model.get("default_skew")),a.__super__.render.apply(this)},create_listeners:function(){a.__super__.create_listeners.apply(this),this.listenTo(this.model,"change:colors",this.update_colors,this),this.listenTo(this.model,"change:stroke",this.update_stroke,this),this.listenTo(this.model,"change:stroke_width",this.update_stroke_width,this),this.listenTo(this.model,"change:default_opacities",this.update_default_opacities,this),this.listenTo(this.model,"change:default_skew",this.update_default_skew,this),this.listenTo(this.model,"change:default_rotation",this.update_xy_position,this),this.listenTo(this.model,"change:marker",this.update_marker,this),this.listenTo(this.model,"change:default_size",this.update_default_size,this),this.listenTo(this.model,"change:fill",this.update_fill,this),this.listenTo(this.model,"change:display_names",this.update_names,this)},update_colors:function(e,t){if(!this.model.dirty){var n=this,r=this.model.get("stroke"),i=t.length;this.d3el.selectAll(".dot").style("fill",this.model.get("fill")?function(e,t){return n.get_element_color(e,t)}:"none").style("stroke",r||function(e,t){return n.get_element_color(e,t)}),this.legend_el&&(this.legend_el.select("path").style("fill",(function(e,n){return t[n%i]})).style("stroke",r||function(e,n){return t[n%i]}),this.legend_el.select("text").style("fill",this.model.get("fill")?function(e,n){return t[n%i]}:"none"))}},update_fill:function(e,t){var n=this,r=this.model.get("colors"),i=r.length;this.d3el.selectAll(".dot").style("fill",t?function(e,t){return n.get_element_color(e,t)}:"none"),this.legend_el&&this.legend_el.selectAll("path").style("fill",t?function(e,t){return r[t%i]}:"none")},update_stroke_width:function(){var e=this.model.get("stroke_width");this.d3el.selectAll(".dot").style("stroke-width",e),this.legend_el&&this.legend_el.selectAll("path").style("stroke-width",e)},update_stroke:function(e,t){var n=this,r=this.model.get("stroke");this.d3el.selectAll(".dot").style("stroke",r||function(e,t){return n.get_element_color(e,t)}),this.legend_el&&this.legend_el.selectAll("path").style("stroke",r)},update_default_opacities:function(e){if(!this.model.dirty){var t=this.model.get("default_opacities"),n=this.model.get("colors"),r=n.length,i=t.length,o=!0===e?this.parent.model.get("animation_duration"):0,s=this;this.d3el.selectAll(".dot").transition("update_default_opacities").duration(o).style("opacity",(function(e,t){return s.get_element_opacity(e,t)})),this.legend_el&&this.legend_el.select("path").style("opacity",(function(e,n){return t[n%i]})).style("fill",(function(e,t){return n[t%r]}))}},update_marker:function(e,t){this.model.dirty||(this.d3el.selectAll(".dot").transition("update_marker").duration(this.parent.model.get("animation_duration")).attr("d",this.dot.type(t)),this.legend_el.select("path").attr("d",this.dot.type(t)))},update_default_skew:function(e){if(!this.model.dirty){var t=!0===e?this.parent.model.get("animation_duration"):0,n=this;this.d3el.selectAll(".dot").transition("update_default_skew").duration(t).attr("d",this.dot.skew((function(e){return n.get_element_skew(e)})))}},update_default_size:function(e){if(this.compute_view_padding(),!this.model.dirty){var t=!0===e?this.parent.model.get("animation_duration"):0,n=this;this.d3el.selectAll(".dot").transition("update_default_size").duration(t).attr("d",this.dot.size((function(e){return n.get_element_size(e)}))),this.update_names(e)}},update_names:function(e){var t=this,n=this.model.get_typed_field("names"),r=this.model.get("display_names")&&0!==n.length,i=e?this.parent.model.get("animation_duration"):0;this.d3el.selectAll(".object_grp").select("text").text((function(e){return e.name})).transition("update_names").duration(i).attr("transform",(function(e){var n=Math.sqrt(t.get_element_size(e))/2;return"translate("+n+","+-n+")"})).attr("display",(function(e){return r?"inline":"none"}))},color_scale_updated:function(e){var t=this,n=this.model.get("fill"),r=this.model.get("stroke"),i=!0===e?this.parent.model.get("animation_duration"):0;this.d3el.selectAll(".object_grp").select("path").transition("color_scale_updated").duration(i).style("fill",n?function(e,n){return t.get_element_color(e,n)}:"none").style("stroke",r||function(e,n){return t.get_element_color(e,n)})},draw_elements:function(e,t){var n=this,r=!0===e?this.parent.model.get("animation_duration"):0,i=this.d3el.selectAll(".object_grp");t.append("path").attr("class","dot element"),t.append("text").attr("class","dot_text"),i.select("path").transition("draw_elements").duration(r).attr("d",this.dot.size((function(e){return n.get_element_size(e)})).skew((function(e){return n.get_element_skew(e)}))),this.update_names(e),this.apply_styles()},draw_legend_elements:function(e,t){var n=this.model.get("colors"),r=n.length,i=this.model.get("stroke");e.append("path").attr("transform",(function(e,n){return"translate( "+t/2+", "+t/2+")"})).attr("d",this.dot.size(64)).style("fill",this.model.get("fill")?function(e,t){return n[t%r]}:"none").style("stroke",i||function(e,t){return n[t%r]})},set_default_style:function(e){if(e&&0!==e.length){var t=this.d3el.selectAll(".element").filter((function(t,n){return-1!==e.indexOf(n)})),n=this.model.get("fill"),r=this.model.get("stroke"),i=this.model.get("stroke_width"),o=this;t.style("fill",n?function(e,t){return o.get_element_color(e,t)}:"none").style("stroke",r||function(e,t){return o.get_element_color(e,t)}).style("opacity",(function(e,t){return o.get_element_opacity(e,t)})).style("stroke-width",i)}},set_drag_style:function(e,t,n){o.select(n).select("path").classed("drag_scatter",!0).transition("set_drag_style").attr("d",this.dot.size(5*this.model.get("default_size")));var r=this.model.get("drag_color");r&&o.select(n).select("path").style("fill",r).style("stroke",r)},reset_drag_style:function(e,t,n){var r=this.model.get("stroke"),i=this.get_element_color(e,t);o.select(n).select("path").classed("drag_scatter",!1).transition("reset_drag_style").attr("d",this.dot.size(this.get_element_size(e))),this.model.get("drag_color")&&o.select(n).select("path").style("fill",i).style("stroke",r||i)}});e.exports={Scatter:a}},function(e,t,n){n(1);var r=n(0),i=n(71),o=i.LinearScaleModel.extend({defaults:function(){return r.extend(i.LinearScaleModel.prototype.defaults(),{_model_name:"DateScaleModel",_view_name:"DateScale"})},initialize:function(){o.__super__.initialize.apply(this,arguments)},set_init_state:function(){this.type="date",this.global_min=(new Date).setTime(0),this.global_max=new Date},min_max_changed:function(){this.min=this.get_date_elem("min"),this.max=this.get_date_elem("max"),this.min_from_data=null===this.min,this.max_from_data=null===this.max,this.update_domain()}});e.exports={DateScaleModel:o}},function(e,t,n){var r=n(1),i=n(0),o=n(20),s=o.MarkModel.extend({defaults:function(){return i.extend(o.MarkModel.prototype.defaults(),{_model_name:"LinesModel",_view_name:"Lines",x:[],y:[],color:null,scales_metadata:{x:{orientation:"horizontal",dimension:"x"},y:{orientation:"vertical",dimension:"y"},color:{dimension:"color"}},colors:r.scale.category10().range(),fill_colors:r.scale.category10().range(),stroke_width:2,labels_visibility:"none",curves_subset:[],line_style:"solid",interpolation:"linear",close_path:!1,fill:"none",marker:null,marker_size:64,opacities:[],fill_opacities:[]})},initialize:function(){s.__super__.initialize.apply(this,arguments),this.on_some_change(["x","y","color"],this.update_data,this),this.on("change:labels",this.update_labels,this),this.on_some_change(["preserve_domain"],this.update_domains,this),this.update_data(),this.update_domains()},update_data:function(){this.dirty=!0;var e=this;this.x_data=this.get_typed_field("x"),this.y_data=this.get_typed_field("y"),this.color_data=this.get_typed_field("color");var t=this.get("scales"),n=(t.x,t.y,this.get("labels"));if(0===this.x_data.length||0===this.y_data.length)this.mark_data=[];else{this.x_data=this.x_data[0]instanceof Array?this.x_data:[this.x_data],this.y_data=this.y_data[0]instanceof Array?this.y_data:[this.y_data],n=this.get_labels();var i=this.y_data.length;1==this.x_data.length&&i>1?this.mark_data=n.map((function(t,n){return{name:t,values:e.y_data[n].map((function(t,r){return{x:e.x_data[0][r],y:t,y0:e.y_data[Math.min(n+1,i-1)][r],sub_index:r}})),color:e.color_data[n],index:n}})):this.mark_data=n.map((function(t,n){return{name:t,values:r.zip(e.x_data[n],e.y_data[n]).map((function(t,r){return{x:t[0],y:t[1],y0:e.y_data[Math.min(n+1,i-1)][r],sub_index:r}})),color:e.color_data[n],index:n}}))}this.update_domains(),this.dirty=!1,this.trigger("data_updated")},update_labels:function(){var e=this.get_labels();this.mark_data.forEach((function(t,n){t.name=e[n]})),this.trigger("labels_updated")},get_labels:function(){var e=this.get("labels"),t=1==this.x_data.length?this.y_data.length:Math.min(this.x_data.length,this.y_data.length);return e.length>t?e=e.slice(0,t):e.length<t&&i.range(e.length,t).forEach((function(t){e[t]="C"+(t+1)})),e},update_domains:function(){if(this.mark_data){var e=this.get("scales"),t=e.x,n=e.y,r=e.color;this.get("preserve_domain").x?t.del_domain([],this.model_id+"_x"):t.compute_and_set_domain(this.mark_data.map((function(e){return e.values.map((function(e){return e.x}))})),this.model_id+"_x"),this.get("preserve_domain").y?n.del_domain([],this.model_id+"_y"):n.compute_and_set_domain(this.mark_data.map((function(e){return e.values.map((function(e){return e.y}))})),this.model_id+"_y"),null!=r&&(this.get("preserve_domain").color?r.del_domain([],this.model_id+"_color"):r.compute_and_set_domain(this.mark_data.map((function(e){return e.color})),this.model_id+"_color"))}},get_data_dict:function(e,t){return e}}),a=s.extend({defaults:function(){return i.extend(s.prototype.defaults(),{_model_name:"FlexLineModel",_view_name:"FlexLine",x:[],y:[],color:null,scales_metadata:{x:{orientation:"horizontal",dimension:"x"},y:{orientation:"vertical",dimension:"y"},color:{dimension:"color"}},colors:r.scale.category10().range(),fill_colors:r.scale.category10().range(),stroke_width:2,labels_visibility:"none",curves_subset:[],line_style:"solid",interpolation:"linear",close_path:!1,fill:"none",marker:null,marker_size:64,opacities:[],fill_opacities:[]})},update_data:function(){this.dirty=!0;var e=this;this.x_data=this.get_typed_field("x"),this.y_data=this.get_typed_field("y");var t=this.get("scales"),n=(t.x,t.y,this.get("labels"));if(0===this.x_data.length||0===this.y_data.length)this.mark_data=[],this.data_len=0;else{this.x_data=this.x_data[0]instanceof Array?this.x_data:[this.x_data],this.y_data=this.y_data[0]instanceof Array?this.y_data:[this.y_data],n=this.get_labels();var r=this.get_typed_field("color"),o=this.get_typed_field("width");this.data_len=Math.min(this.x_data[0].length,this.y_data[0].length),this.mark_data=[{name:n[0],values:i.range(this.data_len-1).map((function(t,n){return{x1:e.x_data[0][n],y1:e.y_data[0][n],x2:e.x_data[0][n+1],y2:e.y_data[0][n+1],color:r[n],size:o[n]}}))}]}this.update_domains(),this.dirty=!1,this.trigger("data_updated")},update_domains:function(){if(this.mark_data){var e=this.get("scales"),t=e.x,n=e.y,r=e.color,i=e.width;this.get("preserve_domain").x?t.del_domain([],this.model_id+"_x"):t.compute_and_set_domain(this.x_data[0].slice(0,this.data_len),this.model_id+"_x"),this.get("preserve_domain").y?n.del_domain([],this.model_id+"_y"):n.compute_and_set_domain(this.y_data[0].slice(0,this.data_len),this.model_id+"_y"),null!=r&&(this.get("preserve_domain").color?r.del_domain([],this.model_id+"_color"):r.compute_and_set_domain(this.mark_data.map((function(e){return e.values.map((function(e){return e.color}))})),this.model_id+"_color")),null!=i&&(this.get("preserve_domain").width?i.del_domain([],this.model_id+"_width"):i.compute_and_set_domain(this.mark_data.map((function(e){return e.values.map((function(e){return e.size}))})),this.model_id+"_width"))}}});e.exports={LinesModel:s,FlexLineModel:a}},function(e,t,n){n(1);var r=n(0),i=n(196),o=i.ScatterBaseModel.extend({defaults:function(){return r.extend(i.ScatterBaseModel.prototype.defaults(),{_model_name:"ScatterModel",_view_name:"Scatter",skew:null,marker:"circle",stroke:null,stroke_width:1.5,default_skew:.5,default_size:64,names:[],display_names:!0,fill:!0,drag_color:null,drag_size:5,names_unique:!0})},initialize:function(){o.__super__.initialize.apply(this,arguments),this.on("change:skew",this.update_data,this),this.on_some_change(["names","names_unique"],(function(){this.update_unique_ids(),this.trigger("data_updated")}),this)},update_mark_data:function(){o.__super__.update_mark_data.apply(this);var e=this.get_typed_field("skew");this.mark_data.forEach((function(t,n){t.skew=e[n]}))},update_unique_ids:function(){var e=this.get_typed_field("names"),t=0!==e.length;e=t?e:this.mark_data.map((function(e,t){return"Dot"+t}));var n=[];n=this.get("names_unique")?e.slice(0):r.range(this.mark_data.length),this.mark_data.forEach((function(t,r){t.name=e[r],t.unique_id=n[r]}))}});e.exports={ScatterModel:o}},function(e,t,n){var r=n(0),i=n(1),o=n(52),s=(n(19),n(103)),a=o.BaseXSelector.extend({render:function(){a.__super__.render.apply(this),this.freeze_but_move=!0,this.freeze_dont_move=!1,this.active=!1,this.dirty=!1,this.size=this.model.get("size"),this.width=this.parent.width-this.parent.margin.left-this.parent.margin.right,this.height=this.parent.height-this.parent.margin.top-this.parent.margin.bottom;var e=this,t=this.create_scales();Promise.all([this.mark_views_promise,t]).then((function(){e.background=e.d3el.append("rect").attr("x",0).attr("y",0).attr("width",e.width).attr("height",e.height).attr("class","selector selectormouse").attr("pointer-events","all").attr("visibility","hidden"),e.background.on("mousemove",r.bind(e.mousemove,e)).on("click",r.bind(e.click,e)).on("dblclick",r.bind(e.dblclick,e)),e.rect=e.d3el.append("rect").attr("class","selector intsel").attr("x",0).attr("y",0).attr("width",e.size).attr("height",e.height).attr("pointer-events","none").attr("display","none"),e.color_change(),e.selected_changed(),e.create_listeners()}))},create_listeners:function(){a.__super__.create_listeners.apply(this),this.listenTo(this.model,"change:color",this.color_change,this)},color_change:function(){null!==this.model.get("color")&&this.rect.style("fill",this.model.get("color"))},click:function(){this.active=!0,this.rect.style("display","inline"),this.freeze_but_move=!!this.model.get("size")||!this.freeze_but_move},dblclick:function(){this.freeze_dont_move=!this.freeze_dont_move},mousemove:function(){if(!this.freeze_dont_move&&this.active){this.dirty=!0;var e,t=i.mouse(this.background.node()),n=this.size>0?this.size:parseInt(this.rect.attr("width")),r=(this.height-t[1])/this.height,o=this.freeze_but_move?n:Math.round(r*this.width);e=t[0]-o/2<0?0:t[0]+o/2>this.width?this.width-o:t[0]-o/2,this.rect.attr("x",e),this.rect.attr("width",o);var s=[e,e+o];this.model.set_typed_field("selected",this.scale.invert_range(s)),this.update_mark_selected(s),this.touch(),this.dirty=!1}},update_mark_selected:function(e,t){if(void 0!==e&&0!==e.length||r.each(this.mark_views,(function(e){return e.selector_changed()})),void 0===t)var n=this.model.get("orientation"),i="vertical"==n?[]:e,o="vertical"==n?e:[];else i=e,o=t;var a=function(e){return s.point_in_rectangle(e,i,o)},l=function(e){return s.rect_inter_rect(e[0],e[1],i,o)};r.each(this.mark_views,(function(e){e.selector_changed(a,l)}),this)},scale_changed:function(){this.reset(),this.create_scale()},relayout:function(){a.__super__.relayout.apply(this),this.adjust_rectangle(),this.background.attr("width",this.width).attr("height",this.height),this.set_range([this.scale])},reset:function(){this.rect.attr("x",0).attr("width",0),this.model.set_typed_field("selected",{}),this.update_mark_selected(),this.touch()},update_scale_domain:function(e){a.__super__.update_scale_domain.apply(this),!0!==e&&this.selected_changed()},selected_changed:function(e,t){if(!this.dirty){var n=this.model.get_typed_field("selected");if(0===n.length)this.reset();else{if(2!=n.length)return;var r=n.map(this.scale.scale);r=r.sort((function(e,t){return e-t})),this.rect.attr({x:r[0],width:r[1]-r[0]}).style("display","inline"),this.active=!0,this.update_mark_selected(r)}}},adjust_rectangle:function(){"vertical"==this.model.get("orientation")?this.d3el.selectAll("rect").attr("x",0).attr("width",this.width):this.d3el.selectAll("rect").attr("y",0).attr("height",this.height)}});e.exports={FastIntervalSelector:a}},function(e,t,n){var r=n(1),i=n(104).LinearScale.extend({render:function(){this.scale=r.scale.log(),this.model.domain.length>0&&this.scale.domain(this.model.domain),this.offset=0,this.create_event_listeners()}});e.exports={LogScale:i}},function(e,t,n){n(1);var r=n(0),i=n(71),o=i.LinearScaleModel.extend({defaults:function(){return r.extend(i.LinearScaleModel.prototype.defaults(),{_model_name:"LogScaleModel",_view_name:"LogScale",domain:[]})},initialize:function(){o.__super__.initialize.apply(this,arguments)},set_init_state:function(){this.type="log",this.global_min=Number.MIN_VALUE,this.global_max=Number.POSITIVE_INFINITY}});e.exports={LogScaleModel:o}},function(e,t,n){var r=n(9),i=(n(0),n(1)),o=r.DOMWidgetView.extend({render:function(){this.width=this.model.get("width"),this.height=this.model.get("height"),this.margin=this.model.get("margin"),this.el.style.width=this.width+this.margin.left+this.margin.right,this.el.style.height=this.height+this.margin.top+this.margin.bottom;var e=this.model.get("data");this.colors=this.model.get("colors"),this.mode=this.model.get("mode");var t=i.scale.category10();this.d3el.append("div").style("position","relative").style("width",this.width+this.margin.left+this.margin.right+"px").style("height",this.height+this.margin.top+this.margin.bottom+"px").style("left",this.margin.left+"px").style("top",this.margin.top+"px"),this.margin=this.model.get("margin"),this.tree_map=i.layout.treemap().size([this.width,this.height]).sticky(!0).padding(null).mode(this.mode).value((function(e){return e.size}));this.d3el.datum(e).selectAll(".node").data(this.tree_map.nodes).enter().append("div").attr("class","node").call(this.position).style({background:function(e,n){return e.children?t(e.name):null},border:"solid white"}).text((function(e){return e.children?null:e.name})).style({font:"11px sans-serif",position:"absolute","text-align":"center",overflow:"hidden",color:"white"})},position:function(){this.style("left",(function(e){return e.x+"px"})).style("top",(function(e){return e.y+"px"})).style("width",(function(e){return Math.max(0,e.dx-1)+"px"})).style("height",(function(e){return Math.max(0,e.dy-1)+"px"}))}});e.exports={SquareMarketMap:o}},function(e,t,n){var r=n(9),i=(n(1),n(0)),o=n(28),s="^"+n(21).version,a=o.BaseModel.extend({defaults:function(){return i.extend(o.BaseModel.prototype.defaults(),{_model_name:"FigureModel",_view_name:"Figure",_model_module:"bqplot",_view_module:"bqplot",_model_module_version:s,_view_module_version:s,title:"",axes:[],marks:[],interaction:null,scale_x:void 0,scale_y:void 0,fig_color:null,title_style:{},background_style:{},legend_style:{},legend_text:{},preserve_aspect:!1,min_aspect_ratio:0,max_aspect_ratio:100,fig_margin:{top:60,bottom:60,left:60,right:60},padding_x:0,padding_y:.025,legend_location:"top-right",animation_duration:0})},initialize:function(){a.__super__.initialize.apply(this,arguments),this.on("msg:custom",this.handle_custom_messages,this)},handle_custom_messages:function(e){"save_png"===e.type?this.trigger("save_png",e.filename):"save_svg"===e.type&&this.trigger("save_svg",e.filename)},save_png:function(){this.trigger("save_png")}},{serializers:i.extend({marks:{deserialize:r.unpack_models},axes:{deserialize:r.unpack_models},interaction:{deserialize:r.unpack_models},scale_x:{deserialize:r.unpack_models},scale_y:{deserialize:r.unpack_models},layout:{deserialize:r.unpack_models}},o.BaseModel.serializers)});e.exports={FigureModel:a}},function(e,t,n){var r=n(9),i=n(1),o=n(0),s=n(19),a=n(13),l=s.Mark.extend({render:function(){var e=l.__super__.render.apply(this);this.map=this.d3el.append("svg").attr("viewBox","0 0 1200 980"),this.width=this.parent.plotarea_width,this.height=this.parent.plotarea_height,this.map_id=r.uuid(),this.enable_hover=this.model.get("enable_hover"),this.display_el_classes=["event_layer"];var t=this;return this.displayed.then((function(){t.parent.tooltip_div.node().appendChild(t.tooltip_div.node()),t.create_tooltip()})),e.then((function(){t.event_listeners={},t.process_interactions(),t.create_listeners(),t.draw()}))},set_ranges:function(){},set_positional_scales:function(){var e=this.scales.projection;this.listenTo(e,"domain_changed",(function(){this.model.dirty||this.draw()}))},initialize_additional_scales:function(){var e=this.scales.color;e&&(this.listenTo(e,"domain_changed",(function(){this.update_style()})),e.on("color_scale_range_changed",this.update_style,this))},remove_map:function(){i.selectAll(".world_map.map"+this.map_id).remove()},draw:function(){this.set_ranges();var e=this;this.remove_map(),this.transformed_g=this.map.append("g").attr("class","world_map map"+this.map_id),this.fill_g=this.transformed_g.append("g"),this.highlight_g=this.transformed_g.append("g"),this.stroke_g=this.transformed_g.append("g");var t=this.scales.projection;this.fill_g.selectAll("path").data(e.model.geodata).enter().append("path").attr("d",t.path).style("fill",(function(t,n){return e.fill_g_colorfill(t,n)})),this.stroke_g.selectAll("path").data(e.model.geodata).enter().append("path").attr("class","event_layer").attr("d",t.path).style("fill-opacity",0).on("click",(function(t,n){return e.event_dispatcher("element_clicked",{data:t,index:n})})),this.validate_color(this.model.get("stroke_color"))&&this.stroke_g.selectAll("path").style("stroke",this.model.get("stroke_color")),this.zoom=i.behavior.zoom().scaleExtent([1,8]).on("zoom",(function(){e.zoomed(e,!1)})),this.parent.bg.call(this.zoom),this.parent.bg.on("dblclick.zoom",null),this.parent.bg.on("dblclick",(function(){e.zoomed(e,!0)}))},validate_color:function(e){return""!==e},mouseover_handler:function(){if(this.model.get("hover_highlight")){var e=i.select(i.event.target);if(this.is_hover_element(e)){var t=e.data()[0],n=this.model.get("selected"),r=n?a.deepCopy(n):[],o=this.highlight_g.append((function(){return e.node().cloneNode(!0)}));o.classed("hovered",!0),o.classed("event_layer",!1),this.validate_color(this.model.get("hovered_styles").hovered_stroke)&&-1===r.indexOf(t.id)&&o.style("stroke",this.model.get("hovered_styles").hovered_stroke).style("stroke-width",this.model.get("hovered_styles").hovered_stroke_width);var s=this;this.validate_color(this.model.get("hovered_styles").hovered_fill)&&-1===r.indexOf(t.id)&&o.style("fill-opacity",1).style("fill",(function(){return s.model.get("hovered_styles").hovered_fill}))}}},mouseout_handler:function(){if(this.model.get("hover_highlight")){var e=i.select(i.event.target);if(this.is_hover_element(e)){var t=this;e.transition("mouseout_handler").style("fill",(function(e,n){return t.fill_g_colorfill(e,n)})).style("stroke",(function(e,n){return t.hoverfill(e,n)})),t.highlight_g.selectAll(".hovered").remove()}}},click_handler:function(){var e=i.select(i.event.target);if(this.is_hover_element(e)){var t=e.data()[0],n=this.model.get("selected"),r=n?a.deepCopy(n):[],o=r.indexOf(t.id);if(o>-1){r.splice(o,1),e.transition("click_handler").style("fill-opacity",0),this.highlight_g.selectAll(".hovered").remove();var s="#c".concat(t.id.toString());i.select(s).remove()}else this.highlight_g.selectAll(".hovered").remove(),this.highlight_g.append((function(){return e.node().cloneNode(!0)})).attr("id","c"+t.id).classed("selected",!0).classed("event_layer",!1),this.validate_color(this.model.get("selected_styles").selected_fill)&&this.highlight_g.selectAll(".selected").style("fill-opacity",1).style("fill",this.model.get("selected_styles").selected_fill),this.validate_color(this.model.get("selected_styles").selected_stroke)&&this.highlight_g.selectAll(".selected").style("stroke",this.model.get("selected_styles").selected_stroke).style("stroke-width",this.model.get("selected_styles").selected_stroke_width),r.push(t.id),this.model.set("selected",r),this.touch();this.model.set("selected",0===r.length?null:r,{updated_view:this}),this.touch()}},zoomed:function(e,t){var n=t?[0,0]:i.event.translate,r=t?1:i.event.scale,o=e.height/3,s=t?e.width:2*e.width;n[0]=Math.min(e.width/2*(r-1),Math.max(s/2*(1-r),n[0])),n[1]=Math.min(e.height/2*(r-1)+this.height*r,Math.max(o/2*(1-r)-e.width*r,n[1])),e.zoom.translate(n),t&&e.zoom.scale(r),e.transformed_g.style("stroke-width",1/r).attr("transform","translate("+n+")scale("+r+")")},create_listeners:function(){var e=this;this.d3el.on("mouseover",o.bind((function(){this.event_dispatcher("mouse_over")}),this)).on("mousemove",o.bind((function(){this.event_dispatcher("mouse_move")}),this)).on("mouseout",o.bind((function(){this.event_dispatcher("mouse_out")}),this)),this.listenTo(this.model,"data_updated",this.draw,this),this.listenTo(this.model,"change:color",this.update_style,this),this.listenTo(this.model,"change:stroke_color",this.change_stroke_color,this),this.listenTo(this.model,"change:colors",this.change_map_color,this),this.listenTo(this.model,"change:selected",this.change_selected,this),this.listenTo(this.model,"change:selected_styles",(function(){e.change_selected_fill(),e.change_selected_stroke()})),this.listenTo(this.model,"change:interactions",this.process_interactions),this.listenTo(this.parent,"bg_clicked",(function(){this.event_dispatcher("parent_clicked")}))},process_interactions:function(){var e=this.model.get("interactions");o.isEmpty(e)?this.reset_interactions():(void 0!==e.click&&null!==e.click?"tooltip"===e.click?(this.event_listeners.element_clicked=function(){return this.refresh_tooltip(!0)},this.event_listeners.parent_clicked=this.hide_tooltip):"select"===e.click&&(this.event_listeners.parent_clicked=this.reset_selection,this.event_listeners.element_clicked=this.click_handler):this.reset_click(),void 0!==e.hover&&null!==e.hover?"tooltip"===e.hover&&(this.event_listeners.mouse_over=function(){return this.mouseover_handler(),this.refresh_tooltip()},this.event_listeners.mouse_move=this.move_tooltip,this.event_listeners.mouse_out=function(){return this.mouseout_handler(),this.hide_tooltip()}):this.reset_hover(),void 0!==e.legend_click&&null!==e.legend_click?"tooltip"===e.legend_click&&(this.event_listeners.legend_clicked=function(){return this.refresh_tooltip(!0)},this.event_listeners.parent_clicked=this.hide_tooltip):this.event_listeners.legend_clicked=function(){})},change_selected_fill:function(){this.validate_color(this.model.get("selected_styles").selected_fill)?this.highlight_g.selectAll(".selected").style("fill-opacity",1).style("fill",this.model.get("selected_styles").selected_fill):this.highlight_g.selectAll(".selected").style("fill-opacity",0)},change_selected_stroke:function(){this.validate_color(this.model.get("selected_styles").selected_stroke)?this.highlight_g.selectAll(".selected").style("stroke-width",this.model.get("selected_styles").selected_stroke_width).style("stroke",this.model.get("selected_styles").selected_stroke):this.highlight_g.selectAll(".selected").style("stroke-width",0)},change_selected:function(){this.highlight_g.selectAll("path").remove();var e=this,t=this.model.get("selected"),n=t||[],r=this.stroke_g.selectAll("path").data();this.stroke_g.selectAll("path").style("stroke",(function(t,n){return e.hoverfill(t,n)}));for(var i=this.stroke_g.selectAll("path"),o=0;o<r.length;o++)n.indexOf(r[o].id)>-1&&e.highlight_g.append((function(){return i[0][o].cloneNode(!0)})).attr("id",r[o].id).style("fill-opacity",(function(){return e.validate_color(e.model.get("selected_styles").selected_fill)?1:0})).style("fill",e.model.get("selected_styles").selected_fill).style("stroke-opacity",(function(){return e.validate_color(e.model.get("selected_styles").selected_stroke)?1:0})).style("stroke",e.model.get("selected_styles").selected_stroke).style("stroke-width",e.model.get("selected_styles").selected_stroke_width).classed("selected",!0)},reset_selection:function(){this.model.set("selected",[]),this.touch(),this.highlight_g.selectAll(".selected").remove(),i.select(this.d3el.parentNode).selectAll("path").classed("selected",!1),i.select(this.d3el.parentNode).selectAll("path").classed("hovered",!1);var e=this;this.stroke_g.selectAll("path").style("stroke",(function(t,n){return e.hoverfill(t,n)})),this.fill_g.selectAll("path").classed("selected",!1).style("fill",(function(t,n){return e.fill_g_colorfill(t,n)}))},change_stroke_color:function(){this.stroke_g.selectAll("path").style("stroke",this.model.get("stroke_color"))},change_map_color:function(){var e=this;this.is_object_empty(this.model.get("color"))&&this.fill_g.selectAll("path").style("fill",(function(t,n){return e.fill_g_colorfill(t,n)}))},update_style:function(){var e=this.model.get("color"),t=this;this.is_object_empty(e)||this.fill_g.selectAll("path").style("fill",(function(e,n){return t.fill_g_colorfill(e,n)}))},is_object_empty:function(e){var t=!0;for(var n in e){t=!1;break}return t},hoverfill:function(e,t){var n=this.model.get("selected");return(n||[]).indexOf(e.id)>-1&&this.validate_color(this.model.get("selected_styles").selected_stroke)?this.model.get("selected_styles").selected_stroke:this.model.get("stroke_color")},fill_g_colorfill:function(e,t){var n=this.scales.color,r=this.model.get("selected"),i=r||[],o=this.model.get("color"),s=this.model.get("colors");return i.indexOf(e.id)>-1?this.model.get("selected_styles").selected_fill:this.is_object_empty(o)?s[e.id]||s.default_color:void 0===o[e.id]||null===o[e.id]||"nan"===o[e.id]||void 0===n?s.default_color:n.scale(o[e.id])}});e.exports={Map:l}},function(e,t,n){var r=n(9),i=n(1),o=n(13),s=n(0),a=r.DOMWidgetView.extend({initialize:function(){this.d3el=i.select(this.el),a.__super__.initialize.apply(this,arguments)},render:function(){this.parent=this.options.parent,this.update_formats(),this.create_listeners(),this.create_table()},create_listeners:function(){this.listenTo(this.parent,"update_tooltip",this.update_tooltip),this.model.on_some_change(["fields","show_labels","labels"],this.create_table,this),this.listenTo(this.model,"change:formats",this.update_formats)},update_formats:function(){var e=this.model.get("fields"),t=this.model.get("formats");this.tooltip_formats=e.map((function(e,n){var r=t[n];return void 0===r||""===r?function(e){return e}:o.is_valid_time_format(r)?i.time.format(r):i.format(r)}))},update_tooltip:function(e){var t=this;this.d3el.select("table").selectAll("tr").select(".datavalue").text((function(n,r){return t.tooltip_formats[r](e[n])}))},create_table:function(){for(var e=this.model.get("fields"),t=s.clone(this.model.get("labels")),n=t.length;n<e.length;n++)t[n]=e[n];this.d3el.select("table").remove();var r=this.d3el.append("table").selectAll("tr").data(e);r.exit().remove();var i=r.enter().append("tr").attr("class","datarow");this.model.get("show_labels")&&i.append("td").text((function(e,n){return t[n]})).attr("class","tooltiptext datafield"),i.append("td").attr("class","tooltiptext datavalue"),this.update_formats()}});e.exports={Tooltip:a}},function(e,t,n){var r=n(9),i=n(0),o="^"+n(21).version,s=r.DOMWidgetModel.extend({defaults:function(){return i.extend(r.DOMWidgetModel.prototype.defaults(),{_model_name:"TooltipModel",_view_name:"Tooltip",_model_module:"bqplot",_view_module:"bqplot",_model_module_version:o,_view_module_version:o,fields:[],formats:[],show_labels:!0,labels:[]})}});e.exports={TooltipModel:s}},function(e,t,n){var r=n(1),i=n(0),o=n(200),s=o.Lines.extend({render:function(){var e=o.Lines.__super__.render.apply(this),t=this;return e.then((function(){t.scales.x,t.scales.y;t.create_listeners(),t.draw()}))},set_ranges:function(){s.__super__.set_ranges.apply(this);var e=this.scales.width;e&&e.set_range([.5,this.model.get("stroke_width")])},create_listeners:function(){s.__super__.create_listeners.apply(this),this.listenTo(this.model,"change:colors",this.update_colors,this),this.listenTo(this.model,"change:labels_visibility",this.update_legend_labels,this),this.listenTo(this.model,"change:color change:width",this.update_and_draw,this)},draw_legend:function(e,t,n,o,s){var a=e.selectAll(".legend"+this.uuid).data(this.model.mark_data,(function(e,t){return e.name})),l=this,c=.8*s;a.enter().append("g").attr("class","legend"+this.uuid).attr("transform",(function(e,t){return"translate(0, "+(t*s+n)+")"})).on("mouseover",i.bind(this.make_axis_bold,this)).on("mouseout",i.bind(this.make_axis_non_bold,this)).append("line").style("stroke",(function(e,t){return l.get_colors(t)})).attr({x1:0,x2:c,y1:c/2,y2:c/2}),a.append("text").attr("class","legendtext").attr("x",1.2*c).attr("y",c/2).attr("dy","0.35em").text((function(e,t){return l.model.get("labels")[t]})).style("fill",(function(e,t){return l.get_colors(t)}));var u=r.max(this.model.get("labels"),(function(e){return e.length}));return a.exit().remove(),[this.model.mark_data.length,u]},set_positional_scales:function(){var e=this.scales.x,t=this.scales.y;this.listenTo(e,"domain_changed",(function(){this.model.dirty||this.draw()})),this.listenTo(t,"domain_changed",(function(){this.model.dirty||this.draw()}))},initialize_additional_scales:function(){var e=this.scales.color;e&&(this.listenTo(e,"domain_changed",(function(){this.draw()})),e.on("color_scale_range_changed",this.draw,this))},draw:function(){this.set_ranges();var e=this.d3el.selectAll(".curve").data(this.model.mark_data,(function(e,t){return e.name}));e.enter().append("g").attr("class","curve"),e.exit().transition("draw").duration(this.parent.model.get("animation_duration")).remove();var t=this.scales.x,n=this.scales.y,i=this;e[0].forEach((function(e,o){var s=r.select(e).selectAll("line").data(i.model.mark_data[o].values);s.enter().append("line"),s.attr("class","line-elem").attr({x1:function(e){return t.scale(e.x1)},x2:function(e){return t.scale(e.x2)},y1:function(e){return n.scale(e.y1)},y2:function(e){return n.scale(e.y2)}}).attr("stroke",(function(e){return i.get_element_color(e)})).attr("stroke-width",(function(e){return i.get_element_width(e)}))}))},get_element_color:function(e){var t=this.scales.color;return void 0!==t&&void 0!==e.color?t.scale(e.color):this.model.get("colors")[0]},get_element_width:function(e){var t=this.scales.width;return void 0!==t&&void 0!==e.size?t.scale(e.size):this.model.get("stroke_width")},relayout:function(){o.Lines.__super__.relayout.apply(this),this.set_ranges();var e=this.scales.x,t=this.scales.y;this.d3el.selectAll(".curve").selectAll(".line-elem").transition("relayout").duration(this.parent.model.get("animation_duration")).attr({x1:function(t){return e.scale(t.x1)},x2:function(t){return e.scale(t.x2)},y1:function(e){return t.scale(e.y1)},y2:function(e){return t.scale(e.y2)}})},create_labels:function(){}});e.exports={FlexLine:s}},function(e,t,n){var r=n(0),i=n(20),o=n(541),s=i.MarkModel.extend({defaults:function(){return r.extend(i.MarkModel.prototype.defaults(),{_model_name:"MapModel",_view_name:"Map",color:{},hover_highlight:!0,hovered_styles:{hovered_fill:"Orange",hovered_stroke:null,hovered_stroke_width:2},stroke_color:null,default_color:null,scales_metadata:{color:{dimension:"color"},projection:{dimension:"geo"}},selected:[],selected_styles:{selected_fill:"Red",selected_stroke:null,selected_stroke_width:2},map_data:void 0})},initialize:function(){s.__super__.initialize.apply(this,arguments),this.on("change:map_data",this.update_data,this),this.on("change:color",this.color_data_updated,this),this.update_data(),this.update_domains()},update_data:function(){this.dirty=!0;var e=this.get("map_data");"Topology"==e.type?this.geodata=o.feature(e,e.objects.subunits).features:this.geodata=e.features,this.color_data_updated(),this.dirty=!1,this.trigger("data_updated")},update_properties:function(e){e.properties?e.properties.color=this.color_data[e.id]:e.properties={color:this.color_data[e.id]}},color_data_updated:function(){var e=this;this.update_domains(),this.geodata.map((function(t){return e.update_properties(t)}))},update_domains:function(){var e=this.get("scales"),t=this,n=e.color;this.color_data=this.get("color"),null!=n&&(this.get("preserve_domain").color?n.del_domain([],this.model_id+"_color"):n.compute_and_set_domain(Object.keys(this.color_data).map((function(e){return t.color_data[e]})),this.model_id+"_color"))},get_data_dict:function(e,t){return r.extend(e.properties,{id:e.id})}});e.exports={MapModel:s}},function(e,t,n){!function(e){"use strict";function t(){}function n(e){if(!e)return t;var n,r,i=e.scale[0],o=e.scale[1],s=e.translate[0],a=e.translate[1];return function(e,t){t||(n=r=0),e[0]=(n+=e[0])*i+s,e[1]=(r+=e[1])*o+a}}function r(e,t){for(var n=0,r=e.length;n<r;){var i=n+r>>>1;e[i]<t?n=i+1:r=i}return n}function i(e,t){var n={type:"Feature",id:t.id,properties:t.properties||{},geometry:o(e,t)};return null==t.id&&delete n.id,n}function o(e,t){var r=n(e.transform),i=e.arcs;function o(e,t){t.length&&t.pop();for(var n,o=i[e<0?~e:e],s=0,a=o.length;s<a;++s)t.push(n=o[s].slice()),r(n,s);e<0&&function(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}(t,a)}function s(e){return e=e.slice(),r(e,0),e}function a(e){for(var t=[],n=0,r=e.length;n<r;++n)o(e[n],t);return t.length<2&&t.push(t[0].slice()),t}function l(e){for(var t=a(e);t.length<4;)t.push(t[0].slice());return t}function c(e){return e.map(l)}var u={Point:function(e){return s(e.coordinates)},MultiPoint:function(e){return e.coordinates.map(s)},LineString:function(e){return a(e.arcs)},MultiLineString:function(e){return e.arcs.map(a)},Polygon:function(e){return c(e.arcs)},MultiPolygon:function(e){return e.arcs.map(c)}};return function e(t){var n=t.type;return"GeometryCollection"===n?{type:n,geometries:t.geometries.map(e)}:n in u?{type:n,coordinates:u[n](t)}:null}(t)}function s(e,t){var n={},r={},i={},o=[],s=-1;function a(e,t){for(var r in e){var i=e[r];delete t[i.start],delete i.start,delete i.end,i.forEach((function(e){n[e<0?~e:e]=1})),o.push(i)}}return t.forEach((function(n,r){var i,o=e.arcs[n<0?~n:n];o.length<3&&!o[1][0]&&!o[1][1]&&(i=t[++s],t[s]=n,t[r]=i)})),t.forEach((function(t){var n,o,s=function(t){var n,r=e.arcs[t<0?~t:t],i=r[0];return e.transform?(n=[0,0],r.forEach((function(e){n[0]+=e[0],n[1]+=e[1]}))):n=r[r.length-1],t<0?[n,i]:[i,n]}(t),a=s[0],l=s[1];if(n=i[a])if(delete i[n.end],n.push(t),n.end=l,o=r[l]){delete r[o.start];var c=o===n?n:n.concat(o);r[c.start=n.start]=i[c.end=o.end]=c}else r[n.start]=i[n.end]=n;else if(n=r[l])if(delete r[n.start],n.unshift(t),n.start=a,o=i[a]){delete i[o.end];var u=o===n?n:o.concat(n);r[u.start=o.start]=i[u.end=n.end]=u}else r[n.start]=i[n.end]=n;else r[(n=[t]).start=a]=i[n.end=l]=n})),a(i,r),a(r,i),t.forEach((function(e){n[e<0?~e:e]||o.push([e])})),o}function a(e,t,n){var r=[];function i(e){var t=e<0?~e:e;(u[t]||(u[t]=[])).push({i:e,g:c})}function o(e){e.forEach(i)}function a(e){e.forEach(o)}function l(e){"GeometryCollection"===e.type?e.geometries.forEach(l):e.type in h&&(c=e,h[e.type](e.arcs))}if(arguments.length>1){var c,u=[],h={LineString:o,MultiLineString:a,Polygon:a,MultiPolygon:function(e){e.forEach(a)}};l(t),u.forEach(arguments.length<3?function(e){r.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&r.push(e[0].i)})}else for(var d=0,p=e.arcs.length;d<p;++d)r.push(d);return{type:"MultiLineString",arcs:s(e,r)}}function l(e){var t=e[0],n=e[1],r=e[2];return Math.abs((t[0]-r[0])*(n[1]-t[1])-(t[0]-n[0])*(r[1]-t[1]))}function c(e,t){var n={},r=[],i=[];function a(e){e.forEach((function(t){t.forEach((function(t){(n[t=t<0?~t:t]||(n[t]=[])).push(e)}))})),r.push(e)}function l(t){return Math.abs(function(e){for(var t,n=-1,r=e.length,i=e[r-1],o=0;++n<r;)t=i,i=e[n],o+=t[0]*i[1]-t[1]*i[0];return o/2}(o(e,{type:"Polygon",arcs:[t]}).coordinates[0]))}return t.forEach((function(e){"Polygon"===e.type?a(e.arcs):"MultiPolygon"===e.type&&e.arcs.forEach(a)})),r.forEach((function(e){if(!e._){var t=[],r=[e];for(e._=1,i.push(t);e=r.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){n[e<0?~e:e].forEach((function(e){e._||(e._=1,r.push(e))}))}))}))}})),r.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:i.map((function(t){var r,i=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){n[e<0?~e:e].length<2&&i.push(e)}))}))})),(r=(i=s(e,i)).length)>1)for(var o,a,c=1,u=l(i[0]);c<r;++c)(o=l(i[c]))>u&&(a=i[0],i[0]=i[c],i[c]=a,u=o);return i}))}}function u(e,t){return e[1][2]-t[1][2]}e.version="1.6.27",e.mesh=function(e){return o(e,a.apply(this,arguments))},e.meshArcs=a,e.merge=function(e){return o(e,c.apply(this,arguments))},e.mergeArcs=c,e.feature=function(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return i(e,t)}))}:i(e,t)},e.neighbors=function(e){var t={},n=e.map((function(){return[]}));function i(e,n){e.forEach((function(e){e<0&&(e=~e);var r=t[e];r?r.push(n):t[e]=[n]}))}function o(e,t){e.forEach((function(e){i(e,t)}))}var s={LineString:i,MultiLineString:o,Polygon:o,MultiPolygon:function(e,t){e.forEach((function(e){o(e,t)}))}};for(var a in e.forEach((function e(t,n){"GeometryCollection"===t.type?t.geometries.forEach((function(t){e(t,n)})):t.type in s&&s[t.type](t.arcs,n)})),t)for(var l=t[a],c=l.length,u=0;u<c;++u)for(var h=u+1;h<c;++h){var d,p=l[u],f=l[h];(d=n[p])[a=r(d,f)]!==f&&d.splice(a,0,f),(d=n[f])[a=r(d,p)]!==p&&d.splice(a,0,p)}return n},e.presimplify=function(e,r){var i=n(e.transform),o=function(e){if(!e)return t;var n,r,i=e.scale[0],o=e.scale[1],s=e.translate[0],a=e.translate[1];return function(e,t){t||(n=r=0);var l=Math.round((e[0]-s)/i),c=Math.round((e[1]-a)/o);e[0]=l-n,e[1]=c-r,n=l,r=c}}(e.transform),s=function(){var e={},t=[],n=0;function r(e,n){for(;n>0;){var r=(n+1>>1)-1,i=t[r];if(u(e,i)>=0)break;t[i._=n]=i,t[e._=n=r]=e}}function i(e,r){for(;;){var i=r+1<<1,o=i-1,s=r,a=t[s];if(o<n&&u(t[o],a)<0&&(a=t[s=o]),i<n&&u(t[i],a)<0&&(a=t[s=i]),s===r)break;t[a._=r]=a,t[e._=r=s]=e}}return e.push=function(e){return r(t[e._=n]=e,n++),n},e.pop=function(){if(!(n<=0)){var e,r=t[0];return--n>0&&(e=t[n],i(t[e._=0]=e,0)),r}},e.remove=function(e){var o,s=e._;if(t[s]===e)return s!==--n&&(u(o=t[n],e)<0?r:i)(t[o._=s]=o,s),s},e}();function a(e){s.remove(e),e[1][2]=r(e),s.push(e)}return r||(r=l),e.arcs.forEach((function(e){var t,n,l,c,u=[],h=0;for(n=0,l=e.length;n<l;++n)c=e[n],i(e[n]=[c[0],c[1],1/0],n);for(n=1,l=e.length-1;n<l;++n)(t=e.slice(n-1,n+2))[1][2]=r(t),u.push(t),s.push(t);for(n=0,l=u.length;n<l;++n)(t=u[n]).previous=u[n-1],t.next=u[n+1];for(;t=s.pop();){var d=t.previous,p=t.next;t[1][2]<h?t[1][2]=h:h=t[1][2],d&&(d.next=p,d[2]=t[2],a(d)),p&&(p.previous=d,p[0]=t[0],a(p))}e.forEach(o)})),e},Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){var r=n(1),i=n(9).WidgetView.extend({render:function(){this.set_projection(),this.listenTo(this.model,"attribute_changed",this.reset_scale)},set_projection:function(){this.path=r.geo.path().projection(this.model.projection),this.scale=this.model.projection},reset_scale:function(){this.set_projection(),this.trigger("domain_changed",null)}}),o=i.extend({}),s=i.extend({}),a=i.extend({}),l=i.extend({}),c=i.extend({}),u=i.extend({}),h=i.extend({});e.exports={GeoScale:i,Mercator:o,Albers:s,AlbersUSA:a,EquiRectangular:l,Orthographic:c,Gnomonic:u,Stereographic:h}},function(e,t,n){var r=n(1),i=n(0),o=n(70),s=o.ScaleModel.extend({defaults:function(){return i.extend(o.ScaleModel.prototype.defaults(),{_model_name:"GeoScaleModel",_view_name:"GeoScale"})}}),a=s.extend({defaults:function(){return i.extend(s.prototype.defaults(),{_model_name:"MercatorModel",_view_name:"Mercator",scale_factor:190,center:[0,60],rotate:[0,0]})},initialize:function(){a.__super__.initialize.apply(this,arguments),this.on_some_change(["scale_factor","center","rotate"],this.create_projection,this),this.create_projection()},create_projection:function(){this.projection=r.geo.mercator().center(this.get("center")).scale(this.get("scale_factor")).rotate(this.get("rotate")),this.attribute_changed()},attribute_changed:function(){this.trigger("attribute_changed")}}),l=s.extend({defaults:function(){return i.extend(s.prototype.defaults(),{_model_name:"AlbersModel",_view_name:"Albers",scale_factor:250,center:[0,60],parallels:[29.5,45.5],precision:.1})},initialize:function(){l.__super__.initialize.apply(this,arguments),this.on_some_change(["rotate","center","parallels","scale_factor","precision"],this.create_projection,this),this.create_projection()},create_projection:function(){this.projection=r.geo.albers().rotate(this.get("rotate")).center(this.get("center")).parallels(this.get("parallels")).scale(this.get("scale_factor")).precision(this.get("precision")),this.attribute_changed()},attribute_changed:function(){this.trigger("attribute_changed")}}),c=s.extend({defaults:function(){return i.extend(s.prototype.defaults(),{_model_name:"AlbersUSAModel",_view_name:"AlbersUSA",scale_factor:1200,translate:[600,490]})},initialize:function(){c.__super__.initialize.apply(this,arguments),this.on_some_change(["scale_factor","translate"],this.create_projection,this),this.create_projection()},create_projection:function(){this.projection=r.geo.albersUsa().scale(this.get("scale_factor")).translate(this.get("translate")),this.attribute_changed()},attribute_changed:function(){this.trigger("attribute_changed")}}),u=s.extend({defaults:function(){return i.extend(s.prototype.defaults(),{_model_name:"EquiRectangularModel",_view_name:"EquiRectangular",scale_factor:145})},initialize:function(){u.__super__.initialize.apply(this,arguments),this.on_some_change(["scale_factor","center"],this.create_projection,this),this.create_projection()},create_projection:function(){this.projection=r.geo.equirectangular().center(this.get("center")).scale(this.get("scale_factor")),this.attribute_changed()},attribute_changed:function(){this.trigger("attribute_changed")}}),h=s.extend({defaults:function(){return i.extend(s.prototype.defaults(),{_model_name:"OrthographicModel",_view_name:"Orthographic",scale_factor:145,center:[0,60],rotate:[0,0],clip_angle:90,precision:.1})},initialize:function(){h.__super__.initialize.apply(this,arguments),this.on_some_change(["scale_factor","center","clip_angle","rotate","precision"],this.create_projection,this),this.create_projection()},create_projection:function(){this.projection=r.geo.orthographic().center(this.get("center")).scale(this.get("scale_factor")).clipAngle(this.get("clip_angle")).rotate(this.get("rotate")).precision(this.get("precision")),this.attribute_changed()},attribute_changed:function(){this.trigger("attribute_changed")}}),d=s.extend({defaults:function(){return i.extend(s.prototype.defaults(),{_model_name:"GnomonicModel",_view_name:"Gnomonic",scale_factor:145,center:[0,60],precision:.1,clip_angle:89.999})},initialize:function(){d.__super__.initialize.apply(this,arguments),this.on_some_change(["scale_factor","precision","clip_angle"],this.create_projection,this),this.create_projection()},create_projection:function(){this.projection=r.geo.gnomonic().clipAngle(this.get("clip_angle")).scale(this.get("scale_factor")).precision(this.get("precision")),this.attribute_changed()},attribute_changed:function(){this.trigger("attribute_changed")}}),p=s.extend({defaults:function(){return i.extend(s.prototype.defaults(),{_model_name:"StereographicModel",_view_name:"StereographicModel",scale_factor:245,center:[0,60],precision:.1,rotate:[96,0],clip_angle:179.9999})},initialize:function(){p.__super__.initialize.apply(this,arguments),this.on_some_change(["scale_factor","center","clip_angle","rotate","precision"],this.create_projection,this),this.create_projection()},create_projection:function(){this.projection=r.geo.stereographic().scale(this.get("scale_factor")).rotate(this.get("rotate")).clipAngle(this.get("clip_angle")).center(this.get("center")).precision(this.get("precision")),this.attribute_changed()},attribute_changed:function(){this.trigger("attribute_changed")}});e.exports={GeoScaleModel:s,MercatorModel:a,AlbersModel:l,AlbersUSAModel:c,EquiRectangularModel:u,OrthographicModel:h,GnomonicModel:d,StereographicModel:p}},function(e,t,n){var r=n(9),i=n(0),o=n(1),s=n(201),a=n(202),l=n(203);l.__esModule&&(l=l.default);var c=s.Figure.extend({render:function(e){this.id=r.uuid();var t=String(this.model.get("layout").get("min_width")),n=String(this.model.get("layout").get("min_height")),i=this._get_height_width(n.slice(0,-2),t.slice(0,-2));this.width=i.width,this.height=i.height,this.scales={},this.set_top_el_style();var s=this;this.margin=this.model.get("map_margin"),this.num_rows=this.model.get("rows"),this.num_cols=this.model.get("cols"),this.row_groups=this.model.get("row_groups"),this.enable_select=this.model.get("enable_select"),this.update_data(),this.set_area_dimensions(this.data.length),this.model.get("theme")&&this.svg.classed(this.model.get("theme"),!0),this.fig=this.svg.append("g").attr("transform","translate("+this.margin.left+","+this.margin.top+")"),this.fig_map=this.fig.append("g"),this.fig_axes=this.fig.append("g"),this.fig_click=this.fig.append("g"),this.fig_hover=this.fig.append("g"),this.fig_names=this.fig.append("g").style("display",this.model.get("show_groups")?"inline":"none"),this.fig_map.classed("g-map",!0),this.fig_axes.classed("g-axes",!0),this.fig_click.classed("g-click",!0),this.fig_hover.classed("g-hover",!0),this.fig_names.classed("g-names",!0),this.axis=[],this.tooltip_div=o.select(document.createElement("div")).attr("class","mark_tooltip").style("opacity",0).style("pointer-events","none"),this.popper_reference=new a.ElementReference(this.svg.node()),this.popper=new l(this.popper_reference,this.tooltip_div.node(),{placement:"auto"}),this.update_default_tooltip(),this.selected_stroke=this.model.get("selected_stroke"),this.hovered_stroke=this.model.get("hovered_stroke"),this.update_plotarea_dimensions(),this.title=this.fig.append("text").attr("class","mainheading").attr({x:.5*this.plotarea_width,y:-this.margin.top/2,dy:"1em"}).text(this.model.get("title")).style(this.model.get("title_style")),this.create_scale_views().then((function(){s.create_listeners(),s.axis_views=new r.ViewList(s.add_axis,null,s),s.axis_views.update(s.model.get("axes")),s.model.on("change:axes",(function(e,t,n){s.axis_views.update(t)}))})),this.displayed.then((function(){document.body.appendChild(s.tooltip_div.node()),s.relayout(),s.draw_group_names(),s.create_tooltip_widget()}))},set_top_el_style:function(){this.el.style["user-select"]="none",this.el.style["ms-user-select"]="none",this.el.style["moz-user-select"]="none",this.el.style["khtml-user-select"]="none",this.el.style["webkit-user-select"]="none"},update_plotarea_dimensions:function(){this.plotarea_width=this.width-this.margin.left-this.margin.right,this.plotarea_height=this.height-this.margin.top-this.margin.bottom,this.column_width=parseFloat((this.plotarea_width/this.num_cols).toFixed(2)),this.row_height=parseFloat((this.plotarea_height/this.num_rows).toFixed(2))},reset_drawing_controls:function(){this.prev_x=0,this.prev_y=-1,this.y_direction=1,this.x_direction=1,this.group_iter=1},create_listeners:function(){this.listenTo(this.model,"change:scales",this.create_scale_views,this),this.listenTo(this.model,"change:color",this.recolor_chart,this),this.listenTo(this.model,"change:colors",this.colors_updated,this),this.listenTo(this.model,"change:show_groups",this.show_groups,this),this.listenTo(this.model,"change:selected_stroke",this.update_selected_stroke,this),this.listenTo(this.model,"change:hovered_stroke",this.update_hovered_stroke,this),this.listenTo(this.model,"change:font_style",this.update_font_style,this),this.model.on_some_change(["title","title_style"],this.update_title,this),this.listenTo(this.model,"change:selected",(function(){this.clear_selected(),this.apply_selected()}),this),this.model.on_some_change(["names","groups","ref_data"],(function(){this.update_data(),this.compute_dimensions_and_draw()}),this),this.listenTo(this.model,"change:rows",(function(e,t){this.num_rows=t,this.compute_dimensions_and_draw()}),this),this.listenTo(this.model,"change:cols",(function(e,t){this.num_cols=t,this.compute_dimensions_and_draw()}),this),this.listenTo(this.model,"change:row_groups",(function(e,t){this.row_groups=t,this.compute_dimensions_and_draw()}),this),this.listenTo(this.model,"change:tooltip_widget",this.create_tooltip_widget,this),this.listenTo(this.model,"change:tooltip_fields",this.update_default_tooltip,this),this.listenTo(this.model,"change:tooltip_formats",this.update_default_tooltip,this)},update_title:function(e,t){this.title.text(this.model.get("title")).style(this.model.get("title_style"))},relayout:function(){var e=this,t=this._get_height_width(this.el.clientHeight,this.el.clientWidth);this.width=t.width,this.height=t.height,window.requestAnimationFrame((function(){e.margin=e.model.get("map_margin"),e.update_plotarea_dimensions(),e.fig.attr("transform","translate("+e.margin.left+","+e.margin.top+")"),e.title.attr({x:.5*e.plotarea_width,y:-e.margin.top/2,dy:"1em"}),e.draw_map(),e.clear_selected(),e.apply_selected(),e.fig_hover.selectAll("rect").remove(),e.hide_tooltip(),e.trigger("margin_updated")}))},update_data:function(){var e=this;this.data=this.model.get_typed_field("names"),this.ref_data=this.model.get("ref_data"),this.group_data=this.model.get_typed_field("groups"),this.groups=i.uniq(this.group_data,!0);var t=this.model.get_typed_field("display_text");t=void 0===t||0===t.length?this.data:t,this.colors=this.model.get("colors");var n=this.colors.length;this.colors_map=function(t){return e.get_color(t,n)};var r=this.model.get_typed_field("color"),o=this.data.map((function(n,i){return{display:t[i],name:n,color:r[i],group:e.group_data[i],ref_data:null===e.ref_data||void 0===e.ref_data?null:e.ref_data[i]}}));this.update_domains(),this.grouped_data=i.groupBy(o,(function(t,n){return e.group_data[n]})),this.groups=[],this.running_sums=[],this.running_sums[0]=0;var s=0;for(var a in this.grouped_data)this.groups.push(a),s+=this.grouped_data[a].length,this.running_sums.push(s);this.running_sums.pop()},update_domains:function(){var e=this.model.get("scales").color,t=this.model.get_typed_field("color");e&&t.length>0&&e.compute_and_set_domain(t,this.model.model_id)},set_area_dimensions:function(e){this.num_rows=this.model.get("rows"),this.num_cols=this.model.get("cols"),this.row_groups=this.model.get("row_groups"),void 0!==this.num_cols&&null!==this.num_cols&&0!==this.num_cols?(this.row_groups>1&&this.num_cols%2==0&&this.num_cols++,this.num_rows=Math.floor(e/this.num_cols),this.num_rows=e%this.num_cols==0?this.num_rows:this.num_rows+1):void 0!==this.num_rows&&null!==this.num_rows&&0!==this.num_rows?(this.num_cols=Math.floor(e/this.num_rows),this.num_cols=e%this.num_rows==0?this.num_cols:this.num_cols+1,this.row_groups>1&&this.num_cols%2==0&&this.num_cols++):(this.num_cols=Math.floor(Math.sqrt(e)),this.row_groups>1&&this.num_cols%2==0&&this.num_cols++,this.num_rows=Math.floor(e/this.num_cols),this.num_rows=e%this.num_cols==0?this.num_rows:this.num_rows+1),this.row_groups=Math.min(this.row_groups,this.num_rows),1==this.row_groups&&(this.num_cols=Math.floor(e/this.num_rows),this.num_cols=e%this.num_rows==0?this.num_cols:this.num_cols+1),this.set_row_limits()},compute_dimensions_and_draw:function(){this.set_area_dimensions(this.data.length),this.update_plotarea_dimensions(),this.draw_map(),this.clear_selected(),this.apply_selected(),this.fig_hover.selectAll("rect").remove(),this.hide_tooltip()},update_default_tooltip:function(){this.tooltip_fields=this.model.get("tooltip_fields");var e=this.model.get("tooltip_formats");this.tooltip_formats=this.tooltip_fields.map((function(t,n){var r=e[n];return void 0===r||""===r?function(e){return e}:o.format(r)}))},create_scale_views:function(){for(var e in this.scales)this.stopListening(this.scales[e]);var t=this.model.get("scales"),n=this,o={};return i.each(t,(function(e,t){o[t]=n.create_child_view(e)})),r.resolvePromisesDict(o).then((function(e){n.scales=e,n.set_scales()}))},set_scales:function(){var e=this,t=this.scales.color;t&&(t.set_range(),t.on("color_scale_range_changed",e.update_map_colors,e),this.update_domains(),this.listenTo(t,"domain_changed",(function(){e.update_map_colors()})),this.update_map_colors())},show_groups:function(e,t){this.fig_names.style("display",t?"inline":"none"),this.fig_map.selectAll(".market_map_text").style("opacity",t?.2:1),this.fig_map.selectAll(".market_map_rect").style("stroke-opacity",t?.2:1)},draw_map:function(){this.reset_drawing_controls(),this.fig_map.selectAll(".element_group").remove(),this.fig_names.selectAll(".names_object").remove(),this.rect_groups=this.fig_map.selectAll(".element_group").data(this.groups);var e=this.scales.color,t=this;this.rect_groups.enter().append("g").attr("class","element_group").attr("transform",(function(e,n){return t.get_group_transform(n)})),this.rect_groups.exit().remove(),this.end_points=[],this.rect_groups[0].forEach((function(n,r){var i=t.grouped_data[t.groups[r]],s=(t.colors_map(r),t.get_new_cords()),a=t.get_end_points(s[2],i.length,s[0],s[1],s[3],s[4]);a.forEach((function(e){t.end_points.push(e)}));var l=t.running_sums[r],c=o.select(n).selectAll(".rect_element").data(i),u=c.enter().append("g").classed("rect_element",!0);u.append("rect").attr("x",0).attr("y",0).classed("market_map_rect",!0),u.append("text").classed("market_map_text",!0).style({"text-anchor":"middle",fill:"black","pointer-events":"none"}).style(t.model.get("font_style")),c.attr("transform",(function(e,n){return t.get_cell_transform(n)})).on("click",(function(e,n){t.cell_click_handler(e,l+n,this)})).on("mouseover",(function(e,n){t.mouseover_handler(e,l+n,this)})).on("mousemove",(function(e){t.mousemove_handler(e)})).on("mouseout",(function(e,n){t.mouseout_handler(e,l+n,this)})).attr("class",(function(e,t){return o.select(this).attr("class")+" rect_"+(l+t)})).attr("id",(function(e){return"market_map_element_"+e.name})),c.selectAll(".market_map_rect").attr("width",t.column_width).attr("height",t.row_height).style("stroke-opacity",t.model.get("show_groups")?.2:1).style({stroke:t.model.get("stroke"),fill:function(n,i){return e&&void 0!==n.color&&null!==n.color?e.scale(n.color):t.colors_map(r)}}),c.selectAll(".market_map_text").attr("x",t.column_width/2).attr("y",t.row_height/2).text((function(e,t){return e.display})).style("opacity",t.model.get("show_groups")?.2:1),c.exit().remove();t.create_bounding_path(n,a);var h=o.min(a,(function(e){return e.x})),d=o.min(a,(function(e){return e.y}));t.fig_names.append("foreignObject").attr("class","names_object").attr("x",h).attr("y",d).append("xhtml:div").attr("class","names_div").style({display:"flex","flex-direction":"row","align-content":"center","align-items":"center",width:"100%",height:"100%","justify-content":"center","word-wrap":"break-word",font:"24px sans-serif",color:"black"}).text(t.groups[r])})),this.draw_group_names()},draw_group_names:function(){var e=this.svg.selectAll(".bounding_path")[0].map((function(e){return e.getBoundingClientRect()}));this.fig_names.selectAll(".names_object").data(e).attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height}))},recolor_chart:function(){var e=this;this.update_data(),this.rect_groups=this.fig.selectAll(".element_group").data(this.groups);var t=this.scales.color;this.rect_groups[0].forEach((function(n,r){var i=e.grouped_data[e.groups[r]];e.colors_map(r),o.select(n).selectAll(".rect_element").data(i).select("rect").style({stroke:e.model.get("stroke"),fill:function(n,i){return t&&void 0!==n.color&&null!==n.color?t.scale(n.color):e.colors_map(r)}})}))},update_font_style:function(e,t){this.svg.selectAll(".market_map_text").style(t)},update_map_colors:function(){var e=this,t=this.scales.color;void 0!==this.rect_groups&&null!==this.rect_groups&&this.rect_groups[0].forEach((function(n,r){var i=e.grouped_data[e.groups[r]];e.colors_map(r),o.select(n).selectAll(".rect_element").data(i).select("rect").style({stroke:e.model.get("stroke"),fill:function(n,i){return t&&void 0!==n.color&&null!==n.color?t.scale(n.color):e.colors_map(r)}})}))},cell_click_handler:function(e,t,n){if(this.model.get("enable_select")){var r=this.model.get("selected").slice(),i=r.indexOf(e.name),s=o.select(n).attr("id");if(-1==i){r.push(e.name);var a=o.select(n).attr("transform");this.add_selected_cell(s,a)}else this.fig_click.select("#click_"+s).remove(),r.splice(i,1);this.model.set("selected",r),this.touch()}},apply_selected:function(){var e=this.model.get("selected"),t=this;null==e||0===e.length?this.clear_selected():e.forEach((function(e){var n="market_map_element_"+e;if(t.fig_click.select("#click_"+n).remove(),1==t.fig_map.selectAll("#"+n)[0].length){var r=t.fig_map.selectAll("#"+n).attr("transform");t.add_selected_cell(n,r)}}))},clear_selected:function(){this.fig_click.selectAll("rect").remove()},add_selected_cell:function(e,t){this.fig_click.append("rect").attr("id","click_"+e).attr("transform",t).attr("x",0).attr("y",0).attr("width",this.column_width).attr("height",this.row_height).style({stroke:this.selected_stroke,"stroke-width":"4px",fill:"none"})},mouseover_handler:function(e,t,n){var r=o.select(n).attr("transform");this.model.get("enable_hover")&&(this.fig_hover.append("rect").attr("class","hover_"+t).attr("transform",r).attr("x",0).attr("y",0).attr("width",this.column_width).attr("height",this.row_height).style({stroke:this.hovered_stroke,"stroke-width":"3px",fill:"none","pointer-events":"none"}),this.show_tooltip(o.event,e),this.send({event:"hover",data:e.name,ref_data:e.ref_data}))},update_selected_stroke:function(e,t){this.selected_stroke=t;this.fig_click.selectAll("rect").style({stroke:t})},update_hovered_stroke:function(e,t){this.hovered_stroke=t},mouseout_handler:function(e,t,n){this.fig_hover.select(".hover_"+t).remove(),this.hide_tooltip()},show_tooltip:function(e,t){o.mouse(this.el);var n=this;if(this.tooltip_view||this.tooltip_fields&&0!=this.tooltip_fields.length){var r=this.tooltip_div;r.transition().style("opacity",.9).style("display",null),this.move_tooltip(),r.select("table").remove();var i=t.ref_data;if(!this.tooltip_view){var s=r.append("table").selectAll("tr").data(this.tooltip_fields);s.exit().remove();var a=s.enter().append("tr");a.append("td").attr("class","tooltiptext").text((function(e){return e})),a.append("td").attr("class","tooltiptext").text((function(e,t){return null==i?null:n.tooltip_formats[t](i[e])}))}this.popper.enableEventListeners(),this.move_tooltip()}},mousemove_handler:function(e){this.move_tooltip(e)},move_tooltip:function(e){this.popper_reference.x=o.event.clientX,this.popper_reference.y=o.event.clientY,this.popper.scheduleUpdate()},hide_tooltip:function(){this.tooltip_div.style("pointer-events","none"),this.tooltip_div.transition().style("opacity",0).style("display","none"),this.popper.disableEventListeners()},create_tooltip_widget:function(){var e=this.model.get("tooltip_widget");null!==this.tooltip_view&&void 0!==this.tooltip_view&&(this.tooltip_view.remove(),this.tooltip_view=null);var t=this;e&&this.create_child_view(e).then((function(e){t.tooltip_view=e,t.tooltip_div.node().appendChild(e.el),e.trigger("displayed",{add_to_dom_only:!0})}))},get_group_transform:function(e){return"translate(0, 0)"},get_cell_transform:function(e){return this.past_border_y()?this.prev_y+=this.y_direction:this.past_border_x()?(this.y_direction=-1*this.y_direction,this.prev_x+=this.x_direction):(this.x_direction=-1*this.x_direction,this.prev_y+=this.y_direction,this.group_iter+=1),"translate("+this.prev_x*this.column_width+", "+this.prev_y*this.row_height+")"},get_new_cords:function(){var e=this.prev_x,t=this.prev_y,n=this.y_direction,r=this.x_direction,i=this.group_iter;return this.past_border_y()?t+=this.y_direction:this.past_border_x()?(n=-1*this.y_direction,e+=this.x_direction):(r=-1*this.x_direction,t+=this.y_direction,i+=1),[e,t,i,r,n,e*this.column_width,t*this.row_height]},past_border_y:function(){return 1==this.y_direction?this.prev_y+1<this.row_limits[this.group_iter]:this.prev_y-1>this.row_limits[this.group_iter-1]-1},past_border_x:function(){return 1==this.x_direction?this.prev_x+1<this.num_cols:this.prev_x-1>-1},colors_updated:function(){this.colors=this.model.get("colors"),this.recolor_chart()},get_color:function(e,t){return this.colors[e%t]},set_row_limits:function(){var e=Math.floor(this.num_rows/this.row_groups);this.row_limits=[];for(var t=this.row_groups-1;t>-1;t--)this.row_limits.unshift(t*e);this.row_limits[this.row_groups]=this.num_rows},get_end_points:function(e,t,n,r,i,o){var s,a=this.row_limits[e-1],l=this.row_limits[e],c=!1,u=i,h=o,d=[],p=1==h?l-r:r-a+1,f=1==u?this.num_cols-1-n:n,g=t,m=l-a;if(0!==g){this.calc_end_point_source(n,r,u,h).forEach((function(e){d.push(e)}));var _=Math.min(p,g);if(_===g)return this.calc_end_point_source(n,r,-1*u,h).forEach((function(e){d.push(e)})),s=r+(g-1)*h,this.calc_end_point_dest(n,s,-1*u,h).forEach((function(e){d.push(e)})),this.calc_end_point_dest(n,s,u,h).forEach((function(e){d.push(e)})),d;if(g-=_,0===f?this.calc_end_point_source(n,r,-1*u,h).forEach((function(e){d.push(e)})):p!==l-a?(this.calc_end_point_source(n,r,-1*u,h).forEach((function(e){d.push(e)})),g>m&&this.calc_end_point_dest(n+u,1==h?a:l-1,-1*u,-1*h).forEach((function(e){d.push(e)}))):g<m&&this.calc_end_point_source(n,r,-1*u,h).forEach((function(e){d.push(e)})),r+=h*(_-1),this.calc_end_point_dest(n,r,-1*u,h).forEach((function(e){d.push(e)})),0===g)return this.calc_end_point_dest(n,r,u,h).forEach((function(e){d.push(e)})),d;0!==f&&g>m&&(n+=u)}for(;g>m;){var v;if(m*f<g){var y=g-(v=f)*m;v+=Math.floor(y/(this.row_limits[e+1]-this.row_limits[e]))}else v=Math.floor(g/m);v>f?(n=1===u?this.num_cols-1:0,0!==f&&this.calc_end_point_dest(n,a,u,-1).forEach((function(e){d.push(e)})),v=f,f=this.num_cols,e+=1,a=l,l=this.row_limits[e],r=a,u*=-1,h=Math.pow(-1,v)*h*-1,this.calc_end_point_dest(n,l-1,-1*u,1).forEach((function(e){d.push(e)}))):v===f?(n=1===u?this.num_cols-1:0,0!==f&&this.calc_end_point_dest(n,a,u,-1).forEach((function(e){d.push(e)})),v=f,f=this.num_cols,(e+=1)<this.row_limits.length?(a=l,l=this.row_limits[e],r=a,u*=-1,h=Math.pow(-1,v)*h*-1,c=!0):(h=1,u=1)):(r=1===(h=Math.pow(-1,v)*h)?a:l-1,n+=u*(v-1),this.calc_end_point_source(n,r,-1*u,h).forEach((function(e){d.push(e)}))),g-=v*m,m=l-a}return 0===g?(r=1===h?l-1:a,u=c?-1*u:u,this.calc_end_point_dest(n,r,u,h).forEach((function(e){d.push(e)}))):(r=1===(h*=-1)?a:l-1,n=c?n:n+u,this.calc_end_point_source(n,r,-1*u,h).forEach((function(e){d.push(e)})),s=r+(g-1)*h,this.calc_end_point_dest(n,s,u,h).forEach((function(e){d.push(e)})),this.calc_end_point_dest(n,s,-1*u,h).forEach((function(e){d.push(e)}))),d},create_bounding_path:function(e,t){t[0].x,t[0].y;var n=[],r=t.slice();n.push(t[0]),r.splice(0,1);for(var i=["x","y"],s=0,a=i[s%2],l=i[(s+1)%2],c=n[0],u=c[a],h=c[l],d=2*r.length,p=0;r.length>1&&d>0;){var f=r.filter((function(e){return e[a]==u}));if(f.length>0){s++;var g=o.min(f,(function(e){return e[l]})),m=o.max(f,(function(e){return e[l]}));if(g<h&&m>h)if("y"==a)p=1==this.x_direction?m:g;else{var _=f.filter((function(e){return e[l]<h})),v=f.filter((function(e){return e[l]>h}));p=1==_.length?g:1==v.length?m:o.max(_,(function(e){return e[l]}))}else p=g>h?g:m;r.filter((function(e){return e[a]==u&&e[l]==p})).forEach((function(e){r.splice(r.indexOf(e),1)}));var y={};y[a]=u,y[l]=p,n.push(y)}else p=h;var b=a;a=l,l=b,h=u,u=p,d--}r.length>0&&n.push(r[0]),n.push(t[0]);var w=o.svg.line().interpolate("linear").x((function(e){return e.x})).y((function(e){return e.y}));return o.select(e).append("path").attr("class","bounding_path").attr("d",(function(){return w(n)})).attr("fill","none").style("stroke",this.model.get("group_stroke")).style("stroke-width",3)},calc_end_point_source:function(e,t,n,r){return t=1==r?t:t+1,[{x:(e=1==n?e:e+1)*this.column_width,y:t*this.row_height}]},calc_end_point_dest:function(e,t,n,r){return t=-1==r?t:t+1,[{x:(e=-1==n?e:e+1)*this.column_width,y:t*this.row_height}]}});e.exports={MarketMap:c}},function(e,t,n){var r=n(1),i=n(0),o=n(13),s=n(19).Mark.extend({render:function(){var e=s.__super__.render.apply(this),t=this;return this.displayed.then((function(){t.parent.tooltip_div.node().appendChild(t.tooltip_div.node()),t.create_tooltip()})),this.selected_indices=this.model.get("selected"),this.selected_style=this.model.get("selected_style"),this.unselected_style=this.model.get("unselected_style"),this.anchor_style=this.model.get("anchor_style"),this.display_el_classes=["heatmapcell"],e.then((function(){t.event_listeners={},t.process_interactions(),t.create_listeners(),t.compute_view_padding(),t.draw()}))},set_ranges:function(){var e=this.scales.row;if(e){var t=this.parent.padded_range("y",e.model);e.set_range(t)}var n=this.scales.column;n&&n.set_range(this.parent.padded_range("x",n.model))},set_positional_scales:function(){var e=this.scales.column,t=this.scales.row;this.listenTo(e,"domain_changed",(function(){this.model.dirty||this.draw()})),this.listenTo(t,"domain_changed",(function(){this.model.dirty||this.draw()}))},expand_scale_domain:function(e,t,n,i){var o,s;if("expand_one"===n){var a=(o=t.map((function(t){return e.scale(t)}))).slice(1).map((function(e,t){return e-o[t]}));s=0,a[0]<0?(i=!i,s=r.max(a)):s=r.min(a);var l=0;return i?(l=o[o.length-1]+s,[t[0],e.invert(l)]):(l=o[0]-s,[e.invert(l),t[o.length-1]])}if("expand_two"===n){o=t.map((function(t){return e.scale(t)})),s=r.min(o.slice(1).map((function(e,t){return e-o[t]})));var c=o[o.length-1]+s,u=o[0]-s;return[e.invert(u),e.invert(c)]}},create_listeners:function(){s.__super__.create_listeners.apply(this),this.listenTo(this.model,"change:stroke",this.update_stroke,this),this.listenTo(this.model,"change:opacity",this.update_opacity,this),this.d3el.on("mouseover",i.bind((function(){this.event_dispatcher("mouse_over")}),this)).on("mousemove",i.bind((function(){this.event_dispatcher("mouse_move")}),this)).on("mouseout",i.bind((function(){this.event_dispatcher("mouse_out")}),this)),this.listenTo(this.model,"data_updated",this.draw,this),this.listenTo(this.model,"change:tooltip",this.create_tooltip,this),this.listenTo(this.parent,"bg_clicked",(function(){this.event_dispatcher("parent_clicked")})),this.listenTo(this.model,"change:selected",this.update_selected),this.listenTo(this.model,"change:interactions",this.process_interactions)},click_handler:function(e){e.data;var t=this.model.colors[0].length,n=e.row_num*t+e.column_num,s=e.row_num,a=e.column_num,l=this,c=this.model.get("selected")?o.deepCopy(this.model.get("selected")):[],u=o.deepCopy(this._cell_nums_from_indices(c)),h=u.indexOf(n),d=r.event.ctrlKey||r.event.metaKey;if(h>-1&&d)c.splice(h,1);else if(d||(u=[],c=[]),c.push([s,a]),u.push(l._cell_nums_from_indices([[s,a]])[0]),r.event.shiftKey){if(h>-1)return;var p=0!==u.length?l.anchor_cell_index[0]:s,f=0!==u.length?l.anchor_cell_index[1]:a;i.range(Math.min(s,p),Math.max(s,p)+1).forEach((function(e){i.range(Math.min(a,f),Math.max(a,f)+1).forEach((function(t){var n=l._cell_nums_from_indices([[e,t]])[0];-1===u.indexOf(n)&&(u.push(n),c.push([e,t]))}))}))}else this.anchor_cell_index=[s,a];this.model.set("selected",0===c.length?null:c,{updated_view:this}),this.touch(),r.event||(r.event=window.event);var g=r.event;void 0!==g.cancelBubble&&(g.cancelBubble=!0),g.stopPropagation&&g.stopPropagation(),g.preventDefault(),this.selected_indices=c,this.apply_styles()},update_selected:function(e,t){this.selected_indices=t,this.apply_styles()},set_style_on_elements:function(e,t,n){t&&(0!==t.length||n&&0!==n.length)&&0!==Object.keys(e).length&&(n=n&&0!==n.length?n:this._filter_cells_by_index(t)).style(e)},set_default_style:function(e,t){if(e&&(0!==e.length||t&&0!==t.length)){t=t&&0!==t.length?t:this._filter_cells_by_index(e);var n=this.model.get("stroke"),r=this.model.get("opacity"),i=this;t.style("fill",(function(e){return i.get_element_fill(e)})).style("opacity",r).style("stroke",n)}},clear_style:function(e,t,n){if(0!==Object.keys(e).length){n&&0!==n.length||(n=t?this._filter_cells_by_index(t):this.display_cells);var r={};for(var i in e)r[i]=null;n.style(r)}},_filter_cells_by_cell_num:function(e){return null==e?[]:this.display_cells.filter((function(t){return-1!==e.indexOf(t._cell_num)}))},selected_style_updated:function(e,t){this.selected_style=t,this.clear_style(e.previous("selected_style"),this.selected_indices,this.selected_elements),this.style_updated(t,this.selected_indices,this.selected_elements)},unselected_style_updated:function(e,t){this.unselected_style=t,this.clear_style(e.previous("unselected_style"),[],this.unselected_elements),this.style_updated(t,[],this.unselected_elements)},apply_styles:function(){var e=this.model.colors.length,t=this.model.colors[0].length;this.clear_style(this.selected_style),this.clear_style(this.unselected_style),this.clear_style(this.anchor_style),this.set_default_style([],this.display_cells);var n=this._cell_nums_from_indices(this.selected_indices),r=null===n?[]:i.difference(i.range(e*t),n);if(this.selected_elements=this._filter_cells_by_cell_num(n),this.set_style_on_elements(this.selected_style,this.selected_indices,this.selected_elements),this.unselected_elements=this._filter_cells_by_cell_num(r),this.set_style_on_elements(this.unselected_style,[],this.unselected_elements),null!==this.anchor_cell_index&&void 0!==this.anchor_cell_index){var o=this._cell_nums_from_indices([this.anchor_cell_index]);this.anchor_element=this._filter_cells_by_cell_num(o),this.set_style_on_elements(this.anchor_style,[],this.anchor_element)}},style_updated:function(e,t,n){this.set_default_style(t,n),this.set_style_on_elements(e,t,n)},reset_selection:function(){this.model.set("selected",null),this.touch(),this.selected_indices=null,this.clear_style(this.selected_style),this.clear_style(this.unselected_style),this.clear_style(this.anchor_style),this.set_default_style([],this.display_cells)},relayout:function(){this.set_ranges(),this.compute_view_padding(),this.draw()},_cell_nums_from_indices:function(e){if(null==e)return null;var t=this.model.colors[0].length;return e.map((function(e){return e[0]*t+e[1]}))},invert_point:function(e){},selector_changed:function(e,t){if(void 0===e)return this.model.set("selected",null),this.touch(),[];var n=i.range(this.model.colors[0].length),r=i.range(this.model.colors.length),o=this,s=i.filter(n,(function(e){return t([o.column_pixels[e],[]])})),a=i.filter(r,(function(e){return t([[],o.row_pixels[e]])})),l=s.map((function(e){return a.map((function(t){return[t,e]}))}));l=i.flatten(l,!0),this.model.set("selected",l),this.touch()},draw:function(){this.set_ranges();var e,t=this,n=this.model.colors.length,o=this.model.colors[0].length,s=this.scales.row,a=this.scales.column,l="start"===this.model.get("row_align"),c="start"===this.model.get("column_align");"middle"!==this.model.modes.row&&"boundaries"!==this.model.modes.row&&(e=this.expand_scale_domain(s,this.model.rows,this.model.modes.row,l),(r.min(e)<r.min(s.model.domain)||r.max(e)>r.max(s.model.domain))&&s.model.compute_and_set_domain(e,s.model.model_id)),"middle"!==this.model.modes.column&&"boundaries"!==this.model.modes.column&&(e=this.expand_scale_domain(a,this.model.columns,this.model.modes.column,c),(r.min(e)<r.min(a.model.domain)||r.max(e)>r.max(a.model.domain))&&a.model.compute_and_set_domain(e,a.model.model_id));var u=this.get_tile_plotting_data(s,this.model.rows,this.model.modes.row,l),h=this.get_tile_plotting_data(a,this.model.columns,this.model.modes.column,c);this.row_pixels=u.start.map((function(e,t){return[e,e+u.widths[t]]})),this.column_pixels=h.start.map((function(e,t){return[e,e+h.widths[t]]})),this.display_rows=this.d3el.selectAll(".heatmaprow").data(i.range(n)),this.display_rows.enter().append("g").attr("class","heatmaprow"),this.display_rows.attr("transform",(function(e){return"translate(0, "+u.start[e]+")"}));var d=i.range(o),p=i.range(n).map((function(e){return d.map((function(n){return t.model.mark_data[e*o+n]}))}));this.display_cells=this.display_rows.selectAll(".heatmapcell").data((function(e,t){return p[t]})),this.display_cells.enter().append("rect").attr("class","heatmapcell").on("click",i.bind((function(){this.event_dispatcher("element_clicked")}),this));var f=this.model.get("stroke"),g=this.model.get("opacity");this.display_cells.attr({x:function(e,t){return h.start[t]},y:0}).attr("width",(function(e,t){return h.widths[t]})).attr("height",(function(e){return u.widths[e.row_num]})).style("fill",(function(e){return t.get_element_fill(e)})).style({stroke:f,opacity:g}),this.display_cells.on("click",(function(e,n){return t.event_dispatcher("element_clicked",{data:e.color,index:n,row_num:e.row_num,column_num:e.column_num})}))},update_stroke:function(e,t){this.display_cells.style("stroke",t)},update_opacity:function(e,t){this.display_cells.style("opacity",t)},get_tile_plotting_data:function(e,t,n,i){var o,s=[],a=[];if("middle"===n)return s=t.map((function(t){return e.scale(t)})),a=t.map((function(t){return e.scale.rangeBand()})),{start:s,widths:a};if("boundaries"===n){var l=t.map((function(t){return e.scale(t)}));a=[];for(var c=1;c<l.length;++c)a[c-1]=Math.abs(l[c]-l[c-1]);return{start:s=l[1]>l[0]?l.slice(0,-1):l.slice(1),widths:a}}if("expand_one"===n)return i?(a=(s=t.map((function(t){return e.scale(t)}))).slice(1).map((function(e,t){return Math.abs(e-s[t])})),o=r.max(e.scale.range()),a=s[0]<s[1]?Array.prototype.concat(a,[Math.abs(o-r.max(s))]):Array.prototype.concat([Math.abs(o-r.max(s))],a)):(a=(s=t.map((function(t){return e.scale(t)}))).slice(1).map((function(e,t){return Math.abs(e-s[t])})),o=r.min(e.scale.range()),o=r.min(e.scale.range()),s[1]>s[0]?(s.splice(0,0,Math.abs(0,0,o)),a.splice(0,0,s[1]-s[0]),s.splice(-1,1)):(a=Array.prototype.concat(a,[Math.abs(o-s.slice(-1)[0])]),(s=Array.prototype.concat(s,o)).splice(0,1))),{widths:a,start:s};if("expand_two"===n){var u=(s=t.map((function(t){return e.scale(t)})))[1]-s[0]>0,h=u?r.min(e.scale.range()):r.max(e.scale.range());return s.splice(0,0,h),a=s.slice(1).map((function(e,t){return Math.abs(e-s[t])})),h=u?r.max(e.scale.range()):r.min(e.scale.range()),a[a.length]=Math.abs(h-s.slice(-1)[0]),{start:s,widths:a}}},get_element_fill:function(e){return null===e.color?this.model.get("null_color"):this.scales.color.scale(e.color)},process_interactions:function(){var e=this.model.get("interactions");i.isEmpty(e)?this.reset_interactions():(void 0!==e.click&&null!==e.click?"tooltip"===e.click?(this.event_listeners.element_clicked=function(){return this.refresh_tooltip(!0)},this.event_listeners.parent_clicked=this.hide_tooltip):"select"==e.click&&(this.event_listeners.parent_clicked=this.reset_selection,this.event_listeners.element_clicked=this.click_handler):this.reset_click(),void 0!==e.hover&&null!==e.hover?"tooltip"===e.hover&&(this.event_listeners.mouse_over=this.refresh_tooltip,this.event_listeners.mouse_move=this.move_tooltip,this.event_listeners.mouse_out=this.hide_tooltip):this.reset_hover())}});e.exports={GridHeatMap:s}},function(e,t,n){var r=n(9),i=n(0),o=n(1),s=n(28),a="^"+n(21).version,l=s.BaseModel.extend({defaults:function(){return i.extend(s.BaseModel.prototype.defaults(),{_model_name:"MarketMapModel",_view_name:"MarketMap",_model_module:"bqplot",_view_module:"bqplot",_model_module_version:a,_view_module_version:a,map_width:1080,map_height:800,names:[],groups:[],display_text:[],ref_data:void 0,title:"",tooltip_fields:[],tooltip_formats:[],show_groups:!1,cols:0,rows:0,row_groups:1,colors:o.scale.category20().range(),scales:{},axes:[],color:[],map_margin:{top:50,right:50,left:50,bottom:50},preserve_aspect:!1,stroke:"white",group_stroke:"black",selected_stroke:"dodgerblue",hovered_stroke:"orangered",font_style:{},title_style:{},selected:[],enable_hover:!0,enable_select:!0,tooltip_widget:null})}},{serializers:i.extend({scales:{deserialize:r.unpack_models},axes:{deserialize:r.unpack_models},tooltip_widget:{deserialize:r.unpack_models},style:{deserialize:r.unpack_models},layout:{deserialize:r.unpack_models}},s.BaseModel.serializers)});e.exports={MarketMapModel:l}},function(e,t,n){var r=n(1),i=n(0),o=(n(13),n(19).Mark.extend({render:function(){var e=o.__super__.render.apply(this),t=this;return this.displayed.then((function(){t.parent.tooltip_div.node().appendChild(t.tooltip_div.node()),t.create_tooltip()})),this.image=r.select(this.el).append("image").classed("heatmap",!0).attr("width",this.parent.width).attr("height",this.parent.height),this.canvas=document.createElement("canvas"),e.then((function(){t.event_listeners={},t.process_interactions(),t.create_listeners(),t.compute_view_padding(),t.draw()}))},set_ranges:function(){var e=this.scales.x;if(e){var t=this.parent.padded_range("x",e.model);e.set_range(t)}var n=this.scales.y;n&&n.set_range(this.parent.padded_range("y",n.model))},set_positional_scales:function(){var e=this.scales.x,t=this.scales.y;this.listenTo(e,"domain_changed",(function(){this.model.dirty||this.draw()})),this.listenTo(t,"domain_changed",(function(){this.model.dirty||this.draw()}))},initialize_additional_scales:function(){var e=this.scales.color;e&&(this.listenTo(e,"domain_changed",(function(){this.draw()})),e.on("color_scale_range_changed",this.draw,this))},create_listeners:function(){o.__super__.create_listeners.apply(this),this.d3el.on("mouseover",i.bind((function(){this.event_dispatcher("mouse_over")}),this)).on("mousemove",i.bind((function(){this.event_dispatcher("mouse_move")}),this)).on("mouseout",i.bind((function(){this.event_dispatcher("mouse_out")}),this)),this.listenTo(this.model,"data_updated",this.draw,this),this.listenTo(this.model,"change:tooltip",this.create_tooltip,this),this.listenTo(this.parent,"bg_clicked",(function(){this.event_dispatcher("parent_clicked")})),this.listenTo(this.model,"change:interactions",this.process_interactions)},click_handler:function(e){},process_interactions:function(e){},relayout:function(){this.set_ranges(),this.compute_view_padding(),this.draw()},draw_canvas:function(){this.image.attr("href",this.canvas.toDataURL("image/png"))},draw:function(){this.set_ranges();var e=this,t=this.get_x_plotting_data(this.model.mark_data.x),n=this.get_y_plotting_data(this.model.mark_data.y);this.canvas.setAttribute("width",t.total_width),this.canvas.setAttribute("height",n.total_height);var r=this.canvas.getContext("2d");this.model.mark_data.color.forEach((function(i,o){var s=n.heights[o],a=n.start[o];i.forEach((function(n,i){var o=t.widths[i],l=t.start[i];r.fillStyle=e.get_element_fill(n),r.fillRect(l,a,o+.5,s+.5)}))})),this.image.attr("width",t.total_width).attr("height",n.total_height).attr("x",t.x0).attr("y",n.y0),this.draw_canvas()},get_x_plotting_data:function(e){var t=e.map(this.scales.x.scale),n=this.get_x_padding(t),r=e.length,i=t.map((function(e,i){return 0==i?.5*(t[1]-e)+n.left:i==r-1?.5*(e-t[i-1])+n.right:.5*(t[i+1]-t[i-1])})),o=t[0]-n.left,s=t.map((function(e,n){return 0==n?0:.5*(e+t[n-1])-o}));return{widths:i,total_width:t[r-1]-t[0]+n.left+n.right,start:s,x0:o}},get_x_padding:function(e){var t=e.length;return{left:.5*(e[1]-e[0]),right:.5*(e[t-1]-e[t-2])}},get_y_plotting_data:function(e){var t=e.map(this.scales.y.scale),n=this.get_y_padding(t),r=e.length,i=t.map((function(e,i){return 0==i?.5*-(t[1]-e)+n.bottom:i==r-1?.5*-(e-t[i-1])+n.top:.5*-(t[i+1]-t[i-1])})),o=t[r-1]-n.top,s=t.map((function(e,n){return n==r-1?0:.5*(e+t[n+1])-o}));return{heights:i,total_height:t[0]-t[r-1]+n.top+n.bottom,start:s,y0:o}},get_y_padding:function(e){var t=e.length;return{bottom:.5*-(e[1]-e[0]),top:.5*-(e[t-1]-e[t-2])}},get_element_fill:function(e){return null===e?this.model.get("null_color"):this.scales.color.scale(e)}}));e.exports={HeatMap:o}},function(e,t,n){n(1);var r=n(0),i=n(20),o=i.MarkModel.extend({defaults:r.extend({},i.MarkModel.prototype.defaults,{_model_name:"HeatMapModel",_view_name:"HeatMap",x:[],y:[],color:null,scales_metadata:{x:{orientation:"horizontal",dimension:"x"},y:{orientation:"vertical",dimension:"y"},color:{dimension:"color"}},null_color:"black"}),initialize:function(){o.__super__.initialize.apply(this,arguments),this.on_some_change(["x","y","color"],this.update_data,this),this.on_some_change(["preserve_domain"],this.update_domains,this),this.update_data(),this.update_domains()},update_data:function(){this.dirty=!0,this.mark_data={x:this.get_typed_field("x"),y:this.get_typed_field("y"),color:this.get_typed_field("color")},this.update_domains(),this.dirty=!1,this.trigger("data_updated")},update_domains:function(){if(this.mark_data){var e=this.get("scales"),t=e.x,n=e.y,r=e.color,i=[].concat.apply([],this.mark_data.color);this.get("preserve_domain").x?t.del_domain([],this.model_id+"_x"):t.compute_and_set_domain(this.mark_data.x,this.model_id+"_x"),this.get("preserve_domain").y?n.del_domain([],this.model_id+"_y"):n.compute_and_set_domain(this.mark_data.y,this.model_id+"_y"),null!=r&&(this.get("preserve_domain").color?r.del_domain([],this.model_id+"_color"):r.compute_and_set_domain(i,this.model_id+"_color"))}},get_data_dict:function(e,t){return e}});e.exports={HeatMapModel:o}},function(e,t,n){var r=n(9),i=n(0),o="^"+n(21).version,s=r.DOMWidgetModel.extend({defaults:function(){return i.extend(r.DOMWidgetModel.prototype.defaults(),{_model_name:"ToolbarModel",_view_name:"Toolbar",_model_module:"bqplot",_view_module:"bqplot",_model_module_version:o,_view_module_version:o,figure:void 0,_panning:!1,_panzoom:null})},panzoom:function(){var e=this.get("figure");if(this.get("_panning"))e&&(e.set("interaction",this.cached_interaction),e.save_changes()),this.set("_panning",!1),this.save_changes();else{if(e){this.cached_interaction=e.get("interaction");var t=this,n=this.get("_panzoom");n?(e.set("interaction",n),e.save_changes()):this._create_panzoom_model(e).then((function(n){t.set("_panzoom",n),t.save_changes(),e.set("interaction",n),e.save_changes()}))}this.set("_panning",!0),this.save_changes()}},reset:function(){var e=this.get("figure");this.get("_panning");if(e){e.set("interaction",this.cached_interaction),e.save_changes();var t=this.get("_panzoom");t.reset_scales(),t.close(),this.set("_panzoom",null),this.set("_panning",!1),this.save_changes()}},save_png:function(){var e=this.get("figure");e&&e.save_png()},_create_panzoom_model:function(e){return this.widget_manager.new_widget({model_name:"PanZoomModel",model_module:"bqplot",model_module_version:e.get("_model_module_version"),view_name:"PanZoom",view_module:"bqplot",view_module_version:e.get("_view_module_version")}).then((function(t){return Promise.all(e.get("marks")).then((function(e){for(var n=[],r=[],o=0;o<e.length;++o){var s=e[o].get("preserve_domain"),a=e[o].get("scales");i.each(a,(function(t,i){var l=e[o].get("scales_metadata")[i].dimension;"x"!==l||s[i]||n.push(a[i]),"y"!==l||s[i]||r.push(a[i])}))}return t.set("scales",{x:n,y:r}),t.save_changes(),t}))}))}},{serializers:i.extend({figure:{deserialize:r.unpack_models},_panzoom:{deserialize:r.unpack_models}},r.DOMWidgetModel.serializers)}),a=r.DOMWidgetView.extend({render:function(){var e=this;this.el.classList.add("jupyter-widget"),this.el.classList.add("widget-hbox");var t=document.createElement("button");t.classList.add("jupyter-widgets"),t.classList.add("jupyter-button"),t.classList.add("widget-toggle-button"),t.setAttribute("data-toggle","tooltip"),t.setAttribute("title","PanZoom"),t.onclick=function(t){t.preventDefault(),e.model.panzoom()};var n=document.createElement("i");n.className="fa fa-arrows",t.appendChild(n);var r=document.createElement("button");r.classList.add("jupyter-widgets"),r.classList.add("jupyter-button"),r.classList.add("widget-button"),r.setAttribute("data-toggle","tooltip"),r.setAttribute("title","Reset"),r.onclick=function(t){t.preventDefault(),e.model.reset()};var i=document.createElement("i");i.className="fa fa-refresh",r.appendChild(i);var o=document.createElement("button");o.classList.add("jupyter-widgets"),o.classList.add("jupyter-button"),o.classList.add("widget-button"),o.setAttribute("data-toggle","tooltip"),o.setAttribute("title","Save"),o.onclick=function(t){t.preventDefault(),e.model.save_png()};var s=document.createElement("i");s.className="fa fa-save",o.appendChild(s),this.el.appendChild(t),this.el.appendChild(r),this.el.appendChild(o),this._panzoom=t,this.update()},update:function(){this.model.get("_panning")?this._panzoom.classList.add("mod-active"):this._panzoom.classList.remove("mod-active")}});e.exports={Toolbar:a,ToolbarModel:s}},function(e,t,n){n(1);var r=n(0),i=n(20),o=i.MarkModel.extend({defaults:function(){return r.extend({},i.MarkModel.prototype.defaults,{_model_name:"GraphModel",_view_name:"Graph",x:[],y:[],color:null,hovered_point:null,scales_metadata:{x:{orientation:"horizontal",dimension:"x"},y:{orientation:"vertical",dimension:"y"},color:{dimension:"color"}},colors:[]})},initialize:function(){o.__super__.initialize.apply(this,arguments),this.on_some_change(["x","y","color","link_color","node_data","link_data","link_color"],this.update_data,this),this.on_some_change(["preserve_domain"],this.update_domains,this),this.update_data()},update_node_data:function(){var e=this.get("node_data"),t=this.get_typed_field("x"),n=this.get_typed_field("y"),r=this.get_typed_field("color"),i=this.get("scales"),o=(i.x,i.y,i.color);e.length>0&&"string"==typeof e[0]&&(e=e.map((function(e){return{label:e}}))),this.mark_data=[];var s=this;e.forEach((function(e,t){e.label=e.label||"N"+t,e.label_display=e.label_display||"center",e.shape=e.shape||"circle",e.shape_attrs=function(e,t){var n={};switch(e){case"circle":n.r=t.r||15;break;case"rect":n.width=t.width||25,n.height=t.height||.8*n.width,n.rx=t.rx||0,n.ry=t.ry||0;break;case"ellipse":n.rx=t.rx||20,n.ry=t.ry||.6*n.rx;break;default:console.log("Invalid shape passed - ",e)}return n}(e.shape,e.shape_attrs||{}),e.value=e.value||null,s.mark_data.push(e)})),0!==t.length&&0!==n.length&&(o&&(this.get("preserve_domain").color?o.del_domain([],this.model_id+"_color"):o.compute_and_set_domain(r,this.model_id+"_color")),this.mark_data.forEach((function(e,i){e.xval=t[i],e.yval=n[i],e.color=r[i]})))},update_link_data:function(){var e=this.get("scales").link_color;this.link_data=this.get("link_data");var t=this.get_typed_field("link_matrix"),n=this.get_typed_field("link_color"),r=this;void 0!==e&&n.length>0&&(t=n),0===this.link_data.length&&t.length>0&&t.forEach((function(e,t){e.forEach((function(e,n){null!==e&&r.link_data.push({source:t,target:n,value:e})}))}))},update_data:function(){this.dirty=!0,this.update_node_data(),this.update_link_data(),this.update_unique_ids(),this.update_domains(),this.dirty=!1,this.trigger("data_updated")},update_unique_ids:function(){},get_data_dict:function(e,t){return e},update_domains:function(){var e={x:"xval",y:"yval"};if(this.mark_data){var t=this.get("scales");for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];this.get("preserve_domain")[n]?r.del_domain([],this.model_id+n):r.compute_and_set_domain(this.mark_data.map((function(t){return t[n]||t[e[n]]})),this.model_id+n)}}}});e.exports={GraphModel:o}},function(e,t,n){var r=n(1),i=n(0),o=n(13),s=n(19).Mark.extend({render:function(){var e=s.__super__.render.apply(this),t=this;return this.selected_style=this.model.get("selected_style"),this.unselected_style=this.model.get("unselected_style"),this.selected_indices=this.model.get("selected"),this.hovered_style=this.model.get("hovered_style"),this.unhovered_style=this.model.get("unhovered_style"),this.hovered_index=this.model.get("hovered_point")?[this.model.get("hovered_point")]:null,this.display_el_classes=["element"],this.event_metadata={mouse_over:{msg_name:"hover",lookup_data:!1,hit_test:!0},element_clicked:{msg_name:"element_click",lookup_data:!1,hit_test:!0},parent_clicked:{msg_name:"background_click",hit_test:!1}},this.displayed.then((function(){t.parent.tooltip_div.node().appendChild(t.tooltip_div.node()),t.create_tooltip()})),this.d3el.attr("class","network"),this.arrow=this.parent.svg.append("defs").append("marker").attr("id","arrow").attr("refX",0).attr("refY",3).attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("path").attr("class","linkarrow").attr("d","M0,0 L0,6 L9,3 z"),e.then((function(){t.event_listeners={},t.process_interactions(),t.create_listeners(),t.compute_view_padding(),t.draw()}))},set_ranges:function(){var e=this.scales.x,t=this.scales.y;e&&e.set_range(this.parent.padded_range("x",e.model)),t&&t.set_range(this.parent.padded_range("y",t.model))},set_positional_scales:function(){this.x_scale=this.scales.x,this.y_scale=this.scales.y,this.x_scale||(this.x_scale=this.parent.scale_x),this.y_scale||(this.y_scale=this.parent.scale_y),this.listenTo(this.x_scale,"domain_changed",(function(){this.model.dirty||this.update_position()})),this.listenTo(this.y_scale,"domain_changed",(function(){this.model.dirty||this.update_position()}))},relayout:function(){this.set_ranges(),this.update_position()},update_position:function(){var e=this.scales.x,t=this.scales.y;this.set_ranges();e&&t&&(this.model.mark_data.forEach((function(n){n.x=e.scale(n.xval)+e.offset,n.y=t.scale(n.yval)+t.offset})),this.force_layout&&(this.force_layout.nodes(this.model.mark_data).links(this.model.link_data).start(),this.links&&this.links.data(this.force_layout.links()),this.nodes&&this.nodes.data(this.force_layout.nodes()),this.nodes&&this.links&&this.tick()))},initialize_additional_scales:function(){var e=this.scales.color;e&&(this.listenTo(e,"domain_changed",(function(){this.color_scale_updated()})),e.on("color_scale_range_changed",this.color_scale_updated,this));var t=this.scales.link_color;t&&this.listenTo(t,"domain_changed",(function(){this.link_color_scale_updated()}))},create_listeners:function(){s.__super__.create_listeners.apply(this),this.d3el.on("mouseover",i.bind((function(){this.event_dispatcher("mouse_over")}),this)).on("mousemove",i.bind((function(){this.event_dispatcher("mouse_move")}),this)).on("mouseout",i.bind((function(){this.event_dispatcher("mouse_out")}),this)),this.listenTo(this.model,"change:charge",this.update_charge),this.listenTo(this.model,"change:link_distance",this.update_link_distance),this.listenTo(this.model,"data_updated",this.data_updated,this),this.listenTo(this.model,"change:tooltip",this.create_tooltip,this),this.listenTo(this.model,"change:enable_hover",(function(){this.hide_tooltip()}),this),this.listenTo(this.model,"change:interactions",this.process_interactions),this.listenTo(this.model,"change:selected",this.update_selected),this.listenTo(this.model,"change:hovered_point",this.update_hovered),this.listenTo(this.model,"change:hovered_style",this.hovered_style_updated,this),this.listenTo(this.model,"change:unhovered_style",this.unhovered_style_updated,this),this.listenTo(this.parent,"bg_clicked",(function(){this.event_dispatcher("parent_clicked")}))},data_updated:function(){this.draw(),this.relayout()},get_node_color:function(e,t){var n=this.scales.color,r=this.model.get("colors"),i=r.length;return n&&void 0!==e.color?n.scale(e.color):r[t%i]},draw:function(){this.set_ranges();var e=this.scales.x,t=this.scales.y,n=(this.scales.color,this.scales.link_color);this.d3el.selectAll(".node").remove(),this.d3el.selectAll(".link").remove(),this.force_layout=r.layout.force().size([this.parent.width,this.parent.height]).linkDistance(this.model.get("link_distance")),e&&t&&this.model.mark_data.forEach((function(n){n.x=e.scale(n.xval)+e.offset,n.y=t.scale(n.yval)+t.offset})),this.force_layout.nodes(this.model.mark_data).links(this.model.link_data),e||t||this.force_layout.charge(this.model.get("charge")).on("tick",i.bind(this.tick,this)).start();var o=this.model.get("directed");this.links=this.d3el.selectAll(".link").data(this.force_layout.links()).enter().append("path").attr("class","link").style("stroke",(function(e){return n?n.scale(e.value):null})).style("stroke-width",(function(e){return e.link_width})).attr("marker-mid",o?"url(#arrow)":null);var s=this;this.nodes=this.d3el.selectAll(".node").data(this.force_layout.nodes()).enter().append("g").attr("class","node").call(this.force_layout.drag),this.nodes.append((function(e){return document.createElementNS(r.ns.prefix.svg,e.shape)})).attr("class","element").each((function(e){var t=r.select(this);for(var n in e.shape_attrs)t.attr(n,e.shape_attrs[n])})).style("fill",(function(e,t){return s.get_node_color(e,t)})),this.nodes.append("text").attr("class","label").attr("text-anchor",(function(e){return"center"===e.label_display?"middle":"start"})).attr("x",(function(e){var t=0;if("outside"===e.label_display)switch(e.shape){case"rect":t=e.shape_attrs.width/2+5;break;case"circle":t=e.shape_attrs.r+5;break;case"ellipse":t=e.shape_attrs.rx+5;break;default:t=0}return t})).attr("y",".31em").text((function(e){return e.label})).style("display",(function(e){return"none"===e.label_display?"none":"inline"})),this.nodes.on("click",i.bind((function(e,t){this.event_dispatcher("element_clicked",{data:e,index:t})}),this)),this.nodes.on("mouseover",i.bind((function(e,t){this.hover_handler({data:e,index:t})}),this)),this.nodes.on("mouseout",i.bind((function(){this.reset_hover()}),this))},color_scale_updated:function(){var e=this;this.nodes.selectAll(".element").style("fill",(function(t,n){return e.get_node_color(t,n)}))},link_color_scale_updated:function(){var e=this.scales.link_color;this.links.style("stroke",(function(t){return e?e.scale(t.value):null}))},process_interactions:function(){var e=this.model.get("interactions");i.isEmpty(e)?this.reset_interactions():(void 0!==e.click&&null!==e.click?"tooltip"===e.click?(this.event_listeners.element_clicked=function(){return this.refresh_tooltip(!0)},this.event_listeners.parent_clicked=this.hide_tooltip):"select"==e.click&&(this.event_listeners.parent_clicked=this.reset_selection,this.event_listeners.element_clicked=this.click_handler):this.reset_click(),void 0!==e.hover&&null!==e.hover?"tooltip"===e.hover&&(this.event_listeners.mouse_over=this.refresh_tooltip,this.event_listeners.mouse_move=this.move_tooltip,this.event_listeners.mouse_out=this.hide_tooltip):this.reset_hover())},reset_hover:function(){this.links.style("opacity",1),this.model.set("hovered_point",null),this.hovered_index=null,this.touch()},hover_handler:function(e){var t=e.data,n=e.index;this.model.get("highlight_links")?this.links.style("opacity",(function(e){return e.source.label===t.label||e.target.label===t.label?1:.1})):this.links.style("opacity",1),this.model.set("hovered_point",n,{updated_view:this}),this.touch()},reset_selection:function(){this.model.set("selected",null),this.selected_indices=null,this.touch()},click_handler:function(e){e.data;var t=e.index,n=this.model.get("selected"),i=n?o.deepCopy(n):[],s=i.indexOf(t),a=r.event.ctrlKey||r.event.metaKey;s>-1&&a?i.splice(s,1):a?i.push(t):(i=[]).push(t),this.model.set("selected",0===i.length?null:i,{updated_view:this}),this.touch(),r.event||(r.event=window.event);var l=r.event;void 0!==l.cancelBubble&&(l.cancelBubble=!0),l.stopPropagation&&l.stopPropagation(),l.preventDefault()},hovered_style_updated:function(e,t){this.hovered_style=t,this.clear_style(e.previous("hovered_style"),this.hovered_index),this.style_updated(t,this.hovered_index)},unhovered_style_updated:function(e,t){this.unhovered_style=t;var n=this.hovered_index,r=n?i.range(this.model.mark_data.length).filter((function(e){return-1===n.indexOf(e)})):[];this.clear_style(e.previous("unhovered_style"),r),this.style_updated(t,r)},update_selected:function(e,t){this.selected_indices=t,this.apply_styles()},update_hovered:function(e,t){this.hovered_index=null===t?t:[t],this.apply_styles()},apply_styles:function(e){null==e&&(e=[this.selected_style,this.unselected_style,this.hovered_style,this.unhovered_style]),s.__super__.apply_styles.apply(this,[e]);var t=i.range(this.model.mark_data.length);this.set_style_on_elements(this.hovered_style,this.hovered_index);var n=this.hovered_index?i.difference(t,this.hovered_index):[];this.set_style_on_elements(this.unhovered_style,n)},clear_style:function(e,t){var n=this.d3el.selectAll(".element");t&&(n=n.filter((function(e,n){return-1!==t.indexOf(n)})));var r={};for(var i in e)r[i]=null;n.style(r)},set_style_on_elements:function(e,t){if(t&&0!==t.length&&(void 0===e||0!==Object.keys(e).length)){var n=this.d3el.selectAll(".element");(n=n.filter((function(e,n){return-1!==t.indexOf(n)}))).style(e)}},compute_view_padding:function(){var e=r.max(this.model.mark_data.map((function(e){return(e.shape_attrs.r||e.shape_attrs.width/2||e.shape_attrs.rx)+1}))),t=r.max(this.model.mark_data.map((function(e){return(e.shape_attrs.r||e.shape_attrs.height/2||e.shape_attrs.ry)+1})));e===this.x_padding&&t===this.y_padding||(this.x_padding=e,this.y_padding=e,this.trigger("mark_padding_updated"))},selected_deleter:function(){r.event.stopPropagation()},update_link_distance:function(){var e=this.scales.x,t=this.scales.y,n=this.model.get("link_distance");e||t||this.force_layout.linkDistance(n).start()},update_charge:function(){var e=this.scales.x,t=this.scales.y,n=this.model.get("charge");e||t||this.force_layout.charge(n).start()},link_arc:function(e){var t=e.target.x-e.source.x,n=e.target.y-e.source.y,r=Math.sqrt(t*t+n*n);return"M"+e.source.x+","+e.source.y+"A"+r+","+r+" 0 0,1 "+e.target.x+","+e.target.y},link_line:function(e){var t=(e.source.x+e.target.x)/2,n=(e.source.y+e.target.y)/2;return"M"+e.source.x+","+e.source.y+"L"+t+","+n+"L"+e.target.x+","+e.target.y},link_slant_line:function(e){var t=(e.source.x+e.target.x)/2;return"M"+e.source.x+","+e.source.y+"L"+t+","+e.target.y+"L"+e.target.x+","+e.target.y},tick:function(){var e=this.model.get("link_type");this.nodes.attr("transform",(function(e){return"translate("+e.x+","+e.y+")"})),this.nodes.select("rect").attr("transform",(function(e){return"translate("+-e.shape_attrs.width/2+","+-e.shape_attrs.height/2+")"}));var t=this.link_arc;switch(e){case"arc":t=this.link_arc;break;case"line":t=this.link_line;break;case"slant_line":t=this.link_slant_line;break;default:t=this.link_arc}this.links.attr("d",(function(e){return t(e)}))}});e.exports={Graph:s}},function(e,t,n){n(1);var r=n(19),i=(n(13),n(0),r.Mark.extend({render:function(){var e=i.__super__.render.apply(this),t=this.d3el||this.el;window.last_el=t,window.last_image=this,this.im=t.append("image").attr("x",0).attr("y",0).attr("width",1).attr("height",1).attr("preserveAspectRatio","none"),this.update_image();var n=this;return e.then((function(){n.create_listeners(),n.listenTo(n.parent,"margin_updated",(function(){n.draw()}))}))},set_positional_scales:function(){var e=this.scales.x,t=this.scales.y;this.listenTo(e,"domain_changed",(function(){this.model.dirty||this.draw()})),this.listenTo(t,"domain_changed",(function(){this.model.dirty||this.draw()}))},set_ranges:function(){var e=this.scales.x,t=this.scales.y;e&&e.set_range(this.parent.padded_range("x",e.model)),t&&t.set_range(this.parent.padded_range("y",t.model))},create_listeners:function(){i.__super__.create_listeners.apply(this),this.listenTo(this.model,"change:image",this.update_image,this),this.listenTo(this.model,"data_updated",(function(){this.draw(!0)}),this)},update_image:function(){this.im.attr("href")&&URL.revokeObjectURL(this.im.attr("href"));var e=this.model.get("image"),t=new Blob([e.get("value")],{type:"image/"+e.get("format")}),n=URL.createObjectURL(t);this.im.attr("href",n)},remove:function(){URL.revokeObjectURL(this.im.attr("href")),i.__super__.remove.apply(this)},relayout:function(){this.draw(!0)},draw:function(e){this.set_ranges();var t=this.scales.x?this.scales.x:this.parent.scale_x,n=this.scales.y?this.scales.y:this.parent.scale_y,r=e?this.parent.model.get("animation_duration"):0,i=this.d3el||this.el,o=this.model.mark_data.x.map(t.scale),s=this.model.mark_data.y.map(n.scale);i.selectAll("image").transition().duration(r).attr("transform",(function(e){return"translate("+(o[0]+t.offset)+","+(s[1]+n.offset)+") scale("+(o[1]-o[0])+", "+(s[0]-s[1])+")"}))}}));e.exports={Image:i}},function(e,t,n){var r=n(9),i=(n(1),n(0)),o=n(20),s=o.MarkModel.extend({defaults:function(){return i.extend(o.MarkModel.prototype.defaults(),{_model_name:"ImageModel",_view_name:"Image",x:1,y:1,scales_metadata:{x:{orientation:"horizontal",dimension:"x"},y:{orientation:"vertical",dimension:"y"}}})},initialize:function(){s.__super__.initialize.apply(this,arguments),this.on_some_change(["x","y"],this.update_data,this),this.on_some_change(["preserve_domain"],this.update_domains,this),this.update_data()},update_data:function(){this.mark_data={x:this.get_typed_field("x"),y:this.get_typed_field("y")},this.update_domains(),this.trigger("data_updated")},update_domains:function(){if(this.mark_data){var e=this.get("scales"),t=e.x,n=e.y;t&&(this.get("preserve_domain").x?t.del_domain([],this.model_id+"_x"):t.compute_and_set_domain(this.mark_data.x,this.model_id+"_x")),n&&(this.get("preserve_domain").y?n.del_domain([],this.model_id+"_y"):n.compute_and_set_domain(this.mark_data.y,this.model_id+"_y"))}}},{serializers:i.extend({image:{deserialize:r.unpack_models}},o.MarkModel.serializers)});e.exports={ImageModel:s}},function(e,t,n){var r=n(555);"string"==typeof r&&(r=[[e.i,r,""]]);var i={transform:void 0};n(40)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(t=e.exports=n(25)(!1)).i(n(556),""),t.i(n(558),""),t.push([e.i,"/* Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n",""])},function(e,t,n){(t=e.exports=n(25)(!1)).i(n(557),""),t.push([e.i,"/*-----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|----------------------------------------------------------------------------*/\n\n/*\nThis file is copied from the JupyterLab project to define default styling for\nwhen the widget styling is compiled down to eliminate CSS variables. We make one\nchange - we comment out the font import below.\n*/\n\n/*\nThe following CSS variables define the main, public API for styling JupyterLab.\nThese variables should be used by all plugins wherever possible. In other\nwords, plugins should not define custom colors, sizes, etc unless absolutely\nnecessary. This enables users to change the visual theme of JupyterLab\nby changing these variables.\n\nMany variables appear in an ordered sequence (0,1,2,3). These sequences\nare designed to work well together, so for example, `--jp-border-color1` should\nbe used with `--jp-layout-color1`. The numbers have the following meanings:\n\n* 0: super-primary, reserved for special emphasis\n* 1: primary, most important under normal situations\n* 2: secondary, next most important under normal situations\n* 3: tertiary, next most important under normal situations\n\nThroughout JupyterLab, we are mostly following principles from Google's\nMaterial Design when selecting colors. We are not, however, following\nall of MD as it is not optimized for dense, information rich UIs.\n*/\n\n\n/*\n * Optional monospace font for input/output prompt.\n */\n /* Commented out in ipywidgets since we don't need it. */\n/* @import url('https://fonts.googleapis.com/css?family=Roboto+Mono'); */\n\n/*\n * Added for compabitility with output area\n */\n:root {\n  --jp-icon-search: none;\n  --jp-ui-select-caret: none;\n}\n\n\n:root {\n\n  /* Borders\n\n  The following variables, specify the visual styling of borders in JupyterLab.\n   */\n\n  --jp-border-width: 1px;\n  --jp-border-color0: var(--md-grey-700);\n  --jp-border-color1: var(--md-grey-500);\n  --jp-border-color2: var(--md-grey-300);\n  --jp-border-color3: var(--md-grey-100);\n\n  /* UI Fonts\n\n  The UI font CSS variables are used for the typography all of the JupyterLab\n  user interface elements that are not directly user generated content.\n  */\n\n  --jp-ui-font-scale-factor: 1.2;\n  --jp-ui-font-size0: calc(var(--jp-ui-font-size1)/var(--jp-ui-font-scale-factor));\n  --jp-ui-font-size1: 13px; /* Base font size */\n  --jp-ui-font-size2: calc(var(--jp-ui-font-size1)*var(--jp-ui-font-scale-factor));\n  --jp-ui-font-size3: calc(var(--jp-ui-font-size2)*var(--jp-ui-font-scale-factor));\n  --jp-ui-icon-font-size: 14px; /* Ensures px perfect FontAwesome icons */\n  --jp-ui-font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n\n  /* Use these font colors against the corresponding main layout colors.\n     In a light theme, these go from dark to light.\n  */\n\n  --jp-ui-font-color0: rgba(0,0,0,1.0);\n  --jp-ui-font-color1: rgba(0,0,0,0.8);\n  --jp-ui-font-color2: rgba(0,0,0,0.5);\n  --jp-ui-font-color3: rgba(0,0,0,0.3);\n\n  /* Use these against the brand/accent/warn/error colors.\n     These will typically go from light to darker, in both a dark and light theme\n   */\n\n  --jp-inverse-ui-font-color0: rgba(255,255,255,1);\n  --jp-inverse-ui-font-color1: rgba(255,255,255,1.0);\n  --jp-inverse-ui-font-color2: rgba(255,255,255,0.7);\n  --jp-inverse-ui-font-color3: rgba(255,255,255,0.5);\n\n  /* Content Fonts\n\n  Content font variables are used for typography of user generated content.\n  */\n\n  --jp-content-font-size: 13px;\n  --jp-content-line-height: 1.5;\n  --jp-content-font-color0: black;\n  --jp-content-font-color1: black;\n  --jp-content-font-color2: var(--md-grey-700);\n  --jp-content-font-color3: var(--md-grey-500);\n\n  --jp-ui-font-scale-factor: 1.2;\n  --jp-ui-font-size0: calc(var(--jp-ui-font-size1)/var(--jp-ui-font-scale-factor));\n  --jp-ui-font-size1: 13px; /* Base font size */\n  --jp-ui-font-size2: calc(var(--jp-ui-font-size1)*var(--jp-ui-font-scale-factor));\n  --jp-ui-font-size3: calc(var(--jp-ui-font-size2)*var(--jp-ui-font-scale-factor));\n\n  --jp-code-font-size: 13px;\n  --jp-code-line-height: 1.307;\n  --jp-code-padding: 5px;\n  --jp-code-font-family: monospace;\n\n\n  /* Layout\n\n  The following are the main layout colors use in JupyterLab. In a light\n  theme these would go from light to dark.\n  */\n\n  --jp-layout-color0: white;\n  --jp-layout-color1: white;\n  --jp-layout-color2: var(--md-grey-200);\n  --jp-layout-color3: var(--md-grey-400);\n\n  /* Brand/accent */\n\n  --jp-brand-color0: var(--md-blue-700);\n  --jp-brand-color1: var(--md-blue-500);\n  --jp-brand-color2: var(--md-blue-300);\n  --jp-brand-color3: var(--md-blue-100);\n\n  --jp-accent-color0: var(--md-green-700);\n  --jp-accent-color1: var(--md-green-500);\n  --jp-accent-color2: var(--md-green-300);\n  --jp-accent-color3: var(--md-green-100);\n\n  /* State colors (warn, error, success, info) */\n\n  --jp-warn-color0: var(--md-orange-700);\n  --jp-warn-color1: var(--md-orange-500);\n  --jp-warn-color2: var(--md-orange-300);\n  --jp-warn-color3: var(--md-orange-100);\n\n  --jp-error-color0: var(--md-red-700);\n  --jp-error-color1: var(--md-red-500);\n  --jp-error-color2: var(--md-red-300);\n  --jp-error-color3: var(--md-red-100);\n\n  --jp-success-color0: var(--md-green-700);\n  --jp-success-color1: var(--md-green-500);\n  --jp-success-color2: var(--md-green-300);\n  --jp-success-color3: var(--md-green-100);\n\n  --jp-info-color0: var(--md-cyan-700);\n  --jp-info-color1: var(--md-cyan-500);\n  --jp-info-color2: var(--md-cyan-300);\n  --jp-info-color3: var(--md-cyan-100);\n\n  /* Cell specific styles */\n\n  --jp-cell-padding: 5px;\n  --jp-cell-editor-background: #f7f7f7;\n  --jp-cell-editor-border-color: #cfcfcf;\n  --jp-cell-editor-background-edit: var(--jp-ui-layout-color1);\n  --jp-cell-editor-border-color-edit: var(--jp-brand-color1);\n  --jp-cell-prompt-width: 100px;\n  --jp-cell-prompt-font-family: 'Roboto Mono', monospace;\n  --jp-cell-prompt-letter-spacing: 0px;\n  --jp-cell-prompt-opacity: 1.0;\n  --jp-cell-prompt-opacity-not-active: 0.4;\n  --jp-cell-prompt-font-color-not-active: var(--md-grey-700);\n  /* A custom blend of MD grey and blue 600\n   * See https://meyerweb.com/eric/tools/color-blend/#546E7A:1E88E5:5:hex */\n  --jp-cell-inprompt-font-color: #307FC1;\n  /* A custom blend of MD grey and orange 600\n   * https://meyerweb.com/eric/tools/color-blend/#546E7A:F4511E:5:hex */\n  --jp-cell-outprompt-font-color: #BF5B3D;\n\n  /* Notebook specific styles */\n\n  --jp-notebook-padding: 10px;\n  --jp-notebook-scroll-padding: 100px;\n\n  /* Console specific styles */\n\n  --jp-console-background: var(--md-grey-100);\n\n  /* Toolbar specific styles */\n\n  --jp-toolbar-border-color: var(--md-grey-400);\n  --jp-toolbar-micro-height: 8px;\n  --jp-toolbar-background: var(--jp-layout-color0);\n  --jp-toolbar-box-shadow: 0px 0px 2px 0px rgba(0,0,0,0.24);\n  --jp-toolbar-header-margin: 4px 4px 0px 4px;\n  --jp-toolbar-active-background: var(--md-grey-300);\n}\n",""])},function(e,t,n){(e.exports=n(25)(!1)).push([e.i,'/**\n * The material design colors are adapted from google-material-color v1.2.6\n * https://github.com/danlevan/google-material-color\n * https://github.com/danlevan/google-material-color/blob/f67ca5f4028b2f1b34862f64b0ca67323f91b088/dist/palette.var.css\n *\n * The license for the material design color CSS variables is as follows (see\n * https://github.com/danlevan/google-material-color/blob/f67ca5f4028b2f1b34862f64b0ca67323f91b088/LICENSE)\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2014 Dan Le Van\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the "Software"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n:root {\n  --md-red-50: #FFEBEE;\n  --md-red-100: #FFCDD2;\n  --md-red-200: #EF9A9A;\n  --md-red-300: #E57373;\n  --md-red-400: #EF5350;\n  --md-red-500: #F44336;\n  --md-red-600: #E53935;\n  --md-red-700: #D32F2F;\n  --md-red-800: #C62828;\n  --md-red-900: #B71C1C;\n  --md-red-A100: #FF8A80;\n  --md-red-A200: #FF5252;\n  --md-red-A400: #FF1744;\n  --md-red-A700: #D50000;\n\n  --md-pink-50: #FCE4EC;\n  --md-pink-100: #F8BBD0;\n  --md-pink-200: #F48FB1;\n  --md-pink-300: #F06292;\n  --md-pink-400: #EC407A;\n  --md-pink-500: #E91E63;\n  --md-pink-600: #D81B60;\n  --md-pink-700: #C2185B;\n  --md-pink-800: #AD1457;\n  --md-pink-900: #880E4F;\n  --md-pink-A100: #FF80AB;\n  --md-pink-A200: #FF4081;\n  --md-pink-A400: #F50057;\n  --md-pink-A700: #C51162;\n\n  --md-purple-50: #F3E5F5;\n  --md-purple-100: #E1BEE7;\n  --md-purple-200: #CE93D8;\n  --md-purple-300: #BA68C8;\n  --md-purple-400: #AB47BC;\n  --md-purple-500: #9C27B0;\n  --md-purple-600: #8E24AA;\n  --md-purple-700: #7B1FA2;\n  --md-purple-800: #6A1B9A;\n  --md-purple-900: #4A148C;\n  --md-purple-A100: #EA80FC;\n  --md-purple-A200: #E040FB;\n  --md-purple-A400: #D500F9;\n  --md-purple-A700: #AA00FF;\n\n  --md-deep-purple-50: #EDE7F6;\n  --md-deep-purple-100: #D1C4E9;\n  --md-deep-purple-200: #B39DDB;\n  --md-deep-purple-300: #9575CD;\n  --md-deep-purple-400: #7E57C2;\n  --md-deep-purple-500: #673AB7;\n  --md-deep-purple-600: #5E35B1;\n  --md-deep-purple-700: #512DA8;\n  --md-deep-purple-800: #4527A0;\n  --md-deep-purple-900: #311B92;\n  --md-deep-purple-A100: #B388FF;\n  --md-deep-purple-A200: #7C4DFF;\n  --md-deep-purple-A400: #651FFF;\n  --md-deep-purple-A700: #6200EA;\n\n  --md-indigo-50: #E8EAF6;\n  --md-indigo-100: #C5CAE9;\n  --md-indigo-200: #9FA8DA;\n  --md-indigo-300: #7986CB;\n  --md-indigo-400: #5C6BC0;\n  --md-indigo-500: #3F51B5;\n  --md-indigo-600: #3949AB;\n  --md-indigo-700: #303F9F;\n  --md-indigo-800: #283593;\n  --md-indigo-900: #1A237E;\n  --md-indigo-A100: #8C9EFF;\n  --md-indigo-A200: #536DFE;\n  --md-indigo-A400: #3D5AFE;\n  --md-indigo-A700: #304FFE;\n\n  --md-blue-50: #E3F2FD;\n  --md-blue-100: #BBDEFB;\n  --md-blue-200: #90CAF9;\n  --md-blue-300: #64B5F6;\n  --md-blue-400: #42A5F5;\n  --md-blue-500: #2196F3;\n  --md-blue-600: #1E88E5;\n  --md-blue-700: #1976D2;\n  --md-blue-800: #1565C0;\n  --md-blue-900: #0D47A1;\n  --md-blue-A100: #82B1FF;\n  --md-blue-A200: #448AFF;\n  --md-blue-A400: #2979FF;\n  --md-blue-A700: #2962FF;\n\n  --md-light-blue-50: #E1F5FE;\n  --md-light-blue-100: #B3E5FC;\n  --md-light-blue-200: #81D4FA;\n  --md-light-blue-300: #4FC3F7;\n  --md-light-blue-400: #29B6F6;\n  --md-light-blue-500: #03A9F4;\n  --md-light-blue-600: #039BE5;\n  --md-light-blue-700: #0288D1;\n  --md-light-blue-800: #0277BD;\n  --md-light-blue-900: #01579B;\n  --md-light-blue-A100: #80D8FF;\n  --md-light-blue-A200: #40C4FF;\n  --md-light-blue-A400: #00B0FF;\n  --md-light-blue-A700: #0091EA;\n\n  --md-cyan-50: #E0F7FA;\n  --md-cyan-100: #B2EBF2;\n  --md-cyan-200: #80DEEA;\n  --md-cyan-300: #4DD0E1;\n  --md-cyan-400: #26C6DA;\n  --md-cyan-500: #00BCD4;\n  --md-cyan-600: #00ACC1;\n  --md-cyan-700: #0097A7;\n  --md-cyan-800: #00838F;\n  --md-cyan-900: #006064;\n  --md-cyan-A100: #84FFFF;\n  --md-cyan-A200: #18FFFF;\n  --md-cyan-A400: #00E5FF;\n  --md-cyan-A700: #00B8D4;\n\n  --md-teal-50: #E0F2F1;\n  --md-teal-100: #B2DFDB;\n  --md-teal-200: #80CBC4;\n  --md-teal-300: #4DB6AC;\n  --md-teal-400: #26A69A;\n  --md-teal-500: #009688;\n  --md-teal-600: #00897B;\n  --md-teal-700: #00796B;\n  --md-teal-800: #00695C;\n  --md-teal-900: #004D40;\n  --md-teal-A100: #A7FFEB;\n  --md-teal-A200: #64FFDA;\n  --md-teal-A400: #1DE9B6;\n  --md-teal-A700: #00BFA5;\n\n  --md-green-50: #E8F5E9;\n  --md-green-100: #C8E6C9;\n  --md-green-200: #A5D6A7;\n  --md-green-300: #81C784;\n  --md-green-400: #66BB6A;\n  --md-green-500: #4CAF50;\n  --md-green-600: #43A047;\n  --md-green-700: #388E3C;\n  --md-green-800: #2E7D32;\n  --md-green-900: #1B5E20;\n  --md-green-A100: #B9F6CA;\n  --md-green-A200: #69F0AE;\n  --md-green-A400: #00E676;\n  --md-green-A700: #00C853;\n\n  --md-light-green-50: #F1F8E9;\n  --md-light-green-100: #DCEDC8;\n  --md-light-green-200: #C5E1A5;\n  --md-light-green-300: #AED581;\n  --md-light-green-400: #9CCC65;\n  --md-light-green-500: #8BC34A;\n  --md-light-green-600: #7CB342;\n  --md-light-green-700: #689F38;\n  --md-light-green-800: #558B2F;\n  --md-light-green-900: #33691E;\n  --md-light-green-A100: #CCFF90;\n  --md-light-green-A200: #B2FF59;\n  --md-light-green-A400: #76FF03;\n  --md-light-green-A700: #64DD17;\n\n  --md-lime-50: #F9FBE7;\n  --md-lime-100: #F0F4C3;\n  --md-lime-200: #E6EE9C;\n  --md-lime-300: #DCE775;\n  --md-lime-400: #D4E157;\n  --md-lime-500: #CDDC39;\n  --md-lime-600: #C0CA33;\n  --md-lime-700: #AFB42B;\n  --md-lime-800: #9E9D24;\n  --md-lime-900: #827717;\n  --md-lime-A100: #F4FF81;\n  --md-lime-A200: #EEFF41;\n  --md-lime-A400: #C6FF00;\n  --md-lime-A700: #AEEA00;\n\n  --md-yellow-50: #FFFDE7;\n  --md-yellow-100: #FFF9C4;\n  --md-yellow-200: #FFF59D;\n  --md-yellow-300: #FFF176;\n  --md-yellow-400: #FFEE58;\n  --md-yellow-500: #FFEB3B;\n  --md-yellow-600: #FDD835;\n  --md-yellow-700: #FBC02D;\n  --md-yellow-800: #F9A825;\n  --md-yellow-900: #F57F17;\n  --md-yellow-A100: #FFFF8D;\n  --md-yellow-A200: #FFFF00;\n  --md-yellow-A400: #FFEA00;\n  --md-yellow-A700: #FFD600;\n\n  --md-amber-50: #FFF8E1;\n  --md-amber-100: #FFECB3;\n  --md-amber-200: #FFE082;\n  --md-amber-300: #FFD54F;\n  --md-amber-400: #FFCA28;\n  --md-amber-500: #FFC107;\n  --md-amber-600: #FFB300;\n  --md-amber-700: #FFA000;\n  --md-amber-800: #FF8F00;\n  --md-amber-900: #FF6F00;\n  --md-amber-A100: #FFE57F;\n  --md-amber-A200: #FFD740;\n  --md-amber-A400: #FFC400;\n  --md-amber-A700: #FFAB00;\n\n  --md-orange-50: #FFF3E0;\n  --md-orange-100: #FFE0B2;\n  --md-orange-200: #FFCC80;\n  --md-orange-300: #FFB74D;\n  --md-orange-400: #FFA726;\n  --md-orange-500: #FF9800;\n  --md-orange-600: #FB8C00;\n  --md-orange-700: #F57C00;\n  --md-orange-800: #EF6C00;\n  --md-orange-900: #E65100;\n  --md-orange-A100: #FFD180;\n  --md-orange-A200: #FFAB40;\n  --md-orange-A400: #FF9100;\n  --md-orange-A700: #FF6D00;\n\n  --md-deep-orange-50: #FBE9E7;\n  --md-deep-orange-100: #FFCCBC;\n  --md-deep-orange-200: #FFAB91;\n  --md-deep-orange-300: #FF8A65;\n  --md-deep-orange-400: #FF7043;\n  --md-deep-orange-500: #FF5722;\n  --md-deep-orange-600: #F4511E;\n  --md-deep-orange-700: #E64A19;\n  --md-deep-orange-800: #D84315;\n  --md-deep-orange-900: #BF360C;\n  --md-deep-orange-A100: #FF9E80;\n  --md-deep-orange-A200: #FF6E40;\n  --md-deep-orange-A400: #FF3D00;\n  --md-deep-orange-A700: #DD2C00;\n\n  --md-brown-50: #EFEBE9;\n  --md-brown-100: #D7CCC8;\n  --md-brown-200: #BCAAA4;\n  --md-brown-300: #A1887F;\n  --md-brown-400: #8D6E63;\n  --md-brown-500: #795548;\n  --md-brown-600: #6D4C41;\n  --md-brown-700: #5D4037;\n  --md-brown-800: #4E342E;\n  --md-brown-900: #3E2723;\n\n  --md-grey-50: #FAFAFA;\n  --md-grey-100: #F5F5F5;\n  --md-grey-200: #EEEEEE;\n  --md-grey-300: #E0E0E0;\n  --md-grey-400: #BDBDBD;\n  --md-grey-500: #9E9E9E;\n  --md-grey-600: #757575;\n  --md-grey-700: #616161;\n  --md-grey-800: #424242;\n  --md-grey-900: #212121;\n\n  --md-blue-grey-50: #ECEFF1;\n  --md-blue-grey-100: #CFD8DC;\n  --md-blue-grey-200: #B0BEC5;\n  --md-blue-grey-300: #90A4AE;\n  --md-blue-grey-400: #78909C;\n  --md-blue-grey-500: #607D8B;\n  --md-blue-grey-600: #546E7A;\n  --md-blue-grey-700: #455A64;\n  --md-blue-grey-800: #37474F;\n  --md-blue-grey-900: #263238;\n}',""])},function(e,t,n){(t=e.exports=n(25)(!1)).i(n(559),""),t.push([e.i,'/* Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n/*\n * We assume that the CSS variables in\n * https://github.com/jupyterlab/jupyterlab/blob/master/src/default-theme/variables.css\n * have been defined.\n */\n\n:root {\n    --jp-widgets-color: var(--jp-content-font-color1);\n    --jp-widgets-label-color: var(--jp-widgets-color);\n    --jp-widgets-readout-color: var(--jp-widgets-color);\n    --jp-widgets-font-size: var(--jp-ui-font-size1);\n    --jp-widgets-margin: 2px;\n    --jp-widgets-inline-height: 28px;\n    --jp-widgets-inline-width: 300px;\n    --jp-widgets-inline-width-short: calc(var(--jp-widgets-inline-width) / 2 - var(--jp-widgets-margin));\n    --jp-widgets-inline-width-tiny: calc(var(--jp-widgets-inline-width-short) / 2 - var(--jp-widgets-margin));\n    --jp-widgets-inline-margin: 4px; /* margin between inline elements */\n    --jp-widgets-inline-label-width: 80px;\n    --jp-widgets-border-width: var(--jp-border-width);\n    --jp-widgets-vertical-height: 200px;\n    --jp-widgets-horizontal-tab-height: 24px;\n    --jp-widgets-horizontal-tab-width: 144px;\n    --jp-widgets-horizontal-tab-top-border: 2px;\n    --jp-widgets-progress-thickness: 20px;\n    --jp-widgets-container-padding: 15px;\n    --jp-widgets-input-padding: 4px;\n    --jp-widgets-radio-item-height-adjustment: 8px;\n    --jp-widgets-radio-item-height: calc(var(--jp-widgets-inline-height) - var(--jp-widgets-radio-item-height-adjustment));\n    --jp-widgets-slider-track-thickness: 4px;\n    --jp-widgets-slider-border-width: var(--jp-widgets-border-width);\n    --jp-widgets-slider-handle-size: 16px;\n    --jp-widgets-slider-handle-border-color: var(--jp-border-color1);\n    --jp-widgets-slider-handle-background-color: var(--jp-layout-color1);\n    --jp-widgets-slider-active-handle-color: var(--jp-brand-color1);\n    --jp-widgets-menu-item-height: 24px;\n    --jp-widgets-dropdown-arrow: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxOCAxOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTggMTg7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDpub25lO30KPC9zdHlsZT4KPHBhdGggZD0iTTUuMiw1LjlMOSw5LjdsMy44LTMuOGwxLjIsMS4ybC00LjksNWwtNC45LTVMNS4yLDUuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTAtMC42aDE4djE4SDBWLTAuNnoiLz4KPC9zdmc+Cg");\n    --jp-widgets-input-color: var(--jp-ui-font-color1);\n    --jp-widgets-input-background-color: var(--jp-layout-color1);\n    --jp-widgets-input-border-color: var(--jp-border-color1);\n    --jp-widgets-input-focus-border-color: var(--jp-brand-color2);\n    --jp-widgets-input-border-width: var(--jp-widgets-border-width);\n    --jp-widgets-disabled-opacity: 0.6;\n\n    /* From Material Design Lite */\n    --md-shadow-key-umbra-opacity: 0.2;\n    --md-shadow-key-penumbra-opacity: 0.14;\n    --md-shadow-ambient-shadow-opacity: 0.12;\n}\n\n.jupyter-widgets {\n    margin: var(--jp-widgets-margin);\n    box-sizing: border-box;\n    color: var(--jp-widgets-color);\n    overflow: visible;\n}\n\n.jupyter-widgets.jupyter-widgets-disconnected::before {\n    line-height: var(--jp-widgets-inline-height);\n    height: var(--jp-widgets-inline-height);\n}\n\n.jp-Output-result > .jupyter-widgets {\n    margin-left: 0;\n    margin-right: 0;\n}\n\n/* vbox and hbox */\n\n.widget-inline-hbox {\n    /* Horizontal widgets */\n    box-sizing: border-box;\n    display: flex;\n    flex-direction: row;\n    align-items: baseline;\n}\n\n.widget-inline-vbox {\n    /* Vertical Widgets */\n    box-sizing: border-box;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n}\n\n.widget-box {\n    box-sizing: border-box;\n    display: flex;\n    margin: 0;\n    overflow: auto;\n}\n\n.widget-gridbox {\n    box-sizing: border-box;\n    display: grid;\n    margin: 0;\n    overflow: auto;\n}\n\n.widget-hbox {\n    flex-direction: row;\n}\n\n.widget-vbox {\n    flex-direction: column;\n}\n\n/* General Button Styling */\n\n.jupyter-button {\n    padding-left: 10px;\n    padding-right: 10px;\n    padding-top: 0px;\n    padding-bottom: 0px;\n    display: inline-block;\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    text-align: center;\n    font-size: var(--jp-widgets-font-size);\n    cursor: pointer;\n\n    height: var(--jp-widgets-inline-height);\n    border: 0px solid;\n    line-height: var(--jp-widgets-inline-height);\n    box-shadow: none;\n\n    color: var(--jp-ui-font-color1);\n    background-color: var(--jp-layout-color2);\n    border-color: var(--jp-border-color2);\n    border: none;\n    user-select: none;\n}\n\n.jupyter-button i.fa {\n    margin-right: var(--jp-widgets-inline-margin);\n    pointer-events: none;\n}\n\n.jupyter-button:empty:before {\n    content: "\\200B"; /* zero-width space */\n}\n\n.jupyter-widgets.jupyter-button:disabled {\n    opacity: var(--jp-widgets-disabled-opacity);\n}\n\n.jupyter-button i.fa.center {\n    margin-right: 0;\n}\n\n.jupyter-button:hover:enabled, .jupyter-button:focus:enabled {\n    /* MD Lite 2dp shadow */\n    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, var(--md-shadow-key-penumbra-opacity)),\n                0 3px 1px -2px rgba(0, 0, 0, var(--md-shadow-key-umbra-opacity)),\n                0 1px 5px 0 rgba(0, 0, 0, var(--md-shadow-ambient-shadow-opacity));\n}\n\n.jupyter-button:active, .jupyter-button.mod-active {\n    /* MD Lite 4dp shadow */\n    box-shadow: 0 4px 5px 0 rgba(0, 0, 0, var(--md-shadow-key-penumbra-opacity)),\n                0 1px 10px 0 rgba(0, 0, 0, var(--md-shadow-ambient-shadow-opacity)),\n                0 2px 4px -1px rgba(0, 0, 0, var(--md-shadow-key-umbra-opacity));\n    color: var(--jp-ui-font-color1);\n    background-color: var(--jp-layout-color3);\n}\n\n.jupyter-button:focus:enabled {\n    outline: 1px solid var(--jp-widgets-input-focus-border-color);\n}\n\n/* Button "Primary" Styling */\n\n.jupyter-button.mod-primary {\n    color: var(--jp-inverse-ui-font-color1);\n    background-color: var(--jp-brand-color1);\n}\n\n.jupyter-button.mod-primary.mod-active {\n    color: var(--jp-inverse-ui-font-color0);\n    background-color: var(--jp-brand-color0);\n}\n\n.jupyter-button.mod-primary:active {\n    color: var(--jp-inverse-ui-font-color0);\n    background-color: var(--jp-brand-color0);\n}\n\n/* Button "Success" Styling */\n\n.jupyter-button.mod-success {\n    color: var(--jp-inverse-ui-font-color1);\n    background-color: var(--jp-success-color1);\n}\n\n.jupyter-button.mod-success.mod-active {\n    color: var(--jp-inverse-ui-font-color0);\n    background-color: var(--jp-success-color0);\n }\n\n.jupyter-button.mod-success:active {\n    color: var(--jp-inverse-ui-font-color0);\n    background-color: var(--jp-success-color0);\n }\n\n /* Button "Info" Styling */\n\n.jupyter-button.mod-info {\n    color: var(--jp-inverse-ui-font-color1);\n    background-color: var(--jp-info-color1);\n}\n\n.jupyter-button.mod-info.mod-active {\n    color: var(--jp-inverse-ui-font-color0);\n    background-color: var(--jp-info-color0);\n}\n\n.jupyter-button.mod-info:active {\n    color: var(--jp-inverse-ui-font-color0);\n    background-color: var(--jp-info-color0);\n}\n\n/* Button "Warning" Styling */\n\n.jupyter-button.mod-warning {\n    color: var(--jp-inverse-ui-font-color1);\n    background-color: var(--jp-warn-color1);\n}\n\n.jupyter-button.mod-warning.mod-active {\n    color: var(--jp-inverse-ui-font-color0);\n    background-color: var(--jp-warn-color0);\n}\n\n.jupyter-button.mod-warning:active {\n    color: var(--jp-inverse-ui-font-color0);\n    background-color: var(--jp-warn-color0);\n}\n\n/* Button "Danger" Styling */\n\n.jupyter-button.mod-danger {\n    color: var(--jp-inverse-ui-font-color1);\n    background-color: var(--jp-error-color1);\n}\n\n.jupyter-button.mod-danger.mod-active {\n    color: var(--jp-inverse-ui-font-color0);\n    background-color: var(--jp-error-color0);\n}\n\n.jupyter-button.mod-danger:active {\n    color: var(--jp-inverse-ui-font-color0);\n    background-color: var(--jp-error-color0);\n}\n\n/* Widget Button, Widget Toggle Button, Widget Upload */\n\n.widget-button, .widget-toggle-button, .widget-upload {\n    width: var(--jp-widgets-inline-width-short);\n}\n\n/* Widget Label Styling */\n\n/* Override Bootstrap label css */\n.jupyter-widgets label {\n    margin-bottom: initial;\n}\n\n.widget-label-basic {\n    /* Basic Label */\n    color: var(--jp-widgets-label-color);\n    font-size: var(--jp-widgets-font-size);\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    line-height: var(--jp-widgets-inline-height);\n}\n\n.widget-label {\n    /* Label */\n    color: var(--jp-widgets-label-color);\n    font-size: var(--jp-widgets-font-size);\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    line-height: var(--jp-widgets-inline-height);\n}\n\n.widget-inline-hbox .widget-label {\n    /* Horizontal Widget Label */\n    color: var(--jp-widgets-label-color);\n    text-align: right;\n    margin-right: calc( var(--jp-widgets-inline-margin) * 2 );\n    width: var(--jp-widgets-inline-label-width);\n    flex-shrink: 0;\n}\n\n.widget-inline-vbox .widget-label {\n    /* Vertical Widget Label */\n    color: var(--jp-widgets-label-color);\n    text-align: center;\n    line-height: var(--jp-widgets-inline-height);\n}\n\n/* Widget Readout Styling */\n\n.widget-readout {\n    color: var(--jp-widgets-readout-color);\n    font-size: var(--jp-widgets-font-size);\n    height: var(--jp-widgets-inline-height);\n    line-height: var(--jp-widgets-inline-height);\n    overflow: hidden;\n    white-space: nowrap;\n    text-align: center;\n}\n\n.widget-readout.overflow {\n    /* Overflowing Readout */\n\n    /* From Material Design Lite\n        shadow-key-umbra-opacity: 0.2;\n        shadow-key-penumbra-opacity: 0.14;\n        shadow-ambient-shadow-opacity: 0.12;\n     */\n    -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.2),\n                        0 3px 1px -2px rgba(0, 0, 0, 0.14),\n                        0 1px 5px 0 rgba(0, 0, 0, 0.12);\n\n    -moz-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.2),\n                     0 3px 1px -2px rgba(0, 0, 0, 0.14),\n                     0 1px 5px 0 rgba(0, 0, 0, 0.12);\n\n    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.2),\n                0 3px 1px -2px rgba(0, 0, 0, 0.14),\n                0 1px 5px 0 rgba(0, 0, 0, 0.12);\n}\n\n.widget-inline-hbox .widget-readout {\n    /* Horizontal Readout */\n    text-align: center;\n    max-width: var(--jp-widgets-inline-width-short);\n    min-width: var(--jp-widgets-inline-width-tiny);\n    margin-left: var(--jp-widgets-inline-margin);\n}\n\n.widget-inline-vbox .widget-readout {\n    /* Vertical Readout */\n    margin-top: var(--jp-widgets-inline-margin);\n    /* as wide as the widget */\n    width: inherit;\n}\n\n/* Widget Checkbox Styling */\n\n.widget-checkbox {\n    width: var(--jp-widgets-inline-width);\n    height: var(--jp-widgets-inline-height);\n    line-height: var(--jp-widgets-inline-height);\n}\n\n.widget-checkbox input[type="checkbox"] {\n    margin: 0px calc( var(--jp-widgets-inline-margin) * 2 ) 0px 0px;\n    line-height: var(--jp-widgets-inline-height);\n    font-size: large;\n    flex-grow: 1;\n    flex-shrink: 0;\n    align-self: center;\n}\n\n/* Widget Valid Styling */\n\n.widget-valid {\n    height: var(--jp-widgets-inline-height);\n    line-height: var(--jp-widgets-inline-height);\n    width: var(--jp-widgets-inline-width-short);\n    font-size: var(--jp-widgets-font-size);\n}\n\n.widget-valid i:before {\n    line-height: var(--jp-widgets-inline-height);\n    margin-right: var(--jp-widgets-inline-margin);\n    margin-left: var(--jp-widgets-inline-margin);\n\n    /* from the fa class in FontAwesome: https://github.com/FortAwesome/Font-Awesome/blob/49100c7c3a7b58d50baa71efef11af41a66b03d3/css/font-awesome.css#L14 */\n    display: inline-block;\n    font: normal normal normal 14px/1 FontAwesome;\n    font-size: inherit;\n    text-rendering: auto;\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n}\n\n.widget-valid.mod-valid i:before {\n    content: "\\F00C";\n    color: green;\n}\n\n.widget-valid.mod-invalid i:before {\n    content: "\\F00D";\n    color: red;\n}\n\n.widget-valid.mod-valid .widget-valid-readout {\n    display: none;\n}\n\n/* Widget Text and TextArea Stying */\n\n.widget-textarea, .widget-text {\n    width: var(--jp-widgets-inline-width);\n}\n\n.widget-text input[type="text"], .widget-text input[type="number"]{\n    height: var(--jp-widgets-inline-height);\n    line-height: var(--jp-widgets-inline-height);\n}\n\n.widget-text input[type="text"]:disabled, .widget-text input[type="number"]:disabled, .widget-textarea textarea:disabled {\n    opacity: var(--jp-widgets-disabled-opacity);\n}\n\n.widget-text input[type="text"], .widget-text input[type="number"], .widget-textarea textarea {\n    box-sizing: border-box;\n    border: var(--jp-widgets-input-border-width) solid var(--jp-widgets-input-border-color);\n    background-color: var(--jp-widgets-input-background-color);\n    color: var(--jp-widgets-input-color);\n    font-size: var(--jp-widgets-font-size);\n    flex-grow: 1;\n    min-width: 0; /* This makes it possible for the flexbox to shrink this input */\n    flex-shrink: 1;\n    outline: none !important;\n}\n    \n.widget-text input[type="text"], .widget-textarea textarea {\n    padding: var(--jp-widgets-input-padding) calc( var(--jp-widgets-input-padding) *  2);\n}\n\n.widget-text input[type="number"] {\n    padding: var(--jp-widgets-input-padding) 0 var(--jp-widgets-input-padding) calc(var(--jp-widgets-input-padding) *  2);\n}\n\n.widget-textarea textarea {\n    height: inherit;\n    width: inherit;\n}\n\n.widget-text input:focus, .widget-textarea textarea:focus {\n    border-color: var(--jp-widgets-input-focus-border-color);\n}\n\n/* Widget Slider */\n\n.widget-slider .ui-slider {\n    /* Slider Track */\n    border: var(--jp-widgets-slider-border-width) solid var(--jp-layout-color3);\n    background: var(--jp-layout-color3);\n    box-sizing: border-box;\n    position: relative;\n    border-radius: 0px;\n}\n\n.widget-slider .ui-slider .ui-slider-handle {\n    /* Slider Handle */\n    outline: none !important; /* focused slider handles are colored - see below */\n    position: absolute;\n    background-color: var(--jp-widgets-slider-handle-background-color);\n    border: var(--jp-widgets-slider-border-width) solid var(--jp-widgets-slider-handle-border-color);\n    box-sizing: border-box;\n    z-index: 1;\n    background-image: none; /* Override jquery-ui */\n}\n\n/* Override jquery-ui */\n.widget-slider .ui-slider .ui-slider-handle:hover, .widget-slider .ui-slider .ui-slider-handle:focus {\n    background-color: var(--jp-widgets-slider-active-handle-color);\n    border: var(--jp-widgets-slider-border-width) solid var(--jp-widgets-slider-active-handle-color);\n}\n\n.widget-slider .ui-slider .ui-slider-handle:active {\n    background-color: var(--jp-widgets-slider-active-handle-color);\n    border-color: var(--jp-widgets-slider-active-handle-color);\n    z-index: 2;\n    transform: scale(1.2);\n}\n\n.widget-slider  .ui-slider .ui-slider-range {\n    /* Interval between the two specified value of a double slider */\n    position: absolute;\n    background: var(--jp-widgets-slider-active-handle-color);\n    z-index: 0;\n}\n\n/* Shapes of Slider Handles */\n\n.widget-hslider .ui-slider .ui-slider-handle {\n    width: var(--jp-widgets-slider-handle-size);\n    height: var(--jp-widgets-slider-handle-size);\n    margin-top: calc((var(--jp-widgets-slider-track-thickness) - var(--jp-widgets-slider-handle-size)) / 2 - var(--jp-widgets-slider-border-width));\n    margin-left: calc(var(--jp-widgets-slider-handle-size) / -2 + var(--jp-widgets-slider-border-width));\n    border-radius: 50%;\n    top: 0;\n}\n\n.widget-vslider .ui-slider .ui-slider-handle {\n    width: var(--jp-widgets-slider-handle-size);\n    height: var(--jp-widgets-slider-handle-size);\n    margin-bottom: calc(var(--jp-widgets-slider-handle-size) / -2 + var(--jp-widgets-slider-border-width));\n    margin-left: calc((var(--jp-widgets-slider-track-thickness) - var(--jp-widgets-slider-handle-size)) / 2 - var(--jp-widgets-slider-border-width));\n    border-radius: 50%;\n    left: 0;\n}\n\n.widget-hslider .ui-slider .ui-slider-range {\n    height: calc( var(--jp-widgets-slider-track-thickness) * 2 );\n    margin-top: calc((var(--jp-widgets-slider-track-thickness) - var(--jp-widgets-slider-track-thickness) * 2 ) / 2 - var(--jp-widgets-slider-border-width));\n}\n\n.widget-vslider .ui-slider .ui-slider-range {\n    width: calc( var(--jp-widgets-slider-track-thickness) * 2 );\n    margin-left: calc((var(--jp-widgets-slider-track-thickness) - var(--jp-widgets-slider-track-thickness) * 2 ) / 2 - var(--jp-widgets-slider-border-width));\n}\n\n/* Horizontal Slider */\n\n.widget-hslider {\n    width: var(--jp-widgets-inline-width);\n    height: var(--jp-widgets-inline-height);\n    line-height: var(--jp-widgets-inline-height);\n\n    /* Override the align-items baseline. This way, the description and readout\n    still seem to align their baseline properly, and we don\'t have to have\n    align-self: stretch in the .slider-container. */\n    align-items: center;\n}\n\n.widgets-slider .slider-container {\n    overflow: visible;\n}\n\n.widget-hslider .slider-container {\n    height: var(--jp-widgets-inline-height);\n    margin-left: calc(var(--jp-widgets-slider-handle-size) / 2 - 2 * var(--jp-widgets-slider-border-width));\n    margin-right: calc(var(--jp-widgets-slider-handle-size) / 2 - 2 * var(--jp-widgets-slider-border-width));\n    flex: 1 1 var(--jp-widgets-inline-width-short);\n}\n\n.widget-hslider .ui-slider {\n    /* Inner, invisible slide div */\n    height: var(--jp-widgets-slider-track-thickness);\n    margin-top: calc((var(--jp-widgets-inline-height) - var(--jp-widgets-slider-track-thickness)) / 2);\n    width: 100%;\n}\n\n/* Vertical Slider */\n\n.widget-vbox .widget-label {\n    height: var(--jp-widgets-inline-height);\n    line-height: var(--jp-widgets-inline-height);\n}\n\n.widget-vslider {\n    /* Vertical Slider */\n    height: var(--jp-widgets-vertical-height);\n    width: var(--jp-widgets-inline-width-tiny);\n}\n\n.widget-vslider .slider-container {\n    flex: 1 1 var(--jp-widgets-inline-width-short);\n    margin-left: auto;\n    margin-right: auto;\n    margin-bottom: calc(var(--jp-widgets-slider-handle-size) / 2 - 2 * var(--jp-widgets-slider-border-width));\n    margin-top: calc(var(--jp-widgets-slider-handle-size) / 2 - 2 * var(--jp-widgets-slider-border-width));\n    display: flex;\n    flex-direction: column;\n}\n\n.widget-vslider .ui-slider-vertical {\n    /* Inner, invisible slide div */\n    width: var(--jp-widgets-slider-track-thickness);\n    flex-grow: 1;\n    margin-left: auto;\n    margin-right: auto;\n}\n\n/* Widget Progress Styling */\n\n.progress-bar {\n    -webkit-transition: none;\n    -moz-transition: none;\n    -ms-transition: none;\n    -o-transition: none;\n    transition: none;\n}\n\n.progress-bar {\n    height: var(--jp-widgets-inline-height);\n}\n\n.progress-bar {\n    background-color: var(--jp-brand-color1);\n}\n\n.progress-bar-success {\n    background-color: var(--jp-success-color1);\n}\n\n.progress-bar-info {\n    background-color: var(--jp-info-color1);\n}\n\n.progress-bar-warning {\n    background-color: var(--jp-warn-color1);\n}\n\n.progress-bar-danger {\n    background-color: var(--jp-error-color1);\n}\n\n.progress {\n    background-color: var(--jp-layout-color2);\n    border: none;\n    box-shadow: none;\n}\n\n/* Horisontal Progress */\n\n.widget-hprogress {\n    /* Progress Bar */\n    height: var(--jp-widgets-inline-height);\n    line-height: var(--jp-widgets-inline-height);\n    width: var(--jp-widgets-inline-width);\n    align-items: center;\n\n}\n\n.widget-hprogress .progress {\n    flex-grow: 1;\n    margin-top: var(--jp-widgets-input-padding);\n    margin-bottom: var(--jp-widgets-input-padding);\n    align-self: stretch;\n    /* Override bootstrap style */\n    height: initial;\n}\n\n/* Vertical Progress */\n\n.widget-vprogress {\n    height: var(--jp-widgets-vertical-height);\n    width: var(--jp-widgets-inline-width-tiny);\n}\n\n.widget-vprogress .progress {\n    flex-grow: 1;\n    width: var(--jp-widgets-progress-thickness);\n    margin-left: auto;\n    margin-right: auto;\n    margin-bottom: 0;\n}\n\n/* Select Widget Styling */\n\n.widget-dropdown {\n    height: var(--jp-widgets-inline-height);\n    width: var(--jp-widgets-inline-width);\n    line-height: var(--jp-widgets-inline-height);\n}\n\n.widget-dropdown > select {\n    padding-right: 20px;\n    border: var(--jp-widgets-input-border-width) solid var(--jp-widgets-input-border-color);\n    border-radius: 0;\n    height: inherit;\n    flex: 1 1 var(--jp-widgets-inline-width-short);\n    min-width: 0; /* This makes it possible for the flexbox to shrink this input */\n    box-sizing: border-box;\n    outline: none !important;\n    box-shadow: none;\n    background-color: var(--jp-widgets-input-background-color);\n    color: var(--jp-widgets-input-color);\n    font-size: var(--jp-widgets-font-size);\n    vertical-align: top;\n    padding-left: calc( var(--jp-widgets-input-padding) * 2);\n\tappearance: none;\n\t-webkit-appearance: none;\n\t-moz-appearance: none;\n    background-repeat: no-repeat;\n\tbackground-size: 20px;\n\tbackground-position: right center;\n    background-image: var(--jp-widgets-dropdown-arrow);\n}\n.widget-dropdown > select:focus {\n    border-color: var(--jp-widgets-input-focus-border-color);\n}\n\n.widget-dropdown > select:disabled {\n    opacity: var(--jp-widgets-disabled-opacity);\n}\n\n/* To disable the dotted border in Firefox around select controls.\n   See http://stackoverflow.com/a/18853002 */\n.widget-dropdown > select:-moz-focusring {\n    color: transparent;\n    text-shadow: 0 0 0 #000;\n}\n\n/* Select and SelectMultiple */\n\n.widget-select {\n    width: var(--jp-widgets-inline-width);\n    line-height: var(--jp-widgets-inline-height);\n\n    /* Because Firefox defines the baseline of a select as the bottom of the\n    control, we align the entire control to the top and add padding to the\n    select to get an approximate first line baseline alignment. */\n    align-items: flex-start;\n}\n\n.widget-select > select {\n    border: var(--jp-widgets-input-border-width) solid var(--jp-widgets-input-border-color);\n    background-color: var(--jp-widgets-input-background-color);\n    color: var(--jp-widgets-input-color);\n    font-size: var(--jp-widgets-font-size);\n    flex: 1 1 var(--jp-widgets-inline-width-short);\n    outline: none !important;\n    overflow: auto;\n    height: inherit;\n\n    /* Because Firefox defines the baseline of a select as the bottom of the\n    control, we align the entire control to the top and add padding to the\n    select to get an approximate first line baseline alignment. */\n    padding-top: 5px;\n}\n\n.widget-select > select:focus {\n    border-color: var(--jp-widgets-input-focus-border-color);\n}\n\n.wiget-select > select > option {\n    padding-left: var(--jp-widgets-input-padding);\n    line-height: var(--jp-widgets-inline-height);\n    /* line-height doesn\'t work on some browsers for select options */\n    padding-top: calc(var(--jp-widgets-inline-height)-var(--jp-widgets-font-size)/2);\n    padding-bottom: calc(var(--jp-widgets-inline-height)-var(--jp-widgets-font-size)/2);\n}\n\n\n\n/* Toggle Buttons Styling */\n\n.widget-toggle-buttons {\n    line-height: var(--jp-widgets-inline-height);\n}\n\n.widget-toggle-buttons .widget-toggle-button {\n    margin-left: var(--jp-widgets-margin);\n    margin-right: var(--jp-widgets-margin);\n}\n\n.widget-toggle-buttons .jupyter-button:disabled {\n    opacity: var(--jp-widgets-disabled-opacity);\n}\n\n/* Radio Buttons Styling */\n\n.widget-radio {\n    width: var(--jp-widgets-inline-width);\n    line-height: var(--jp-widgets-inline-height);\n}\n\n.widget-radio-box {\n    display: flex;\n    flex-direction: column;\n    align-items: stretch;\n    box-sizing: border-box;\n    flex-grow: 1;\n    margin-bottom: var(--jp-widgets-radio-item-height-adjustment);\n}\n\n.widget-radio-box label {\n    height: var(--jp-widgets-radio-item-height);\n    line-height: var(--jp-widgets-radio-item-height);\n    font-size: var(--jp-widgets-font-size);\n}\n\n.widget-radio-box input {\n    height: var(--jp-widgets-radio-item-height);\n    line-height: var(--jp-widgets-radio-item-height);\n    margin: 0 calc( var(--jp-widgets-input-padding) * 2 ) 0 1px;\n    float: left;\n}\n\n/* Color Picker Styling */\n\n.widget-colorpicker {\n    width: var(--jp-widgets-inline-width);\n    height: var(--jp-widgets-inline-height);\n    line-height: var(--jp-widgets-inline-height);\n}\n\n.widget-colorpicker > .widget-colorpicker-input {\n    flex-grow: 1;\n    flex-shrink: 1;\n    min-width: var(--jp-widgets-inline-width-tiny);\n}\n\n.widget-colorpicker input[type="color"] {\n    width: var(--jp-widgets-inline-height);\n    height: var(--jp-widgets-inline-height);\n    padding: 0 2px; /* make the color square actually square on Chrome on OS X */\n    background: var(--jp-widgets-input-background-color);\n    color: var(--jp-widgets-input-color);\n    border: var(--jp-widgets-input-border-width) solid var(--jp-widgets-input-border-color);\n    border-left: none;\n    flex-grow: 0;\n    flex-shrink: 0;\n    box-sizing: border-box;\n    align-self: stretch;\n    outline: none !important;\n}\n\n.widget-colorpicker.concise input[type="color"] {\n    border-left: var(--jp-widgets-input-border-width) solid var(--jp-widgets-input-border-color);\n}\n\n.widget-colorpicker input[type="color"]:focus, .widget-colorpicker input[type="text"]:focus {\n    border-color: var(--jp-widgets-input-focus-border-color);\n}\n\n.widget-colorpicker input[type="text"] {\n    flex-grow: 1;\n    outline: none !important;\n    height: var(--jp-widgets-inline-height);\n    line-height: var(--jp-widgets-inline-height);\n    background: var(--jp-widgets-input-background-color);\n    color: var(--jp-widgets-input-color);\n    border: var(--jp-widgets-input-border-width) solid var(--jp-widgets-input-border-color);\n    font-size: var(--jp-widgets-font-size);\n    padding: var(--jp-widgets-input-padding) calc( var(--jp-widgets-input-padding) *  2 );\n    min-width: 0; /* This makes it possible for the flexbox to shrink this input */\n    flex-shrink: 1;\n    box-sizing: border-box;\n}\n\n.widget-colorpicker input[type="text"]:disabled {\n    opacity: var(--jp-widgets-disabled-opacity);\n}\n\n/* Date Picker Styling */\n\n.widget-datepicker {\n    width: var(--jp-widgets-inline-width);\n    height: var(--jp-widgets-inline-height);\n    line-height: var(--jp-widgets-inline-height);\n}\n\n.widget-datepicker input[type="date"] {\n    flex-grow: 1;\n    flex-shrink: 1;\n    min-width: 0; /* This makes it possible for the flexbox to shrink this input */\n    outline: none !important;\n    height: var(--jp-widgets-inline-height);\n    border: var(--jp-widgets-input-border-width) solid var(--jp-widgets-input-border-color);\n    background-color: var(--jp-widgets-input-background-color);\n    color: var(--jp-widgets-input-color);\n    font-size: var(--jp-widgets-font-size);\n    padding: var(--jp-widgets-input-padding) calc( var(--jp-widgets-input-padding) *  2 );\n    box-sizing: border-box;\n}\n\n.widget-datepicker input[type="date"]:focus {\n    border-color: var(--jp-widgets-input-focus-border-color);\n}\n\n.widget-datepicker input[type="date"]:invalid {\n    border-color: var(--jp-warn-color1);\n}\n\n.widget-datepicker input[type="date"]:disabled {\n    opacity: var(--jp-widgets-disabled-opacity);\n}\n\n/* Play Widget */\n\n.widget-play {\n    width: var(--jp-widgets-inline-width-short);\n    display: flex;\n    align-items: stretch;\n}\n\n.widget-play .jupyter-button {\n    flex-grow: 1;\n    height: auto;\n}\n\n.widget-play .jupyter-button:disabled {\n    opacity: var(--jp-widgets-disabled-opacity);\n}\n\n/* Tab Widget */\n\n.jupyter-widgets.widget-tab {\n    display: flex;\n    flex-direction: column;\n}\n\n.jupyter-widgets.widget-tab > .p-TabBar {\n    /* Necessary so that a tab can be shifted down to overlay the border of the box below. */\n    overflow-x: visible;\n    overflow-y: visible;\n}\n\n.jupyter-widgets.widget-tab > .p-TabBar > .p-TabBar-content {\n    /* Make sure that the tab grows from bottom up */\n    align-items: flex-end;\n    min-width: 0;\n    min-height: 0;\n}\n\n.jupyter-widgets.widget-tab > .widget-tab-contents {\n    width: 100%;\n    box-sizing: border-box;\n    margin: 0;\n    background: var(--jp-layout-color1);\n    color: var(--jp-ui-font-color1);\n    border: var(--jp-border-width) solid var(--jp-border-color1);\n    padding: var(--jp-widgets-container-padding);\n    flex-grow: 1;\n    overflow: auto;\n}\n\n.jupyter-widgets.widget-tab > .p-TabBar {\n    font: var(--jp-widgets-font-size) Helvetica, Arial, sans-serif;\n    min-height: calc(var(--jp-widgets-horizontal-tab-height) + var(--jp-border-width));\n}\n\n.jupyter-widgets.widget-tab > .p-TabBar .p-TabBar-tab {\n    flex: 0 1 var(--jp-widgets-horizontal-tab-width);\n    min-width: 35px;\n    min-height: calc(var(--jp-widgets-horizontal-tab-height) + var(--jp-border-width));\n    line-height: var(--jp-widgets-horizontal-tab-height);\n    margin-left: calc(-1 * var(--jp-border-width));\n    padding: 0px 10px;\n    background: var(--jp-layout-color2);\n    color: var(--jp-ui-font-color2);\n    border: var(--jp-border-width) solid var(--jp-border-color1);\n    border-bottom: none;\n    position: relative;\n}\n\n.jupyter-widgets.widget-tab > .p-TabBar .p-TabBar-tab.p-mod-current {\n    color: var(--jp-ui-font-color0);\n    /* We want the background to match the tab content background */\n    background: var(--jp-layout-color1);\n    min-height: calc(var(--jp-widgets-horizontal-tab-height) + 2 * var(--jp-border-width));\n    transform: translateY(var(--jp-border-width));\n    overflow: visible;\n}\n\n.jupyter-widgets.widget-tab > .p-TabBar .p-TabBar-tab.p-mod-current:before {\n    position: absolute;\n    top: calc(-1 * var(--jp-border-width));\n    left: calc(-1 * var(--jp-border-width));\n    content: \'\';\n    height: var(--jp-widgets-horizontal-tab-top-border);\n    width: calc(100% + 2 * var(--jp-border-width));\n    background: var(--jp-brand-color1);\n}\n\n.jupyter-widgets.widget-tab > .p-TabBar .p-TabBar-tab:first-child {\n    margin-left: 0;\n}\n\n.jupyter-widgets.widget-tab > .p-TabBar .p-TabBar-tab:hover:not(.p-mod-current) {\n    background: var(--jp-layout-color1);\n    color: var(--jp-ui-font-color1);\n}\n\n.jupyter-widgets.widget-tab > .p-TabBar .p-mod-closable > .p-TabBar-tabCloseIcon {\n    margin-left: 4px;\n}\n\n.jupyter-widgets.widget-tab > .p-TabBar .p-mod-closable > .p-TabBar-tabCloseIcon:before {\n    font-family: FontAwesome;\n    content: \'\\F00D\'; /* close */\n}\n\n.jupyter-widgets.widget-tab > .p-TabBar .p-TabBar-tabIcon,\n.jupyter-widgets.widget-tab > .p-TabBar .p-TabBar-tabLabel,\n.jupyter-widgets.widget-tab > .p-TabBar .p-TabBar-tabCloseIcon {\n    line-height: var(--jp-widgets-horizontal-tab-height);\n}\n\n/* Accordion Widget */\n\n.p-Collapse {\n    display: flex;\n    flex-direction: column;\n    align-items: stretch;\n}\n\n.p-Collapse-header {\n    padding: var(--jp-widgets-input-padding);\n    cursor: pointer;\n    color: var(--jp-ui-font-color2);\n    background-color: var(--jp-layout-color2);\n    border: var(--jp-widgets-border-width) solid var(--jp-border-color1);\n    padding: calc(var(--jp-widgets-container-padding) * 2 / 3) var(--jp-widgets-container-padding);\n    font-weight: bold;\n}\n\n.p-Collapse-header:hover {\n    background-color: var(--jp-layout-color1);\n    color: var(--jp-ui-font-color1);\n}\n\n.p-Collapse-open > .p-Collapse-header {\n    background-color: var(--jp-layout-color1);\n    color: var(--jp-ui-font-color0);\n    cursor: default;\n    border-bottom: none;\n}\n\n.p-Collapse .p-Collapse-header::before {\n    content: \'\\F0DA\\A0\';  /* caret-right, non-breaking space */\n    display: inline-block;\n    font: normal normal normal 14px/1 FontAwesome;\n    font-size: inherit;\n    text-rendering: auto;\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n}\n\n.p-Collapse-open > .p-Collapse-header::before {\n    content: \'\\F0D7\\A0\'; /* caret-down, non-breaking space */\n}\n\n.p-Collapse-contents {\n    padding: var(--jp-widgets-container-padding);\n    background-color: var(--jp-layout-color1);\n    color: var(--jp-ui-font-color1);\n    border-left: var(--jp-widgets-border-width) solid var(--jp-border-color1);\n    border-right: var(--jp-widgets-border-width) solid var(--jp-border-color1);\n    border-bottom: var(--jp-widgets-border-width) solid var(--jp-border-color1);\n    overflow: auto;\n}\n\n.p-Accordion {\n    display: flex;\n    flex-direction: column;\n    align-items: stretch;\n}\n\n.p-Accordion .p-Collapse {\n    margin-bottom: 0;\n}\n\n.p-Accordion .p-Collapse + .p-Collapse {\n    margin-top: 4px;\n}\n\n\n\n/* HTML widget */\n\n.widget-html, .widget-htmlmath {\n    font-size: var(--jp-widgets-font-size);\n}\n\n.widget-html > .widget-html-content, .widget-htmlmath > .widget-html-content {\n    /* Fill out the area in the HTML widget */\n    align-self: stretch;\n    flex-grow: 1;\n    flex-shrink: 1;\n    /* Makes sure the baseline is still aligned with other elements */\n    line-height: var(--jp-widgets-inline-height);\n    /* Make it possible to have absolutely-positioned elements in the html */\n    position: relative;\n}\n\n\n/* Image widget  */\n\n.widget-image {\n    max-width: 100%;\n    height: auto;\n}\n',""])},function(e,t,n){(e.exports=n(25)(!1)).push([e.i,"/* This file has code derived from PhosphorJS CSS files, as noted below. The license for this PhosphorJS code is:\n\nCopyright (c) 2014-2017, PhosphorJS Contributors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of the copyright holder nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n*/\n\n/*\n * The following section is derived from https://github.com/phosphorjs/phosphor/blob/23b9d075ebc5b73ab148b6ebfc20af97f85714c4/packages/widgets/style/tabbar.css \n * We've scoped the rules so that they are consistent with exactly our code.\n */\n\n.jupyter-widgets.widget-tab > .p-TabBar {\n  display: flex;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n\n.jupyter-widgets.widget-tab > .p-TabBar[data-orientation='horizontal'] {\n  flex-direction: row;\n}\n\n\n.jupyter-widgets.widget-tab > .p-TabBar[data-orientation='vertical'] {\n  flex-direction: column;\n}\n\n\n.jupyter-widgets.widget-tab > .p-TabBar > .p-TabBar-content {\n  margin: 0;\n  padding: 0;\n  display: flex;\n  flex: 1 1 auto;\n  list-style-type: none;\n}\n\n\n.jupyter-widgets.widget-tab > .p-TabBar[data-orientation='horizontal'] > .p-TabBar-content {\n  flex-direction: row;\n}\n\n\n.jupyter-widgets.widget-tab > .p-TabBar[data-orientation='vertical'] > .p-TabBar-content {\n  flex-direction: column;\n}\n\n\n.jupyter-widgets.widget-tab > .p-TabBar .p-TabBar-tab {\n  display: flex;\n  flex-direction: row;\n  box-sizing: border-box;\n  overflow: hidden;\n}\n\n\n.jupyter-widgets.widget-tab > .p-TabBar .p-TabBar-tabIcon,\n.jupyter-widgets.widget-tab > .p-TabBar .p-TabBar-tabCloseIcon {\n  flex: 0 0 auto;\n}\n\n\n.jupyter-widgets.widget-tab > .p-TabBar .p-TabBar-tabLabel {\n  flex: 1 1 auto;\n  overflow: hidden;\n  white-space: nowrap;\n}\n\n\n.jupyter-widgets.widget-tab > .p-TabBar .p-TabBar-tab.p-mod-hidden {\n  display: none !important;\n}\n\n\n.jupyter-widgets.widget-tab > .p-TabBar.p-mod-dragging .p-TabBar-tab {\n  position: relative;\n}\n\n\n.jupyter-widgets.widget-tab > .p-TabBar.p-mod-dragging[data-orientation='horizontal'] .p-TabBar-tab {\n  left: 0;\n  transition: left 150ms ease;\n}\n\n\n.jupyter-widgets.widget-tab > .p-TabBar.p-mod-dragging[data-orientation='vertical'] .p-TabBar-tab {\n  top: 0;\n  transition: top 150ms ease;\n}\n\n\n.jupyter-widgets.widget-tab > .p-TabBar.p-mod-dragging .p-TabBar-tab.p-mod-dragging {\n  transition: none;\n}\n\n/* End tabbar.css */\n",""])},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"OutputModel",(function(){return S})),n.d(r,"OutputView",(function(){return M}));n(209),n(214),n(219),n(230),n(233);var i=n(204),o=n.n(i),s=n(205),a=n(14),l=n(206),c=n(108),u=n(5),h=n(9),d=n(207);const p=e=>(e.includes("localhost")?"ws:":"wss:")+e.split(":").slice(1).join(":"),f=()=>document.querySelectorAll(".code_cell"),g=e=>e.querySelector(".input_area").textContent.trim(),m=e=>null!==e.querySelector(".output_widget_view"),_=(e=document)=>e.querySelectorAll(".js-nbinteract-widget"),v=(e,t=document)=>{_(t).forEach(t=>{t.innerHTML=e})},y=(e,t=document)=>{_(t).forEach(t=>{t.disabled=!0;const n=document.createElement("pre");n.innerText=e,n.style.cssText="text-align: left; font-size: 0.9em;",t.innerHTML="",t.appendChild(n)})},b=(e=document)=>{_(e).forEach(e=>e.remove())};var w=n(72),x=n(55),k=n(54);const E=new k.RenderMimeRegistry({initialFactories:k.standardRendererFactories});class S extends w.OutputModel{defaults(){const e=super.defaults();return e.msg_id="",e}initialize(e,t){super.initialize(e,t),this._outputs=new x.OutputAreaModel({trusted:!0}),this.listenTo(this,"change:msg_id",this.reset_msg_id),this.reset_msg_id()}reset_msg_id(){this._msgHook&&this._msgHook.dispose(),this._msgHook=null;let e=this.widget_manager.kernel;this.get("msg_id")&&e&&(this._msgHook=e.registerMessageHook(this.get("msg_id"),e=>(this.add(e),!1)))}add(e){let t=e.header.msg_type;switch(t){case"execute_result":case"display_data":case"stream":case"error":let n=e.content;n.output_type=t,this._outputs.add(n);break;case"clear_output":this.clear_output(e.content.wait)}}clear_output(e=!1){this._outputs.clear(e)}get outputs(){return this._outputs}}class M extends w.OutputView{_createElement(e){return this.pWidget=new u.Panel,this.pWidget.node}_setElement(e){if(this.el||e!==this.pWidget.node)throw new Error("Cannot reset the DOM element.");this.el=this.pWidget.node}render(){this._outputView=new x.OutputArea({rendermime:E,contentFactory:x.OutputArea.defaultContentFactory,model:this.model.outputs}),this.pWidget.insertWidget(0,this._outputView),this.pWidget.addClass("jupyter-widgets"),this.pWidget.addClass("widget-output"),this.update()}remove(){return this._outputView.dispose(),super.remove()}}n(554);class C extends l.HTMLManager{constructor(e){super(),this.generateWidgets=this.generateWidgets.bind(this),this._displayWidget=this._displayWidget.bind(this),this.setKernel(e)}setKernel(e){Object.values(this._models).forEach(async e=>{(await e).close(!0)}),this._models={},this.kernel&&this.kernel.dispose(),this.kernel=e,this._registerKernel(e)}generateWidgets(){f().forEach((e,t)=>{const n=g(e);this.kernel.requestExecute({code:n}).onIOPub=t=>this._displayWidget(e,t)})}async _displayWidget(e,t){if((e=>"error"===e.msg_type)(t)){const n=g(e),r=t.content.traceback.join("\n").replace(/\u001b\[.*?m/g,"");console.error(`${n}\n${r}`.trim()),m(e)&&y(r,e)}if(!m(e))return;const n=await(async(e,t)=>{if(!a.KernelMessage.isDisplayDataMsg(e))return!1;const n=e.content.data["application/vnd.jupyter.widget-view+json"];if(void 0===n||2!==n.version_major)return!1;return await t.get_model(n.model_id)})(t,this);if(n){b();const r=(e=>e.querySelector(".output_widget_view"))(e);this.display_model(t,n,{el:r})}}_registerKernel(e){this._commRegistration&&this._commRegistration.dispose(),e&&(this._commRegistration=e.registerCommTarget(this.comm_target_name,(e,t)=>{this.handle_comm_open(new h.shims.services.Comm(e),t)}))}display_view(e,t,{el:n}){return Promise.resolve(t).then(e=>(u.Widget.attach(e.pWidget,n),e.on("remove",()=>{console.log("View removed",e)}),e))}_create_comm(e,t,n,r){const i=this.kernel.connectToComm(e,t);return(n||r)&&i.open(n,r),Promise.resolve(new h.shims.services.Comm(i))}_get_comm_info(){return this.kernel.requestCommInfo({target:this.comm_target_name}).then(e=>e.content.comms)}loadClass(e,t,n){return"@jupyter-widgets/controls"===t?Promise.resolve(c[e]):"@jupyter-widgets/base"===t?Promise.resolve(h[e]):"@jupyter-widgets/output"===t?Promise.resolve(r[e]):"bqplot"===t?Promise.resolve(d[e]):new Promise((function(e,n){window.require([t],e,n)})).then((function(n){return n[e]?n[e]:Promise.reject("Class "+e+" not found in module "+t)}))}}const j=new Set(["*","failed","built","waiting","building","fetching","pushing","launching","ready"]);class A{constructor({spec:e,baseUrl:t,provider:n,callbacks:r={},nbUrl:i=!1,logger:o=!1}={}){this.baseUrl=t,this.provider=n,this.spec=e,this.nbUrl=i,this.logger=o,this.callbacks=r,this.state=null,this.registerCallback("*",(e,t,n)=>{void 0!==n.message?this.logger.info("\n"+n.message.slice(0,-1)):this.logger.info("\n"+n.slice(0,-1))})}apiUrl(){return`${this.baseUrl}/build/${this.provider}/${this.spec}`}startServer(){return this.nbUrl?Promise.resolve({url:this.nbUrl}):new Promise((e,t)=>{const n=new EventSource(this.apiUrl());n.onerror=e=>{this.logger.error("\nstopping nbinteract - failed to connect to Binder: "+e),n.close(),t(new Error(e))},n.onmessage=e=>{const t=JSON.parse(e.data);t.phase&&this.changeState(t.phase.toLowerCase(),t)},this.registerCallback("failed",(e,r,i)=>{this.logger.error("\nstopping nbinteract - failed to build Binder image: "+i),n.close(),t(new Error(i))}),this.registerCallback("ready",(t,r,i)=>{n.close(),e(i)})})}registerCallback(e,t){j.has(e)?void 0===this.callbacks[e]?this.callbacks[e]=[t]:this.callbacks[e].push(t):this.logger.error("\ntried to register callback on invalid state: "+e)}changeState(e,t){[e,"*"].map(n=>{const r=this.callbacks[n];r&&r.forEach(n=>n(this.state,e,t))}),e&&(this.state=e)}}var T={lines:13,length:38,width:17,radius:45,scale:1.1,corners:1,speed:.5,rotate:0,animation:"spinner-line-fade-quick",direction:1,color:"#e91c1c",fadeColor:"transparent",top:"50%",left:"50%",shadow:"0 0 1px transparent",zIndex:2e9,className:"spinner",position:"absolute"};class P{constructor({spec:e="SamLau95/nbinteract-image/master",baseUrl:t="https://mybinder.org",provider:n="gh",nbUrl:r=!1,logger:i=!1}={}){this.logger=i,this.run=o()(this.run,500,{leading:!0,trailing:!1}),this._kernelHeartbeat=this._kernelHeartbeat.bind(this),this.binder=new A({spec:e,baseUrl:t,provider:n,nbUrl:r,logger:i}),this.kernel=null,this.manager=null}async prepare(){var e=document.getElementById("statusButton");new s.Spinner(T).spin(e);this.logger.info("\nnbinteract core is being initialized"),v("Show widgets"),this.binder.registerCallback("failed",(e,t,n)=>{y("Error, try refreshing the page:<br>"+n.message)}),_().forEach(e=>{e.addEventListener("click",e=>{this.run()})}),this.runIfKernelExists()}async run(){v("Initializing widgets ..."),0===f().length&&b();const e=!this.kernel||!this.manager;try{this.kernel=await this._getOrStartKernel(),this.manager=this.manager||new C(this.kernel),this.manager.generateWidgets(),e&&this._kernelHeartbeat()}catch(e){throw this.logger.info("\nwidget initialization failed"),e}}async runIfKernelExists(){try{await this._getKernelModel()}catch(e){return this.logger.info("\nno kernel, stopping the runIfKernelExists() call.\nuse the run() method to automatically start a kernel if needed"),void this.run()}this.run()}async _kernelHeartbeat(e=5){try{await this._getKernelModel()}catch(e){this.logger.info("\nlooks like the kernel has died"),this.logger.info("\nstarting a new kernel ..");const t=await this._startKernel();this.kernel=t,this.manager.setKernel(t),this.manager.generateWidgets()}finally{setTimeout(this._kernelHeartbeat,1e3*e)}}async _getOrStartKernel(){if(this.kernel)return this.kernel;try{const e=await this._getKernel();return this.logger.info("\nconnected to cached kernel: "+e._id),e}catch(e){this.logger.info("\nno cached kernel found, starting new kernel on BinderHub");return await this._startKernel()}}async _getKernel(){const{serverSettings:e,kernelModel:t}=await this._getKernelModel();return await a.Kernel.connectTo(t,e)}async _getKernelModel(){const{serverParams:e,kernelId:t}=localStorage,{url:n,token:r}=JSON.parse(e),i=a.ServerConnection.makeSettings({baseUrl:n,wsUrl:p(n),token:r});return{serverSettings:i,kernelModel:await a.Kernel.findById(t,i)}}async _startKernel(){try{const{url:e,token:t}=await this.binder.startServer(),n=a.ServerConnection.makeSettings({baseUrl:e,wsUrl:p(e),token:t}),r=await a.Kernel.getSpecs(n),i=await a.Kernel.startNew({name:r.default,serverSettings:n});return localStorage.serverParams=JSON.stringify({url:e,token:t}),localStorage.kernelId=i.id,this.logger.info("\nstarted kernel: "+i.id),i}catch(e){throw this.logger.error("\ninitialization kernel failed"),e}}async _killKernel(){return(await this._getKernel()).shutdown()}}"undefined"!=typeof window&&(window.NbInteract=P);t.default=P}]);
//# sourceMappingURL=nbinteract-core.js.map