attributes-kit
Version:
React component for MSON rendering
1 lines • 139 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("radium"),require("lodash/merge"),require("lodash/isEmpty"),require("lodash/isUndefined"),require("lodash/isObject"),require("lodash/map"),require("sift"),require("lodash/isArray"),require("eidolon"),require("react-dom"),require("lodash/each"),require("lodash/every"),require("abagnale"),require("dedent"),require("fbemitter"),require("lodash/cloneDeep"),require("lodash/isString"),require("lodash/last"),require("lodash/max"),require("lodash/random"),require("lodash/reduce"),require("lodash/some"),require("lodash/values"),require("marked"),require("minim")):"function"==typeof define&&define.amd?define(["react","radium","lodash/merge","lodash/isEmpty","lodash/isUndefined","lodash/isObject","lodash/map","sift","lodash/isArray","eidolon","react-dom","lodash/each","lodash/every","abagnale","dedent","fbemitter","lodash/cloneDeep","lodash/isString","lodash/last","lodash/max","lodash/random","lodash/reduce","lodash/some","lodash/values","marked","minim"],t):"object"==typeof exports?exports.AttributesKit=t(require("react"),require("radium"),require("lodash/merge"),require("lodash/isEmpty"),require("lodash/isUndefined"),require("lodash/isObject"),require("lodash/map"),require("sift"),require("lodash/isArray"),require("eidolon"),require("react-dom"),require("lodash/each"),require("lodash/every"),require("abagnale"),require("dedent"),require("fbemitter"),require("lodash/cloneDeep"),require("lodash/isString"),require("lodash/last"),require("lodash/max"),require("lodash/random"),require("lodash/reduce"),require("lodash/some"),require("lodash/values"),require("marked"),require("minim")):e.AttributesKit=t(e.react,e.radium,e["lodash/merge"],e["lodash/isEmpty"],e["lodash/isUndefined"],e["lodash/isObject"],e["lodash/map"],e.sift,e["lodash/isArray"],e.eidolon,e["react-dom"],e["lodash/each"],e["lodash/every"],e.abagnale,e.dedent,e.fbemitter,e["lodash/cloneDeep"],e["lodash/isString"],e["lodash/last"],e["lodash/max"],e["lodash/random"],e["lodash/reduce"],e["lodash/some"],e["lodash/values"],e.marked,e.minim)}(this,function(e,t,n,r,o,i,l,a,u,s,f,p,c,d,h,y,m,b,v,_,E,O,g,x,w,j){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=86)}([function(t,n){t.exports=e},function(e,t,n){e.exports=n(37)()},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(69);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})});var o=n(70);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})});var i=n(71);Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})});var l=n(72);Object.keys(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})});var a=n(73);Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})});var u=n(74);Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})});var s=n(75);Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})});var f=n(76);Object.keys(f).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}})});var p=n(16);Object.keys(p).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}})});var c=n(77);Object.keys(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),f=r(s),p=n(1),c=(r(p),n(2)),d=r(c),h=n(3),y=r(h),m=(0,d.default)(a=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),u(t,[{key:"render",value:function(){return f.default.createElement("div",{style:this.style},this.props.children)}},{key:"style",get:function(){var e={height:"auto",width:"100%",display:"flex",flexDirection:"column",flexWrap:"no-wrap",justifyContent:"flex-start",alignItems:"flex-start"};return(0,y.default)(e,this.props.style)}}]),t}(f.default.Component))||a;t.default=m,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=r(u),f=n(1),p=(r(f),n(3)),c=r(p),d=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),a(t,[{key:"getStyles",value:function(){var e={width:"100%",height:"auto",display:"flex",flexDirection:"row",flexWrap:"no-wrap",justifyContent:"flex-start",alignItems:"stretch",position:"relative"};return(0,c.default)(e,this.props.style||{})}},{key:"render",value:function(){return s.default.createElement("div",{style:this.getStyles(),onClick:this.props.onClick},this.props.children)}}]),t}(s.default.Component);t.default=d,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.DEFAULT_FONT_FAMILY="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",t.MONO_FONT_FAMILY="SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace"},function(e,t){e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.Value=void 0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(10),s=r(u),f=n(0),p=r(f),c=n(1),d=(r(c),n(4)),h=n(65),y=n(20),m=r(y),b=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),a(t,[{key:"render",value:function(){return this.props.element?(0,d.isMember)(this.props.element)?(0,d.isStructured)(this.props.element)?p.default.createElement(m.default,{element:this.props.element.content.value,expandableCollapsible:this.props.expandableCollapsible,parentElement:this.props.parentElement,style:this.props.style,isSample:this.props.isSample,collapseByDefault:this.props.collapseByDefault}):p.default.createElement(h.PrimitiveValue,{value:this.props.element.content.value.content,style:this.props.style,collapseByDefault:this.props.collapseByDefault}):(0,d.isStructured)(this.props.element)?p.default.createElement(m.default,{element:this.props.element,expandableCollapsible:this.props.expandableCollapsible,parentElement:this.props.parentElement,style:this.props.style,isSample:this.props.isSample,collapseByDefault:this.props.collapseByDefault}):(0,d.isObject)(this.props.element)||(0,d.isArray)(this.props.element)||(0,d.isSelect)(this.props.element)||(0,d.isEnum)(this.props.element)?p.default.createElement(m.default,{element:this.props.element,expandableCollapsible:this.props.expandableCollapsible,parentElement:this.props.parentElement,style:this.props.style,isSample:this.props.isSample,collapseByDefault:this.props.collapseByDefault}):(0,s.default)(this.props.element.content)?null:p.default.createElement(h.PrimitiveValue,{value:this.props.element.content,style:this.props.style,collapseByDefault:this.props.collapseByDefault}):null}}]),t}(p.default.Component);t.Value=b},function(e,t){e.exports=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a,u,s,f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(0),c=r(p),d=n(1),h=r(d),y=n(2),m=r(y),b=n(3),v=r(b),_=n(5),E=r(_),O=n(6),g=r(O),x=n(7),w=(0,m.default)((s=u=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),f(t,[{key:"renderStyles",value:function(){var e=this.context.theme.SAMPLE_TOGGLE_TITLE_COLOR,t={root:{cursor:"pointer"},iconColumn:{width:"12px",minWidth:"12px",maxWidth:"12px"},icon:{width:"12px",height:"12px",backgroundRepeat:"no-repeat",backgroundPosition:"left center"},title:{userSelect:"none",lineHeight:"12px",letterSpacing:"0.85px",fontFamily:x.DEFAULT_FONT_FAMILY,fontSize:"12px",color:e,textTransform:"uppercase",paddingLeft:"6px"}};return this.props.isExpanded?(t.icon.backgroundImage="url("+n(88)+")",t.icon.backgroundSize="12px 7px"):(t.icon.backgroundImage="url("+n(87)+")",t.icon.backgroundSize="7px 12px"),(0,v.default)(t,this.props.style||{})}},{key:"render",value:function(){return c.default.createElement(g.default,{style:this.renderStyles().root,onClick:this.props.onClick},c.default.createElement(E.default,{style:this.renderStyles().iconColumn},c.default.createElement("div",{style:this.renderStyles().icon})),c.default.createElement(E.default,null,c.default.createElement("div",{style:this.renderStyles().title},this.props.sampleTitle||"Sample")))}}]),t}(c.default.Component),u.contextTypes={theme:h.default.object},a=s))||a;t.default=w,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a,u,s,f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(17),c=r(p),d=n(95),h=r(d),y=n(102),m=r(y),b=n(3),v=r(b),_=n(2),E=r(_),O=n(0),g=r(O),x=n(1),w=r(x),j=n(7),P=n(16);m.default.setOptions({sanitize:!0});var k=(0,E.default)((s=u=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),f(t,[{key:"render",value:function(){var e=t.getDescription(this.props.element);if(!e&&(0,P.isMember)(this.props.element)){var n=this.props.element.content;n&&n.value&&(e=t.getDescription(n.value))}if(!e)return!1;var r={__html:(0,m.default)(e)};return g.default.createElement("div",null,g.default.createElement("div",{style:this.style.base,dangerouslySetInnerHTML:r}))}},{key:"style",get:function(){var e=this.context.theme.DESCRIPTION_COLOR,t={base:{fontFamily:j.DEFAULT_FONT_FAMILY,fontSize:"13px",color:e,lineHeight:"150%",fontWeight:"regular"}};return(0,v.default)(t,this.props.style||{})}}],[{key:"getDescription",value:function(e){if(e.meta&&e.meta.description){if((0,h.default)(e.meta.description))return e.meta.description;if((0,c.default)(e.meta.description))return e.meta.description.content}return null}}]),t}(g.default.Component),u.contextTypes={theme:w.default.object},a=s))||a;t.default=k,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a,u,s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(0),p=r(f),c=n(1),d=r(c),h=n(2),y=r(h),m=n(3),b=r(m),v=n(4),_=n(7),E=(u=a=function(e){function t(){var e,n,r,l;o(this,t);for(var a=arguments.length,u=Array(a),s=0;s<a;s++)u[s]=arguments[s];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.handleClick=function(e){var t=(0,v.getReference)(r.props.element),n=(0,v.findElement)(t,r.context.dereferencedDataStructures);return r.context.onElementLinkClick?r.context.onElementLinkClick(n.meta.id,n,e):null},l=n,i(r,l)}return l(t,e),s(t,[{key:"render",value:function(){if(this.props.reference)return p.default.createElement("div",{style:this.style.reference,onClick:this.handleClick},this.props.reference);if(this.props.type)return p.default.createElement("div",{style:this.style.type},this.props.type);if(this.props.element){var e=(0,v.getType)(this.props.element);if(e)return p.default.createElement("div",{style:this.style.type},e)}return null}},{key:"style",get:function(){var e=this.context.theme.TYPE_COLOR,t={type:{width:"100%",fontFamily:_.MONO_FONT_FAMILY,fontWeight:"regular",fontSize:"13px",color:e,lineHeight:"13px"},reference:{width:"100%",fontFamily:_.MONO_FONT_FAMILY,fontWeight:"regular",fontSize:"13px",color:e,textDecoration:"underline",cursor:"pointer",":hover":{textDecoration:"none"}}};return(0,b.default)(t,this.props.style||{})}}]),t}(p.default.Component),a.contextTypes={theme:d.default.object,onElementLinkClick:d.default.func,dereferencedDataStructures:d.default.array},u);t.default=(0,y.default)(E),e.exports=t.default},function(e,t,n){"use strict";function r(e){this.name="MissingCacheObjectException",this.message=(0,l.default)(o,JSON.stringify(e,null,2))}Object.defineProperty(t,"__esModule",{value:!0}),t.MissingCacheObjectException=void 0;var o=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n The element is missing the ‘cache’ object. Please check that the the Refract tree has been preprocessed. Element is ‘","’.\n "],["\n The element is missing the ‘cache’ object. Please check that the the Refract \\\n tree has been preprocessed. Element is ‘","’.\n "]),i=n(92),l=function(e){return e&&e.__esModule?e:{default:e}}(i);r.prototype=new Error,t.MissingCacheObjectException=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),f=r(s),p=n(1),c=(r(p),n(2)),d=r(c),h=n(3),y=r(h),m=n(9),b=n(5),v=r(b),_=n(6),E=r(_),O=n(11),g=r(O),x=(0,d.default)(a=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleExpandCollapse=function(){n.setState({isExpanded:!n.state.isExpanded})},n.state={isExpanded:!1},n}return l(t,e),u(t,[{key:"render",value:function(){return f.default.createElement(E.default,{style:this.style.row},f.default.createElement(v.default,null,f.default.createElement(g.default,{sampleTitle:this.props.title||"Sample",onClick:this.handleExpandCollapse,isExpanded:this.state.isExpanded}),this.state.isExpanded&&f.default.createElement(m.Value,{element:this.props.sample,style:this.style.value,collapseByDefault:this.props.collapseByDefault})))}},{key:"style",get:function(){var e={row:{width:"100%"},value:{base:{marginTop:"4px",marginBottom:"4px"}}};return(0,y.default)(e,this.props.style||{})}}]),t}(f.default.Component))||a;t.default=x,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(!e)return!1;if(!e.cache)throw new y.MissingCacheObjectException(e);return e.cache.isObject}function o(e){if(!e)return!1;if(!e.cache)throw new y.MissingCacheObjectException(e);return e.cache.isArray}function i(e){if(!e)return!1;if(!e.cache)throw new y.MissingCacheObjectException(e);return e.cache.isEnum}function l(e){if(!e)return!1;if(!e.cache)throw new y.MissingCacheObjectException(e);return e.cache.isSelect}function a(e){return r(e)||o(e)}function u(e){return r(e)||o(e)||i(e)}function s(e){return o(e)||i(e)}function f(e){return o(e)||i(e)||l(e)}function p(e){return!!e&&(e.element?e.element===m.TYPES.MEMBER:e===m.TYPES.MEMBER)}function c(e){if(p(e.element)){if((0,v.default)(e.content.value))return;return e.content.value.element}return e.element}function d(e){return p(e.element)?c(e):e.element}function h(e){return!!e&&!!d(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isSelect=t.isObjectOrArrayOrEnum=t.isObjectOrArray=t.isObject=t.isMember=t.isEnum=t.isArrayOrEnumOrSelect=t.isArrayOrEnum=t.isArray=t.hasType=t.getTypeOfValue=t.getType=void 0;var y=n(14),m=n(31),b=n(10),v=function(e){return e&&e.__esModule?e:{default:e}}(b);t.getType=d,t.getTypeOfValue=c,t.hasType=h,t.isArray=o,t.isArrayOrEnum=s,t.isArrayOrEnumOrSelect=f,t.isEnum=i,t.isMember=p,t.isObject=r,t.isObjectOrArray=a,t.isObjectOrArrayOrEnum=u,t.isSelect=l},function(e,t){e.exports=i},function(e,t){e.exports=l},function(e,t){e.exports=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),s=r(u),f=n(1),p=(r(f),n(49)),c=r(p),d=n(84),h=r(d),y=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),a(t,[{key:"render",value:function(){if(!this.props.element)return!1;var e=h.default[this.props.element.element];if(void 0===e){var t="\n Attributes Kit is not able to render the ‘"+this.props.element.element+"’\n element.\n ";return s.default.createElement(c.default,{errorMessage:t})}return s.default.createElement(e,{collapseByDefault:this.props.collapseByDefault,element:this.props.element,expandableCollapsible:this.props.expandableCollapsible,parentElement:this.props.parentElement,isSample:this.props.isSample})}}]),t}(s.default.Component);t.default=y,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){void 0===e.cache&&(e.cache={}),e.cache[t]=n}Object.defineProperty(t,"__esModule",{value:!0}),t.setCache=r},function(e,t){e.exports=u},function(e,t){e.exports=s},function(e,t){e.exports=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),f=r(s),p=n(1),c=(r(p),n(2)),d=r(c),h=n(3),y=r(h),m=n(7),b=(0,d.default)(a=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),u(t,[{key:"render",value:function(){return f.default.createElement("span",{style:this.style.base},this.props.index)}},{key:"style",get:function(){var e={base:{position:"absolute",top:"8px",right:"8px",fontFamily:m.MONO_FONT_FAMILY,fontSize:"13px",color:"#8A93A3",opacity:"0.56"}};return(0,y.default)(e,this.props.style||{})}}]),t}(f.default.Component))||a;t.default=b,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a,u,s,f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(19),c=r(p),d=n(33),h=r(d),y=n(8),m=r(y),b=n(96),v=r(b),_=n(18),E=r(_),O=n(97),g=r(O),x=n(0),w=r(x),j=n(1),P=r(j),k=n(101),C=r(k),T=n(2),S=r(T),R=n(3),D=r(R),L=n(29),M=r(L),A=n(55),B=r(A),I=n(54),W=r(I),F=n(56),N=r(F),q=n(4),U=(0,S.default)((s=u=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.componentDidMount=function(){n.subscription=n.context.eventEmitter.addListener("alignKeys",n.alignKeys)},n.componentWillReceiveProps=function(e){e.keyWidth&&n.setState({keyWidth:e.keyWidth})},n.componentWillUnmount=function(){n.subscription.remove()},n.alignKeys=function(){n.keyWidthsIndex={},n.setState({keyWidth:null}),window.setTimeout(function(){n.context.eventEmitter.emit(n.props.element.meta.id+":alignKey")},5)},n.reportKeyWidth=function(e,t){if(n.props.reportKeyWidth)return void n.props.reportKeyWidth(e,t);n.keyWidthsIndex[e]=t;var r=(0,C.default)(n.keyWidthsIndex);r.length===n.props.element.content.length&&n.setState({keyWidth:(0,g.default)(r)})},n.state={keyWidth:n.props.keyWidth||null},n.keyWidthsIndex={},n}return l(t,e),f(t,[{key:"getComponent",value:function(e,t){var n=t.key,r=t.index;return n||(n=r),(0,q.isSelect)(e)?w.default.createElement(M.default,{key:n,index:r,element:e,parentElement:this.props.element,reportKeyWidth:this.reportKeyWidth,keyWidth:this.state.keyWidth}):(0,q.isStructured)(e)?w.default.createElement(N.default,{key:n,index:r,element:e,parentElement:this.props.element,collapseByDefault:this.props.collapseByDefault,reportKeyWidth:this.reportKeyWidth,keyWidth:this.state.keyWidth}):w.default.createElement(B.default,{key:n,index:r,element:e,parentElement:this.props.element,collapseByDefault:this.props.collapseByDefault,reportKeyWidth:this.reportKeyWidth,keyWidth:this.state.keyWidth})}},{key:"groupElements",value:function(){var e=this,t=this.props.element.content,n=[];return(0,h.default)(t,function(t,r){if(!t.meta||!t.meta.ref)return n.length&&"own"===(0,v.default)(n).type?(0,v.default)(n).components.push(e.getComponent(t,{index:r})):n.push({type:"own",components:[e.getComponent(t,{index:r})]});var o=void 0;return n.length&&(0,v.default)(n).name===t.meta.ref?o=(0,v.default)(n):(o={name:t.meta.ref,components:[]},(0,q.isInherited)(t)?o.type="inherited":(0,q.isIncluded)(t)&&(o.type="included"),n.push(o)),o.components.push(e.getComponent(t,{key:o.name+"+"+r,index:r}))}),n}},{key:"render",value:function(){if(!this.props.element)return!1;if((0,m.default)(this.props.element.content))return!1;var e=this.groupElements(),t={type:"own"},n={type:"included"},r={type:"inherited"},o={$or:[t,n]},i=(0,c.default)(t,e),l=(0,c.default)(r,e),a=(0,c.default)(n,e),u=(0,c.default)(o,e);return"placeholder"===this.context.inheritedProperties&&"placeholder"===this.context.includedProperties?w.default.createElement("div",{style:this.style.root},(0,E.default)(l,function(e,t){return w.default.createElement(W.default,{type:e.type,name:e.name,key:t},e.components)}),(0,E.default)(a,function(e,t){return w.default.createElement(W.default,{type:e.type,name:e.name,key:t},e.components)}),w.default.createElement("div",{style:this.style.separator}),(0,E.default)(i,function(e,t){return w.default.createElement(W.default,{type:e.type,name:e.name,key:t},e.components)})):w.default.createElement("div",{style:this.style.root},(0,E.default)(u,function(e,t){return w.default.createElement(W.default,{type:e.type,name:e.name,key:t},e.components)}),(0,E.default)(l,function(e,t){return w.default.createElement(W.default,{type:e.type,name:e.name,key:t},e.components)}))}},{key:"style",get:function(){var e={root:{width:"100%",height:"auto"},separator:{width:"100%",height:"1px",backgroundColor:"rgb(232, 235, 238)"}};return(0,D.default)(e,this.props.style||{})}}]),t}(w.default.Component),u.contextTypes={theme:P.default.object,eventEmitter:P.default.object,includedProperties:P.default.oneOfType([P.default.bool,P.default.string]),inheritedProperties:P.default.oneOfType([P.default.bool,P.default.string])},a=s))||a;t.default=U,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.KeyColumn=void 0;var a,u,s,f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(2),c=r(p),d=n(0),h=r(d),y=n(24),m=r(y),b=n(1),v=r(b),_=n(3),E=r(_),O=n(98),g=r(O),x=n(5),w=r(x),j=n(50),P=r(j),k=n(66),C=r(k),T=n(4),S=(0,c.default)((s=u=function(e){function t(){var e,n,r,l;o(this,t);for(var a=arguments.length,u=Array(a),s=0;s<a;s++)u[s]=arguments[s];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.componentDidMount=function(){r.alignKey(),r.context.eventEmitter&&r.props.parentElement.meta&&r.props.parentElement.meta.id&&(r.subscription=r.context.eventEmitter.addListener(r.props.parentElement.meta.id+":alignKey",r.alignKey))},r.componentWillUnmount=function(){r.subscription&&r.subscription.remove()},r.alignKey=function(){var e=void 0;e=r.props.element.meta&&r.props.element.meta.id?r.props.element.meta.id:(0,g.default)(0,1e6);var t=m.default.findDOMNode(r.refs.key);t&&r.props.reportKeyWidth(e,t.clientWidth)},l=n,i(r,l)}return l(t,e),f(t,[{key:"render",value:function(){return h.default.createElement(w.default,{style:this.style.base},h.default.createElement(P.default,{onClick:this.props.onClick,element:this.props.element,ref:"key"}),h.default.createElement(C.default,{element:this.props.element}))}},{key:"style",get:function(){var e={base:{}};(0,T.isStructured)(this.props.element)?e.base.marginLeft="0px":(0,T.containsStructuredElement)(this.props.parentElement)?0===this.props.element.meta._nestedLevel?(0,T.containsSelectElement)(this.props.parentElement)?e.base.marginLeft="42px":e.base.marginLeft="20px":(0,T.containsSelectElement)(this.props.parentElement)?e.base.marginLeft="42px":e.base.marginLeft="30px":e.base.marginLeft="30px",e.base.marginRight="40px";var t=void 0;return this.props.keyWidth&&(t=this.props.keyWidth+"px"),t?(e.base.width=t,e.base.minWidth=t,e.base.maxWidth=t):(e.base.width="auto",e.base.minWidth=null,e.base.maxWidth=null),(0,E.default)(e,this.props.style||{})}}]),t}(h.default.Component),u.contextTypes={eventEmitter:v.default.object},a=s))||a;t.KeyColumn=S},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a,u,s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(0),p=r(f),c=n(1),d=r(c),h=n(2),y=r(h),m=n(3),b=r(m),v=(u=a=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),s(t,[{key:"render",value:function(){return p.default.createElement("div",{style:this.style.base},p.default.createElement("div",{style:this.style.container},p.default.createElement("div",{style:this.style.talon}),this.props.children))}},{key:"style",get:function(){var e=this.context.theme.BORDER_COLOR,t={base:{minWidth:"100%",maxWidth:"100%",height:"auto"},container:{minWidth:"100%",maxWidth:"100%",width:"100%",borderLeft:"1px solid "+e,position:"relative"},talon:{position:"absolute",top:"-14px",left:"-1px",width:"1px",height:"14px",backgroundColor:e}};return this.props.subtle&&(t.container.borderLeft="1px solid transparent",t.talon.backgroundColor="transparent"),(0,b.default)(t,this.props.style||{})}}]),t}(p.default.Component),a.contextTypes={theme:d.default.object},u);t.default=(0,y.default)(v),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a,u,s,f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(0),c=r(p),d=n(1),h=r(d),y=n(2),m=r(y),b=n(3),v=r(b),_=n(8),E=r(_),O=n(6),g=r(O),x=n(5),w=r(x),j=n(67),P=r(j),k=(0,m.default)((s=u=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleExpandCollapse=function(){n.setState({isExpanded:!n.state.isExpanded})},n.state={isExpanded:!0},n.keyWidthsIndex={},n}return l(t,e),f(t,[{key:"renderOptions",value:function(){var e=this;return this.props.element.content.map(function(t,n){return c.default.createElement(P.default,{key:n,index:n,element:t,parentElement:e.props.element,reportKeyWidth:e.props.reportKeyWidth,keyWidth:e.props.keyWidth})})}},{key:"render",value:function(){return(0,E.default)(this.props.element.content)?null:c.default.createElement(g.default,null,c.default.createElement(w.default,{style:this.style.column}),c.default.createElement(w.default,null,this.renderOptions()))}},{key:"style",get:function(){var e={column:{width:"2px",backgroundColor:this.context.theme.SELECT_LINE_COLOR}};return(0,v.default)(e,{})}}]),t}(c.default.Component),u.contextTypes={theme:h.default.object,eventEmitter:h.default.object},a=s))||a;t.default=k,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),f=r(s),p=n(1),c=(r(p),n(2)),d=r(c),h=n(3),y=r(h),m=(0,d.default)(a=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),u(t,[{key:"render",value:function(){return f.default.createElement("div",{onClick:this.props.onClick,style:this.style.base},f.default.createElement("div",{style:this.style.icon}))}},{key:"style",get:function(){var e={};return e.base={width:"13px",height:"13px"},e.icon={width:"13px",height:"13px",backgroundRepeat:"no-repeat",backgroundPosition:"center"},this.props.isExpanded?(e.icon.backgroundImage="url("+n(90)+")",e.icon.backgroundSize="13px 8px"):(e.icon.backgroundImage="url("+n(89)+")",e.icon.backgroundSize="8px 13px"),(0,y.default)(e,this.props.style||{})}}]),t}(f.default.Component))||a;t.default=m,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={MEMBER:"member",ARRAY:"array",OBJECT:"object",STRING:"string",NUMBER:"number",ENUM:"enum",SELECT:"select"};t.TYPES=r},function(e,t){e.exports='\'data:image/svg+xml;utf8,<svg width="8" height="8" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg"><title>Slice 1</title><rect stroke="%23B6BAC4" stroke-width="2" x="1" y="1" width="6" height="6" rx="40" fill="none" fill-rule="evenodd"/></svg>\''},function(e,t){e.exports=p},function(e,t){e.exports=c},function(e,t,n){"use strict";function r(e){console&&console.warn&&console.warn(e)}function o(){o.init.call(this)}function i(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,n,o){var l,a,u;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(a=e._events,void 0===a?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),u=a[t]),void 0===u)u=a[t]=n,++e._eventsCount;else if("function"==typeof u?u=a[t]=o?[n,u]:[u,n]:o?u.unshift(n):u.push(n),(l=i(e))>0&&u.length>l&&!u.warned){u.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=u.length,r(s)}return e}function a(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,m(this.listener,this.target,e))}function u(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=a.bind(r);return o.listener=n,r.wrapFn=o,o}function s(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?d(o):p(o,o.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function c(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function d(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}var h,y="object"==typeof Reflect?Reflect:null,m=y&&"function"==typeof y.apply?y.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};h=y&&"function"==typeof y.ownKeys?y.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var b=Number.isNaN||function(e){return e!==e};e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var v=10;Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return v},set:function(e){if("number"!=typeof e||e<0||b(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");v=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||b(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return i(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var l=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw l.context=i,l}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)m(a,this,t);else for(var u=a.length,s=p(a,u),n=0;n<u;++n)m(s[n],this,t);return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,u(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,u(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,o,i,l;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){l=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():c(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,l||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return s(this,e,!0)},o.prototype.rawListeners=function(e){return s(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?h(this._events):[]}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}Object.defineProperty(t,"__esModule",{value:!0});var a,u,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(91),c=r(p),d=n(94),h=r(d),y=n(23),m=r(y),b=n(93),v=n(10),_=r(v),E=n(22),O=r(E),g=n(17),x=r(g),w=n(18),j=r(w),P=n(3),k=r(P),C=n(103),T=r(C),S=n(0),R=r(S),D=n(1),L=r(D),M=n(99),A=r(M),B=n(2),I=n(20),W=r(I),F=n(68),N=r(F),q=n(7),U=n(78),K=n(82),V=n(85),Y=r(V),z=function(e){return e instanceof T.default.Element||e instanceof T.default.ArraySlice},G=(u=a=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.alignKeys=function(){n.eventEmitter.emit("alignKeys")},n.state=n.transformPropsIntoState(n.props),n.eventEmitter=new b.EventEmitter,n}return l(t,e),f(t,[{key:"getChildContext",value:function(){return{dereferencedDataStructures:this.state.dereferencedDataStructures,eventEmitter:this.eventEmitter,includedProperties:this.state.includedProperties,inheritedProperties:this.state.inheritedProperties,onElementLinkClick:this.state.onElementLinkClick,theme:this.state.theme,namedTypes:this.state.namedTypes,element:this.state.element}}},{key:"componentWillReceiveProps",value:function(e){this.setState(this.transformPropsIntoState(e))}},{key:"transformPropsIntoState",value:function(e){var t=void 0;t=(0,h.default)(Y.default),t=(0,k.default)(t,e.theme||{});var n=(0,_.default)(e.dataStructures)?[]:e.dataStructures,r=e.element,o=new C.JSON06Serialiser;z(r)&&(r=o.serialise(r.content)),z(n)&&(n=n.map(function(e){return o.serialise(e.content)}));var i=e.dataStructuresIndex||(0,A.default)(n,function(e,t){return"object"===s(t.meta.id)?e[t.meta.id.content]=t:e[t.meta.id]=t,e},{}),l=e.dereferencedDataStructures||(0,j.default)(n,function(e){return m.default.dereference((0,h.default)(e),i)}),a=e.inheritedProperties||e.showInherited,u=e.includedProperties||e.showIncluded;(0,_.default)(a)&&(a=!0),(0,_.default)(u)&&(u=!0);var f=void 0;f="show"===e.title||"hide"!==e.title;var p=e.maxInheritanceDepth||void 0,d=e.collapseByDefault;(0,_.default)(d)&&(d=!1);var y=e.namedTypes;(0,_.default)(y)&&(y=!1);var b=e.onElementLinkClick;(0,_.default)(b)&&(b=function(){});var v=this.addNestedLevels((0,h.default)(r)),E=m.default.dereference(v,i);return r=c.default.forge([E],{separator:"."})[0],(0,K.preprocessSamples)(r),(0,U.preprocess)(r),{collapseByDefault:d,dereferencedDataStructures:l,element:r,includedProperties:u,inheritedProperties:a,maxInheritanceDepth:p,namedTypes:y,onElementLinkClick:b,theme:t,title:f}}},{key:"addNestedLevels",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return e?(e.meta||(e.meta={}),e.content&&e.content.value&&(n+=1),e.meta._nestedLevel=n,e.content&&(0,O.default)(e.content)?e.content=(0,j.default)(e.content,function(e){return t.addNestedLevels(e,n)}):e.content&&(0,x.default)(e.content)&&(e.content.value=this.addNestedLevels(e.content.value,n)),e):e}},{key:"render",value:function(){if(!this.props.element)return console.error(new Error('\n Please provide the ‘element’ prop (‘<Attributes element="" />’)\n to the Attributes Kit.\n ')),null;var e=this.state.theme.DESCRIPTION_COLOR;return R.default.createElement("div",{className:"attributesKit"},this.state.title&&R.default.createElement(N.default,{element:this.state.element}),R.default.createElement(B.Style,{scopeSelector:".attributesKit",rules:{p:{marginBottom:"4px",fontFamily:q.DEFAULT_FONT_FAMILY,fontSize:"14px",color:e,lineHeight:"21px",fontWeight:"regular"},"p:last-child":{marginBottom:"0px"},ul:{marginLeft:"20px"},a