!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("CubeViz",[],t):"object"==typeof exports?exports.CubeViz=t():e.CubeViz=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,i){r.apply(this,[e,t,i].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},t.__esModule=!0},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}var i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,a,s=n(e),l=1;l>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?d(e)+t:t}function y(){return!0}function m(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function g(e,t){return x(e,t,0)}function b(e,t){return x(e,t,t)}function x(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}function w(e){this.next=e}function _(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function T(){return{value:void 0,done:!0}}function k(e){return!!S(e)}function C(e){return e&&"function"==typeof e.next}function E(e){var t=S(e);return t&&t.call(e)}function S(e){var t=e&&(Tn&&e[Tn]||e[kn]);if("function"==typeof t)return t}function P(e){return e&&"number"==typeof e.length}function O(e){return null===e||void 0===e?N():o(e)?e.toSeq():U(e)}function A(e){return null===e||void 0===e?N().toKeyedSeq():o(e)?a(e)?e.toSeq():e.fromEntrySeq():B(e)}function M(e){return null===e||void 0===e?N():o(e)?a(e)?e.entrySeq():e.toIndexedSeq():z(e)}function I(e){return(null===e||void 0===e?N():o(e)?a(e)?e.entrySeq():e:z(e)).toSetSeq()}function j(e){this._array=e,this.size=e.length}function D(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function R(e){this._iterable=e,this.size=e.length||e.size}function F(e){this._iterator=e,this._iteratorCache=[]}function L(e){return!(!e||!e[En])}function N(){return Sn||(Sn=new j([]))}function B(e){var t=Array.isArray(e)?new j(e).fromEntrySeq():C(e)?new F(e).fromEntrySeq():k(e)?new R(e).fromEntrySeq():"object"==typeof e?new D(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function z(e){var t=W(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function U(e){var t=W(e)||"object"==typeof e&&new D(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function W(e){return P(e)?new j(e):C(e)?new F(e):k(e)?new R(e):void 0}function G(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(t(s[1],r?s[0]:a,e)===!1)return a+1}return a}return e.__iterateUncached(t,n)}function H(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new w(function(){var e=i[n?o-a:a];return a++>o?T():_(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function q(e,t){return t?Q(t,e,"",{"":e}):V(e)}function Q(e,t,n,r){return Array.isArray(t)?e.call(r,n,M(t).map(function(n,r){return Q(e,n,r,t)})):X(t)?e.call(r,n,A(t).map(function(n,r){return Q(e,n,r,t)})):t}function V(e){return Array.isArray(e)?M(e).map(V).toList():X(e)?A(e).map(V).toMap():e}function X(e){return e&&(e.constructor===Object||void 0===e.constructor)}function K(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function Y(e,t){if(e===t)return!0;if(!o(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||a(e)!==a(t)||s(e)!==s(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!l(e);if(u(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&K(i[1],e)&&(n||K(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var c=e;e=t,t=c}var p=!0,f=t.__iterate(function(t,r){if(n?!e.has(t):i?!K(t,e.get(r,mn)):!K(e.get(r,mn),t))return p=!1,!1});return p&&e.size===f}function $(e,t){if(!(this instanceof $))return new $(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Pn)return Pn;Pn=this}}function J(e,t){if(!e)throw new Error(t)}function Z(e,t,n){if(!(this instanceof Z))return new Z(e,t,n);if(J(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t>>1&1073741824|3221225471&e}function oe(e){if(e===!1||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(e=e.valueOf(),e===!1||null===e||void 0===e))return 0;if(e===!0)return 1;var t=typeof e;if("number"===t){if(e!==e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)e/=4294967295,n^=e;return ie(n)}if("string"===t)return e.length>Ln?ae(e):se(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return le(e);if("function"==typeof e.toString)return se(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ae(e){var t=zn[e];return void 0===t&&(t=se(e),Bn===Nn&&(Bn=0,zn={}),Bn++,zn[e]=t),t}function se(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function ce(e){J(e!==1/0,"Cannot perform this action with an infinite size.")}function pe(e){return null===e||void 0===e?_e():fe(e)&&!u(e)?e:_e().withMutations(function(t){var r=n(e);ce(r.size),r.forEach(function(e,n){return t.set(n,e)})})}function fe(e){return!(!e||!e[Un])}function he(e,t){this.ownerID=e,this.entries=t}function de(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function ve(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function ye(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function me(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function ge(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&xe(e._root)}function be(e,t){return _(e,t[0],t[1])}function xe(e,t){return{node:e,index:0,__prev:t}}function we(e,t,n,r){var i=Object.create(Wn);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function _e(){return Gn||(Gn=we(0))}function Te(e,t,n){var r,i;if(e._root){var o=c(gn),a=c(bn);if(r=ke(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===mn?-1:1:0)}else{if(n===mn)return e;i=1,r=new he(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?we(i,r):_e()}function ke(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===mn?e:(p(s),p(a),new me(t,r,[i,o]))}function Ce(e){return e.constructor===me||e.constructor===ye}function Ee(e,t,n,r,i){if(e.keyHash===r)return new ye(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&yn,s=(0===n?r:r>>>n)&yn,l=a===s?[Ee(e,t,n+dn,r,i)]:(o=new me(t,r,i),a>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new ve(e,o+1,a)}function Ae(e,t,r){for(var i=[],a=0;a>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,127&e}function Fe(e,t,n,r){var i=r?e:h(e);return i[t]=n,i}function Le(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;s0&&io?0:o-n,u=a-n;return u>vn&&(u=vn),function(){if(i===u)return Yn;var e=t?--u:i++;return r&&r[e]}}function i(e,r,i){var s,l=e&&e.array,u=i>o?0:o-i>>r,c=(a-i>>r)+1;return c>vn&&(c=vn),function(){for(;;){if(s){var e=s();if(e!==Yn)return e;s=null}if(u===c)return Yn;var o=t?--c:u++;s=n(l&&l[o],r-dn,i+(o<=e.size||t<0)return e.withMutations(function(e){t<0?Ke(e,t).set(0,n):Ke(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=c(bn);return t>=$e(e._capacity)?r=Qe(r,e.__ownerID,0,t,n,o):i=Qe(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Ge(e._origin,e._capacity,e._level,i,r):e}function Qe(e,t,n,r,i,o){var a=r>>>n&yn,s=e&&a0){var u=e&&e.array[a],c=Qe(u,t,n-dn,r,i,o);return c===u?e:(l=Ve(e,t),l.array[a]=c,l)}return s&&e.array[a]===i?e:(p(o),l=Ve(e,t),void 0===i&&a===l.array.length-1?l.array.pop():l.array[a]=i,l)}function Ve(e,t){return t&&e&&t===e.ownerID?e:new Ue(e?e.array.slice():[],t)}function Xe(e,t){if(t>=$e(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&yn],r-=dn;return n}}function Ke(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new f,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var l=e._level,u=e._root,c=0;a+c<0;)u=new Ue(u&&u.array.length?[void 0,u]:[],r),l+=dn,c+=1<=1<p?new Ue([],r):d;if(d&&h>p&&adn;m-=dn){var g=p>>>m&yn;y=y.array[g]=Ve(y.array[g],r)}y.array[p>>>dn&yn]=d}if(s=h)a-=h,s-=h,l=dn,u=null,v=v&&v.removeBefore(r,0,a);else if(a>i||h>>l&yn;if(b!==h>>>l&yn)break;b&&(c+=(1<i&&(u=u.removeBefore(r,l,a-c)),u&&ha&&(a=u.size),o(l)||(u=u.map(function(e){return q(e)})),i.push(u)}return a>e.size&&(e=e.setSize(a)),je(e,t,i)}function $e(e){return e>>dn<=vn&&a.size>=2*o.size?(i=a.filter(function(e,t){return void 0!==e&&s!==t}),r=i.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(l){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):et(r,i)}function rt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function it(e){this._iter=e,this.size=e.size}function ot(e){this._iter=e,this.size=e.size}function at(e){this._iter=e,this.size=e.size}function st(e){var t=Pt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Ot,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return t(n,e,r)!==!1},n)},t.__iteratorUncached=function(t,n){if(t===_n){var r=e.__iterator(t,n);return new w(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===wn?xn:wn,n)},t}function lt(e,t,n){var r=Pt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,mn);return o===mn?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return r(t.call(n,e,i,a),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(_n,i);return new w(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return _(r,s,t.call(n,a[1],s,e),i)})},r}function ut(e,t){var n=Pt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=st(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Ot,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function ct(e,t,n,r){var i=Pt(e);return r&&(i.has=function(r){var i=e.get(r,mn);return i!==mn&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,mn);return o!==mn&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate(function(e,o,l){if(t.call(n,e,o,l))return s++,i(e,r?o:s-1,a)},o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(_n,o),s=0;return new w(function(){for(;;){var o=a.next();if(o.done)return o;var l=o.value,u=l[0],c=l[1];if(t.call(n,c,u,e))return _(i,r?u:s++,c,o)}})},i}function pt(e,t,n){var r=pe().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function ft(e,t,n){var r=a(e),i=(u(e)?Je():pe()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return e=e||[],e.push(r?[a,o]:o),e})});var o=St(e);return i.map(function(t){return kt(e,o(t))})}function ht(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),m(t,n,i))return e;var o=g(t,i),a=b(n,i);if(o!==o||a!==a)return ht(e.toSeq().cacheResult(),t,n,r);var s,l=a-o;l===l&&(s=l<0?0:l);var u=Pt(e);return u.size=0===s?s:e.size&&s||void 0,!r&&L(e)&&s>=0&&(u.get=function(t,n){return t=v(this,t),t>=0&&ts)return T();var e=i.next();return r||t===wn?e:t===xn?_(t,l-1,void 0,e):_(t,l-1,e.value[1],e)})},u}function dt(e,t,n){var r=Pt(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(_n,i),s=!0;return new w(function(){if(!s)return T();var e=a.next();if(e.done)return e;var i=e.value,l=i[0],u=i[1];return t.call(n,u,l,o)?r===_n?e:_(r,l,u,e):(s=!1,T())})},r}function vt(e,t,n,r){var i=Pt(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,l=0;return e.__iterate(function(e,o,u){if(!s||!(s=t.call(n,e,o,u)))return l++,i(e,r?o:l-1,a)}),l},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(_n,o),l=!0,u=0;return new w(function(){var e,o,c;do{if(e=s.next(),e.done)return r||i===wn?e:i===xn?_(i,u++,void 0,e):_(i,u++,e.value[1],e);var p=e.value;o=p[0],c=p[1],l&&(l=t.call(n,c,o,a))}while(l);return i===_n?e:_(i,o,c,e)})},i}function yt(e,t){var r=a(e),i=[e].concat(t).map(function(e){return o(e)?r&&(e=n(e)):e=r?B(e):z(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var l=i[0];if(l===e||r&&a(l)||s(e)&&s(l))return l}var u=new j(i);return r?u=u.toKeyedSeq():s(e)||(u=u.toSetSeq()),u=u.flatten(!0),u.size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),u}function mt(e,t,n){var r=Pt(e);return r.__iterateUncached=function(r,i){function a(e,u){var c=this;e.__iterate(function(e,i){return(!t||u0}function Tt(e,n,r){var i=Pt(e);return i.size=new j(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(wn,t),i=0;!(n=r.next()).done&&e(n.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=t(e),E(i?e.reverse():e)}),a=0,s=!1;return new w(function(){var t;return s||(t=o.map(function(e){return e.next()}),s=t.some(function(e){return e.done})),s?T():_(e,a++,n.apply(null,t.map(function(e){return e.value})))})},i}function kt(e,t){return L(e)?t:e.constructor(t)}function Ct(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Et(e){return ce(e.size),d(e)}function St(e){return a(e)?n:s(e)?r:i}function Pt(e){return Object.create((a(e)?A:s(e)?M:I).prototype)}function Ot(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function At(e,t){return e>t?1:et?-1:0}function on(e){if(e.size===1/0)return 0;var t=u(e),n=a(e),r=t?1:0,i=e.__iterate(n?t?function(e,t){r=31*r+sn(oe(e),oe(t))|0}:function(e,t){r=r+sn(oe(e),oe(t))|0}:t?function(e){r=31*r+oe(e)|0}:function(e){r=r+oe(e)|0});return an(i,r)}function an(e,t){return t=Mn(t,3432918353),t=Mn(t<<15|t>>>-15,461845907),t=Mn(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Mn(t^t>>>16,2246822507),t=Mn(t^t>>>13,3266489909),t=ie(t^t>>>16)}function sn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}var ln=Array.prototype.slice;e(n,t),e(r,t),e(i,t),t.isIterable=o,t.isKeyed=a,t.isIndexed=s,t.isAssociative=l,t.isOrdered=u,t.Keyed=n,t.Indexed=r,t.Set=i;var un="@@__IMMUTABLE_ITERABLE__@@",cn="@@__IMMUTABLE_KEYED__@@",pn="@@__IMMUTABLE_INDEXED__@@",fn="@@__IMMUTABLE_ORDERED__@@",hn="delete",dn=5,vn=1<r?T():_(e,i,n[t?r-i++:i++])})},e(D,A),D.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},D.prototype.has=function(e){return this._object.hasOwnProperty(e)},D.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(e(n[a],a,this)===!1)return o+1}return o},D.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new w(function(){var a=r[t?i-o:o];return o++>i?T():_(e,a,n[a])})},D.prototype[fn]=!0,e(R,M),R.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,r=E(n),i=0;if(C(r))for(var o;!(o=r.next()).done&&e(o.value,i++,this)!==!1;);return i},R.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,r=E(n);if(!C(r))return new w(T);var i=0;return new w(function(){var t=r.next();return t.done?t:_(e,i++,t.value)})},e(F,M),F.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return _(e,i,r[i++])})};var Sn;e($,M),$.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},$.prototype.get=function(e,t){return this.has(e)?this._value:t},$.prototype.includes=function(e){return K(this._value,e)},$.prototype.slice=function(e,t){var n=this.size;return m(e,t,n)?this:new $(this._value,b(t,n)-g(e,n))},$.prototype.reverse=function(){return this},$.prototype.indexOf=function(e){return K(this._value,e)?0:-1},$.prototype.lastIndexOf=function(e){return K(this._value,e)?this.size:-1},$.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?T():_(e,o++,a)})},Z.prototype.equals=function(e){return e instanceof Z?this._start===e._start&&this._end===e._end&&this._step===e._step:Y(this,e)};var On;e(ee,t),e(te,ee),e(ne,ee),e(re,ee),ee.Keyed=te,ee.Indexed=ne,ee.Set=re;var An,Mn="function"==typeof Math.imul&&Math.imul(4294967295,2)===-2?Math.imul:function(e,t){e|=0,t|=0;var n=65535&e,r=65535&t;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0},In=Object.isExtensible,jn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),Dn="function"==typeof WeakMap;Dn&&(An=new WeakMap);var Rn=0,Fn="__immutablehash__";"function"==typeof Symbol&&(Fn=Symbol(Fn));var Ln=16,Nn=255,Bn=0,zn={};e(pe,te),pe.of=function(){var e=ln.call(arguments,0);return _e().withMutations(function(t){for(var n=0;n=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},pe.prototype.toString=function(){return this.__toString("Map {","}")},pe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},pe.prototype.set=function(e,t){return Te(this,e,t)},pe.prototype.setIn=function(e,t){return this.updateIn(e,mn,function(){return t})},pe.prototype.remove=function(e){return Te(this,e,mn)},pe.prototype.deleteIn=function(e){return this.updateIn(e,function(){return mn})},pe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},pe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=De(this,Mt(e),t,n);return r===mn?void 0:r},pe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):_e()},pe.prototype.merge=function(){return Ae(this,void 0,arguments)},pe.prototype.mergeWith=function(e){var t=ln.call(arguments,1);return Ae(this,e,t)},pe.prototype.mergeIn=function(e){var t=ln.call(arguments,1);return this.updateIn(e,_e(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},pe.prototype.mergeDeep=function(){return Ae(this,Me,arguments)},pe.prototype.mergeDeepWith=function(e){var t=ln.call(arguments,1);return Ae(this,Ie(e),t)},pe.prototype.mergeDeepIn=function(e){var t=ln.call(arguments,1);return this.updateIn(e,_e(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},pe.prototype.sort=function(e){return Je(xt(this,e))},pe.prototype.sortBy=function(e,t){return Je(xt(this,t,e))},pe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},pe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new f)},pe.prototype.asImmutable=function(){return this.__ensureOwner()},pe.prototype.wasAltered=function(){return this.__altered},pe.prototype.__iterator=function(e,t){return new ge(this,e,t)},pe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},pe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?we(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},pe.isMap=fe;var Un="@@__IMMUTABLE_MAP__@@",Wn=pe.prototype;Wn[Un]=!0,Wn[hn]=Wn.remove,Wn.removeIn=Wn.deleteIn,he.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=Hn)return Se(e,l,r,i);var d=e&&e===this.ownerID,v=d?l:h(l);return f?s?u===c-1?v.pop():v[u]=v.pop():v[u]=[r,i]:v.push([r,i]),d?(this.entries=v,this):new he(e,v)}},de.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=1<<((0===e?t:t>>>e)&yn),o=this.bitmap;return 0===(o&i)?r:this.nodes[Re(o&i-1)].get(e+dn,t,n,r)},de.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&yn,l=1<=qn)return Oe(e,f,u,s,d);if(c&&!d&&2===f.length&&Ce(f[1^p]))return f[1^p];if(c&&d&&1===f.length&&Ce(d))return d;var v=e&&e===this.ownerID,y=c?d?u:u^l:u|l,m=c?d?Fe(f,p,d,v):Ne(f,p,v):Le(f,p,d,v);return v?(this.bitmap=y,this.nodes=m,this):new de(e,y,m)},ve.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=(0===e?t:t>>>e)&yn,o=this.nodes[i];return o?o.get(e+dn,t,n,r):r},ve.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&yn,l=i===mn,u=this.nodes,c=u[s];if(l&&!c)return this;var p=ke(c,e,t+dn,n,r,i,o,a);if(p===c)return this;var f=this.count;if(c){if(!p&&(f--,f=0&&e>>t&yn;if(r>=this.array.length)return new Ue([],e);var i,o=0===r;if(t>0){var a=this.array[r];if(i=a&&a.removeBefore(e,t-dn,n),i===a&&o)return this}if(o&&!i)return this;var s=Ve(this,e);if(!o)for(var l=0;l>>t&yn;if(r>=this.array.length)return this;var i;if(t>0){var o=this.array[r];if(i=o&&o.removeAfter(e,t-dn,n),i===o&&r===this.array.length-1)return this}var a=Ve(this,e);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Kn,Yn={};e(Je,pe),Je.of=function(){return this(arguments)},Je.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Je.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Je.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):tt()},Je.prototype.set=function(e,t){return nt(this,e,t)},Je.prototype.remove=function(e){return nt(this,e,mn)},Je.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Je.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Je.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Je.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?et(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Je.isOrderedMap=Ze,Je.prototype[fn]=!0,Je.prototype[hn]=Je.prototype.remove;var $n;e(rt,A),rt.prototype.get=function(e,t){return this._iter.get(e,t)},rt.prototype.has=function(e){return this._iter.has(e)},rt.prototype.valueSeq=function(){return this._iter.valueSeq()},rt.prototype.reverse=function(){var e=this,t=ut(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},rt.prototype.map=function(e,t){var n=this,r=lt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},rt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Et(this):0,function(i){return e(i,t?--n:n++,r)}),t)},rt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(wn,t),r=t?Et(this):0;return new w(function(){var i=n.next();return i.done?i:_(e,t?--r:r++,i.value,i)})},rt.prototype[fn]=!0,e(it,M),it.prototype.includes=function(e){return this._iter.includes(e)},it.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},it.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t),r=0;return new w(function(){var t=n.next();return t.done?t:_(e,r++,t.value,t)})},e(ot,I),ot.prototype.has=function(e){return this._iter.includes(e)},ot.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},ot.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t);return new w(function(){var t=n.next();return t.done?t:_(e,t.value,t.value,t)})},e(at,A),at.prototype.entrySeq=function(){return this._iter.toSeq()},at.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){Ct(t);var r=o(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},at.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t);return new w(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){Ct(r);var i=o(r);return _(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},it.prototype.cacheResult=rt.prototype.cacheResult=ot.prototype.cacheResult=at.prototype.cacheResult=Ot,e(It,te),It.prototype.toString=function(){return this.__toString(Dt(this)+" {","}")},It.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},It.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},It.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=jt(this,_e()))},It.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Dt(this));if(this._map&&!this._map.has(e)){var n=this._defaultValues[e];if(t===n)return this}var r=this._map&&this._map.set(e,t);return this.__ownerID||r===this._map?this:jt(this,r)},It.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:jt(this,t)},It.prototype.wasAltered=function(){return this._map.wasAltered()},It.prototype.__iterator=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterator(e,t)},It.prototype.__iterate=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterate(e,t)},It.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?jt(this,t,e):(this.__ownerID=e,this._map=t,this)};var Jn=It.prototype;Jn[hn]=Jn.remove,Jn.deleteIn=Jn.removeIn=Wn.removeIn,Jn.merge=Wn.merge,Jn.mergeWith=Wn.mergeWith,Jn.mergeIn=Wn.mergeIn,Jn.mergeDeep=Wn.mergeDeep,Jn.mergeDeepWith=Wn.mergeDeepWith,Jn.mergeDeepIn=Wn.mergeDeepIn,Jn.setIn=Wn.setIn,Jn.update=Wn.update,Jn.updateIn=Wn.updateIn,Jn.withMutations=Wn.withMutations,Jn.asMutable=Wn.asMutable,Jn.asImmutable=Wn.asImmutable,e(Lt,re),Lt.of=function(){return this(arguments)},Lt.fromKeys=function(e){return this(n(e).keySeq())},Lt.prototype.toString=function(){return this.__toString("Set {","}")},Lt.prototype.has=function(e){return this._map.has(e)},Lt.prototype.add=function(e){return Bt(this,this._map.set(e,!0))},Lt.prototype.remove=function(e){return Bt(this,this._map.remove(e))},Lt.prototype.clear=function(){return Bt(this,this._map.clear())},Lt.prototype.union=function(){var e=ln.call(arguments,0);return e=e.filter(function(e){return 0!==e.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var n=0;n=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Xt(e,t)},Qt.prototype.pushAll=function(e){if(e=r(e),0===e.size)return this;ce(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Xt(t,n)},Qt.prototype.pop=function(){return this.slice(1)},Qt.prototype.unshift=function(){return this.push.apply(this,arguments)},Qt.prototype.unshiftAll=function(e){return this.pushAll(e)},Qt.prototype.shift=function(){return this.pop.apply(this,arguments)},Qt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Kt()},Qt.prototype.slice=function(e,t){if(m(e,t,this.size))return this;var n=g(e,this.size),r=b(t,this.size);if(r!==this.size)return ne.prototype.slice.call(this,e,t);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Xt(i,o)},Qt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Xt(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Qt.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&e(r.value,n++,this)!==!1;)r=r.next;return n},Qt.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new w(function(){if(r){var t=r.value;return r=r.next,_(e,n++,t)}return T()})},Qt.isStack=Vt;var ir="@@__IMMUTABLE_STACK__@@",or=Qt.prototype;or[ir]=!0,or.withMutations=Wn.withMutations,or.asMutable=Wn.asMutable,or.asImmutable=Wn.asImmutable,or.wasAltered=Wn.wasAltered;var ar;t.Iterator=w,Yt(t,{toArray:function(){ce(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new it(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new rt(this,!0)},toMap:function(){return pe(this.toKeyedSeq())},toObject:function(){ce(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Je(this.toKeyedSeq())},toOrderedSet:function(){return Wt(a(this)?this.valueSeq():this)},toSet:function(){return Lt(a(this)?this.valueSeq():this)},toSetSeq:function(){return new ot(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Qt(a(this)?this.valueSeq():this)},toList:function(){return Be(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var e=ln.call(arguments,0);return kt(this,yt(this,e))},includes:function(e){return this.some(function(t){return K(t,e)})},entries:function(){return this.__iterator(_n)},every:function(e,t){ce(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return kt(this,ct(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return ce(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){ce(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!==r&&void 0!==r?r.toString():""}),t},keys:function(){return this.__iterator(xn)},map:function(e,t){return kt(this,lt(this,e,t))},reduce:function(e,t,n){ce(this.size);var r,i;return arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return kt(this,ut(this,!0))},slice:function(e,t){return kt(this,ht(this,e,t,!0))},some:function(e,t){return!this.every(Zt(e),t)},sort:function(e){return kt(this,xt(this,e))},values:function(){return this.__iterator(wn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return d(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return pt(this,e,t)},equals:function(e){return Y(this,e)},entrySeq:function(){var e=this;if(e._cache)return new j(e._cache);var t=e.toSeq().map(Jt).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Zt(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(y)},flatMap:function(e,t){return kt(this,gt(this,e,t))},flatten:function(e){return kt(this,mt(this,e,!0))},fromEntrySeq:function(){return new at(this)},get:function(e,t){return this.find(function(t,n){return K(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=Mt(e);!(n=i.next()).done;){var o=n.value;if(r=r&&r.get?r.get(o,mn):mn,r===mn)return t}return r},groupBy:function(e,t){return ft(this,e,t)},has:function(e){return this.get(e,mn)!==mn},hasIn:function(e){return this.getIn(e,mn)!==mn},isSubset:function(e){return e="function"==typeof e.includes?e:t(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e="function"==typeof e.isSubset?e:t(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(t){return K(t,e)})},keySeq:function(){return this.toSeq().map($t).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return wt(this,e)},maxBy:function(e,t){return wt(this,t,e)},min:function(e){return wt(this,e?en(e):rn)},minBy:function(e,t){return wt(this,t?en(t):rn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return kt(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return kt(this,vt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Zt(e),t)},sortBy:function(e,t){return kt(this,xt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return kt(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return kt(this,dt(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Zt(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var sr=t.prototype;sr[un]=!0,sr[Cn]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=tn,sr.inspect=sr.toSource=function(){return this.toString()},sr.chain=sr.flatMap,sr.contains=sr.includes,Yt(n,{flip:function(){return kt(this,st(this))},mapEntries:function(e,t){var n=this,r=0;return kt(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return kt(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var lr=n.prototype;lr[cn]=!0,lr[Cn]=sr.entries,lr.__toJS=sr.toObject,lr.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+tn(e)},Yt(r,{toKeyedSeq:function(){return new rt(this,!1)},filter:function(e,t){return kt(this,ct(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return kt(this,ut(this,!1))},slice:function(e,t){return kt(this,ht(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=g(e,e<0?this.count():this.size);var r=this.slice(0,e);return kt(this,1===n?r:r.concat(h(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return kt(this,mt(this,e,!1))},get:function(e,t){return e=v(this,e),e<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return e=v(this,e),e>=0&&(void 0!==this.size?this.size===1/0||e":'"'+e.value+'"^^<'+a+">"}else o=null==r&&null==i?'"'+n+'"':null==i?'"'+n+'"@'+r:i.indexOf("hexBinary")!=-1?'"'+e.value.toLowerCase()+'"^^<'+i+">":'"'+e.value+'"^^<'+i+">";return o},normalizeUnicodeLiterals=function(string){for(var escapedUnicode=string.match(/\\u[0-9abcdefABCDEF]{4,4}/g)||[],dups={},i=0;i=e.length?n():nextTick(i))})};i()},eachParallel=function(e,t,n){if(n=n||function(){},!e.length)return n();for(var r=!1,i=0,o=function(t){if(t)throw r=!0,new Error(t);r||(i++,i===e.length&&n())},a=0;a1)for(var n=1;n=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function y(e){return+e!=e&&(e=0),a.alloc(+e)}function m(e,t){if(a.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 q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(r)return q(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,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return P(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function b(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function x(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=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,l=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;us&&(n=s-l),u=n;u>=0;u--){for(var p=!0,f=0;fi&&(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 a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=n){var l,u,c,p;switch(s){case 1:o<128&&(a=o);break;case 2:l=e[i+1],128===(192&l)&&(p=(31&o)<<6|63&l,p>127&&(a=p));break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(p=(15&o)<<12|(63&l)<<6|63&u,p>2047&&(p<55296||p>57343)&&(a=p));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(p=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c,p>65535&&p<1114112&&(a=p))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return A(r)}function A(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.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>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function B(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 z(e,t,n,r,i){return i||B(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||B(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(e,t,n,r,52,8),n+8}function W(e){if(e=G(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function G(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+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=(i-55296<<10|n-56320)+65536}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 Q(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function X(e){return $.toByteArray(W(e))}function K(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e){return e!==e}var $=n(429),J=n(478),Z=n(158);t.Buffer=a,t.SlowBuffer=y,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),t.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return s(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return u(null,e,t,n)},a.allocUnsafe=function(e){return c(null,e)},a.allocUnsafeSlow=function(e){return c(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.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);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},a.prototype.compare=function(e,t,n,r,i){if(!a.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(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,l=Math.min(o,s),u=this.slice(r,i),c=e.slice(t,n),p=0;pi)&&(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 _(this,e,t,n);case"utf8":case"utf-8":return T(this,e,t,n);case"ascii":return k(this,e,t,n);case"latin1":case"binary":return C(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},a.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),J.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),J.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),J.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),J.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;F(this,e,t,n,i,0)}var o=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+o]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);F(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);F(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},a.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=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=0;--i)e[i+t]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o1&&void 0!==arguments[1]?arguments[1]:this.measures,r=n.map(function(n){var r=t.getComponentElementFromObservation(e,n);return r});return r}},{key:"getAttributeElementsFromObservation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.attributes,n=this.getComponentsElementFromObservation(e,this.attributesElements,t);return n}},{key:"getDimensionElementsFromObservation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.dimensions,n=this.getComponentsElementFromObservation(e,this.assignedDimEls,t);return n}},{key:"getComponentElementFromObservation",value:function(e,t){if(e.get(t.get("@id")))return e.get(t.get("@id")).first()}},{key:"getComponentsElementFromObservation",value:function(e,t,n){var r=this;if(!n)return(0,f.List)();var i=n.map(function(n){var i=r.getComponentElementFromObservation(e,n);if(i){var o=r.getComponentElements(t,n);return o.find(function(e){return e.get("@id")===i.get("@id")})}});return i.filter(function(e){return void 0!==e})}},{key:"getComponentElements",value:function(e,t){return e.get(t.get("@id"))}}],[{key:"getLabel",value:function(e,n){var r=h.default.fromJS(p.LabelUris).find(function(t){return e.get(t)});if(r){var i=e.get(r),o=i.find(function(e){return e.get("@language")===n});return o?o:i.first()}return(0,f.Map)({"@value":t.getUri(e).match(/([^\/]*)\/*$/)[1]})}},{key:"getUri",value:function(e){return e.get("@id")}},{key:"getValue",value:function(e){var t=e.get("@value");if(t){var n=e.get("@type");if(void 0===n)return t;if(n===p.FloatUri||n===p.DoubleUri||n===p.DecimalUri)return parseFloat(t);throw new Error("DataCube: Object has unkown type")}throw new Error("DataCube: Object has no value")}},{key:"empty",value:function(){var e=new t(null);return e.defaultLanguage="",e.dataset=(0,f.fromJS)({}),e.dataStructureDefinition=(0,f.fromJS)({}),e.measures=(0,f.fromJS)([]),e.dimensions=(0,f.fromJS)([]),e.attributes=(0,f.fromJS)([]),e.attributesElements=(0,f.fromJS)({}),e.assignedDimEls=(0,f.fromJS)([]),e.observations=(0,f.fromJS)([]),e}}]),t}(v.default);t.default=y},function(e,t,n){var r=n(286),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t,n){"use strict";var r=null;e.exports={debugTool:r}},function(e,t,n){(function(e){function n(e){return Array.isArray?Array.isArray(e):"[object Array]"===y(e)}function r(e){return"boolean"==typeof e}function i(e){return null===e}function o(e){return null==e}function a(e){return"number"==typeof e}function s(e){return"string"==typeof e}function l(e){return"symbol"==typeof e}function u(e){return void 0===e}function c(e){return"[object RegExp]"===y(e)}function p(e){return"object"==typeof e&&null!==e}function f(e){return"[object Date]"===y(e)}function h(e){return"[object Error]"===y(e)||e instanceof Error}function d(e){return"function"==typeof e}function v(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function y(e){return Object.prototype.toString.call(e)}t.isArray=n,t.isBoolean=r,t.isNull=i,t.isNullOrUndefined=o,t.isNumber=a,t.isString=s,t.isSymbol=l,t.isUndefined=u,t.isRegExp=c,t.isObject=p,t.isDate=f,t.isError=h,t.isFunction=d,t.isPrimitive=v,t.isBuffer=e.isBuffer}).call(t,n(26).Buffer)},function(e,t,n){function r(e){if(a.unindexedChars&&o(e)){for(var t=-1,n=e.length,r=Object(e);++t2&&void 0!==arguments[2]&&arguments[2];return function(r,i){return e.then(function(){var e=i(),o=e.dataCubeReducer,a=o.get("dataCube"),s=u(t.data_configuration,a),l=c(t.data_configuration,a),f=p(t.data_configuration,a);if(s!==-1&&r((0,g.changeSelectedComponentIndex)("measureComponents",s)),a.attributes.size>0&&r((0,g.changeSelectedComponentIndex)("attrComponentElements",l)),r((0,g.changeSelectedComponentIndex)("dimComponentElements",f)),n){var h="ui_configuration"in t&&"chart_name"in t.ui_configuration?t.ui_configuration.chart_name:"";r((0,g.handleAccept)({chartName:h}))}}).catch(function(e){console.error(e)})}}function h(e){return function(t){return G.validate(e).then(function(){if(t(z(e)),e&&"data_configuration"in e&&"source"in e.data_configuration){var n=!1;"ui_configuration"in e&&"show_ui_elements"in e.ui_configuration&&(n=!e.ui_configuration.show_ui_elements),t(f(s("endpoint",e.data_configuration.source,t),e,n))}else t(f(s("endpoint","https://raw.githubusercontent.com/AKSW/cubeviz.ontowiki/master/assets/serbia.n3",t),e))}).catch(function(e){console.log(e.errors.toString())})}}Object.defineProperty(t,"__esModule",{value:!0}),t.changeDataSetIndex=t.changeDataSets=t.changeUserConfig=t.addNewLineToLogBox=t.changeLogBoxVisibility=t.changeRdfStore=t.changeImportSettings=t.hideSettingsModal=t.showSettingsModal=t.showGlobalPopover=t.CHANGE_USER_CONFIG=t.ADD_NEW_LINE_TO_LOG_BOX=t.CHANGE_LOG_BOX_VISIBILITY=t.CHANGE_DATASET_INDEX=t.CHANGE_DATASETS=t.CHANGE_RDF_STORE=t.CHANGE_IMPORT_SETTINGS=t.HIDE_SETTINGS_MODAL=t.SHOW_SETTINGS_MODAL=t.SHOW_GLOBAL_POPOVER=void 0,t.createRdfStore=i,t.listDataSets=o,t.dataSetSelectionChanged=a,t.importPromise=s,t.doImport=l,t.preSelection=f,t.handleConfiguration=h;var d=n(953),v=r(d),y=n(15),m=n(379),g=n(47),b=n(406),x=r(b),w=n(228),_=r(w),T=n(398),k=r(T),C=n(411),E=t.SHOW_GLOBAL_POPOVER="SHOW_GLOBAL_POPOVER",S=t.SHOW_SETTINGS_MODAL="SHOW_SETTINGS_MODAL",P=t.HIDE_SETTINGS_MODAL="HIDE_SETTINGS_MODAL",O=t.CHANGE_IMPORT_SETTINGS="CHANGE_IMPORT_SETTINGS",A=t.CHANGE_RDF_STORE="CHANGE_RDF_STORE",M=t.CHANGE_DATASETS="CHANGE_DATASETS",I=t.CHANGE_DATASET_INDEX="CHANGE_DATASET_INDEX",j=t.CHANGE_LOG_BOX_VISIBILITY="CHANGE_LOG_BOX_VISIBILITY",D=t.ADD_NEW_LINE_TO_LOG_BOX="ADD_NEW_LINE_TO_LOG_BOX",R=t.CHANGE_USER_CONFIG="CHANGE_USER_CONFIG",F=t.showGlobalPopover=(0,m.createAction)(E,function(e,t){return{show:e,title:t}}),L=(t.showSettingsModal=(0,m.createAction)(S,function(e,t){return{modalType:e,anchorEl:t}}),t.hideSettingsModal=(0,m.createAction)(P),t.changeImportSettings=(0,m.createAction)(O,function(e,t){return e===b.IMPORT_TYPE_FILE_UPLOAD?{importType:e,value:t.name}:{importType:e,value:t}})),N=t.changeRdfStore=(0,m.createAction)(A),B=(t.changeLogBoxVisibility=(0,m.createAction)(j),t.addNewLineToLogBox=(0,m.createAction)(D)),z=t.changeUserConfig=(0,m.createAction)(R),U=t.changeDataSets=(0,m.createAction)(M),W=t.changeDataSetIndex=(0,m.createAction)(I),G=v.default.object().strict().shape({data_configuration:v.default.object().shape({source:v.default.string(),measure:v.default.string(),attribute:v.default.string(),dimension_elements:v.default.array().of(v.default.string())}),ui_configuration:v.default.object().shape({ui_container:v.default.string().required(),show_ui_elements:v.default.bool(),chart_name:v.default.string()}).required()}).required()},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){return n?[e,t]:e},e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var i=this.constructor.Interface;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s?this[o]=s(n):"target"===o?this.target=r:this[o]=n[o]}var l=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return l?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var i=n(14),o=n(57),a=n(27),s=(n(7),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),l={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};i(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){var r=n(118),i=n(70),o=n(51),a="[object Array]",s=Object.prototype,l=s.toString,u=r(Array,"isArray"),c=u||function(e){return o(e)&&i(e.length)&&l.call(e)==a};e.exports=c},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=n},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";var r=n(10).default,i=n(9).default,o=n(3).default,a=n(2).default;t.__esModule=!0;var s=n(1),l=a(s),u=n(25),c=a(u),p=function(e){function t(n){i(this,t),e.call(this,n),this.handleClick=this.handleClick.bind(this)}return r(t,e),t.prototype.handleClick=function(e){void 0===this.props.href&&e.preventDefault()},t.prototype.render=function(){return l.default.createElement("a",o({role:this.props.href?void 0:"button"},this.props,{onClick:c.default(this.props.onClick,this.handleClick),href:this.props.href||""}))},t}(l.default.Component);t.default=p,p.propTypes={href:l.default.PropTypes.string,onClick:l.default.PropTypes.func},e.exports=t.default},function(e,t,n){function r(){i.call(this)}e.exports=r;var i=n(41).EventEmitter,o=n(28);o(r,i),r.Readable=n(903),r.Writable=n(905),r.Duplex=n(901),r.Transform=n(904),r.PassThrough=n(902),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&u.pause&&u.pause()}function r(){u.readable&&u.resume&&u.resume()}function o(){c||(c=!0,e.end())}function a(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(l(),0===i.listenerCount(this,"error"))throw e}function l(){u.removeListener("data",n),e.removeListener("drain",r),u.removeListener("end",o),u.removeListener("close",a),u.removeListener("error",s),e.removeListener("error",s),u.removeListener("end",l),u.removeListener("close",l),e.removeListener("close",l)}var u=this;u.on("data",n),e.on("drain",r),e._isStdio||t&&t.end===!1||(u.on("end",o),u.on("close",a));var c=!1;return u.on("error",s),e.on("error",s),u.on("end",l),u.on("close",l),e.on("close",l),e.emit("pipe",u),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function o(e,t,n){return t.map(function(t,r){var i=n.getComponentFromUri(e,r);return(0,g.Map)({header:k.default.getValue(n.getLabel(i)),elements:t.map(function(e){return k.default.getValue(n.getLabel(e))})})}).toList().toJS()}function a(e,t){return e.map(function(e){return k.default.getValue(t.getLabel(e))}).toJS()}function s(e,t,n){return e.map(function(e,r){var i=n.getComponentFromUri(t,r);return(0,g.Map)({comp:i,compEls:e})}).toList()}function l(e,t){return t.reduce(function(t,n){return t.push(e.get(n))},(0,g.List)())}function u(e,t){return(0,g.fromJS)(e).map(function(e,n){var r=t.get(n),i=l(r.get("compEls"),e);return i}).toList().flatten(1)}function c(e){return e.map(function(e){return e.get("name")})}function p(e){return function(t){var n=new k.default(e);n.setLogger({logFct:C.addNewLineToLogBox,dispatch:t});var r=o(n.dimensions,n.assignedDimEls,n),i=o(n.attributes,n.attributesElements,n),s=a(n.measures,n);t(L(n)),t(N({dimComponentElements:r,attrComponentElements:i,measureComponents:s}))}}function f(e){return function(t,n){var r=n(),i=r.dataCubeReducer,o=i.get("cubeVizCharts"),a=parseInt(e,10),s=o.get(a),l=(0,_.default)(s,i.get("selectedComponents"),i.get("slice"),i.get("dataCube"));t(q(l)),t(H(s)),t(G(a))}}function h(e,t){var n=u(e.getIn(["selectedComponentsIndex","attrComponentElements"]),s(t.attributesElements,t.attributes,t)),r=u(e.getIn(["selectedComponentsIndex","dimComponentElements"]),s(t.assignedDimEls,t.dimensions,t)),i=e.getIn(["selectedComponentsIndex","measureComponents"]),o=t.measures.get(i);return{selectedMeasure:o,selectedAttrElements:n,selectedDimElements:r}}function d(e,t,n,r){return e?0===n.size?[!1,"No dimension elements selected"]:0===t.size&&r.attributes.size>0?[!1,"No attribute selected"]:[!0]:[!1,"No measure selected"]}function v(e,t,n){var r=-1;return""!==t&&(r=n.findIndex(function(e){return null!==e.get("name").match(new RegExp(t,"i"))})),r===-1&&(r=e),r}function y(e){var t=e.chartIndex,n=void 0===t?0:t,r=e.chartName,i=void 0===r?"":r;return function(e,t){var r=t(),o=r.dataCubeReducer,a=o.get("dataCube"),s=h(o,a),l=s.selectedMeasure,u=s.selectedAttrElements,p=s.selectedDimElements,y=d(l,u,p,a);if(!y[0])return void e((0,C.addNewLineToLogBox)("Error: "+y[1]));var m=x.createDataCube(l,u.size>0?u.first():null,p,a),b=x.determineCharts(null,m);e((0,C.addNewLineToLogBox)("Selected "+m.observations.size+" Observation(s)")),b.forEach(function(t){e((0,C.addNewLineToLogBox)(t.get("name"))),e((0,C.addNewLineToLogBox)("Satisfied rules:")),e((0,C.addNewLineToLogBox)(t.get("satisfied").map(function(e){return" "+e.toString()+" "}))),e((0,C.addNewLineToLogBox)("Not satisfied rules:")),e((0,C.addNewLineToLogBox)(t.get("notSatisfied").map(function(e){return" "+e.toString()+" "})))});var w=b.filter(function(e){return e.get("isSatisfied")}),_=v(n,i,w);w.size>_&&(e(B(m)),e(z(w)),e(U(c(w))),e(W((0,g.Map)({dimComponentElements:p,attrComponentElement:u.size>0?u.first():null,measureComponent:l}))),e(f(_)))}}Object.defineProperty(t,"__esModule",{value:!0}),t.resetAllDataCubeState=t.changeSelectedComponentIndex=t.changedSelectedChartReact=t.changedSelectedChart=t.changedSelectedChartIdx=t.newSelectedComponents=t.newCubeVizChartNames=t.newCubeVizCharts=t.newSlice=t.newSelectableComponents=t.newDataCube=t.RESET_ALL_DATA_CUBE_STATE=t.CHANGE_SELECTED_COMPONENT_INDEX=t.CHANGED_SELECTED_CHART_REACT=t.CHANGED_SELECTED_CHART=t.CHANGED_SELECTED_CHART_IDX=t.NEW_SELECTED_COMPONENTS=t.NEW_CUBEVIZ_CHART_NAMES=t.NEW_CUBEVIZ_CHARTS=t.NEW_SLICE=t.NEW_SELECTABLE_COMPONENTS=t.NEW_DATA_CUBE=void 0,t.createNewDataCube=p,t.changeSelectedChart=f,t.handleAccept=y;var m=n(379),g=n(15),b=n(405),x=i(b),w=n(404),_=r(w),T=n(31),k=r(T),C=n(37),E=t.NEW_DATA_CUBE="NEW_DATA_CUBE",S=t.NEW_SELECTABLE_COMPONENTS="NEW_SELECTABLE_COMPONENTS",P=t.NEW_SLICE="NEW_SLICE",O=t.NEW_CUBEVIZ_CHARTS="NEW_CUBEVIZ_CHARTS",A=t.NEW_CUBEVIZ_CHART_NAMES="NEW_CUBEVIZ_CHART_NAMES",M=t.NEW_SELECTED_COMPONENTS="NEW_SELECTED_COMPONENTS",I=t.CHANGED_SELECTED_CHART_IDX="CHANGED_SELECTED_CHART_IDX",j=t.CHANGED_SELECTED_CHART="CHANGED_SELECTED_CHART",D=t.CHANGED_SELECTED_CHART_REACT="CHANGED_SELECTED_CHART_REACT",R=t.CHANGE_SELECTED_COMPONENT_INDEX="CHANGE_SELECTED_COMPONENT_INDEX",F=t.RESET_ALL_DATA_CUBE_STATE="RESET_ALL_DATA_CUBE_STATE",L=t.newDataCube=(0,m.createAction)(E),N=t.newSelectableComponents=(0,m.createAction)(S),B=t.newSlice=(0,m.createAction)(P),z=t.newCubeVizCharts=(0,m.createAction)(O),U=t.newCubeVizChartNames=(0,m.createAction)(A),W=t.newSelectedComponents=(0,m.createAction)(M),G=t.changedSelectedChartIdx=(0,m.createAction)(I),H=t.changedSelectedChart=(0,m.createAction)(j),q=t.changedSelectedChartReact=(0,m.createAction)(D);t.changeSelectedComponentIndex=(0,m.createAction)(R,function(e,t){return{key:e,selection:t}}),t.resetAllDataCubeState=(0,m.createAction)(F)},function(e,t,n){e.exports={default:n(434),__esModule:!0}},function(e,t){"use strict";e.exports=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(e,t){},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t,n){function r(e){return null==e?void 0===e?l:s:(e=Object(e),u&&u in e?o(e):a(e))}var i=n(71),o=n(604),a=n(632),s="[object Null]",l="[object Undefined]",u=i?i.toStringTag:void 0;e.exports=r},function(e,t,n){function r(e,t){var n=o(e,t);return i(n)?n:void 0}var i=n(566),o=n(605);e.exports=r},function(e,t,n){function r(e,t){return null!=e&&o(e,t,i)}var i=n(561),o=n(290);e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=r.PropTypes.oneOf(["left","middle","right"]),o=r.PropTypes.oneOf(["top","center","bottom"]);t.default={corners:r.PropTypes.oneOf(["bottom-left","bottom-right","top-left","top-right"]),horizontal:i,vertical:o,origin:r.PropTypes.shape({horizontal:i,vertical:o}),cornersAndCenter:r.PropTypes.oneOf(["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"]),stringOrNumber:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.number]),zDepth:r.PropTypes.oneOf([0,1,2,3,4,5])}},function(e,t,n){"use strict";var r=n(3).default,i=n(2).default;t.__esModule=!0;var o=n(1),a=i(o),s=n(4),l=i(s),u=n(29),c=i(u),p=n(6),f=i(p),h=n(24),d=["button","reset","submit"],v=h.State.values().concat(h.DEFAULT,h.PRIMARY,h.LINK),y=a.default.createClass({displayName:"Button",propTypes:{active:a.default.PropTypes.bool,disabled:a.default.PropTypes.bool,block:a.default.PropTypes.bool,navItem:a.default.PropTypes.bool,navDropdown:a.default.PropTypes.bool,componentClass:c.default,href:a.default.PropTypes.string,target:a.default.PropTypes.string,type:a.default.PropTypes.oneOf(d)},getDefaultProps:function(){return{active:!1,block:!1,disabled:!1,navItem:!1,navDropdown:!1}},render:function(){var e,t=this.props.navDropdown?{}:f.default.getClassSet(this.props),n=void 0,i=f.default.prefix(this.props,"block");return t=r((e={active:this.props.active},e[i]=this.props.block,e),t),this.props.navItem?this.renderNavItem(t):(n=this.props.href||this.props.target||this.props.navDropdown?"renderAnchor":"renderButton",this[n](t))},renderAnchor:function(e){var t=this.props.componentClass||"a",n=this.props.href||"#";return e.disabled=this.props.disabled,a.default.createElement(t,r({},this.props,{href:n,className:l.default(this.props.className,e),role:"button"}),this.props.children)},renderButton:function(e){var t=this.props.componentClass||"button";return a.default.createElement(t,r({},this.props,{type:this.props.type||"button",className:l.default(this.props.className,e)}),this.props.children)},renderNavItem:function(e){var t={active:this.props.active};return a.default.createElement("li",{className:l.default(t)},this.renderAnchor(e))}});y.types=d,t.default=p.bsStyles(v,h.DEFAULT,p.bsSizes([h.Sizes.LARGE,h.Sizes.SMALL,h.Sizes.XSMALL],p.bsClass("btn",y))),e.exports=t.default},[968,11],function(e,t,n){"use strict";var r=n(14),i=n(368),o=n(217),a=n(895),s=n(890),l=n(891),u=n(59),c=n(893),p=n(898),f=n(900),h=(n(7),u.createElement),d=u.createFactory,v=u.cloneElement,y=r,m={Children:{map:i.map,forEach:i.forEach,count:i.count,toArray:i.toArray,only:f},Component:o,PureComponent:a,createElement:h,cloneElement:v,isValidElement:u.isValidElement,PropTypes:c,createClass:s.createClass,createFactory:d,createMixin:function(e){return e},DOM:l,version:p,__spread:y};e.exports=m},function(e,t,n){"use strict";function r(e){return void 0!==e.ref}function i(e){return void 0!==e.key}var o=n(14),a=n(40),s=(n(7),n(371),Object.prototype.hasOwnProperty),l=n(369),u={key:!0,ref:!0,__self:!0,__source:!0},c=function(e,t,n,r,i,o,a){var s={$$typeof:l,type:e,key:t,ref:n,props:a,_owner:o};return s};c.createElement=function(e,t,n){var o,l={},p=null,f=null,h=null,d=null;if(null!=t){r(t)&&(f=t.ref),i(t)&&(p=""+t.key),h=void 0===t.__self?null:t.__self,d=void 0===t.__source?null:t.__source;for(o in t)s.call(t,o)&&!u.hasOwnProperty(o)&&(l[o]=t[o])}var v=arguments.length-2;if(1===v)l.children=n;else if(v>1){for(var y=Array(v),m=0;m1){for(var b=Array(g),x=0;x1}}},{key:"isSatisfiedBy",value:function(e){var t=this.dimensionsConstraint(this.constraint(),e);return t.size===this.num}},{key:"toString",value:function(){return"multi element dimension ("+this.num+")"}}]),t}(l),t.ObservationsRangeSpec=function(e){function t(e,n){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.a=e,o.b=n,o}return o(t,e),a(t,[{key:"isSatisfiedBy",value:function(e){return e.observations.size>=this.a&&e.observations.size<=this.b}},{key:"toString",value:function(){return"observation range ("+this.a+", "+this.b+")"}}]),t}(s.CompositeSpecification),t.ProcessingSpec=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"process",value:function(e){throw new Error("Do not call function from ProcessingSpec base class")}},{key:"isSatisfiedBy",value:function(e){throw new Error("Do not call function from ProcessingSpec base class")}}]),t}(s.CompositeSpecification)},function(e,t){"use strict";function n(e){return e&&e.ownerDocument||document}t.__esModule=!0,t.default=n,e.exports=t.default},function(e,t,n){"use strict";var r=n(49),i=function(){var e=r&&document.documentElement;return e&&e.contains?function(e,t){return e.contains(t)}:e&&e.compareDocumentPosition?function(e,t){return e===t||!!(16&e.compareDocumentPosition(t))}:function(e,t){if(t)do if(t===e)return!0;while(t=t.parentNode);return!1}}();e.exports=i},function(e,t){t=e.exports=function(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return o[e];var i=String(e),a=n[i.toLowerCase()];if(a)return a;var a=r[i.toLowerCase()];return a?a:1===i.length?i.charCodeAt(0):void 0};var n=t.code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(i=97;i<123;i++)n[String.fromCharCode(i)]=i-32;for(var i=48;i<58;i++)n[i-48]=i;for(i=1;i<13;i++)n["f"+i]=i+111;for(i=0;i<10;i++)n["numpad "+i]=i+96;var o=t.names=t.title={};for(i in n)o[n[i]]=i;for(var a in r)n[a]=r[a]},function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=n},function(e,t,n){var r=n(32),i=r.Symbol;e.exports=i},function(e,t,n){function r(e,t,n,r){var a=!n;n||(n={});for(var s=-1,l=t.length;++sn?n:e}function r(e){var t=e.type,n=e.values;if(t.indexOf("rgb")>-1)for(var r=0;r<3;r++)n[r]=parseInt(n[r]);var i=void 0;return i=t.indexOf("hsl")>-1?e.type+"("+n[0]+", "+n[1]+"%, "+n[2]+"%":e.type+"("+n[0]+", "+n[1]+", "+n[2],i+=4===n.length?", "+e.values[3]+")":")"}function i(e){if(4===e.length){for(var t="#",n=1;n-1){var t=e.values.map(function(e){return e/=255,e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}if(e.type.indexOf("hsl")>-1)return e.values[2]/100}function l(e){var t=arguments.length<=1||void 0===arguments[1]?.15:arguments[1];return s(e)>.5?c(e,t):p(e,t)}function u(e,t){return e=o(e),t=n(t,0,1),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,r(e)}function c(e,t){if(e=o(e),t=n(t,0,1),e.type.indexOf("hsl")>-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")>-1)for(var i=0;i<3;i++)e.values[i]*=1-t;return r(e)}function p(e,t){if(e=o(e),t=n(t,0,1),e.type.indexOf("hsl")>-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")>-1)for(var i=0;i<3;i++)e.values[i]+=(255-e.values[i])*t;return r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.convertColorToString=r,t.convertHexToRGB=i,t.decomposeColor=o,t.getContrastRatio=a,t.getLuminance=s,t.emphasize=l,t.fade=u,t.darken=c,t.lighten=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return function(t,n,r,i,o){if(null!=t[n]){var s=r+"."+n;a[s]=!0}for(var l=arguments.length,u=Array(l>5?l-5:0),c=5;c=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(927),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(187),o=function(e){if("string"!=typeof e)throw new TypeError("ref's must be strings, got: "+e)},a=function(){function e(t,n){var a=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];r(this,e),o(t);var s=a.contextPrefix||"$";"function"==typeof t&&(t="."),this.key=t.trim(),this.prefix=s,this.isContext=0===this.key.indexOf(s),this.isSelf="."===this.key,this.path=this.isContext?this.key.slice(this.prefix.length):this.key,this._get=(0,i.getter)(this.path,!0),this.map=n||function(e){return e}}return e.isRef=function(t){return!(!t||!(t.__isYupRef||t instanceof e))},e.prototype.cast=function(e,t){var n=t.parent,r=t.context;return this.getValue(n,r)},e.prototype.getValue=function(e,t){var n=this.isContext,r=this._get(n?t:e||t||{});return this.map(r)},e}();t.default=a,a.prototype.__isYupRef=!0,e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){return null==e},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;ne[n])return 1}return 0},Pattern=function(e){this.subject=e.subject,this.predicate=e.predicate,this.object=e.object,this.graph=e.graph,this.indexKey=[],this.keyComponents={};var t=[],n=[],r=this;i.forEach(["subject","predicate","object","graph"],function(e){"string"==typeof r[e]?(n.push(e),r.keyComponents[e]=null):(t.push(e),r.keyComponents[e]=r[e],r.indexKey.push(e))}),this.order=t.concat(n),this.key=new NodeKey(this.keyComponents,this.order)},QuadIndex=function(e,t){0!=arguments&&(this.componentOrder=e.componentOrder,r.call(this,e.order,function(e){e.comparator=function(t,n){for(var r=0;ra)return 1}return 0},e.rangeComparator=function(t,n){for(var r=0;rn[i])return 1}return 0},t(e)}))},QuadIndex.prototype=i.create(r.prototype,{constructor:r}),QuadIndex.prototype.insert=function(e,t){r.prototype.insert.call(this,e,null,function(e){t(e)})},QuadIndex.prototype.search=function(e,t){r.prototype.search.call(this,e,function(e){t(e)},!0)},QuadIndex.prototype.range=function(e,t){this._rangeTraverse(this,this.root,e,t)},QuadIndex.prototype._rangeTraverse=function(e,t,n,r){var i=n.key,a=[],s=[t];o.whilst(function(){return s.length>0},function(t){for(var n=s.shift(),r=0;r1?t-1:0),a=1;a]/;e.exports=r},function(e,t,n){"use strict";var r,i=n(22),o=n(198),a=/^[ \r\n\t\f]/,s=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,l=n(206),u=l(function(e,t){if(e.namespaceURI!==o.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML=""+t+"";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(i.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(u=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),c=null}e.exports=u},function(e,t,n){!function(t,r){e.exports=r(n(1),n(867))}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(3)},function(t,n){t.exports=e},function(e,t,n){(function(t){"use strict";var r=Object.assign||function(e){for(var t=1;t=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,r=t.charCodeAt(i);if(r>=55296&&r<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},u.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},u.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},function(e,t){"use strict";var n=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},r=function(){function e(){}return e.prototype.and=function(e){return new i(this,e)},e.prototype.andNot=function(e){return new o(this,e)},e.prototype.or=function(e){return new a(this,e)},e.prototype.orNot=function(e){return new s(this,e)},e.prototype.not=function(){return new l(this)},e}();t.CompositeSpecification=r;var i=function(e){function t(t,n){e.call(this),this.left=t,this.right=n}return n(t,e),t.prototype.isSatisfiedBy=function(e){return this.left.isSatisfiedBy(e)&&this.right.isSatisfiedBy(e)},t.prototype.toString=function(){return"("+this.left.toString()+" and "+this.right.toString()+")"},t}(r);t.AndSpecification=i;var o=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype.isSatisfiedBy=function(t){return e.prototype.isSatisfiedBy.call(this,t)!==!0},t.prototype.toString=function(){return"not "+e.prototype.toString.call(this)},t}(i);t.AndNotSpecification=o;var a=function(e){function t(t,n){e.call(this),this.left=t,this.right=n}return n(t,e),t.prototype.isSatisfiedBy=function(e){return this.left.isSatisfiedBy(e)||this.right.isSatisfiedBy(e)},t.prototype.toString=function(){return"("+this.left.toString()+" or "+this.right.toString()+")"},t}(r);t.OrSpecification=a;var s=function(e){function t(){e.apply(this,arguments)}return n(t,e),t.prototype.isSatisfiedBy=function(t){return e.prototype.isSatisfiedBy.call(this,t)!==!0},t.prototype.toString=function(){return"not "+e.prototype.toString.call(this)},t}(a);t.OrNotSpecification=s;var l=function(e){function t(t){e.call(this),this.other=t}return n(t,e),t.prototype.isSatisfiedBy=function(e){return!this.other.isSatisfiedBy(e)},t.prototype.toString=function(){return"(not "+this.other.toString()+")"},t}(r);t.NotSpecification=l;var u=function(e){function t(t,n){e.call(this),this.a=t,this.b=n}return n(t,e),t.prototype.isSatisfiedBy=function(e){return e>=this.a&&e<=this.b},t.prototype.toString=function(){return"range ("+this.a+", "+this.b+")"},t}(r);t.RangeSpecification=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;na)throw new RangeError("size is too large");var r=n,o=t;void 0===o&&(r=void 0,o=0);var s=new i(e);if("string"==typeof o)for(var l=new i(o,r),u=l.length,c=-1;++ca)throw new RangeError("size is too large");return new i(e)},t.from=function(t,n,r){if("function"==typeof i.from&&(!e.Uint8Array||Uint8Array.from!==i.from))return i.from(t,n,r);if("number"==typeof t)throw new TypeError('"value" argument must not be a number');if("string"==typeof t)return new i(t,n);if("undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer){var o=n;if(1===arguments.length)return new i(t);"undefined"==typeof o&&(o=0);var a=r;if("undefined"==typeof a&&(a=t.byteLength-o),o>=t.byteLength)throw new RangeError("'offset' is out of bounds");if(a>t.byteLength-o)throw new RangeError("'length' is out of bounds");return new i(t.slice(o,o+a))}if(i.isBuffer(t)){var s=new i(t.length);return t.copy(s,0,0,t.length),s}if(t){if(Array.isArray(t)||"undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return new i(t);if("Buffer"===t.type&&Array.isArray(t.data))return new i(t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},t.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=a)throw new RangeError("size is too large");return new o(e)}}).call(t,function(){return this}())},function(e,t,n){var r=n(440),i=n(87),o=n(235),a="prototype",s=function(e,t,n){var l,u,c,p=e&s.F,f=e&s.G,h=e&s.S,d=e&s.P,v=e&s.B,y=e&s.W,m=f?i:i[t]||(i[t]={}),g=f?r:h?r[t]:(r[t]||{})[a];f&&(n=t);for(l in n)u=!p&&g&&l in g,u&&l in m||(c=u?g[l]:n[l],m[l]=f&&"function"!=typeof g[l]?n[l]:v&&u?o(c,r):y&&g[l]==c?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[a]=e[a],t}(c):d&&"function"==typeof c?o(Function.call,c):c,d&&((m[a]||(m[a]={}))[l]=c))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,e.exports=s},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){"use strict";var r=n(49),i=function(){};r&&(i=function(){return document.addEventListener?function(e,t,n,r){return e.addEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.attachEvent("on"+t,n)}:void 0}()),e.exports=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Array.isArray(e)&&(e=e.join(",")),null!==e.match(/-webkit-|-moz-|-ms-/)},e.exports=t.default},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){var r,i;(function(o,a,s,l){!function(){var u="undefined"!=typeof o&&o.versions&&o.versions.node,c=!u&&("undefined"!=typeof window||"undefined"!=typeof self);c&&"undefined"==typeof a&&("undefined"!=typeof window?a=window:"undefined"!=typeof self?a=self:"undefined"!=typeof $&&(a=$));var p=function(e){function t(){}function r(e){for(var t=[],n=Object.keys(e).sort(),r=0;r=0;--n)if(t[n]["@id"]===e["@id"])return!0;return!1}function _(e,t,n){var r="@"+n,i=r in e?e[r][0]:t[n];return"embed"===n&&(i===!0?i="@last":i===!1?i="@never":"@always"!==i&&"@never"!==i&&"@link"!==i&&(i="@last")),i}function T(e){if(!U(e)||1!==e.length||!B(e[0]))throw new Ie("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:e})}function k(e,t,n,r){for(var i={},o=0;o=0;--h)for(var C=_[h],E=C.terms,S=0;S0&&"/"!==o.substr(-1)&&(o+="/"),o+=r.path),i.path=o}i.query=r.query}i.path=ue(i.path,!!i.authority);var a=i.protocol;return null!==i.authority&&(a+="//"+i.authority),a+=i.path,null!==i.query&&(a+="?"+i.query),null!==r.fragment&&(a+="#"+r.fragment),""===a&&(a="./"),a}function F(t,n){if(null===t)return n;G(t)&&(t=e.url.parse(t||""));var r="";if(""!==t.href?r+=(t.protocol||"")+"//"+(t.authority||""):n.indexOf("//")&&(r+="//"),0!==n.indexOf(r))return n;for(var i=e.url.parse(n.substr(r.length)),o=t.normalizedPath.split("/"),a=i.normalizedPath.split("/"),s=i.fragment||i.query?0:1;o.length>0&&a.length>s&&o[0]===a[0];)o.shift(),a.shift();var l="";if(o.length>0){o.pop();for(var u=0;u=i.length?"":i[n],o in s?s[o].push(a[l]):s[o]=[a[l]];for(var t in s)""!==t&&r(s,t,n+1)}function i(e,t,n,r){r in n||(n[r]=t)}function o(){var e={};return e["@base"]=this["@base"],e.mappings=te(this.mappings),e.clone=this.clone,e.inverse=null,e.getInverse=this.getInverse,"@language"in this&&(e["@language"]=this["@language"]),"@vocab"in this&&(e["@vocab"]=this["@vocab"]),e}var a=e.url.parse(t.base||"");return{"@base":a,mappings:{},inverse:null,getInverse:n,clone:o}}function N(e){if(!G(e))return!1;switch(e){case"@base":case"@context":case"@container":case"@default":case"@embed":case"@explicit":case"@graph":case"@id":case"@index":case"@language":case"@list":case"@omitDefault":case"@preserve":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@vocab":return!0}return!1}function B(e){return"[object Object]"===Object.prototype.toString.call(e)}function z(e){return B(e)&&0===Object.keys(e).length}function U(e){return Array.isArray(e)}function W(e){if(!G(e)&&!z(e)){var t=!1;if(U(e)){t=!0;for(var n=0;n1||!("@id"in e); }return t}function Y(e){return B(e)&&1===Object.keys(e).length&&"@id"in e}function $(e){return B(e)&&"@value"in e}function J(e){return B(e)&&"@list"in e}function Z(e){var t=!1;return B(e)&&(t="@id"in e?0===e["@id"].indexOf("_:"):0===Object.keys(e).length||!("@value"in e||"@set"in e||"@list"in e)),t}function ee(e){return G(e)&&e.indexOf(":")!==-1}function te(e){if(e&&"object"==typeof e){var t;if(U(e)){t=[];for(var n=0;nMe)return r=new Ie("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:"loading remote context failed",max:Me}),a(r);var s={},l=function(){ne(e,s,!0,i),a(null,e)};ne(e,s,!1,i)||l();var u=[];for(var c in s)s[c]===!1&&u.push(c);for(var p=u.length,f=0;f":n.value,a+=" ",a+="IRI"===r.type?"<"+r.value+">":r.value,a+=" ","IRI"===i.type)a+="<"+i.value+">";else if("blank node"===i.type)a+=i.value;else{var s=i.value.replace(/\\/g,"\\\\").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\"/g,'\\"');a+='"'+s+'"',i.datatype===Oe?i.language&&(a+="@"+i.language):i.datatype!==be&&(a+="^^<"+i.datatype+">")}return null!==o&&void 0!==o&&(a+=0!==o.indexOf("_:")?" <"+o+">":" "+o),a+=" .\n"}function se(e){var t={};t["@default"]=[];for(var n=e.getSubjects(),r=0;r0;)"."===r[0]||""===r[0]&&r.length>1?r.shift():".."!==r[0]?i.push(r.shift()):(r.shift(),t||i.length>0&&".."!==i[i.length-1]?i.pop():i.push(".."));return n+i.join("/")}e.compact=function(t,n,r,i){function o(e,t,r,o){if(e)return i(e);o.compactArrays&&!o.graph&&U(t)?1===t.length?t=t[0]:0===t.length&&(t={}):o.graph&&B(t)&&(t=[t]),B(n)&&"@context"in n&&(n=n["@context"]),n=te(n),U(n)||(n=[n]);var a=n;n=[];for(var s=0;s0)&&n.push(a[s]);var l=n.length>0;if(1===n.length&&(n=n[0]),U(t)){var u=M(r,"@graph"),c=t;t={},l&&(t["@context"]=n),t[u]=c}else if(B(t)&&l){var c=t;t={"@context":n};for(var p in c)t[p]=c[p]}i(null,t,r)}if(arguments.length<2)return e.nextTick(function(){i(new TypeError("Could not compact, too few arguments."))});if("function"==typeof r&&(i=r,r={}),r=r||{},null===n)return e.nextTick(function(){i(new Ie("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"}))});if(null===t)return e.nextTick(function(){i(null,null)});"base"in r||(r.base="string"==typeof t?t:""),"compactArrays"in r||(r.compactArrays=!0),"graph"in r||(r.graph=!1),"skipExpansion"in r||(r.skipExpansion=!1),"documentLoader"in r||(r.documentLoader=e.loadDocument),"link"in r||(r.link=!1),r.link&&(r.skipExpansion=!0);var a=function(t,n,r){return n.skipExpansion?e.nextTick(function(){r(null,t)}):void e.expand(t,n,r)};a(t,r,function(t,a){if(t)return i(new Ie("Could not expand input before compaction.","jsonld.CompactError",{cause:t}));var s=L(r);e.processContext(s,n,r,function(e,t){if(e)return i(new Ie("Could not process context before compaction.","jsonld.CompactError",{cause:e}));var n;try{n=(new je).compact(t,null,a,r)}catch(e){return i(e)}o(null,n,t,r)})})},e.expand=function(t,n,r){function i(e){"base"in n||(n.base=e.documentUrl||"");var t={document:te(e.document),remoteContext:{"@context":e.contextUrl}};if("expandContext"in n){var i=te(n.expandContext);"object"==typeof i&&"@context"in i?t.expandContext=i:t.expandContext={"@context":i}}re(t,n,function(e,t){if(e)return r(e);var i;try{var o=new je,a=L(n),s=t.document,l=t.remoteContext["@context"];t.expandContext&&(a=o.processContext(a,t.expandContext["@context"],n)),l&&(a=o.processContext(a,l,n)),i=o.expand(a,null,s,n,!1),B(i)&&"@graph"in i&&1===Object.keys(i).length?i=i["@graph"]:null===i&&(i=[]),U(i)||(i=[i])}catch(e){return r(e)}r(null,i)})}return arguments.length<1?e.nextTick(function(){r(new TypeError("Could not expand, too few arguments."))}):("function"==typeof n&&(r=n,n={}),n=n||{},"documentLoader"in n||(n.documentLoader=e.loadDocument),"keepFreeFloatingNodes"in n||(n.keepFreeFloatingNodes=!1),void e.nextTick(function(){if("string"==typeof t){var e=function(e,t){if(e)return r(e);try{if(!t.document)throw new Ie("No remote document found at the given URL.","jsonld.NullRemoteDocument");"string"==typeof t.document&&(t.document=JSON.parse(t.document))}catch(e){return r(new Ie("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",cause:e,remoteDoc:t}))}i(t)},o=n.documentLoader(t,e);return void(o&&"then"in o&&o.then(e.bind(null,null),e))}i({contextUrl:null,documentUrl:null,document:t})}))},e.flatten=function(t,n,r,i){return arguments.length<1?e.nextTick(function(){i(new TypeError("Could not flatten, too few arguments."))}):("function"==typeof r?(i=r,r={}):"function"==typeof n&&(i=n,n=null,r={}),r=r||{},"base"in r||(r.base="string"==typeof t?t:""),"documentLoader"in r||(r.documentLoader=e.loadDocument),void e.expand(t,r,function(t,o){if(t)return i(new Ie("Could not expand input before flattening.","jsonld.FlattenError",{cause:t}));var a;try{a=(new je).flatten(o)}catch(e){return i(e)}return null===n?i(null,a):(r.graph=!0,r.skipExpansion=!0,void e.compact(a,n,r,function(e,t){return e?i(new Ie("Could not compact flattened output.","jsonld.FlattenError",{cause:e})):void i(null,t)}))}))},e.frame=function(t,n,r,i){function o(n){var o,a=n.document;a?(o=a["@context"],n.contextUrl?(o?U(o)?o.push(n.contextUrl):o=[o,n.contextUrl]:o=n.contextUrl,a["@context"]=o):o=o||{}):o={},e.expand(t,r,function(t,n){if(t)return i(new Ie("Could not expand input before framing.","jsonld.FrameError",{cause:t}));var s=te(r);s.isFrame=!0,s.keepFreeFloatingNodes=!0,e.expand(a,s,function(t,r){if(t)return i(new Ie("Could not expand frame before framing.","jsonld.FrameError",{cause:t}));var a;try{a=(new je).frame(n,r,s)}catch(e){return i(e)}s.graph=!0,s.skipExpansion=!0,s.link={},e.compact(a,o,s,function(e,t,n){if(e)return i(new Ie("Could not compact framed output.","jsonld.FrameError",{cause:e}));var r=M(n,"@graph");s.link={},t[r]=P(n,t[r],s),i(null,t)})})})}return arguments.length<2?e.nextTick(function(){i(new TypeError("Could not frame, too few arguments."))}):("function"==typeof r&&(i=r,r={}),r=r||{},"base"in r||(r.base="string"==typeof t?t:""),"documentLoader"in r||(r.documentLoader=e.loadDocument),"embed"in r||(r.embed="@last"),r.explicit=r.explicit||!1,"requireAll"in r||(r.requireAll=!0),r.omitDefault=r.omitDefault||!1,void e.nextTick(function(){if("string"==typeof n){var e=function(e,t){if(e)return i(e);try{if(!t.document)throw new Ie("No remote document found at the given URL.","jsonld.NullRemoteDocument");"string"==typeof t.document&&(t.document=JSON.parse(t.document))}catch(e){return i(new Ie("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",cause:e,remoteDoc:t}))}o(t)},t=r.documentLoader(n,e);return void(t&&"then"in t&&t.then(e.bind(null,null),e))}o({contextUrl:null,documentUrl:null,document:n})}))},e.link=function(t,n,r,i){var o={};n&&(o["@context"]=n),o["@embed"]="@link",e.frame(t,o,r,i)},e.objectify=function(t,n,r,i){"function"==typeof r&&(i=r,r={}),r=r||{},"base"in r||(r.base="string"==typeof t?t:""),"documentLoader"in r||(r.documentLoader=e.loadDocument),e.expand(t,r,function(t,o){if(t)return i(new Ie("Could not expand input before linking.","jsonld.LinkError",{cause:t}));var a;try{a=(new je).flatten(o)}catch(e){return i(e)}r.graph=!0,r.skipExpansion=!0,e.compact(a,n,r,function(t,n,r){if(t)return i(new Ie("Could not compact flattened output before linking.","jsonld.LinkError",{cause:t}));var o=M(r,"@graph"),a=n[o][0],s=function(t){if(B(t)||U(t)){if(B(t)){if(s.visited[t["@id"]])return;s.visited[t["@id"]]=!0}for(var n in t){var i=t[n],o="@id"===e.getContextValue(r,n,"@type");if(U(i)||B(i)||o)if(G(i)&&o)t[n]=i=a[i],s(i);else if(U(i))for(var l=0;l]*?>|"[^"]*?"|[^,])+/g),r=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,i=0;i=+new Date)return t.ctx;delete this.cache[e],this.order.splice(this.order.indexOf(e),1)}return null},e.DocumentCache.prototype.set=function(e,t){this.order.length===this.size&&delete this.cache[this.order.shift()],this.order.push(e),this.cache[e]={ctx:t,expires:+new Date+this.expires}},e.ActiveContextCache=function(e){this.order=[],this.cache={},this.size=e||100},e.ActiveContextCache.prototype.get=function(e,t){var n=JSON.stringify(e),r=JSON.stringify(t),i=this.cache[n];return i&&r in i?i[r]:null},e.ActiveContextCache.prototype.set=function(e,t,n){if(this.order.length===this.size){var r=this.order.shift();delete this.cache[r.activeCtx][r.localCtx]}var i=JSON.stringify(e),o=JSON.stringify(t);this.order.push({activeCtx:i,localCtx:o}),i in this.cache||(this.cache[i]={}),this.cache[i][o]=te(n)},e.cache={activeCtx:new e.ActiveContextCache},e.documentLoaders={},e.documentLoaders.jquery=function(t,n){function r(r,i){return 0!==r.indexOf("http:")&&0!==r.indexOf("https:")?i(new Ie('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:r}),{contextUrl:null,documentUrl:r,document:null}):n.secure&&0!==r.indexOf("https")?i(new Ie('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:r}),{contextUrl:null,documentUrl:r,document:null}):void t.ajax({url:r,accepts:{json:"application/ld+json, application/json"},headers:{Accept:"application/ld+json, application/json"},dataType:"json",crossDomain:!0,success:function(t,n,o){var a={contextUrl:null,documentUrl:r,document:t},s=o.getResponseHeader("Content-Type"),l=o.getResponseHeader("Link");if(l&&"application/ld+json"!==s){if(l=e.parseLinkHeader(l)[Ae],U(l))return i(new Ie("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:r}),a);l&&(a.contextUrl=l.target)}i(null,a)},error:function(e,t,n){i(new Ie("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:r,cause:n}),{contextUrl:null,documentUrl:r,document:null})}})}n=n||{};var i=new e.RequestQueue,o="usePromise"in n?n.usePromise:"undefined"!=typeof Promise;return o?i.wrapLoader(function(t){return e.promisify(r,t)}):i.wrapLoader(r)},e.documentLoaders.node=function(t){function r(n,u,c){function p(t,i,a){if(f={contextUrl:null,documentUrl:n,document:a||null},t)return c(new Ie("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:n,cause:t}),f);var s=l.STATUS_CODES[i.statusCode];if(i.statusCode>=400)return c(new Ie("URL could not be dereferenced: "+s,"jsonld.InvalidUrl",{code:"loading document failed",url:n,httpStatusCode:i.statusCode}),f);if(i.headers.link&&"application/ld+json"!==i.headers["content-type"]){var p=e.parseLinkHeader(i.headers.link)[Ae];if(U(p))return c(new Ie("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:n}),f);p&&(f.contextUrl=p.target)}return i.statusCode>=300&&i.statusCode<400&&i.headers.location?u.length===o?c(new Ie("URL could not be dereferenced; there were too many redirects.","jsonld.TooManyRedirects",{code:"loading document failed",url:n,httpStatusCode:i.statusCode,redirects:u}),f):u.indexOf(n)!==-1?c(new Ie("URL could not be dereferenced; infinite redirection was detected.","jsonld.InfiniteRedirectDetected",{code:"recursive context inclusion",url:n,httpStatusCode:i.statusCode,redirects:u}),f):(u.push(n),r(i.headers.location,u,c)):(u.push(n),void c(t,f))}if(0!==n.indexOf("http:")&&0!==n.indexOf("https:"))return c(new Ie('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:n}),{contextUrl:null,documentUrl:n,document:null});if(t.secure&&0!==n.indexOf("https"))return c(new Ie('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:n}),{contextUrl:null,documentUrl:n,document:null});var f=null;if(null!==f)return c(null,f);var h={Accept:s};for(var d in t.headers)h[d]=t.headers[d];a({url:n,headers:h,strictSSL:i,followRedirect:!1},p)}t=t||{};var i=!("strictSSL"in t)||t.strictSSL,o="maxRedirects"in t?t.maxRedirects:-1,a="request"in t?t.request:n(50),s="application/ld+json, application/json",l=n(50),u=new e.RequestQueue;if(t.usePromise)return u.wrapLoader(function(t){return e.promisify(r,t,[])});var c=t.headers||{};if("Accept"in c||"accept"in c)throw new RangeError('Accept header may not be specified as an option; only "'+s+'" is supported.');return u.wrapLoader(function(e,t){r(e,[],t)})},e.documentLoaders.xhr=function(t){function n(n,i){if(0!==n.indexOf("http:")&&0!==n.indexOf("https:"))return i(new Ie('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:n}),{contextUrl:null,documentUrl:n,document:null});if(t.secure&&0!==n.indexOf("https"))return i(new Ie('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:n}),{contextUrl:null,documentUrl:n,document:null});var o=t.xhr||XMLHttpRequest,a=new o;a.onload=function(){if(a.status>=400)return i(new Ie("URL could not be dereferenced: "+a.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:n,httpStatusCode:a.status}),{contextUrl:null,documentUrl:n,document:null});var t,o={contextUrl:null,documentUrl:n,document:a.response},s=a.getResponseHeader("Content-Type");if(r.test(a.getAllResponseHeaders())&&(t=a.getResponseHeader("Link")),t&&"application/ld+json"!==s){if(t=e.parseLinkHeader(t)[Ae],U(t))return i(new Ie("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:n}),o);t&&(o.contextUrl=t.target)}i(null,o)},a.onerror=function(){i(new Ie("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:n}),{contextUrl:null,documentUrl:n,document:null})},a.open("GET",n,!0),a.setRequestHeader("Accept","application/ld+json, application/json"),a.send()}t=t||{};var r=/(^|(\r\n))link:/i,i=new e.RequestQueue,o="usePromise"in t?t.usePromise:"undefined"!=typeof Promise;return o?i.wrapLoader(function(t){return e.promisify(n,t)}):i.wrapLoader(n)},e.useDocumentLoader=function(t){if(!(t in e.documentLoaders))throw new Ie('Unknown document loader type: "'+t+'"',"jsonld.UnknownDocumentLoader",{type:t});e.documentLoader=e.documentLoaders[t].apply(e,Array.prototype.slice.call(arguments,1))},e.processContext=function(t,n){var r={},i=2;arguments.length>3&&(r=arguments[2]||{},i+=1);var o=arguments[i];return"base"in r||(r.base=""),"documentLoader"in r||(r.documentLoader=e.loadDocument),null===n?o(null,L(r)):(n=te(n),B(n)&&"@context"in n||(n={"@context":n}),void re(n,r,function(e,n){if(e)return o(e);try{n=(new je).processContext(t,n,r)}catch(e){return o(e)}o(null,n)}))},e.hasProperty=function(e,t){var n=!1;if(t in e){var r=e[t];n=!U(r)||r.length>0}return n},e.hasValue=function(t,n,r){var i=!1;if(e.hasProperty(t,n)){var o=t[n],a=J(o);if(U(o)||a){a&&(o=o["@list"]);for(var s=0;s0){var v=M(t,h);e.addValue(o,v,C)}}else{var C;if(G(d))C=M(t,d,null,{vocab:"@type"===h});else{C=[];for(var m=0;m1&&!(2===P&&"@index"in l))throw new Ie('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:l});"@set"in l&&(l=l["@set"],d=Object.keys(l),P=d.length)}else 1===P&&"@language"in l&&(l=null);return!B(l)||o.keepFreeFloatingNodes||a||null!==n&&"@graph"!==h||(0===P||"@value"in l||"@list"in l||1===P&&"@id"in l)&&(l=null),l},je.prototype.createNodeMap=function(e,t){t=t||{};var n=t.namer||t.issuer||new le("_:b"),r={"@default":{}};return m(e,r,"@default",n),g(r)},je.prototype.flatten=function(e){for(var t=this.createNodeMap(e),n=[],r=Object.keys(t).sort(),i=0;i=r.MAX_TOTAL_DEPTH?n(new Error("Maximum total call stack depth exceeded; normalization aborting.")):void function i(){if(r.depth===r.MAX_DEPTH)return r.depth=0,r.running=!1,e.nextTick(i);var o=(new Date).getTime();return r.running||(r.start=(new Date).getTime(),r.deadline=r.start+r.timeSlice),o1)return o();var s=a[0];n.canonicalIssuer.getId(s),delete i[s],delete n.hashToBlankNodes[e],t=!0,o()},e)}],e)},e)},function(e){var t=Object.keys(n.hashToBlankNodes).sort();n.forEach(t,function(e,t,r){var i=[],o=n.hashToBlankNodes[e];n.waterfall([function(e){n.forEach(o,function(e,t,r){if(n.canonicalIssuer.hasId(e))return r();var o=new le("_:b");o.getId(e),n.hashNDegreeQuads(e,o,function(e,t){return e?r(e):(i.push(t),void r())})},e)},function(e){i.sort(function(e,t){return e.hasht.hash?1:0}),n.forEach(i,function(e,t,r){for(var i in e.issuer.existing)n.canonicalIssuer.getId(i);r()},e)}],r)},e)},function(e){var t=[];n.waterfall([function(e){n.forEach(n.quads,function(e,r,i){n.forEachComponent(e,function(e){"blank node"===e.type&&0!==e.value.indexOf(n.canonicalIssuer.prefix)&&(e.value=n.canonicalIssuer.getId(e.value))}),t.push(ae(e)),i()},e)},function(e){return t.sort(),"application/nquads"===n.options.format?(r=t.join(""),e()):(r=ie(t.join("")),void e())}],e)}],function(e){t(e,r)})},n.prototype.hashFirstDegreeQuads=function(e,t){var n=this,r=n.blankNodeInfo[e];if("hash"in r)return t(null,r.hash);var i=[],o=r.quads;n.forEach(o,function(t,r,o){var a={predicate:t.predicate};n.forEachComponent(t,function(t,r){a[r]=n.modifyFirstDegreeComponent(e,t,r)}),i.push(ae(a)),o()},function(e){return e?t(e):(i.sort(),r.hash=Le.hashNQuads(n.name,i),void t(null,r.hash))})},n.prototype.modifyFirstDegreeComponent=function(e,t){return"blank node"!==t.type?t:(t=te(t),t.value=t.value===e?"_:a":"_:z",t)},n.prototype.hashRelatedBlankNode=function(e,t,n,r,i){var o,a=this;a.waterfall([function(t){return a.canonicalIssuer.hasId(e)?(o=a.canonicalIssuer.getId(e),t()):n.hasId(e)?(o=n.getId(e),t()):void a.hashFirstDegreeQuads(e,function(e,n){return e?t(e):(o=n,void t())})}],function(e){if(e)return i(e);var n=new Le(a.name);return n.update(r),"g"!==r&&n.update(a.getRelatedPredicate(t)),n.update(o),i(null,n.digest())})},n.prototype.getRelatedPredicate=function(e){return"<"+e.predicate.value+">"},n.prototype.hashNDegreeQuads=function(e,t,n){var r,i=this,o=new Le(i.name);i.waterfall([function(n){i.createHashToRelated(e,t,function(e,t){return e?n(e):(r=t,void n())})},function(e){var n=Object.keys(r).sort();i.forEach(n,function(e,n,a){o.update(e);var s,l="",u=new Fe(r[e]);i.whilst(function(){return u.hasNext()},function(e){var n=u.next(),r=t.clone(),o="",a=[];i.waterfall([function(t){i.forEach(n,function(t,n,s){return i.canonicalIssuer.hasId(t)?o+=i.canonicalIssuer.getId(t):(r.hasId(t)||a.push(t),o+=r.getId(t)),0!==l.length&&o.length>=l.length&&o>l?e():void s()},t)},function(t){i.forEach(a,function(t,n,a){i.hashNDegreeQuads(t,r,function(n,i){return n?a(n):(o+=r.getId(t),o+="<"+i.hash+">",r=i.issuer,0!==l.length&&o.length>=l.length&&o>l?e():void a())})},t)},function(e){(0===l.length||ot)&&(a&&i>0&&o>this.list[i-1]||!a&&ithis.list[i+1])&&(t=o,n=i)}if(null===t)this.done=!0;else{var s=this.left[t]?n-1:n+1;this.list[n]=this.list[s],this.list[s]=t;for(var i=0;it&&(this.left[this.list[i]]=!this.left[this.list[i]])}return e};var Le=function(e){if(!(this instanceof Le))return new Le(e);if(["URDNA2015","URGNA2012"].indexOf(e)===-1)throw new Error("Invalid RDF Dataset Normalization algorithm: "+e);Le._init.call(this,e)};if(Le.hashNQuads=function(e,t){for(var n=new Le(e),r=0;r0;)1&n&&(r._padding+=t),n>>>=1,n>0&&(t+=t)}this.start()};r.prototype.start=function(){this.messageLength=0,this.fullMessageLength=[];for(var e=this._algorithm.messageLengthSize/4,t=0;t>>0,t>>>0];for(var n=this.fullMessageLength.length-1;n>=0;--n)this.fullMessageLength[n]+=t[1],t[1]=t[0]+(this.fullMessageLength[n]/4294967296>>>0),this.fullMessageLength[n]=this.fullMessageLength[n]>>>0,t[0]=t[1]/4294967296>>>0;for(this._input.putBytes(e.bytes());this._input.length()>=this._algorithm.blockSize;)this.state=this._algorithm.digest(this.state,this._input);return(this._input.read>2048||0===this._input.length())&&this._input.compact(),this},r.prototype.digest=function(){var e=new r.ByteBuffer;e.putBytes(this._input.bytes());var t=this.fullMessageLength[this.fullMessageLength.length-1]+this._algorithm.messageLengthSize,n=t&this._algorithm.blockSize-1;e.putBytes(r._padding.substr(0,this._algorithm.blockSize-n));for(var i=new r.ByteBuffer,o=0;o>>28);this._algorithm.writeMessageLength(e,i);var a=this._algorithm.digest(this.state.copy(),e),s=new r.ByteBuffer;return a.write(s),s},r.ByteBuffer=function(e){"string"==typeof e?this.data=e:this.data="",this.read=0},r.ByteBuffer.prototype.putInt32=function(e){this.data+=String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)},r.ByteBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e},r.ByteBuffer.prototype.putBytes=function(e){this.data+=e},r.ByteBuffer.prototype.bytes=function(){return this.data.slice(this.read)},r.ByteBuffer.prototype.length=function(){return this.data.length-this.read},r.ByteBuffer.prototype.compact=function(){this.data=this.data.slice(this.read),this.read=0},r.ByteBuffer.prototype.toHex=function(){for(var e="",t=this.read;t=64;){for(r=e.h0,o=e.h1,a=e.h2,s=e.h3,l=e.h4,c=0;c<16;++c)n=t.getInt32(),f[c]=n,u=s^o&(a^s),n=(r<<5|r>>>27)+u+l+1518500249+n,l=s,s=a,a=o<<30|o>>>2,o=r,r=n;for(;c<20;++c)n=f[c-3]^f[c-8]^f[c-14]^f[c-16],n=n<<1|n>>>31,f[c]=n,u=s^o&(a^s),n=(r<<5|r>>>27)+u+l+1518500249+n,l=s,s=a,a=o<<30|o>>>2,o=r,r=n;for(;c<32;++c)n=f[c-3]^f[c-8]^f[c-14]^f[c-16],n=n<<1|n>>>31,f[c]=n,u=o^a^s,n=(r<<5|r>>>27)+u+l+1859775393+n,l=s,s=a,a=o<<30|o>>>2,o=r,r=n;for(;c<40;++c)n=f[c-6]^f[c-16]^f[c-28]^f[c-32],n=n<<2|n>>>30,f[c]=n,u=o^a^s,n=(r<<5|r>>>27)+u+l+1859775393+n,l=s,s=a,a=o<<30|o>>>2,o=r,r=n;for(;c<60;++c)n=f[c-6]^f[c-16]^f[c-28]^f[c-32],n=n<<2|n>>>30,f[c]=n,u=o&a|s&(o^a),n=(r<<5|r>>>27)+u+l+2400959708+n,l=s,s=a,a=o<<30|o>>>2,o=r,r=n;for(;c<80;++c)n=f[c-6]^f[c-16]^f[c-28]^f[c-32],n=n<<2|n>>>30,f[c]=n,u=o^a^s,n=(r<<5|r>>>27)+u+l+3395469782+n,l=s,s=a,a=o<<30|o>>>2,o=r,r=n;e.h0=e.h0+r|0,e.h1=e.h1+o|0,e.h2=e.h2+a|0,e.h3=e.h3+s|0,e.h4=e.h4+l|0,p-=64}return e},i._createState=function(){var e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return e.copy=function(){var t=i._createState();return t.h0=e.h0,t.h1=e.h1,t.h2=e.h2,t.h3=e.h3,t.h4=e.h4,t},e.write=function(t){t.putInt32(e.h0),t.putInt32(e.h1),t.putInt32(e.h2),t.putInt32(e.h3),t.putInt32(e.h4)},e};var o={_k:null,_w:null};o.Algorithm=function(){this.name="sha256",this.blockSize=64,this.digestLength=32,this.messageLengthSize=8},o.Algorithm.prototype.start=function(){return o._k||o._init(),o._createState()},o.Algorithm.prototype.writeMessageLength=function(e,t){e.putBytes(t.bytes())},o.Algorithm.prototype.digest=function(e,t){for(var n,r,i,a,s,l,u,c,p,f,h,d,v,y,m,g=t.length(),b=o._k,x=o._w;g>=64;){for(u=0;u<16;++u)x[u]=t.getInt32();for(;u<64;++u)n=x[u-2],n=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,r=x[u-15],r=(r>>>7|r<<25)^(r>>>18|r<<14)^r>>>3,x[u]=n+x[u-7]+r+x[u-16]|0;for(c=e.h0,p=e.h1,f=e.h2,h=e.h3,d=e.h4,v=e.h5,y=e.h6,m=e.h7,u=0;u<64;++u)a=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),s=y^d&(v^y),i=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),l=c&p|f&(c^p),n=m+a+s+b[u]+x[u],r=i+l,m=y,y=v,v=d,d=h+n|0,h=f,f=p,p=c,c=n+r|0;e.h0=e.h0+c|0,e.h1=e.h1+p|0,e.h2=e.h2+f|0,e.h3=e.h3+h|0,e.h4=e.h4+d|0,e.h5=e.h5+v|0,e.h6=e.h6+y|0,e.h7=e.h7+m|0,g-=64}return e},o._createState=function(){var e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return e.copy=function(){var t=o._createState();return t.h0=e.h0,t.h1=e.h1,t.h2=e.h2,t.h3=e.h3,t.h4=e.h4,t.h5=e.h5,t.h6=e.h6,t.h7=e.h7,t},e.write=function(t){t.putInt32(e.h0),t.putInt32(e.h1),t.putInt32(e.h2),t.putInt32(e.h3),t.putInt32(e.h4),t.putInt32(e.h5),t.putInt32(e.h6),t.putInt32(e.h7)},e},o._init=function(){o._k=[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],o._w=new Array(64)}}(u),!de)var Ne=function(){de=n(50).XMLSerializer};if(e.url={},e.url.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},e.url.parse=function(t,n){for(var r={},i=e.url.parsers[n||"full"],o=i.regex.exec(t),a=i.keys.length;a--;)r[i.keys[a]]=void 0===o[a]?null:o[a];return r.normalizedPath=ue(r.path,!!r.authority),r},u?e.useDocumentLoader("node"):"undefined"!=typeof XMLHttpRequest&&e.useDocumentLoader("xhr"),u){e.use=function(t){switch(t){case"request":e.request=n(50);break;default:throw new Ie("Unknown extension.","jsonld.UnknownExtension",{extension:t})}};var Be={exports:{},filename:l};n(50)(Be,"version"),e.version=Be.exports.version}return e},f=function(){return p(function(){return f()})};return!u&&n(945)?(r=[],i=function(){return p(f),f}.apply(t,r),!(void 0!==i&&(e.exports=i))):(p(f),"undefined"!=typeof e&&e.exports&&(e.exports=f),c&&("undefined"==typeof jsonld?jsonld=jsonldjs=f:jsonldjs=f)),f}()}).call(t,n(20),function(){return this}(),n(107).setImmediate,"/")},function(e,t,n){function r(e,t,n){if("function"!=typeof e)return i;if(void 0===t)return e;switch(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)};case 5:return function(n,r,i,o,a){return e.call(t,n,r,i,o,a)}}return function(){return e.apply(t,arguments)}}var i=n(268);e.exports=r},function(e,t,n){function r(e){return null!=e&&o(i(e))}var i=n(259),o=n(70);e.exports=r},function(e,t,n){function r(e){return o(e)&&i(e)&&s.call(e,"callee")&&!l.call(e,"callee")}var i=n(161),o=n(51),a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable;e.exports=r},function(e,t,n){function r(e){return"string"==typeof e||i(e)&&s.call(e)==o}var i=n(51),o="[object String]",a=Object.prototype,s=a.toString;e.exports=r},function(e,t,n){var r=n(118),i=n(161),o=n(43),a=n(539),s=n(167),l=r(Object,"keys"),u=l?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||("function"==typeof e?s.enumPrototypes:i(e))?a(e):o(e)?l(e):[]}:a;e.exports=u},function(e,t,n){function r(e){if(null==e)return[];c(e)||(e=Object(e));var t=e.length;t=t&&u(t)&&(a(e)||o(e)||p(e))&&t||0;for(var n=e.constructor,r=-1,i=s(n)&&n.prototype||k,h=i===e,d=Array(t),v=t>0,m=f.enumErrorProps&&(e===T||e instanceof Error),g=f.enumPrototypes&&s(e);++r-1&&e%1==0&&e-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;twindow.innerHeight||e.left<0||e.left>window.innerWidth)&&this.requestClose("offScreen")}},{key:"getOverlapMode",value:function(e,t,n){return[e,t].indexOf(n)>=0?"auto":e===t?"inclusive":"exclusive"}},{key:"getPositions",value:function(e,t){var n=l({},e),r=l({},t),i={x:["left","right"].filter(function(e){return e!==r.horizontal}),y:["top","bottom"].filter(function(e){return e!==r.vertical})},o={x:this.getOverlapMode(n.horizontal,r.horizontal,"middle"),y:this.getOverlapMode(n.vertical,r.vertical,"center")};return i.x.splice("auto"===o.x?0:1,0,"middle"),i.y.splice("auto"===o.y?0:1,0,"center"),"auto"!==o.y&&(n.vertical="top"===n.vertical?"bottom":"top","inclusive"===o.y&&(r.vertical=r.vertical)),"auto"!==o.x&&(n.horizontal="left"===n.horizontal?"right":"left","inclusive"===o.y&&(r.horizontal=r.horizontal)),{positions:i,anchorPos:n}}},{key:"applyAutoPositionIfNeeded",value:function(e,t,n,r,i){var o=this.getPositions(r,n),a=o.positions,s=o.anchorPos;if(i.top<0||i.top+t.bottom>window.innerHeight){var l=e[s.vertical]-t[a.y[0]];l+t.bottom<=window.innerHeight?i.top=Math.max(0,l):(l=e[s.vertical]-t[a.y[1]],l+t.bottom<=window.innerHeight&&(i.top=Math.max(0,l)))}if(i.left<0||i.left+t.right>window.innerWidth){var u=e[s.horizontal]-t[a.x[0]];u+t.right<=window.innerWidth?i.left=Math.max(0,u):(u=e[s.horizontal]-t[a.x[1]],u+t.right<=window.innerWidth&&(i.left=Math.max(0,u)))}return i}},{key:"render",value:function(){return p.default.createElement("div",{style:{display:"none"}},p.default.createElement(v.default,{target:"window",onScroll:this.handleScroll,onResize:this.handleResize}),p.default.createElement(m.default,{ref:"layer",open:this.state.open,componentClickAway:this.componentClickAway,useLayerForClickAway:this.props.useLayerForClickAway,render:this.renderLayer}))}}]),t}(c.Component);E.propTypes={anchorEl:c.PropTypes.object,anchorOrigin:b.default.origin,animated:c.PropTypes.bool,animation:c.PropTypes.func,autoCloseWhenOffScreen:c.PropTypes.bool,canAutoPosition:c.PropTypes.bool,children:c.PropTypes.node,className:c.PropTypes.string,onRequestClose:c.PropTypes.func,open:c.PropTypes.bool,style:c.PropTypes.object,targetOrigin:b.default.origin,useLayerForClickAway:c.PropTypes.bool,zDepth:b.default.zDepth},E.defaultProps={anchorOrigin:{vertical:"bottom",horizontal:"left"},animated:!0,autoCloseWhenOffScreen:!0,canAutoPosition:!0,onRequestClose:function(){},open:!1,style:{overflowY:"auto"},targetOrigin:{vertical:"top",horizontal:"left"},useLayerForClickAway:!0,zDepth:1},E.contextTypes={muiTheme:c.PropTypes.object.isRequired},t.default=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(){if(!S){var e=document.createElement("style");e.innerHTML="\n button::-moz-focus-inner,\n input::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n ",document.body.appendChild(e),S=!0}}function u(){P||(g.default.on(window,"keydown",function(e){O="tab"===(0,x.default)(e)}),P=!0)}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t\\"\{\}\|\^\`]/;n.prototype={_iri:/^<((?:[^>\\]|\\[uU])+)>/,_unescapedIri:/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>/,_unescapedString:/^"[^"\\]+"(?=[^"\\])/,_singleQuotedString:/^"[^"\\]*(?:\\.[^"\\]*)*"(?=[^"\\])|^'[^'\\]*(?:\\.[^'\\]*)*'(?=[^'\\])/,_tripleQuotedString:/^""("[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*")""|^''('[^'\\]*(?:(?:\\.|'(?!''))[^'\\]*)*')''/,_langcode:/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,_prefix:/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,_prefixed:/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?=\.?[,;\s#()\[\]\{\}"'<])/,_blank:/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=\.?[,;:\s#()\[\]\{\}"'<])/,_number:/^[\-+]?(?:\d+\.?\d*([eE](?:[\-\+])?\d+)|\d*\.?\d+)(?=[.,;:\s#()\[\]\{\}"'<])/,_boolean:/^(?:true|false)(?=[.,;:\s#()\[\]\{\}"'<])/,_keyword:/^@[a-z]+(?=[\s#<:])/,_sparqlKeyword:/^(?:PREFIX|BASE|GRAPH)(?=[\s#<:])/i,_shortPredicates:/^a(?=\s+|<)/,_newline:/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,_whitespace:/^[ \t]+/,_endOfFile:/^(?:#[^\n\r]*)?$/,_tokenizeToEnd:function(e,t){function n(t){e(t._syntaxError(/^\S*/.exec(r)[0]))}for(var r=this._input;;){for(var i;i=this._newline.exec(r);)r=r.substr(i[0].length,r.length),this._line++;if((i=this._whitespace.exec(r))&&(r=r.substr(i[0].length,r.length)),this._endOfFile.test(r))return t&&e(r=null,{line:this._line,type:"eof",value:"",prefix:""}),this._input=r;var o,a=this._line,l="",u="",c="",p=r[0],f=null,h=0,d=!1;switch(p){case"^":if(1===r.length)break;if("^"!==r[1])return n(this);if(this._prevTokenType="^",r=r.substr(2),"<"!==r[0]){d=!0;break}case"<":if(f=this._unescapedIri.exec(r))l="IRI",u=f[1];else if(f=this._iri.exec(r)){if(o=this._unescape(f[1]),null===o||s.test(o))return n(this);l="IRI",u=o}break;case"_":((f=this._blank.exec(r))||t&&(f=this._blank.exec(r+" ")))&&(l="prefixed",c="_",u=f[1]);break;case'"':case"'":if(f=this._unescapedString.exec(r))l="literal",u=f[0];else if(f=this._singleQuotedString.exec(r)){if(o=this._unescape(f[0]),null===o)return n(this);l="literal",u=o.replace(/^'|'$/g,'"')}else if(f=this._tripleQuotedString.exec(r)){if(o=f[1]||f[2],this._line+=o.split(/\r\n|\r|\n/).length-1,o=this._unescape(o),null===o)return n(this);l="literal",u=o.replace(/^'|'$/g,'"')}break;case"@":"literal"===this._prevTokenType&&(f=this._langcode.exec(r))?(l="langcode",u=f[1]):(f=this._keyword.exec(r))&&(l=f[0]);break;case".":if(1===r.length?t:r[1]<"0"||r[1]>"9"){l=".",h=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(f=this._number.exec(r))&&(l="literal",u='"'+f[0]+'"^^http://www.w3.org/2001/XMLSchema#'+(f[1]?"double":/^[+\-]?\d+$/.test(f[0])?"integer":"decimal"));break;case"B":case"b":case"p":case"P":case"G":case"g":(f=this._sparqlKeyword.exec(r))?l=f[0].toUpperCase():d=!0;break;case"f":case"t":(f=this._boolean.exec(r))?(l="literal",u='"'+f[0]+'"^^http://www.w3.org/2001/XMLSchema#boolean'):d=!0;break;case"a":(f=this._shortPredicates.exec(r))?(l="abbreviation",u="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"):d=!0;break;case",":case";":case"[":case"]":case"(":case")":case"{":case"}":h=1,l=p;break;default:d=!0}if(d&&("@prefix"!==this._prevTokenType&&"PREFIX"!==this._prevTokenType||!(f=this._prefix.exec(r))?((f=this._prefixed.exec(r))||t&&(f=this._prefixed.exec(r+" ")))&&(l="prefixed",c=f[1]||"",u=this._unescape(f[2])):(l="prefix",u=f[1]||"")),"^"===this._prevTokenType&&(l="IRI"===l||"prefixed"===l?"type":""),!l)return t||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?n(this):this._input=r;e(null,{line:a,type:l,value:u,prefix:c}),this._prevTokenType=l,r=r.substr(h||f[0].length,r.length)}},_unescape:function(e){try{return e.replace(o,function(e,t,n,i){var o;if(t){if(o=parseInt(t,16),isNaN(o))throw new Error;return r(o)}if(n){if(o=parseInt(n,16),isNaN(o))throw new Error;return o<=65535?r(o):r(55296+(o-=65536)/1024,56320+(1023&o))}var s=a[i];if(!s)throw new Error;return s})}catch(e){return null}},_syntaxError:function(e){return this._input=null,new Error('Syntax error: unexpected "'+e+'" on line '+this._line+".")},tokenize:function(e,t){function n(e){null!==o._input&&(o._input+=e,o._tokenizeToEnd(t,!1))}function r(){null!==o._input&&o._tokenizeToEnd(t,!0)}var o=this;this._line=1,"string"==typeof e?(this._input=e,i(function(){o._tokenizeToEnd(t,!0)})):(this._input="",e&&"function"!=typeof e?("function"==typeof e.setEncoding&&e.setEncoding("utf8"),e.on("data",n),e.on("end",r)):(this.addChunk=n,this.end=r,t||(t=e)))}},e.exports=n}).call(t,n(107).setImmediate)},function(e,t,n){function r(e){if(!(this instanceof r))return new r(e);this._tripleStack=[],this._graph=null,e=e||{},this._setBase(e.documentIRI);var t="string"==typeof e.format&&e.format.match(/\w*$/)[0].toLowerCase(),n="turtle"===t,a="trig"===t,s=/triple/.test(t),l=/quad/.test(t),u=s||l;(this._supportsNamedGraphs=!n)||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(n||a||s),u&&(this._base="",this._resolveIRI=function(e){return this._error("Disallowed relative IRI",e),this._callback=i,this._subject=null}),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":"_:"+e.blankNodePrefix.replace(/^_:/,""),this._lexer=e.lexer||new o({lineMode:u})}function i(){}var o=n(183),a="http://www.w3.org/1999/02/22-rdf-syntax-ns#",s=a+"nil",l=a+"first",u=a+"rest",c=/^[a-z][a-z0-9+.-]*:/i,p=/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i,f=/(?:^|\/)\.\.?(?:$|[\/#?])/,h=0,d=0;r._resetBlankNodeIds=function(){h=d=0},r.prototype={_setBase:function(e){if(e){if(e.indexOf("#")>=0)throw new Error("Invalid base IRI "+e)}else e=null;(this._base=e)&&(this._basePath=e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(p),this._baseRoot=e[0],this._baseScheme=e[1])},_readInTopContext:function(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"@prefix":return this._sparqlStyle=!1,this._readPrefix;case"PREFIX":return this._sparqlStyle=!0,this._readPrefix;case"@base":return this._sparqlStyle=!1,this._readBaseIRI;case"BASE":return this._sparqlStyle=!0,this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(e)}},_readSubject:function(e){switch(this._predicate=null,e.type){case"IRI":null===this._base||c.test(e.value)?this._subject=e.value:this._subject=this._resolveIRI(e);break;case"prefixed":var t=this._prefixes[e.prefix];if(void 0===t)return this._error('Undefined prefix "'+e.prefix+':"',e);this._subject=t+e.value;break;case"[":return this._subject="_:b"+d++,this._tripleStack.push({subject:this._subject,predicate:null,object:null,type:"blank"}),this._readBlankNodeHead;case"(":return this._tripleStack.push({subject:s,predicate:null,object:null,type:"list"}),this._subject=null,this._readListItem;case"}":return this._readPunctuation(e);default:return this._error("Expected subject but got "+e.type,e)}return this._readPredicateOrNamedGraph},_readPredicate:function(e){var t=e.type;switch(t){case"IRI":case"abbreviation":null===this._base||c.test(e.value)?this._predicate=e.value:this._predicate=this._resolveIRI(e);break;case"prefixed":if("_"===e.prefix)return this._error("Disallowed blank node as predicate",e);var n=this._prefixes[e.prefix];if(void 0===n)return this._error('Undefined prefix "'+e.prefix+':"',e);this._predicate=n+e.value;break;case".":case"]":case"}":return null===this._predicate?this._error("Unexpected "+t,e):(this._subject=null,"]"===t?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return this._readPredicate;default:return this._error('Expected predicate to follow "'+this._subject+'"',e)}return this._readObject},_readObject:function(e){switch(e.type){case"IRI":null===this._base||c.test(e.value)?this._object=e.value:this._object=this._resolveIRI(e);break;case"prefixed":var t=this._prefixes[e.prefix];if(void 0===t)return this._error('Undefined prefix "'+e.prefix+':"',e);this._object=t+e.value;break;case"literal":return this._object=e.value,this._readDataTypeOrLang;case"[":var n="_:b"+d++;return this._tripleStack.push({subject:this._subject,predicate:this._predicate,object:n, type:"blank"}),this._subject=n,this._readBlankNodeHead;case"(":return this._tripleStack.push({subject:this._subject,predicate:this._predicate,object:s,type:"list"}),this._subject=null,this._readListItem;default:return this._error('Expected object to follow "'+this._predicate+'"',e)}return this._getTripleEndReader()},_readPredicateOrNamedGraph:function(e){return"{"===e.type?this._readGraph(e):this._readPredicate(e)},_readGraph:function(e){return"{"!==e.type?this._error("Expected graph but got "+e.type,e):(this._graph=this._subject,this._subject=null,this._readSubject)},_readBlankNodeHead:function(e){return"]"===e.type?(this._subject=null,this._readBlankNodeTail(e)):(this._predicate=null,this._readPredicate(e))},_readBlankNodeTail:function(e){if("]"!==e.type)return this._readBlankNodePunctuation(e);null!==this._subject&&this._callback(null,{subject:this._subject,predicate:this._predicate,object:this._object,graph:this._graph||""});var t=this._tripleStack.pop();return this._subject=t.subject,null!==t.object?(this._predicate=t.predicate,this._object=t.object,this._getTripleEndReader()):null!==this._predicate?this._readPredicate:this._readPredicateOrNamedGraph},_readDataTypeOrLang:function(e){switch(e.type){case"type":var t;if(""===e.prefix)t=null===this._base||c.test(e.value)?e.value:this._resolveIRI(e);else{var n=this._prefixes[e.prefix];if(void 0===n)return this._error('Undefined prefix "'+e.prefix+':"',e);t=n+e.value}return this._object+="^^"+t,this._getTripleEndReader();case"langcode":return this._object+="@"+e.value.toLowerCase(),this._getTripleEndReader();default:return this._getTripleEndReader().call(this,e)}},_readListItem:function(e){var t=null,n=null,r=this._subject,i=this._tripleStack,o=i[i.length-1],a=this._readListItem;switch(e.type){case"IRI":t=null===this._base||c.test(e.value)?e.value:this._resolveIRI(e);break;case"prefixed":var p=this._prefixes[e.prefix];if(void 0===p)return this._error('Undefined prefix "'+e.prefix+':"',e);t=p+e.value;break;case"literal":t=e.value,a=this._readDataTypeOrLang;break;case"[":n="_:b"+d++,t="_:b"+d++,i.push({subject:n,predicate:l,object:t,type:"blank"}),this._subject=t,a=this._readBlankNodeHead;break;case"(":n="_:b"+d++,i.push({subject:n,predicate:l,object:s,type:"list"}),this._subject=null,a=this._readListItem;break;case")":if(i.pop(),0!==i.length&&"list"===i[i.length-1].type&&this._callback(null,{subject:o.subject,predicate:o.predicate,object:o.object,graph:this._graph||""}),this._subject=o.subject,null===o.predicate){if(a=this._readPredicate,o.subject===s)return a}else if(this._predicate=o.predicate,this._object=o.object,a=this._getTripleEndReader(),o.object===s)return a;n=s;break;default:return this._error('Expected list item instead of "'+e.type+'"',e)}return null===n&&(this._subject=n="_:b"+d++),null===r?o.object===s?o.object=n:o.subject=n:this._callback(null,{subject:r,predicate:u,object:n,graph:this._graph||""}),null!==t&&this._callback(null,{subject:n,predicate:l,object:t,graph:this._graph||""}),a},_readPunctuation:function(e){var t,n=this._subject,r=this._graph;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);this._graph=null;case".":this._subject=null,t=this._readInTopContext;break;case";":t=this._readPredicate;break;case",":t=this._readObject;break;case"IRI":if(this._supportsQuads&&null===this._graph){r=null===this._base||c.test(e.value)?e.value:this._resolveIRI(e),n=this._subject,t=this._readQuadPunctuation;break}case"prefixed":if(this._supportsQuads&&null===this._graph){var i=this._prefixes[e.prefix];if(void 0===i)return this._error('Undefined prefix "'+e.prefix+':"',e);r=i+e.value,t=this._readQuadPunctuation;break}default:return this._error('Expected punctuation to follow "'+this._object+'"',e)}return null!==n&&this._callback(null,{subject:n,predicate:this._predicate,object:this._object,graph:r||""}),t},_readBlankNodePunctuation:function(e){var t;switch(e.type){case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:return this._error('Expected punctuation to follow "'+this._object+'"',e)}return this._callback(null,{subject:this._subject,predicate:this._predicate,object:this._object,graph:this._graph||""}),t},_readQuadPunctuation:function(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext},_readPrefix:function(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)},_readPrefixIRI:function(e){if("IRI"!==e.type)return this._error('Expected IRI to follow prefix "'+this._prefix+':"',e);var t;return t=null===this._base||c.test(e.value)?e.value:this._resolveIRI(e),this._prefixes[this._prefix]=t,this._prefixCallback(this._prefix,t),this._readDeclarationPunctuation},_readBaseIRI:function(e){if("IRI"!==e.type)return this._error("Expected IRI to follow base declaration",e);try{this._setBase(null===this._base||c.test(e.value)?e.value:this._resolveIRI(e))}catch(t){this._error(t.message,e)}return this._readDeclarationPunctuation},_readNamedGraphLabel:function(e){switch(e.type){case"IRI":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}},_readNamedGraphBlankLabel:function(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject="_:b"+d++,this._readGraph)},_readDeclarationPunctuation:function(e){return this._sparqlStyle?this._readInTopContext(e):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext},_getTripleEndReader:function(){var e=this._tripleStack;if(0===e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem}},_error:function(e,t){this._callback(new Error(e+" at line "+t.line+"."))},_resolveIRI:function(e){var t=e.value;switch(t[0]){case void 0:return this._base;case"#":return this._base+t;case"?":return this._base.replace(/(?:\?.*)?$/,t);case"/":return("/"===t[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(t);default:return this._removeDotSegments(this._basePath+t)}},_removeDotSegments:function(e){if(!f.test(e))return e;for(var t="",n=e.length,r=-1,i=-1,o=0,a="/";r=i&&(t=t.substr(0,o)),"/"!==a)return t+"/"+e.substr(r+1);o=r+1}}}a=e[++r]}return t+e.substring(o)},parse:function(e,t,n){this._readCallback=this._readInTopContext,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix||"_:b"+h++ +"_","function"==typeof e&&(n=t,t=e,e=null),this._callback=t||i,this._prefixCallback=n||i;var r=this;this._lexer.tokenize(e,function(e,t){null!==e?(r._callback(e),r._callback=i):void 0!==r._readCallback&&(r._readCallback=r._readCallback(t))}),e||(this.addChunk=this._lexer.addChunk,this.end=this._lexer.end)}},e.exports=r},function(e,t){function n(e,t){for(var n in c)t?e.prototype[n]=r(c[n]):e[n]=c[n];return e}function r(e){return function(t){return e(this,t)}}var i="http://www.w3.org/2001/XMLSchema#",o=i+"string",a=i+"integer",s=i+"decimal",l=i+"boolean",u="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",c={isIRI:function(e){if(!e)return e;var t=e[0];return'"'!==t&&"_"!==t},isLiteral:function(e){return e&&'"'===e[0]},isBlank:function(e){return e&&"_:"===e.substr(0,2)},getLiteralValue:function(e){var t=/^"([^]*)"/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]},getLiteralType:function(e){var t=/^"[^]*"(?:\^\^([^"]+)|(@)[^@"]+)?$/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]||(t[2]?u:o)},getLiteralLanguage:function(e){var t=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]?t[1].toLowerCase():""},isPrefixedName:function(e){return e&&/^[^:\/"']*:[^:\/"']+$/.test(e)},expandPrefixedName:function(e,t){var n,r,i,o=/(?:^|"\^\^)([^:\/#"'\^_]*):[^\/]*$/.exec(e);return o&&(n=o[1],r=t[n],i=o.index),void 0===r?e:0===i?r+e.substr(n.length+1):e.substr(0,i+3)+r+e.substr(i+n.length+4)},createIRI:function(e){return e&&'"'===e[0]?c.getLiteralValue(e):e},createLiteral:function(e,t){if(!t)switch(typeof e){case"boolean":t=l;break;case"number":if(isFinite(e)){t=e%1===0?a:s;break}default:return'"'+e+'"'}return'"'+e+(/^[a-z]+(-[a-z0-9]+)*$/i.test(t)?'"@'+t.toLowerCase():'"^^'+t)},prefix:function(e){return c.prefixes({"":e})("")},prefixes:function(e){function t(e,t){if(t||!(e in n)){var r=Object.create(null);t=t||"",n[e]=function(e){return r[e]||(r[e]=t+e)}}return n[e]}var n=Object.create(null);for(var r in e)t(r,e[r]);return t}};e.exports=n(n)},function(e,t){function n(e,t){if(!(this instanceof n))return new n(e,t);if(e&&"function"!=typeof e.write&&(t=e,e=null),t=t||{},e)this._outputStream=e,this._endStream=void 0===t.end||!!t.end;else{var r="";this._outputStream={write:function(e,t,n){r+=e,n&&n()},end:function(e){e&&e(null,r)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(t.format)?this._writeTriple=this._writeTripleLine:(this._graph="",this._prefixIRIs=Object.create(null),t.prefixes&&this.addPrefixes(t.prefixes))}function r(e){var t=u[e];return void 0===t&&(1===e.length?(t=e.charCodeAt(0).toString(16),t="\\u0000".substr(0,6-t.length)+t):(t=(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)+9216).toString(16),t="\\U00000000".substr(0,10-t.length)+t)),t}var i=/^"([^]*)"(?:\^\^(.+)|@([\-a-z]+))?$/i,o="http://www.w3.org/1999/02/22-rdf-syntax-ns#",a=o+"type",s=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,l=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,u={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};n.prototype={_write:function(e,t){this._outputStream.write(e,"utf8",t)},_writeTriple:function(e,t,n,r,i){try{this._graph!==r&&(this._write((null===this._subject?"":this._graph?"\n}\n":".\n")+(r?this._encodeIriOrBlankNode(r)+" {\n":"")),this._subject=null,this._graph="["!==r[0]?r:"]"),this._subject===e?this._predicate===t?this._write(", "+this._encodeObject(n),i):this._write(";\n "+this._encodePredicate(this._predicate=t)+" "+this._encodeObject(n),i):this._write((null===this._subject?"":".\n")+this._encodeSubject(this._subject=e)+" "+this._encodePredicate(this._predicate=t)+" "+this._encodeObject(n),i)}catch(e){i&&i(e)}},_writeTripleLine:function(e,t,n,r,i){delete this._prefixMatch;try{this._write(this._encodeIriOrBlankNode(e)+" "+this._encodeIriOrBlankNode(t)+" "+this._encodeObject(n)+(r?" "+this._encodeIriOrBlankNode(r)+".\n":".\n"),i)}catch(e){i&&i(e)}},_encodeIriOrBlankNode:function(e){var t=e[0];if("["===t||"("===t||"_"===t&&":"===e[1])return e;s.test(e)&&(e=e.replace(l,r));var n=this._prefixRegex.exec(e);return n?n[1]?this._prefixIRIs[n[1]]+n[2]:e:"<"+e+">"},_encodeLiteral:function(e,t,n){return s.test(e)&&(e=e.replace(l,r)),n?'"'+e+'"@'+n:t?'"'+e+'"^^'+this._encodeIriOrBlankNode(t):'"'+e+'"'},_encodeSubject:function(e){if('"'===e[0])throw new Error("A literal as subject is not allowed: "+e);return"["===e[0]&&(this._subject="]"),this._encodeIriOrBlankNode(e)},_encodePredicate:function(e){if('"'===e[0])throw new Error("A literal as predicate is not allowed: "+e);return e===a?"a":this._encodeIriOrBlankNode(e)},_encodeObject:function(e){if('"'!==e[0])return this._encodeIriOrBlankNode(e);var t=i.exec(e);if(!t)throw new Error("Invalid literal: "+e);return this._encodeLiteral(t[1],t[2],t[3])},_blockedWrite:function(){throw new Error("Cannot write because the writer has been closed.")},addTriple:function(e,t,n,r,i){void 0===n?this._writeTriple(e.subject,e.predicate,e.object,e.graph||"",t):"string"!=typeof r?this._writeTriple(e,t,n,"",r):this._writeTriple(e,t,n,r,i)},addTriples:function(e){for(var t=0;t.\n"))}if(r){var a="",s="";for(var l in n)a+=a?"|"+l:l,s+=(s?"|":"")+n[l];a=a.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&"),this._prefixRegex=new RegExp("^(?:"+s+")[^/]*$|^("+a+")([a-zA-Z][\\-_a-zA-Z0-9]*)$")}this._write(r?"\n":"",t)},blank:function(e,t){var n,r,i=e;switch(void 0===e?i=[]:"string"==typeof e?i=[{predicate:e,object:t}]:"length"in e||(i=[e]),r=i.length){case 0:return"[]";case 1:if(n=i[0],"["!==n.object[0])return"[ "+this._encodePredicate(n.predicate)+" "+this._encodeObject(n.object)+" ]";default:for(var o="[",a=0;a0?{kind:"JOIN",lvalue:{kind:"BGP",value:o},rvalue:l}:l,"ZERO_OR_MORE_PATH"===l.kind)if("var"===l.y.token&&0===l.y.value.indexOf("fresh:")&&"var"===l.x.token&&0===l.x.value.indexOf("fresh:"))for(var c=0;c0){var p=AbstractQueryTree.translatePathExpressionsInBGP({kind:"BGP",value:r},t);if(null!=u){var f=o.concat([u]).concat(r);return{kind:"UNION",value:[{kind:"JOIN",lvalue:i,rvalue:p},{kind:"BGP",value:f}]}}return{kind:"JOIN",lvalue:i,rvalue:p}}return i}return l}o=o.concat(l.value)}else o.push(e.value[a]);return e.value=o,e},AbstractQueryTree.translatePathExpression=function(e,t){if("element"===e.predicate.kind){if("+"===e.predicate.modifier){e.predicate.modifier=null;var n=AbstractQueryTree.translatePathExpression(e,t);return{kind:"ONE_OR_MORE_PATH",path:n,x:e.subject,y:e.object}}if("*"===e.predicate.modifier){e.predicate.modifier=null;var n=AbstractQueryTree.translatePathExpression(e,t);return{kind:"ZERO_OR_MORE_PATH",path:n,x:e.subject,y:e.object}}return e.predicate=e.predicate.value,{kind:"BGP",value:[e]}}if("sequence"===e.predicate.kind){for(var i,o,a=e.subject,l=e.object,u=e.graph,c=[],p=0;pt?1:0},n.merger=null,null!=t&&t(n)})})}};l.prototype._allocateNode=function(){return new u},l.prototype._diskWrite=function(e,t){o(function(){t(e)})},l.prototype._diskRead=function(e,t){o(function(){t(e)})},l.prototype._diskDelete=function(e,t){o(function(){t()})},l.prototype._updateRootNode=function(e,t){t(e)},l.prototype.search=function(e,t,n){var r=this.root,i=this;i.__search(i,e,r,t,n)},l.prototype.__search=function(e,t,n,r,i){for(var o=0;ot+1;a--)e.children[a]=e.children[a-1];for(e.children[t+1]=i,a=e.numberActives;a>t;a--)e.keys[a]=e.keys[a-1];e.keys[t]=o,e.numberActives++;var s=this;this._diskWrite(i,function(i){s._diskWrite(e,function(e){e.children[t+1]=i,s._diskWrite(n,function(t){return r(e)})})})},l.prototype.insert=function(e,t,n){if(this.root.numberActives===2*this.order-1){var r=this._allocateNode();r.isLeaf=!1,r.level=this.root.level+1,r.numberActives=0,r.children[0]=this.root;var i=this;this._splitChild(r,0,this.root,function(o){r=o,i.root=r,i._updateRootNode(r,function(r){i._insertNonFull(r,e,t,n)})})}else this._insertNonFull(this.root,e,t,n)},l.prototype._insertNonFull=function(e,t,n,r){var i=e.numberActives-1;this.__insertNonFull(this,e,i,t,n,r)},l.prototype.__insertNonFull=function(e,t,n,r,i,o){if(t.isLeaf){for(;n>=0&&e.comparator(r,t.keys[n].key)===-1;)t.keys[n+1]=t.keys[n],n--;n>=0&&0===e.comparator(r,t.keys[n].key)?t.keys[n]={key:r,data:i}:(t.keys[n+1]={key:r,data:i},t.numberActives++),e._diskWrite(t,function(e){return o(e)})}else{for(;n>=0&&e.comparator(r,t.keys[n].key)===-1;)n--;n++;var a=e;e._diskRead(t.children[n],function(s){s.numberActives===2*a.order-1?a._splitChild(t,n,s,function(){1===a.comparator(r,t.keys[n].key)&&n++,a._diskRead(t.children[n],function(t){n=t.numberActives-1,a.__insertNonFull(e,t,n,r,i,o)})}):a._diskRead(t.children[n],function(t){n=t.numberActives-1,a.__insertNonFull(e,t,n,r,i,o)})})}},l.prototype.delete=function(e,t){var n=this.root;l.prototype.__deleteSearchNode(this,e,n,t)},l.prototype.__deleteSearchNode=function(e,t,n,r){var i=0;if(0===n.numberActives)return r(!1);for(;ie.order-1?e._moveKey(l,i,a,function(i){e.__deleteSearchNode(e,t,n,r)}):null!=o&&o.numberActives>e.order-1?e._moveKey(l,i,s,function(i){e.__deleteSearchNode(e,t,n,r)}):null!=o&&o.numberActives===e.order-1?e._mergeSiblings(l,i,a,function(n){e.__deleteSearchNode(e,t,n,r)}):null!=p&&p.numberActives===e.order-1&&e._mergeSiblings(l,i,s,function(n){e.__deleteSearchNode(e,t,n,r)}):e.__deleteSearchNode(e,t,n,r)})})})},l.prototype.__deleteNodeFound=function(e,t,n,r,i){return r.isLeaf&&r.numberActives>e.order-1?(e._deleteKeyFromNode(r,t,function(){i(!0)}),!0):r.isLeaf&&r===e.root?(e._deleteKeyFromNode(r,t,function(){i(!0)}),!0):(r.isLeaf===!1&&e._diskRead(r.children[t],function(o){o.numberActives>e.order-1?e._getMaxKeyPos(e,o,function(a){n=a.node.keys[a.index],r.keys[t]=n,e._diskWrite(r,function(t){t=o,n=n.key,e.__deleteSearchNode(e,n,t,i)})}):e._diskRead(r.children[t+1],function(a){a.numberActives>e.order-1?e._getMinKeyPos(e,a,function(o){ n=o.node.keys[o.index],r.keys[t]=n,e._diskWrite(r,function(t){t=a,n=n.key,e.__deleteSearchNode(e,n,t,i)})}):o.numberActives===e.order-1&&a.numberActives===e.order-1&&e._mergeNodes(o,r.keys[t],a,function(o){r.children[t]=o,t++;for(var a=t;ae.order-1&&e._deleteKeyFromNode(r,t,function(t){e.__deleteSearchNode(e,n,t,i)})))},l.prototype._moveKey=function(e,t,n,r){n===s&&t--;var i=this;i._diskRead(e.children[t],function(o){i._diskRead(e.children[t+1],function(s){if(n==a){o.keys[o.numberActives]=e.keys[t],o.children[o.numberActives+1]=s.children[0],s.children[0]=null,o.numberActives++,e.keys[t]=s.keys[0];for(var l=1;l0;l--)s.children[l]=s.children[l-1],s.keys[l]=s.keys[l-1];s.keys[0]=null,s.children[0]=null,s.children[0]=o.children[o.numberActives],s.keys[0]=e.keys[t],s.numberActives++,o.children[o.numberActives]=null,e.keys[t]=o.keys[o.numberActives-1],o.keys[o.numberActives-1]=null,o.numberActives--}i._diskWrite(o,function(t){i._diskWrite(s,function(t){i._diskWrite(e,function(e){return r(e)})})})})})},l.prototype._mergeSiblings=function(e,t,n,r){var i,o,a,s;t===e.numberActives?(t--,a=e.children[e.numberActives-1],s=e.children[e.numberActives]):(a=e.children[t],s=e.children[t+1]);var l=this;l._diskRead(a,function(n){l._diskRead(s,function(a){var s=l._allocateNode();for(s.isLeaf=n.isLeaf,s.level=n.level,o=0;o key "+a.keys[s].key;e===!0&&console.log(c),t.push(c)}if(1===r.comparator(a.keys[s].key,u)){var c=" !!! value min right "+u+" < key "+a.keys[s].key;e===!0&&console.log(c),t.push(c)}i(a.keys[s].key),n.push(a.keys[s].key)}else{if(null===o)o=a.level;else if(o!=a.level){var c=" !!! Leaf node with wrong level value";e===!0&&console.log(c),t.push(c)}for(var s=0;s2*r.order-1){if(e===!0)var c=" !!!! MAX num keys restriction violated ";console.log(c),t.push(c)}if(a.numberActives"),e},RDFModel.Literal.prototype.toNT=function(){return this.toString()},RDFModel.Literal.prototype.valueOf=function(){return i.effectiveTypeValue({token:"literal",type:this.type||this.datatype,value:this.nominalValue,language:this.language})},RDFModel.NamedNode=function(e){RDFModel.RDFNode.call(this,"NamedNode"),null!=e.value?this.nominalValue=e.value:this.nominalValue=e},RDFModel.NamedNode.prototype=r.create(RDFModel.RDFNode.prototype,{constructor:RDFModel.NamedNode}),RDFModel.NamedNode.prototype.toString=function(){return this.nominalValue},RDFModel.NamedNode.prototype.toNT=function(){return"<"+this.toString()+">"},RDFModel.NamedNode.prototype.valueOf=function(){return this.nominalValue},RDFModel.Triple=function(e,t,n){this.subject=e,this.predicate=t,this.object=n},RDFModel.Triple.prototype.equals=function(e){return this.subject.equals(e.subject)&&this.predicate.equals(e.predicate)&&this.object.equals(e.object)},RDFModel.Triple.prototype.toString=function(){return this.subject.toNT()+" "+this.predicate.toNT()+" "+this.object.toNT()+" . \r\n"},RDFModel.Graph=function(){this.triples=[],this.duplicates={},this.actions=[],this.length=0},RDFModel.Graph.prototype.add=function(e){for(var t=0;t-1?void 0:a("96",e),!u.plugins[n]){t.extractEvents?void 0:a("97",e),u.plugins[n]=t;var r=t.eventTypes;for(var o in r)i(r[o],t,o)?void 0:a("98",o,e)}}}function i(e,t,n){u.eventNameDispatchConfigs.hasOwnProperty(n)?a("99",n):void 0,u.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];o(s,t,n)}return!0}return!!e.registrationName&&(o(e.registrationName,t,n),!0)}function o(e,t,n){u.registrationNameModules[e]?a("100",e):void 0,u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(11),s=(n(5),null),l={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s?a("101"):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];l.hasOwnProperty(n)&&l[n]===i||(l[n]?a("102",n):void 0,l[n]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var i=u.registrationNameModules[n[r]];if(i)return i}}return null},_resetEventPlugins:function(){s=null;for(var e in l)l.hasOwnProperty(e)&&delete l[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=u.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};e.exports=u},function(e,t,n){"use strict";function r(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e}function i(e){return"topMouseMove"===e||"topTouchMove"===e}function o(e){return"topMouseDown"===e||"topTouchStart"===e}function a(e,t,n,r){var i=e.type||"unknown-event";e.currentTarget=m.getNodeFromInstance(r),t?v.invokeGuardedCallbackWithCatch(i,n,e):v.invokeGuardedCallback(i,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function o(e,t){var n=s.get(e);if(!n){return null}return n}var a=n(11),s=(n(40),n(80)),l=(n(33),n(36)),u=(n(5),n(7),{isMounted:function(e){var t=s.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){u.validateCallback(t,n);var i=o(e);return i?(i._pendingCallbacks?i._pendingCallbacks.push(t):i._pendingCallbacks=[t],void r(i)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=o(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?a("122",t,i(e)):void 0}});e.exports=u},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e};e.exports=n},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=i[e];return!!r&&!!n[r]}function r(e){return n}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t,n){"use strict";function r(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&i&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var i,o=n(22);o.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var i=typeof e,o=typeof t;return"string"===i||"number"===i?"string"===o||"number"===o:"object"===o&&e.type===t.type&&e.key===t.key}e.exports=n},function(e,t,n){"use strict";var r=(n(14),n(27)),i=(n(7),r);e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return e="function"==typeof e?e():e,a.default.findDOMNode(e)||t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(12),a=r(o);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n,r,i){var a=e[t],l="undefined"==typeof a?"undefined":o(a);return s.default.isValidElement(a)?new Error("Invalid "+r+" `"+i+"` of type ReactElement "+("supplied to `"+n+"`, expected a ReactComponent or a ")+"DOMElement. You can usually obtain a ReactComponent or DOMElement from a ReactElement by attaching a ref to it."):"object"===l&&"function"==typeof a.render||1===a.nodeType?null:new Error("Invalid "+r+" `"+i+"` of value `"+a+"` "+("supplied to `"+n+"`, expected a ReactComponent or a ")+"DOMElement.")}t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=n(1),s=r(a),l=n(364),u=r(l);t.default=(0,u.default)(i)},function(e,t){"use strict";function n(e,t,n,r){return"Invalid prop '"+t+"' of value '"+e[t]+"'"+(" supplied to '"+n+"'"+r)}function r(e){function t(t,n,r,i){return i=i||"<>",null!=n[r]?e(n,r,i):t?new Error("Required prop '"+r+"' was not specified in '"+i+"'."):void 0}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}t.__esModule=!0,t.errMsg=n,t.createChainableTypeChecker=r},function(e,t){"use strict";function n(e){return function(t,n,r){return null==t[n]?new Error("The prop '"+n+"' is required to make '"+r+"' accessible for users using assistive technologies such as screen readers"):e(t,n,r)}}t.__esModule=!0,t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||o}var i=n(60),o=n(219),a=(n(371),n(88));n(5),n(7);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?i("85"):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};e.exports=r},function(e,t,n){"use strict";function r(e){var t=Function.prototype.toString,n=Object.prototype.hasOwnProperty,r=RegExp("^"+t.call(n).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");try{var i=t.call(e);return r.test(i)}catch(e){return!1}}function i(e){var t=u(e);if(t){var n=t.childIDs;c(e),n.forEach(i)}}function o(e,t,n){return"\n in "+(e||"Unknown")+(t?" (at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+")":n?" (created by "+n+")":"")}function a(e){return null==e?"#empty":"string"==typeof e||"number"==typeof e?"#text":"string"==typeof e.type?e.type:e.type.displayName||e.type.name||"Unknown"}function s(e){var t,n=C.getDisplayName(e),r=C.getElement(e),i=C.getOwnerID(e);return i&&(t=C.getDisplayName(i)),o(n,r&&r._source,t)}var l,u,c,p,f,h,d,v=n(60),y=n(40),m=(n(5),n(7),"function"==typeof Array.from&&"function"==typeof Map&&r(Map)&&null!=Map.prototype&&"function"==typeof Map.prototype.keys&&r(Map.prototype.keys)&&"function"==typeof Set&&r(Set)&&null!=Set.prototype&&"function"==typeof Set.prototype.keys&&r(Set.prototype.keys));if(m){var g=new Map,b=new Set;l=function(e,t){g.set(e,t)},u=function(e){return g.get(e)},c=function(e){g.delete(e)},p=function(){return Array.from(g.keys())},f=function(e){b.add(e)},h=function(e){b.delete(e)},d=function(){return Array.from(b.keys())}}else{var x={},w={},_=function(e){return"."+e},T=function(e){return parseInt(e.substr(1),10)};l=function(e,t){var n=_(e);x[n]=t},u=function(e){var t=_(e);return x[t]},c=function(e){var t=_(e);delete x[t]},p=function(){return Object.keys(x).map(T)},f=function(e){var t=_(e);w[t]=!0},h=function(e){var t=_(e);delete w[t]},d=function(){return Object.keys(w).map(T)}}var k=[],C={onSetChildren:function(e,t){var n=u(e);n?void 0:v("144"),n.childIDs=t;for(var r=0;r-1?r:k,E=n(26).Buffer;s.WritableState=a;var S=n(34);S.inherits=n(28);var P,O={deprecate:n(392)};!function(){try{P=n(46)}catch(e){}finally{P||(P=n(41).EventEmitter)}}();var E=n(26).Buffer;S.inherits(s,P);var A;a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(a.prototype,"buffer",{get:O.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var A;s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},s.prototype.write=function(e,t,n){var r=this._writableState,o=!1;return"function"==typeof t&&(n=t,t=null),E.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=i),r.ended?l(this,n):u(this,r,e,n)&&(r.pendingcb++,o=p(this,r,e,t,n)),o},s.prototype.cork=function(){var e=this._writableState;e.corked++},s.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||g(this,e))},s.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e},s.prototype._write=function(e,t,n){n(new Error("not implemented"))},s.prototype._writev=null,s.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||_(this,r,n)}}).call(t,n(20),n(107).setImmediate)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var i=n(382),o=r(i),a=n(923),s=r(a),l=n(922),u=r(l),c=n(921),p=r(c),f=n(381),h=r(f),d=n(383);r(d);t.createStore=o.default,t.combineReducers=s.default,t.bindActionCreators=u.default,t.applyMiddleware=p.default,t.compose=h.default},function(e,t){"use strict";function n(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function r(e,t,n,i){var o=this;this.name="ValidationError",this.value=t,this.path=n,this.type=i,this.errors=[],this.inner=[],e&&[].concat(e).forEach(function(e){o.errors=o.errors.concat(e.errors||e),e.inner&&(o.inner=o.inner.concat(e.inner.length?e.inner:e))}),this.message=this.errors.length>1?this.errors.length+" errors occurred":this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,r)}t.__esModule=!0,t.default=r;var i=/\$\{\s*(\w+)\s*\}/g,o=function(e){return function(t){return e.replace(i,function(e,n){return t[n]||""})}};r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.isError=function(e){return e&&"ValidationError"===e.name},r.formatError=function(e,t){"string"==typeof e&&(e=o(e));var r=function(t){var r=t.path,i=t.label,o=n(t,["path","label"]);return o.path=i||r||"this",e(o)};return 1===arguments.length?r:r(t)},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){return Promise.all(e).catch(function(e){throw"ValidationError"===e.name&&(e.value=t),e}).then(function(){return t})}function a(e,t){return e?null:function(e){return t.push(e),e.value}}function s(e){var t=function(e){return e.then(function(e){return{fulfilled:!0,value:e}},function(e){return{fulfilled:!1,value:e}})};return Promise.all(e.map(t))}function l(e){var t=e.validations,n=e.value,r=e.path,i=e.errors,o=void 0===i?f(o):i,a=e.sort;return s(t).then(function(e){var t=e.filter(function(e){return!e.fulfilled}).reduce(function(e,t){return e.concat(t.value)},[]);if(a&&t.sort(a),o=t.concat(o),o.length)throw new p.default(o,n,r);return n})}function u(e){var t=e.endEarly,n=i(e,["endEarly"]);return t?o(n.validations,n.value):l(n)}t.__esModule=!0,t.propagateErrors=a,t.settled=s,t.collectErrors=l,t.default=u;var c=n(223),p=r(c),f=function(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];return e.inner&&e.inner.length?e.inner:[].concat(e)}},function(e,t){(function(t){"use strict";function n(e){s.length||(a(),l=!0),s[s.length]=e}function r(){for(;uc){for(var t=0,n=s.length-u;t \nPREFIX rdfs: PREFIX skos: PREFIX qb: PREFIX xsd: PREFIX owl: "}Object.defineProperty(t,"__esModule",{value:!0});t.IC1={query:n()+" ASK { { ?obs a qb:Observation . FILTER NOT EXISTS { ?obs qb:dataSet ?dataset1 . } } UNION { ?obs a qb:Observation ; qb:dataSet ?dataset1, ?dataset2 . FILTER (?dataset1 != ?dataset2) } } ",name:"IC-1. Unique DataSet",disc:"Every qb:Observation has exactly one associated qb:DataSet."},t.IC2={query:n()+" ASK { { ?dataset a qb:DataSet . FILTER NOT EXISTS { ?dataset qb:structure ?dsd . } } UNION { ?dataset a qb:DataSet ; qb:structure ?dsd1, ?dsd2 . FILTER (?dsd1 != ?dsd2) } } ",name:"IC-2. Unique DSD",disc:"Every qb:DataSet has exactly one associated qb:DataStructureDefinition."},t.IC3={query:n()+" ASK { ?dsd a qb:DataStructureDefinition . FILTER NOT EXISTS { ?dsd qb:component [qb:componentProperty [a qb:MeasureProperty]] } } ",name:"IC-3. DSD includes measure",disc:"Every qb:DataStructureDefinition must include at least one declared measure."},t.IC4={query:n()+" ASK { ?dim a qb:DimensionProperty . FILTER NOT EXISTS { ?dim rdfs:range [] } } ",name:"IC-4. Dimensions have range",disc:"Every dimension declared in a qb:DataStructureDefinition must have a declared rdfs:range."},t.IC6={query:n()+' ASK { ?dsd qb:component ?componentSpec . ?componentSpec qb:componentRequired "false"^^xsd:boolean ; qb:componentProperty ?component . FILTER NOT EXISTS { ?component a qb:AttributeProperty } } ',name:"IC-6. Only attributes may be optional",disc:"The only components of a qb:DataStructureDefinition that may be marked as optional, using qb:componentRequired are attributes."},t.IC11={query:n()+" ASK { ?obs qb:dataSet/qb:structure/qb:component/qb:componentProperty ?dim . ?dim a qb:DimensionProperty . FILTER NOT EXISTS { ?obs ?dim [] } } ",name:"IC-11. All dimensions required",disc:"Every qb:Observation has a value for each dimension declared in its associated qb:DataStructureDefinition."},t.IC12={query:n()+" ASK { FILTER( ?allEqual ) { SELECT (MIN(?equal) AS ?allEqual) WHERE { ?obs1 qb:dataSet ?dataset . ?obs2 qb:dataSet ?dataset . FILTER (?obs1 != ?obs2) ?dataset qb:structure/qb:component/qb:componentProperty ?dim . ?dim a qb:DimensionProperty . ?obs1 ?dim ?value1 . ?obs2 ?dim ?value2 . BIND( ?value1 = ?value2 AS ?equal) } GROUP BY ?obs1 ?obs2 } } ",name:"IC-12. No duplicate observations",disc:"No two qb:Observations in the same qb:DataSet may have the same value for all dimensions."},t.IC13={query:n()+' ASK { ?obs qb:dataSet/qb:structure/qb:component ?component . ?component qb:componentRequired "true"^^xsd:boolean ; qb:componentProperty ?attr . FILTER NOT EXISTS { ?obs ?attr [] } } ',name:"IC-13. Required attributes",disc:"Every qb:Observation has a value for each declared attribute that is marked as required."},t.IC14={query:n()+" ASK { ?obs qb:dataSet/qb:structure ?dsd . FILTER NOT EXISTS { ?dsd qb:component/qb:componentProperty qb:measureType } ?dsd qb:component/qb:componentProperty ?measure . ?measure a qb:MeasureProperty . FILTER NOT EXISTS { ?obs ?measure [] } } ",name:"IC-14. All measures present",disc:"In a qb:DataSet which does not use a Measure dimension then each individual qb:Observation must have a value for every declared measure."},t.IC15={query:n()+" ASK { ?obs qb:dataSet/qb:structure ?dsd ; qb:measureType ?measure . ?dsd qb:component/qb:componentProperty qb:measureType . FILTER NOT EXISTS { ?obs ?measure [] } } ",name:"IC-15. Measure dimension consistent",disc:"In a qb:DataSet which uses a Measure dimension then each qb:Observation must have a value for the measure corresponding to its given qb:measureType."},t.IC16={query:n()+" ASK { ?obs qb:dataSet/qb:structure ?dsd ; qb:measureType ?measure ; ?omeasure [] . ?dsd qb:component/qb:componentProperty qb:measureType ; qb:component/qb:componentProperty ?omeasure . ?omeasure a qb:MeasureProperty . FILTER (?omeasure != ?measure) } ",name:"IC-16. Single measure on measure dimension observation",disc:"In a qb:DataSet which uses a Measure dimension then each qb:Observation must only have a value for one measure (by IC-15 this will be the measure corresponding to its qb:measureType)."},t.IC17={query:n()+" ASK { { SELECT ?numMeasures (COUNT(?obs2) AS ?count) WHERE { { SELECT ?dsd (COUNT(?m) AS ?numMeasures) WHERE { ?dsd qb:component/qb:componentProperty ?m. ?m a qb:MeasureProperty . } GROUP BY ?dsd } ?obs1 qb:dataSet/qb:structure ?dsd; qb:dataSet ?dataset ; qb:measureType ?m1 . ?obs2 qb:dataSet ?dataset ; qb:measureType ?m2 . FILTER NOT EXISTS { ?dsd qb:component/qb:componentProperty ?dim . FILTER (?dim != qb:measureType) ?dim a qb:DimensionProperty . ?obs1 ?dim ?v1 . ?obs2 ?dim ?v2. FILTER (?v1 != ?v2) } } GROUP BY ?obs1 ?numMeasures HAVING (?count != ?numMeasures) } } ",name:"IC-17. All measures present in measures dimension cube",disc:"In a qb:DataSet which uses a Measure dimension then if there is a Observation for some combination of non-measure dimensions then there must be other Observations with the same non-measure dimension values for each of the declared measures."}},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n . ?s ?p ?o . } "}},{key:"dsdQuery",value:function(e){return"CONSTRUCT {?dsd ?p ?o}WHERE { <"+e+"> ?dsd . ?dsd ?p ?o . }"}},{key:"csQuery",value:function(e){return"CONSTRUCT {?cs ?p ?o} WHERE { <"+e+"> ?cs . ?cs ?p ?o . }"}},{key:"componentElementsQuery",value:function(e,t){return"CONSTRUCT { ?componentUri <"+e+"> .?componentUri ?p ?o . } WHERE { ?ob . ?ob <"+t+">. ?ob <"+e+"> ?componentUri. OPTIONAL { ?componentUri ?p ?o . }}"}},{key:"componentQuery",value:function(e,t,n){return"CONSTRUCT { ?comptype ?p ?o . }WHERE { <"+e+"> <"+t+"> . <"+t+"> ?comp . ?comp <"+n+"> ?comptype . ?comptype ?p ?o. }"}},{key:"observationsQuery",value:function(e){return"CONSTRUCT { ?s ?p ?o } WHERE { ?s . ?s <"+e+">. ?s ?p ?o . }"}}]),l(t,[{key:"mapComponentElementsToComponentTypes",value:function(e,t){return e.reduce(function(e,n,r){var i=(0,d.fromJS)(t).getIn([r,"@id"]);return e.set(i,n)},(0,d.Map)()).toJS()}},{key:"parse",value:function(e){return h.promises.fromRDF(e.toNT(),{format:"application/nquads"})}},{key:"execute",value:function(e){var t=this;return this.log(this.constructor.name+" Query:\n"+e),new c.default(function(n,r){t.internalStore.execute(e,function(e,t){e?r(e):n(t)})})}},{key:"create",value:function(){var e=this;return this.triple?new c.default(function(e,t){f.default.create(function(n,r){n?t(n):e(r)})}).then(function(t){return e.internalStore=t,c.default.resolve(e)}):c.default.reject("No triples!")}},{key:"load",value:function(){var e=this;return new c.default(function(t,n){e.internalStore.load("text/n3",e.triple,function(r,i){r?n(r):t(e)})})}},{key:"import",value:function(e){var t=this;e&&(this.result.dataset=e);var n=e?this.getDsd(e):this.getDatasets().then(function(e){return 0===e.length?c.default.reject(new Error("NO DATASET FOUND VALIDATION ERROR")):(t.log(t.constructor.name+" found "+e.length+" Datasets, selected first."),t.result.dataset=e[0],t.getDsd(e[0]))});return n.then(function(e){if(0===e.length)return c.default.reject(new Error("NO DSD FOUND VALIDATION ERROR"));t.result.dataStructureDefinition=e[0],t.log(t.constructor.name+" found "+e.length+" DSD, selected first.");var n=[t.getDimensions(t.result.dataset,e[0]),t.getMeasures(t.result.dataset,e[0]),t.getAttributes(t.result.dataset,e[0])]; return c.default.all(n)}).then(function(e){if(0===e[1].length)return c.default.reject(new Error("NO MEASURE FOUND VALIDATION ERROR"));if(0===e[0].length)return c.default.reject(new Error("NO DIMENSIONS FOUND VALIDATION ERROR"));if(t.log(t.constructor.name+" found "+e[0].length+" dimension(s)"),t.log(t.constructor.name+" found "+e[1].length+" measure(s)"),t.log(t.constructor.name+" found "+e[2].length+" attribute(s)"),t.result.dimensions=e[0],t.result.measures=e[1],t.result.attributes=e[2],0===e[2].length)return t.getAttributesFromMeasures(t.result.measures,t.result.dsd,t.result.ds).then(function(e){t.result.attributes=(0,d.fromJS)(e[1]).flatten(1).toJS();var n=t.result.dimensions.map(function(e){return t.getDimElements(e,t.result.dataset)});return c.default.all(n)});var n=e[0].map(function(e){return t.getDimElements(e,t.result.dataset)});return c.default.all(n)}).then(function(e){var n=(0,d.fromJS)(e);if(0===n.flatten(1).size)return c.default.reject(new Error("NO DIMENSION ELEMENTS FOUND VALIDATION ERROR"));var r=n.map(function(e,t){return[e.size>0,t,e]}),i=r.filter(function(e){return e[0]}).map(function(e){return e[2]}),o=(0,d.fromJS)(t.result.dimensions).filter(function(e,t){return r.get(t)[0]});t.result.dimensions=o.toJS(),t.log(t.constructor.name+" found "+i.size+" valid dimension(s) with a total count of "+i.flatten(1).size+" dimension element(s)"),t.result.dimensionElements=t.mapComponentElementsToComponentTypes(i,t.result.dimensions);var a=t.result.attributes.map(function(e){return t.getAttrElements(e,t.result.dataset)});return c.default.all(a)}).then(function(e){if(0===t.result.attributes.length)return t.result.attributesElements={},t.getObservations(t.result.dataset);var n=(0,d.fromJS)(e);return 0===n.flatten(1).size?c.default.reject(new Error("NO ATTRIBUTE ELEMENTS FOUND VALIDATION ERROR")):(t.log(t.constructor.name+" found "+n.flatten(1).size+" attribute element(s)"),t.result.attributesElements=t.mapComponentElementsToComponentTypes(n,t.result.attributes),t.getObservations(t.result.dataset))}).then(function(e){if(0===e.length)return c.default.reject(new Error("NO OBSERVATIONS FOUND VALIDATION ERROR"));t.result.observations=e,t.log(t.constructor.name+" found "+e.length+" observation(s)");t.result.attributes.map(function(e){return t.getAttrElements(e,t.result.dataset)});return c.default.resolve(t.result)})}},{key:"getAttributesFromMeasures",value:function(e,t,n){var r=this,i=function(e){return"CONSTRUCT { ?attr ?p ?o . } WHERE { <"+e+"> ?attr . ?attr ?p ?o . }"},o=e.map(function(e){return r.execute(i(e["@id"])).then(r.parse)});return c.default.all(o).then(function(t){return[e,t]})}},{key:"getDatasets",value:function(){return this.execute(this.datasetQuery()).then(this.parse)}},{key:"getDsd",value:function(e){return this.execute(this.dsdQuery(e["@id"])).then(this.parse)}},{key:"getCs",value:function(e){return this.execute(this.csQuery(e["@id"])).then(this.parse)}},{key:"getDimensions",value:function(e,t){return this.execute(this.componentQuery(e["@id"],t["@id"],"http://purl.org/linked-data/cube#dimension")).then(this.parse)}},{key:"getMeasures",value:function(e,t){return this.execute(this.componentQuery(e["@id"],t["@id"],"http://purl.org/linked-data/cube#measure")).then(this.parse)}},{key:"getAttributes",value:function(e,t){return this.execute(this.componentQuery(e["@id"],t["@id"],"http://purl.org/linked-data/cube#attribute")).then(this.parse)}},{key:"getDimElements",value:function(e,t){return this.execute(this.componentElementsQuery(e["@id"],t["@id"])).then(this.parse)}},{key:"getAttrElements",value:function(e,t){return this.execute(this.componentElementsQuery(e["@id"],t["@id"])).then(this.parse)}},{key:"getObservations",value:function(e){return this.execute(this.observationsQuery(e["@id"])).then(this.parse)}},{key:"getAllTriples",value:function(){return this.execute(this.allTriplesQuery()).then(this.parse)}},{key:"execVerification",value:function(e){var t=this;return this.execute(e.query).then(function(n){var r="string"==typeof n?"false"!==n:n;r===!0?(t.log(e.name+": failed 😥"),t.log(e.disc),t.log("See http://www.w3.org/TR/vocab-data-cube/ for further details")):(t.log(e.name+": fulfilled 😃"),t.log(e.disc))})}},{key:"verify",value:function(){var e=this;return c.default.all([]).then(function(t){return e},function(t){return e.log(t),e})}}]),t}(m.default);t.default=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n0}).toJS()}},{key:"onAccept",value:function(e){var t=this.clearEmptySelections(e);this.props.dispatch((0,p.hideSettingsModal)());var n=this.action(t);this.props.dispatch(n)}},{key:"render",value:function(){return u.default.createElement(h.default,{values:this.props.allComponents,selectedValues:this.props.selectedComponents,onAccept:this.onAccept.bind(this)})}}]),t}(l.Component);d.propTypes={allComponents:l.PropTypes.arrayOf(l.PropTypes.shape({header:l.PropTypes.string.isRequired,elements:l.PropTypes.arrayOf(l.PropTypes.string.isRequired).isRequired}).isRequired).isRequired,selectedComponents:l.PropTypes.object.isRequired,dispatch:l.PropTypes.func.isRequired},t.default=d},function(e,t,n){e.exports={default:n(432),__esModule:!0}},function(e,t,n){e.exports={default:n(433),__esModule:!0}},function(e,t){"use strict";t.default=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},t.__esModule=!0},function(e,t,n){var r=n(436);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){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(439);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";function r(){var e=void 0===arguments[0]?document:arguments[0];try{return e.activeElement}catch(e){}}var i=n(115);t.__esModule=!0,t.default=r;var o=n(67);i.interopRequireDefault(o);e.exports=t.default},function(e,t){"use strict";e.exports=function(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")!==-1}},function(e,t,n){"use strict";var r=n(49),i=function(){};r&&(i=function(){return document.addEventListener?function(e,t,n,r){return e.removeEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.detachEvent("on"+t,n)}:void 0}()),e.exports=i},function(e,t,n){"use strict";var r=n(68),i=n(113),o=n(67);e.exports=function(e){var t=o(e),n=i(t),a=t&&t.documentElement,s={top:0,left:0,height:0,width:0};if(t)return r(a,e)?(void 0!==e.getBoundingClientRect&&(s=e.getBoundingClientRect()),(s.width||s.height)&&(s={top:s.top+(n.pageYOffset||a.scrollTop)-(a.clientTop||0),left:s.left+(n.pageXOffset||a.scrollLeft)-(a.clientLeft||0),width:(null==s.width?e.offsetWidth:s.width)||0,height:(null==s.height?e.offsetHeight:s.height)||0}),s):s}},function(e,t,n){"use strict";var r=n(113);e.exports=function(e,t){var n=r(e);return void 0===t?n?"pageYOffset"in n?n.pageYOffset:n.document.documentElement.scrollTop:e.scrollTop:void(n?n.scrollTo("pageXOffset"in n?n.pageXOffset:n.document.documentElement.scrollLeft,t):e.scrollTop=t)}},function(e,t,n){"use strict";var r=n(461),i=/^-ms-/;e.exports=function(e){return r(e.replace(i,"ms-"))}},function(e,t,n){"use strict";var r,i=n(49);e.exports=function(e){if((!r||e)&&i){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),r=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return r}},function(e,t,n){var r;(function(e,i,o,a){(function(){"use strict";function s(e){return"function"==typeof e||"object"==typeof e&&null!==e}function l(e){return"function"==typeof e}function u(e){return"object"==typeof e&&null!==e}function c(e){X=e}function p(e){J=e}function f(){var t=e.nextTick,n=e.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&"0"===n[1]&&"10"===n[2]&&(t=i),function(){t(m)}}function h(){return function(){V(m)}}function d(){var e=0,t=new te(m),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function v(){var e=new MessageChannel;return e.port1.onmessage=m,function(){e.port2.postMessage(0)}}function y(){return function(){setTimeout(m,1)}}function m(){for(var e=0;e<$;e+=2){var t=ie[e],n=ie[e+1];t(n),ie[e]=void 0,ie[e+1]=void 0}$=0}function g(){try{var e=n(965);return V=e.runOnLoop||e.runOnContext,h()}catch(e){return y()}}function b(){}function x(){return new TypeError("You cannot resolve a promise with itself")}function w(){return new TypeError("A promises callback cannot return that same promise.")}function _(e){try{return e.then}catch(e){return le.error=e,le}}function T(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function k(e,t,n){J(function(e){var r=!1,i=T(n,t,function(n){r||(r=!0,t!==n?S(e,n):O(e,n))},function(t){r||(r=!0,A(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&i&&(r=!0,A(e,i))},e)}function C(e,t){t._state===ae?O(e,t._result):t._state===se?A(e,t._result):M(t,void 0,function(t){S(e,t)},function(t){A(e,t)})}function E(e,t){if(t.constructor===e.constructor)C(e,t);else{var n=_(t);n===le?A(e,le.error):void 0===n?O(e,t):l(n)?k(e,t,n):O(e,t)}}function S(e,t){e===t?A(e,x()):s(t)?E(e,t):O(e,t)}function P(e){e._onerror&&e._onerror(e._result),I(e)}function O(e,t){e._state===oe&&(e._result=t,e._state=ae,0!==e._subscribers.length&&J(I,e))}function A(e,t){e._state===oe&&(e._state=se,e._result=t,J(P,e))}function M(e,t,n,r){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+ae]=n,i[o+se]=r,0===o&&e._state&&J(I,e)}function I(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,i,o=e._result,a=0;a-1&&e%1==0&&ei?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++rf))return!1;var d=c.get(e);if(d&&c.get(t))return d==t;var v=-1,y=!0,m=n&l?new i:void 0;for(c.set(e,t),c.set(t,e);++v=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return Array.isArray(e)?e:Array.from(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e,t){var n=e.animated,r=e.desktop,i=e.maxHeight,o=e.openDirection,a=void 0===o?"bottom-left":o,s=e.width,l="bottom"===a.split("-")[0],u="left"===a.split("-")[1],c=t.muiTheme,p={root:{transition:n?C.default.easeOut("250ms","transform"):null,zIndex:c.zIndex.menu,top:l?0:null,bottom:l?null:0,left:u?null:0,right:u?0:null,transform:n?"scaleX(0)":null,transformOrigin:u?"right":"left",opacity:0,maxHeight:i,overflowY:i?"auto":null},divider:{marginTop:7,marginBottom:8},list:{display:"table-cell",paddingBottom:r?16:8,paddingTop:r?16:8,userSelect:"none",width:s},menuItemContainer:{transition:n?C.default.easeOut(null,"opacity"):null,opacity:0},selectedMenuItem:{color:c.baseTheme.palette.accent1Color}};return p}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t=0?o:0,isKeyboardFocused:e.initiallyKeyboardFocused,keyWidth:e.desktop?64:56},r.hotKeyHolder=new R.HotKeyHolder,r}return l(t,e),p(t,[{key:"componentDidMount",value:function(){this.props.autoWidth&&this.setWidth(),this.props.animated||this.animateOpen(),this.setScollPosition()}},{key:"componentWillReceiveProps",value:function(e){var t=this.getFilteredChildren(e.children),n=this.getSelectedIndex(e,t);this.setState({focusIndex:e.disableAutoFocus?-1:n>=0?n:0,keyWidth:e.desktop?64:56})}},{key:"shouldComponentUpdate",value:function(e,t,n){return!(0,b.default)(this.props,e)||!(0,b.default)(this.state,t)||!(0,b.default)(this.context,n)}},{key:"componentDidUpdate",value:function(){this.props.autoWidth&&this.setWidth()}},{key:"getValueLink",value:function(e){return e.valueLink||{value:e.value,requestChange:e.onChange}}},{key:"setKeyboardFocused",value:function(e){this.setState({isKeyboardFocused:e})}},{key:"getFilteredChildren",value:function(e){var t=[];return v.default.Children.forEach(e,function(e){e&&t.push(e)}),t}},{key:"animateOpen",value:function(){var e=m.default.findDOMNode(this).style,t=m.default.findDOMNode(this.refs.scrollContainer).style,n=m.default.findDOMNode(this.refs.list).childNodes;T.default.set(e,"transform","scaleX(1)"),T.default.set(t,"transform","scaleY(1)"),t.opacity=1;for(var r=0;r=0)){var i=n.props.primaryText;"string"==typeof i&&new RegExp("^"+e,"i").test(i)&&(t=r)}}),t>=0&&(this.setFocusIndex(t,!0),!0)}},{key:"handleMenuItemTouchTap",value:function(e,t,n){var r=this.props.children,i=this.props.multiple,a=this.getValueLink(this.props),s=a.value,l=t.props.value,u=v.default.isValidElement(r)?0:r.indexOf(t);if(this.setFocusIndex(u,!1),i){var c=s.indexOf(l),p=o(s),f=p;c===-1?f.push(l):f.splice(c,1),a.requestChange(e,f)}else i||l===s||a.requestChange(e,l);this.props.onItemTouchTap(e,t,n)}},{key:"incrementKeyboardFocusIndex",value:function(e){var t=this.state.focusIndex,n=this.getMenuItemCount(e)-1;t++,t>n&&(t=n),this.setFocusIndex(t,!0)}},{key:"isChildSelected",value:function(e,t){var n=this.getValueLink(t).value,r=e.props.value;return t.multiple?n.length&&n.indexOf(r)!==-1:e.props.hasOwnProperty("value")&&n===r}},{key:"setFocusIndex",value:function(e,t){this.setState({focusIndex:e,isKeyboardFocused:t})}},{key:"setScollPosition",value:function(){var e=this.props.desktop,t=this.refs.focusedMenuItem,n=e?32:48;if(t){var r=m.default.findDOMNode(t).offsetTop,i=r-n;i=d-1&&E<=d+k-1&&(T=x?T+C:T-C,l=T),s=(0,h.default)({},m.menuItemContainer,{transitionDelay:l+"ms"})}var u=i?v.default.cloneElement(t,{style:m.divider}):a?v.default.cloneElement(t,{desktop:o}):e.cloneMenuItem(t,E,m,r);return i||a||E++,n?v.default.createElement("div",{style:y(s)},u):u});return v.default.createElement(w.default,{onClickAway:this.handleClickAway},v.default.createElement("div",{onKeyDown:this.handleKeyDown,style:y(g),ref:"scrollContainer"},v.default.createElement(M.default,c({},f,{ref:"list",style:b}),S)))}}]),t}(d.Component);F.propTypes={animated:(0,j.default)(d.PropTypes.bool,"Instead, use a [Popover](/#/components/popover).\n It will be removed with v0.16.0."),autoWidth:d.PropTypes.bool,children:d.PropTypes.node,desktop:d.PropTypes.bool,disableAutoFocus:d.PropTypes.bool,initiallyKeyboardFocused:d.PropTypes.bool,listStyle:d.PropTypes.object,maxHeight:d.PropTypes.number,multiple:d.PropTypes.bool,onChange:d.PropTypes.func,onEscKeyDown:d.PropTypes.func,onItemTouchTap:d.PropTypes.func,onKeyDown:d.PropTypes.func,openDirection:(0,j.default)(O.default.corners,"Instead, use a [Popover](/#/components/popover).\n It will be removed with v0.16.0."),selectedMenuItemStyle:d.PropTypes.object,style:d.PropTypes.object,value:d.PropTypes.any,valueLink:d.PropTypes.object,width:O.default.stringOrNumber,zDepth:O.default.zDepth},F.defaultProps={autoWidth:!0,desktop:!1,disableAutoFocus:!1,initiallyKeyboardFocused:!1,maxHeight:null,multiple:!1,onChange:function(){},onEscKeyDown:function(){},onItemTouchTap:function(){},onKeyDown:function(){}},F.contextTypes={muiTheme:d.PropTypes.object.isRequired};var L=function(){var e=this;this.handleClickAway=function(t){t.defaultPrevented||e.setFocusIndex(-1,!1)},this.handleKeyDown=function(t){var n=e.getFilteredChildren(e.props.children),r=(0,S.default)(t);switch(r){case"down":t.preventDefault(),e.incrementKeyboardFocusIndex(n);break;case"esc":e.props.onEscKeyDown(t);break;case"tab":t.preventDefault(),t.shiftKey?e.decrementKeyboardFocusIndex():e.incrementKeyboardFocusIndex(n);break;case"up":t.preventDefault(),e.decrementKeyboardFocusIndex();break;default:if(r&&1===r.length){var i=e.hotKeyHolder.append(r);e.setFocusIndexStartsWith(i)&&t.preventDefault()}}e.props.onKeyDown(t)}};t.default=F},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n=t.muiTheme.baseTheme.palette.disabledColor,r=t.muiTheme.baseTheme.palette.textColor,i=e.desktop?64:72,o=e.desktop?24:16,a={root:{color:e.disabled?n:r,cursor:e.disabled?"not-allowed":"pointer",lineHeight:e.desktop?"32px":"48px",fontSize:e.desktop?15:16,whiteSpace:"nowrap"},innerDivStyle:{paddingLeft:e.leftIcon||e.insetChildren||e.checked?i:o,paddingRight:o,paddingBottom:0,paddingTop:0},secondaryText:{float:"right"},leftIconDesktop:{margin:0,left:24,top:4},rightIconDesktop:{margin:0,right:24,top:4,fill:t.muiTheme.menuItem.rightIconDesktopFill}};return a}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r=0;o--)this.on(e,r[o],i)},on:function(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent("on"+t,function(){n.call(e)})},off:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n):e.detachEvent("on"+t,n)},isKeyboard:function(e){return["keydown","keypress","keyup"].indexOf(e.type)!==-1}}},function(e,t,n){function r(e,t){return this instanceof r?(this._size=0,this._graphs=Object.create(null),this._id=0,this._ids=Object.create(null),this._ids["><"]=0,this._entities=Object.create(null),this._blankNodeIndex=0,t||!e||e[0]||(t=e,e=null),t=t||{},this._prefixes=Object.create(null),t.prefixes&&this.addPrefixes(t.prefixes),this.defaultGraph=t.defaultGraph||"http://example.org/#defaultGraph",void(e&&this.addTriples(e))):new r(e,t)}var i=n(185).expandPrefixedName;r.prototype={get size(){var e=this._size;if(null!==e)return e;var t,n,r=this._graphs;for(var i in r)for(var o in t=r[i].subjects)for(var a in n=t[o])e+=Object.keys(n[a]).length;return this._size=e},_addToIndex:function(e,t,n,r){var i=e[t]||(e[t]={}),o=i[n]||(i[n]={}),a=r in o;return a||(o[r]=null),!a},_removeFromIndex:function(e,t,n,r){var i,o=e[t],a=o[n];delete a[r];for(i in a)return;delete o[n];for(i in o)return;delete e[t]},_findInIndex:function(e,t,n,r,i,o,a,s){var l,u,c,p=[],f=!t+!n+!r,h=f>1?Object.keys(this._ids):this._entities;t&&((l=e,e={})[t]=l[t]);for(var d in e){var v=h[d];if(u=e[d]){n&&((l=u,u={})[n]=l[n]);for(var y in u){var m=h[y];if(c=u[y])for(var g=(r?r in c?[r]:[]:Object.keys(c)),b=g.length-1;b>=0;b--){var x={subject:"",predicate:"",object:"",graph:s};x[i]=v,x[o]=m,x[a]=h[g[b]],p.push(x)}}}}return p},_countInIndex:function(e,t,n,r){var i,o,a,s=0;t&&((i=e,e={})[t]=i[t]);for(var l in e)if(o=e[l]){n&&((i=o,o={})[n]=i[n]);for(var u in o)(a=o[u])&&(r?r in a&&s++:s+=Object.keys(a).length)}return s},addTriple:function(e,t,n,r){t||(r=e.graph,n=e.object,t=e.predicate,e=e.subject),r=r||this.defaultGraph;var i=this._graphs[r];i||(i=this._graphs[r]={subjects:{},predicates:{},objects:{}},Object.freeze(i));var o=this._ids,a=this._entities;e=o[e]||(o[a[++this._id]=e]=this._id),t=o[t]||(o[a[++this._id]=t]=this._id),n=o[n]||(o[a[++this._id]=n]=this._id);var s=this._addToIndex(i.subjects,e,t,n);return this._addToIndex(i.predicates,t,n,e),this._addToIndex(i.objects,n,e,t),this._size=null,s},addTriples:function(e){for(var t=e.length-1;t>=0;t--)this.addTriple(e[t])},addPrefix:function(e,t){this._prefixes[e]=t},addPrefixes:function(e){for(var t in e)this.addPrefix(t,e[t])},removeTriple:function(e,t,n,r){t||(r=e.graph,n=e.object,t=e.predicate,e=e.subject),r=r||this.defaultGraph;var i,o=this._ids,a=this._graphs;if(!(e=o[e]))return!1;if(!(t=o[t]))return!1;if(!(n=o[n]))return!1;if(!(i=a[r]))return!1;var s,l;if(!(s=i.subjects[e]))return!1;if(!(l=s[t]))return!1;if(!(n in l))return!1;this._removeFromIndex(i.subjects,e,t,n),this._removeFromIndex(i.predicates,t,n,e),this._removeFromIndex(i.objects,n,e,t),null!==this._size&&this._size--;for(e in i.subjects)return!0;return delete a[r],!0},removeTriples:function(e){for(var t=e.length-1;t>=0;t--)this.removeTriple(e[t])},find:function(e,t,n,r){var o=this._prefixes;return this.findByIRI(i(e,o),i(t,o),i(n,o),i(r,o))},findByIRI:function(e,t,n,r){var i,o,a,s,l=[],u={},c=this._ids;r?u[r]=this._graphs[r]:u=this._graphs;for(var p in u)if(i=u[p]){if(e&&!(o=c[e]))return l;if(t&&!(a=c[t]))return l;if(n&&!(s=c[n]))return l;o?s?l.push(this._findInIndex(i.objects,s,o,a,"object","subject","predicate",p)):l.push(this._findInIndex(i.subjects,o,a,null,"subject","predicate","object",p)):a?l.push(this._findInIndex(i.predicates,a,s,null,"predicate","object","subject",p)):s?l.push(this._findInIndex(i.objects,s,null,null,"object","subject","predicate",p)):l.push(this._findInIndex(i.subjects,null,null,null,"subject","predicate","object",p))}return 1===l.length?l[0]:l.concat.apply([],l)},count:function(e,t,n,r){var o=this._prefixes;return this.countByIRI(i(e,o),i(t,o),i(n,o),i(r,o))},countByIRI:function(e,t,n,r){r=r||this.defaultGraph;var i=this._graphs[r],o=this._ids;return i?e&&!(e=o[e])?0:t&&!(t=o[t])?0:n&&!(n=o[n])?0:e?n?this._countInIndex(i.objects,n,e,t):this._countInIndex(i.subjects,e,t,n):t?this._countInIndex(i.predicates,t,n,e):this._countInIndex(i.objects,n,e,t):0; },createBlankNode:function(e){var t,n;if(e)for(t=e="_:"+e,n=1;this._ids[t];)t=e+n++;else do t="_:b"+this._blankNodeIndex++;while(this._ids[t]);return this._ids[t]=++this._id,t}},e.exports=r},function(e,t,n){function r(e){if(!(this instanceof r))return new r(e);i.call(this,{decodeStrings:!0}),this._readableState.objectMode=!0;var t=this,n=new a(e);n.parse(function(e,n){n&&t.push(n)||e&&t.emit("error",e)},this.emit.bind(this,"prefix")),this._transform=function(e,t,r){n.addChunk(e),r()},this._flush=function(e){n.end(),e()}}var i=n(46).Transform,o=n(393),a=n(184);o.inherits(r,i),e.exports=r},function(e,t,n){function r(e){if(!(this instanceof r))return new r(e);i.call(this,{encoding:"utf8"}),this._writableState.objectMode=!0;var t=this,n=new a({write:function(e,n,r){t.push(e),r&&r()},end:function(e){t.push(null),e&&e()}},e);this._transform=function(e,t,r){n.addTriple(e,r)},this._flush=function(e){n.end(e)}}var i=n(46).Transform,o=n(393),a=n(186);o.inherits(r,i),e.exports=r},function(e,t,n){"use strict";function r(e){var t=new i(i._61);return t._81=1,t._65=e,t}var i=n(77);e.exports=i;var o=r(!0),a=r(!1),s=r(null),l=r(void 0),u=r(0),c=r("");i.resolve=function(e){if(e instanceof i)return e;if(null===e)return s;if(void 0===e)return l;if(e===!0)return o;if(e===!1)return a;if(0===e)return u;if(""===e)return c;if("object"==typeof e||"function"==typeof e)try{var t=e.then;if("function"==typeof t)return new i(t.bind(e))}catch(e){return new i(function(t,n){n(e)})}return r(e)},i.all=function(e){var t=Array.prototype.slice.call(e);return new i(function(e,n){function r(a,s){if(s&&("object"==typeof s||"function"==typeof s)){if(s instanceof i&&s.then===i.prototype.then){for(;3===s._81;)s=s._65;return 1===s._81?r(a,s._65):(2===s._81&&n(s._65),void s.then(function(e){r(a,e)},n))}var l=s.then;if("function"==typeof l){var u=new i(l.bind(s));return void u.then(function(e){r(a,e)},n)}}t[a]=s,0===--o&&e(t)}if(0===t.length)return e([]);for(var o=t.length,a=0;a"===e[e.length-1]){var n=e.substring(1,t-1),i=e.substring(t+3,e.length-1);return{token:"literal",value:n,type:i}}var n=e.substring(1,e.length-1);return{token:"literal",value:n}},Lexicon.prototype.parseUri=function(e){return{token:"uri",value:e}},Lexicon.prototype.retrieve=function(e,t){var n=this;e===this.defaultGraphOid?t({token:"uri",value:this.defaultGraphUri,prefix:null,suffix:null,defaultGraph:!0}):r.seq(function(t,r){n.oidUris.search("u"+e,function(e){null!=e?r(null,n.parseUri(e)):r(null,null)})},function(t,r){null==t?n.oidLiterals.search("l"+e,function(e){null!=e?r(null,n.parseLiteral(e)):r(null,null)}):r(null,t)},function(t,r){null==t?n.oidBlanks.search(""+e,function(t){null!=t?r(null,{token:"blank",value:"_:"+e}):r(null,null)}):r(null,t)})(null,function(e,n){t(n)})},Lexicon.prototype.clear=function(e){var t=this;this.defaultGraphOid=0,this.defaultGraphUri="https://github.com/antoniogarrote/rdfstore-js#default_graph",this.defaultGraphUriTerm={token:"uri",prefix:null,suffix:null,value:this.defaultGraphUri},this.oidCounter=1,r.seq(function(e){new i(2,function(n){t.uris=n,e()})},function(e){new i(2,function(n){t.literals=n,e()})},function(e){new i(2,function(n){t.knownGraphs=n,e()})},function(e){new i(2,function(n){t.oidUris=n,e()})},function(e){new i(2,function(n){t.oidLiterals=n,e()})},function(e){new i(2,function(n){t.oidBlanks=n,e()})})(function(){null!=e&&e()})},Lexicon.prototype.unregister=function(e,t,n){var i=this;r.seq(function(n){i._unregisterTerm(e.subject.token,t.subject,n)},function(n){i._unregisterTerm(e.predicate.token,t.predicate,n)},function(n){i._unregisterTerm(e.object.token,t.object,n)},function(n){null!=e.graph?i._unregisterTerm(e.graph.token,t.graph,n):n()})(function(){n(!0)})},Lexicon.prototype._unregisterTerm=function(e,t,n){var i=this;if("uri"===e)if(t!=this.defaultGraphOid){var o="u"+t;i.oidUris.search(o,function(e){i.uris.search(e,function(a){var s=a[1];""+a[0]==""+t?0===s?r.seq(function(e){i.oidUris.delete(o,function(){e()})},function(t){i.uris.delete(e,function(){t()})},function(e){i.knownGraphs.delete(t,function(){e()})})(function(){n()}):i.uris.insert(e,[t,s-1],function(){n()}):n()})})}else n();else if("literal"===e){this.oidCounter++;var o="l"+t;i.oidLiterals.search(o,function(e){i.literals.search(e,function(a){var s=a[1];""+a[0]==""+t?0===s?r.seq(function(e){i.oidLiterals.delete(o,function(){e()})},function(t){i.literals.delete(e,function(){t()})})(function(){n()}):i.literals.insert(e,[t,s-1],function(){n()}):n()})})}else"blank"===e?i.oidBlanks.delete(""+t,function(){n()}):n()},e.exports={Lexicon:Lexicon}},function(e,t,n){var r=n(16),i=r,o=n(16);QueryFilters={};var a="http://www.w3.org/2001/XMLSchema#";QueryFilters.checkFilters=function(e,t,n,r,i,a,s){var l=[];e.filter&&"function"!=typeof e.filter&&(l=e.filter);var u=[];return null==l||0===l.length||null!=e.length?s(t):void QueryFilters.preprocessExistentialFilters(l,t,a,r,i,function(e){o.eachSeries(e,function(e,o){QueryFilters.run(e.value,t,n,r,i,a,function(e){for(var n=[],r=0;r"===s)return QueryFilters.runGtFunction(t,n,r);if("<="===s)return QueryFilters.runLtEqFunction(t,n,r);if(">="===s)return QueryFilters.runGtEqFunction(t,n,r);throw"Error applying relational filter, unknown operator"},QueryFilters.effectiveTypeValue=function(e){if("literal"!=e.token)throw console.log("not implemented yet"),console.log(e),"value not supported in operations yet";if(e.type==a+"integer"){var t=parseInt(e.value);return t}if(e.type==a+"decimal"){var t=parseFloat(e.value);return t}if(e.type==a+"float"){var t=parseFloat(e.value);return t}if(e.type==a+"double"){var t=parseFloat(e.value);return t}if(e.type==a+"nonPositiveInteger"){var t=parseFloat(e.value);return t}if(e.type==a+"negativeInteger"){var t=parseInt(e.value);return t}if(e.type==a+"long"){var t=parseInt(e.value);return t}if(e.type==a+"int"){var t=parseInt(e.value);return t}if(e.type==a+"short"){var t=parseInt(e.value);return t}if(e.type==a+"byte"){var t=parseInt(e.value);return t}if(e.type==a+"nonNegativeInteger"){var t=parseInt(e.value);return t}if(e.type==a+"unsignedLong"){var t=parseInt(e.value);return t}if(e.type==a+"unsignedInt"){var t=parseInt(e.value);return t}if(e.type==a+"unsignedShort"){var t=parseInt(e.value);return t}if(e.type==a+"unsignedByte"){var t=parseInt(e.value);return t}if(e.type==a+"positiveInteger"){var t=parseInt(e.value);return t}if(e.type!=a+"date"&&e.type!=a+"dateTime")return e.type==a+"boolean"?e.value===!0||"true"===e.value||"1"===e.value||1===e.value||e.value===!0||e.value!==!1&&"false"!==e.value&&"0"!==e.value&&0!==e.value&&e.value!==!1&&void 0:e.type==a+"string"?null===e.value||void 0===e.value?void 0:""+e.value:null==e.type?e.value:e.value;try{var n=r.parseISO8601(e.value);return n}catch(e){return null}},QueryFilters.runOrFunction=function(e,t,n,r,i){for(var o=null,a=0;aQueryFilters.effectiveTypeValue(t));if(QueryFilters.isSimpleLiteral(e)&&QueryFilters.isSimpleLiteral(t))return QueryFilters.ebvBoolean(QueryFilters.effectiveTypeValue(e)>QueryFilters.effectiveTypeValue(t));if(QueryFilters.isXsdType("string",e)&&QueryFilters.isXsdType("string",t))return QueryFilters.ebvBoolean(QueryFilters.effectiveTypeValue(e)>QueryFilters.effectiveTypeValue(t));if(QueryFilters.isXsdType("boolean",e)&&QueryFilters.isXsdType("boolean",t))return QueryFilters.ebvBoolean(QueryFilters.effectiveTypeValue(e)>QueryFilters.effectiveTypeValue(t));if((QueryFilters.isXsdType("dateTime",e)||QueryFilters.isXsdType("date",e))&&(QueryFilters.isXsdType("dateTime",t)||QueryFilters.isXsdType("date",t))){if(QueryFilters.isXsdType("dateTime",e)&&QueryFilters.isXsdType("date",t))return QueryFilters.ebvFalse();if(QueryFilters.isXsdType("date",e)&&QueryFilters.isXsdType("dateTime",t))return QueryFilters.ebvFalse();var i=r.compareDateComponents(e.value,t.value);return null!=i?1==i?QueryFilters.ebvTrue():QueryFilters.ebvFalse():QueryFilters.ebvError()}return QueryFilters.ebvFalse()},QueryFilters.runTotalGtFunction=function(e,t){return QueryFilters.isEbvError(e)||QueryFilters.isEbvError(t)?QueryFilters.ebvError():QueryFilters.isNumeric(e)&&QueryFilters.isNumeric(t)||QueryFilters.isSimpleLiteral(e)&&QueryFilters.isSimpleLiteral(t)||QueryFilters.isXsdType("string",e)&&QueryFilters.isSimpleLiteral("string",t)||QueryFilters.isXsdType("boolean",e)&&QueryFilters.isSimpleLiteral("boolean",t)||QueryFilters.isXsdType("dateTime",e)&&QueryFilters.isSimpleLiteral("dateTime",t)?QueryFilters.runGtFunction(e,t,[]):e.token&&"uri"===e.token&&t.token&&"uri"===t.token?QueryFilters.ebvBoolean(e.value>t.value):e.token&&"literal"===e.token&&t.token&&"literal"===t.token?QueryFilters.ebvBoolean(""+e.value+e.type+e.lang>""+t.value+t.type+t.lang):e.token&&"blank"===e.token&&t.token&&"blank"===t.token?QueryFilters.ebvBoolean(e.value>t.value):e.value&&t.value?QueryFilters.ebvBoolean(e.value>t.value):QueryFilters.ebvTrue()},QueryFilters.runLtFunction=function(e,t,n){if(QueryFilters.isEbvError(e)||QueryFilters.isEbvError(t))return QueryFilters.ebvError();if(QueryFilters.isNumeric(e)&&QueryFilters.isNumeric(t))return QueryFilters.ebvBoolean(QueryFilters.effectiveTypeValue(e)=QueryFilters.effectiveTypeValue(t));if(QueryFilters.isSimpleLiteral(e)&&QueryFilters.isSimpleLiteral(t))return QueryFilters.ebvBoolean(QueryFilters.effectiveTypeValue(e)>=QueryFilters.effectiveTypeValue(t));if(QueryFilters.isXsdType("string",e)&&QueryFilters.isXsdType("string",t))return QueryFilters.ebvBoolean(QueryFilters.effectiveTypeValue(e)>=QueryFilters.effectiveTypeValue(t));if(QueryFilters.isXsdType("boolean",e)&&QueryFilters.isXsdType("boolean",t))return QueryFilters.ebvBoolean(QueryFilters.effectiveTypeValue(e)>=QueryFilters.effectiveTypeValue(t));if((QueryFilters.isXsdType("dateTime",e)||QueryFilters.isXsdType("date",e))&&(QueryFilters.isXsdType("dateTime",t)||QueryFilters.isXsdType("date",t))){if(QueryFilters.isXsdType("dateTime",e)&&QueryFilters.isXsdType("date",t))return QueryFilters.ebvFalse();if(QueryFilters.isXsdType("date",e)&&QueryFilters.isXsdType("dateTime",t))return QueryFilters.ebvFalse();var i=r.compareDateComponents(e.value,t.value);return null!=i?i!=-1?QueryFilters.ebvTrue():QueryFilters.ebvFalse():QueryFilters.ebvError()}return QueryFilters.ebvFalse()},QueryFilters.runLtEqFunction=function(e,t,n){if(QueryFilters.isEbvError(e)||QueryFilters.isEbvError(t))return QueryFilters.ebvError();if(QueryFilters.isNumeric(e)&&QueryFilters.isNumeric(t))return QueryFilters.ebvBoolean(QueryFilters.effectiveTypeValue(e)<=QueryFilters.effectiveTypeValue(t));if(QueryFilters.isSimpleLiteral(e)&&QueryFilters.isSimpleLiteral(t))return QueryFilters.ebvBoolean(QueryFilters.effectiveTypeValue(e)<=QueryFilters.effectiveTypeValue(t));if(QueryFilters.isXsdType("string",e)&&QueryFilters.isXsdType("string",t))return QueryFilters.ebvBoolean(QueryFilters.effectiveTypeValue(e)<=QueryFilters.effectiveTypeValue(t));if(QueryFilters.isXsdType("boolean",e)&&QueryFilters.isXsdType("boolean",t))return QueryFilters.ebvBoolean(QueryFilters.effectiveTypeValue(e)<=QueryFilters.effectiveTypeValue(t));if((QueryFilters.isXsdType("dateTime",e)||QueryFilters.isXsdType("date",e))&&(QueryFilters.isXsdType("dateTime",t)||QueryFilters.isXsdType("date",t))){if(QueryFilters.isXsdType("dateTime",e)&&QueryFilters.isXsdType("date",t))return QueryFilters.ebvFalse();if(QueryFilters.isXsdType("date",e)&&QueryFilters.isXsdType("dateTime",t))return QueryFilters.ebvFalse();var i=r.compareDateComponents(e.value,t.value);return null!=i?1!=i?QueryFilters.ebvTrue():QueryFilters.ebvFalse():QueryFilters.ebvError()}return QueryFilters.ebvFalse()},QueryFilters.runAddition=function(e,t,n,r,i,o){var a=QueryFilters.runFilter(e,n,r,i,o);if(QueryFilters.isEbvError(a))return QueryFilters.ebvError();var s=a;if(QueryFilters.isNumeric(a)){for(var l=0;l2)return QueryFilters.ebvError();if(p.value.split("-").length>2)return QueryFilters.ebvError();if(p.value.split("/").length>2)return QueryFilters.ebvError();if(p.value.split("+").length>2)return QueryFilters.ebvError();if(c==a+"decimal"&&(p.value.indexOf("e")!=-1||p.value.indexOf("E")!=-1))return QueryFilters.ebvError();if(!(c!=a+"int"&&c!=a+"integer"||p.value.indexOf("e")==-1&&p.value.indexOf("E")==-1&&p.value.indexOf(".")==-1))return QueryFilters.ebvError();try{return p.value=parseInt(parseFloat(p.value)),isNaN(p.value)?QueryFilters.ebvError():(p.type=c,p)}catch(e){return QueryFilters.ebvError()}}else{if(c==a+"boolean"){var p=l[0];return"literal"===p.token&&null==p.type?"true"===p.value||"1"===p.value?QueryFilters.ebvTrue():"false"===p.value||"0"===p.value?QueryFilters.ebvFalse():QueryFilters.ebvError():"literal"===p.token?QueryFilters.isEbvError(p)?p:QueryFilters.ebvBoolean(p):QueryFilters.ebvError()}if(c==a+"string"){var p=l[0];return"literal"===p.token?(p=QueryFilters.normalizeLiteralDatatype(p,i,s),p.type==a+"integer"||p.type==a+"decimal"||p.type==a+"double"||p.type==a+"nonPositiveInteger"||p.type==a+"negativeInteger"||p.type==a+"long"||p.type==a+"int"||p.type==a+"short"||p.type==a+"byte"||p.type==a+"nonNegativeInteger"||p.type==a+"unsignedLong"||p.type==a+"unsignedInt"||p.type==a+"unsignedShort"||p.type==a+"unsignedByte"||p.type==a+"positiveInteger"||p.type==a+"float"?(p.type=c,p.value=""+p.value,p):p.type==a+"string"?p:p.type==a+"boolean"?(QueryFilters.ebv(p)?(p.type=c,p.value="true"):(p.type=c,p.value="false"),p):p.type==a+"dateTime"||p.type==a+"date"?(p.type=c,"string"!=typeof p.value&&(p.value=r.iso8601(p.value)),p):null==p.type?(p.value=""+p.value,p.type=c,p):QueryFilters.ebvError()):"uri"===p.token?{token:"literal",value:r.lexicalFormBaseUri(p,s),type:c,lang:null}:QueryFilters.ebvError()}if(c==a+"dateTime"||c==a+"date"){if(p=l[0],p.type==a+"dateTime"||p.type==a+"date")return p;if(p.type!=a+"string"&&null!=p.type)return QueryFilters.ebvError();try{return p.value=r.iso8601(r.parseISO8601(p.value)),p.type=c,p}catch(e){return QueryFilters.ebvError()}}else{if(c!=a+"float")return null!=i.customFns[c]?i.customFns[c](QueryFilters,l):QueryFilters.ebvError();var p=l[0];if("literal"!==p.token)return QueryFilters.ebvError();if(p=QueryFilters.normalizeLiteralDatatype(p,i,s),"http://www.w3.org/2001/XMLSchema#decimal"==p.type||"http://www.w3.org/2001/XMLSchema#int"==p.type)return p.type=c,p.value=parseFloat(p.value),p;if("http://www.w3.org/2001/XMLSchema#boolean"==p.type)return 1==QueryFilters.ebv(p)?(p.type=c,p.value=1):(p.type=c,p.value=0),p;if("http://www.w3.org/2001/XMLSchema#float"==p.type||"http://www.w3.org/2001/XMLSchema#double"==p.type)return p.type=c,p.value=parseFloat(p.value),p;if("http://www.w3.org/2001/XMLSchema#string"==p.type)try{return p.value=parseFloat(p.value),isNaN(p.value)?QueryFilters.ebvError():(p.type=c,p)}catch(e){return QueryFilters.ebvError()}else{if(null!=p.type)return QueryFilters.ebvError();if(p.value.split(".").length>2)return QueryFilters.ebvError();if(p.value.split("-").length>2)return QueryFilters.ebvError();if(p.value.split("/").length>2)return QueryFilters.ebvError();if(p.value.split("+").length>2)return QueryFilters.ebvError();try{return p.value=parseFloat(p.value),isNaN(p.value)?QueryFilters.ebvError():(p.type=c,p)}catch(e){return QueryFilters.ebvError()}}}}},e.exports={QueryFilters:QueryFilters}},function(e,t,n){e.exports=n(897)},function(e,t,n){"use strict";var r=n(3).default,i=n(2).default;t.__esModule=!0;var o=n(1),a=i(o),s=n(4),l=i(s),u=n(6),c=i(u),p=n(146),f=i(p),h=n(56),d=i(h),v=a.default.createClass({displayName:"ButtonGroup",propTypes:{vertical:a.default.PropTypes.bool,justified:a.default.PropTypes.bool,block:f.default(a.default.PropTypes.bool,function(e){if(e.block&&!e.vertical)return new Error("The block property requires the vertical property to be set to have any effect")})},getDefaultProps:function(){return{block:!1,justified:!1,vertical:!1}},render:function(){var e=c.default.getClassSet(this.props);return e[c.default.prefix(this.props)]=!this.props.vertical,e[c.default.prefix(this.props,"vertical")]=this.props.vertical,e[c.default.prefix(this.props,"justified")]=this.props.justified,e[c.default.prefix(d.default.defaultProps,"block")]=this.props.block,a.default.createElement("div",r({},this.props,{className:l.default(this.props.className,e)}),this.props.children)}});t.default=u.bsClass("btn-group",v),e.exports=t.default},function(e,t,n){"use strict";var r=n(3).default,i=n(48).default,o=n(2).default;t.__esModule=!0;var a=n(1),s=o(a),l=n(4),u=o(l),c=n(24),p=o(c),f=n(29),h=o(f),d=s.default.createClass({displayName:"Col",propTypes:{xs:s.default.PropTypes.number,sm:s.default.PropTypes.number,md:s.default.PropTypes.number,lg:s.default.PropTypes.number,xsHidden:s.default.PropTypes.bool,smHidden:s.default.PropTypes.bool,mdHidden:s.default.PropTypes.bool,lgHidden:s.default.PropTypes.bool,xsOffset:s.default.PropTypes.number,smOffset:s.default.PropTypes.number,mdOffset:s.default.PropTypes.number,lgOffset:s.default.PropTypes.number,xsPush:s.default.PropTypes.number,smPush:s.default.PropTypes.number,mdPush:s.default.PropTypes.number,lgPush:s.default.PropTypes.number,xsPull:s.default.PropTypes.number,smPull:s.default.PropTypes.number,mdPull:s.default.PropTypes.number,lgPull:s.default.PropTypes.number,componentClass:h.default},getDefaultProps:function(){return{componentClass:"div"}},render:function(){var e=this,t=this.props.componentClass,n={};return i(p.default.SIZES).forEach(function(t){var r=p.default.SIZES[t],i=r,o=r+"-";e.props[i]&&(n["col-"+o+e.props[i]]=!0),n["hidden-"+r]=e.props[r+"Hidden"],i=r+"Offset",o=r+"-offset-",e.props[i]>=0&&(n["col-"+o+e.props[i]]=!0),i=r+"Push",o=r+"-push-",e.props[i]>=0&&(n["col-"+o+e.props[i]]=!0),i=r+"Pull",o=r+"-pull-",e.props[i]>=0&&(n["col-"+o+e.props[i]]=!0)},this),s.default.createElement(t,r({},this.props,{className:u.default(this.props.className,n)}),this.props.children)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,i=n(9).default,o=n(3).default,a=n(2).default;t.__esModule=!0;var s=n(1),l=a(s),u=n(4),c=a(u),p=n(56),f=a(p),h=n(45),d=a(h),v=l.default.createElement("span",null," ",l.default.createElement("span",{className:"caret"})),y=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props.noCaret?null:v,t={"dropdown-toggle":!0},n=this.props.useAnchor?d.default:f.default;return l.default.createElement(n,o({},this.props,{className:c.default(t,this.props.className),type:"button","aria-haspopup":!0,"aria-expanded":this.props.open}),this.props.children||this.props.title,e)},t}(l.default.Component);t.default=y,y.defaultProps={open:!1,useAnchor:!1,bsRole:"toggle"},y.propTypes={bsRole:l.default.PropTypes.string,noCaret:l.default.PropTypes.bool,open:l.default.PropTypes.bool,title:l.default.PropTypes.string,useAnchor:l.default.PropTypes.bool},y.isToggle=!0,y.titleProp="title",y.onClickProp="onClick",e.exports=t.default},function(e,t,n){"use strict";var r=n(2).default;t.__esModule=!0;var i=n(765),o=r(i);t.Static=o.default},function(e,t,n){"use strict";var r=n(10).default,i=n(9).default,o=n(2).default;t.__esModule=!0;var a=n(1),s=o(a),l=n(4),u=o(l),c=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e={"form-group":!this.props.standalone,"form-group-lg":!this.props.standalone&&"large"===this.props.bsSize,"form-group-sm":!this.props.standalone&&"small"===this.props.bsSize,"has-feedback":this.props.hasFeedback,"has-success":"success"===this.props.bsStyle,"has-warning":"warning"===this.props.bsStyle,"has-error":"error"===this.props.bsStyle};return s.default.createElement("div",{className:u.default(e,this.props.groupClassName)},this.props.children)},t}(s.default.Component);c.defaultProps={hasFeedback:!1,standalone:!1},c.propTypes={standalone:s.default.PropTypes.bool,hasFeedback:s.default.PropTypes.bool,bsSize:function(e){return e.standalone&&void 0!==e.bsSize?new Error("bsSize will not be used when `standalone` is set."):s.default.PropTypes.oneOf(["small","medium","large"]).apply(null,arguments)},bsStyle:s.default.PropTypes.oneOf(["success","warning","error"]),groupClassName:s.default.PropTypes.string},t.default=c,e.exports=t.default},function(e,t,n){"use strict";var r=n(3).default,i=n(2).default;t.__esModule=!0;var o=n(1),a=i(o),s=n(19),l=i(s),u=/\%\((.+?)\)s/,c=a.default.createClass({displayName:"Interpolate",propTypes:{component:a.default.PropTypes.node,format:a.default.PropTypes.string,unsafe:a.default.PropTypes.bool},getDefaultProps:function(){return{component:"span",unsafe:!1}},render:function(){var e=l.default.hasValidComponent(this.props.children)||"string"==typeof this.props.children?this.props.children:this.props.format,t=this.props.component,n=this.props.unsafe===!0,i=r({},this.props);if(delete i.children,delete i.format,delete i.component,delete i.unsafe,n){var o=e.split(u).reduce(function(e,t,n){var r=void 0;if(n%2===0?r=t:(r=i[t],delete i[t]),a.default.isValidElement(r))throw new Error("cannot interpolate a React component into unsafe text");return e+=r},"");return i.dangerouslySetInnerHTML={__html:o},a.default.createElement(t,i)}var s=e.split(u).reduce(function(e,t,n){var r=void 0;if(n%2===0){if(0===t.length)return e;r=t}else r=i[t],delete i[t];return e.push(r),e},[]);return a.default.createElement(t,i,s)}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,i=n(9).default,o=n(3).default,a=n(2).default;t.__esModule=!0;var s=n(1),l=a(s),u=n(6),c=a(u),p=n(24),f=n(4),h=a(f),d=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=c.default.getClassSet(this.props);return e.active=this.props.active,e.disabled=this.props.disabled,this.props.href?this.renderAnchor(e):this.props.onClick?this.renderButton(e):this.props.listItem?this.renderLi(e):this.renderSpan(e)},t.prototype.renderLi=function(e){return l.default.createElement("li",o({},this.props,{className:h.default(this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},t.prototype.renderAnchor=function(e){return l.default.createElement("a",o({},this.props,{className:h.default(this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},t.prototype.renderButton=function(e){return l.default.createElement("button",o({type:"button"},this.props,{className:h.default(this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},t.prototype.renderSpan=function(e){return l.default.createElement("span",o({},this.props,{className:h.default(this.props.className,e)}),this.props.header?this.renderStructuredContent():this.props.children)},t.prototype.renderStructuredContent=function(){var e=void 0,t=c.default.prefix(this.props,"heading");e=l.default.isValidElement(this.props.header)?s.cloneElement(this.props.header,{key:"header",className:h.default(this.props.header.props.className,t)}):l.default.createElement("h4",{key:"header",className:t},this.props.header);var n=l.default.createElement("p",{key:"content",className:c.default.prefix(this.props,"text")},this.props.children);return[e,n]},t}(l.default.Component);d.propTypes={className:l.default.PropTypes.string,active:l.default.PropTypes.any,disabled:l.default.PropTypes.any,header:l.default.PropTypes.node,listItem:l.default.PropTypes.bool,onClick:l.default.PropTypes.func,eventKey:l.default.PropTypes.any,href:l.default.PropTypes.string,target:l.default.PropTypes.string},d.defaultTypes={listItem:!1},t.default=u.bsStyles(p.State.values(),u.bsClass("list-group-item",d)),e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,i=n(9).default,o=n(3).default,a=n(2).default;t.__esModule=!0;var s=n(1),l=a(s),u=n(4),c=a(u),p=n(6),f=a(p),h=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l.default.createElement("div",o({},this.props,{className:c.default(this.props.className,f.default.prefix(this.props,"body"))}),this.props.children)},t}(l.default.Component);t.default=p.bsClass("modal",h),e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,i=n(9).default,o=n(3).default,a=n(2).default;t.__esModule=!0;var s=n(1),l=a(s),u=n(4),c=a(u),p=n(6),f=a(p),h=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l.default.createElement("div",o({},this.props,{className:c.default(this.props.className,f.default.prefix(this.props,"footer"))}),this.props.children)},t}(l.default.Component);h.propTypes={bsClass:l.default.PropTypes.string},h.defaultProps={bsClass:"modal"},t.default=p.bsClass("modal",h),e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,i=n(9).default,o=n(13).default,a=n(3).default,s=n(2).default;t.__esModule=!0;var l=n(1),u=s(l),c=n(4),p=s(c),f=n(6),h=s(f),d=n(25),v=s(d),y=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e["aria-label"],n=o(e,["aria-label"]),r=v.default(this.context.$bs_onModalHide,this.props.onHide);return u.default.createElement("div",a({},n,{className:p.default(this.props.className,h.default.prefix(this.props,"header"))}),this.props.closeButton&&u.default.createElement("button",{type:"button",className:"close","aria-label":t,onClick:r},u.default.createElement("span",{"aria-hidden":"true"},"×")),this.props.children)},t}(u.default.Component);y.propTypes={"aria-label":u.default.PropTypes.string,bsClass:u.default.PropTypes.string,closeButton:u.default.PropTypes.bool,onHide:u.default.PropTypes.func},y.contextTypes={$bs_onModalHide:u.default.PropTypes.func},y.defaultProps={"aria-label":"Close",closeButton:!1},t.default=f.bsClass("modal",y),e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,i=n(9).default,o=n(3).default,a=n(2).default;t.__esModule=!0;var s=n(1),l=a(s),u=n(4),c=a(u),p=n(6),f=a(p),h=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){return l.default.createElement("h4",o({},this.props,{className:c.default(this.props.className,f.default.prefix(this.props,"title"))}),this.props.children)},t}(l.default.Component);t.default=p.bsClass("modal",h),e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,i=n(9).default,o=n(3).default,a=n(2).default;t.__esModule=!0;var s=n(1),l=a(s),u=n(4),c=a(u),p=n(146),f=a(p),h=n(106),d=a(h),v=n(6),y=a(v),m=n(19),g=a(m),b=n(25),x=a(b),w=n(101),_=a(w),T=function(e){function t(){i(this,t),e.apply(this,arguments)}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.ulClassName,r=e.id,i=e.ulId,a=null!=this.props.navbar?this.props.navbar:this.context.$bs_navbar,s=y.default.getClassSet(this.props);if(s[y.default.prefix(this.props,"stacked")]=this.props.stacked,s[y.default.prefix(this.props,"justified")]=this.props.justified,a){var u=this.context.$bs_navbar_bsClass||"navbar",p=null!=this.props.right?this.props.right:this.props.pullRight;s[y.default.prefix({bsClass:u},"nav")]=!0,s[y.default.prefix({bsClass:u},"right")]=p,s[y.default.prefix({bsClass:u},"left")]=this.props.pullLeft}else s["pull-right"]=this.props.pullRight,s["pull-left"]=this.props.pullLeft;var f=l.default.createElement("ul",o({ref:"ul"},this.props,{id:i||r,role:"tabs"===this.props.bsStyle?"tablist":null,className:c.default(t,n,s)}),g.default.map(this.props.children,this.renderNavItem,this));return this.context.$bs_deprecated_navbar&&this.props.collapsible&&(f=l.default.createElement(_.default,{in:this.props.expanded,className:a?"navbar-collapse":void 0},l.default.createElement("div",null,f))),f},t.prototype.getChildActiveProp=function(e){return!!e.props.active||(null!=this.props.activeKey&&e.props.eventKey===this.props.activeKey||(null!=this.props.activeHref&&e.props.href===this.props.activeHref||e.props.active))},t.prototype.renderNavItem=function(e,t){return s.cloneElement(e,{role:"tabs"===this.props.bsStyle?"tab":null,active:this.getChildActiveProp(e),activeKey:this.props.activeKey,activeHref:this.props.activeHref,onSelect:x.default(e.props.onSelect,this.props.onSelect),key:e.key?e.key:t,navItem:!0})},t}(l.default.Component);T.propTypes={activeHref:l.default.PropTypes.string,activeKey:l.default.PropTypes.any,stacked:l.default.PropTypes.bool,justified:f.default(l.default.PropTypes.bool,function(e){var t=e.justified,n=e.navbar;return t&&n?Error("justified navbar `Nav`s are not supported"):null}),onSelect:l.default.PropTypes.func,className:l.default.PropTypes.string,id:l.default.PropTypes.oneOfType([l.default.PropTypes.string,l.default.PropTypes.number]),ulClassName:d.default(l.default.PropTypes.string,"The wrapping `