/*! For license information please see dll.ShapedForm.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[120],{3079:function(t,e,n){var r=n(54),a=n(3080);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[t.i,a,""]]);var s={insert:"head",singleton:!1};r(a,s);t.exports=a.locals||{}},3080:function(t,e,n){"use strict";n.r(e);var r=n(22),a=n.n(r)()(!1);a.push([t.i,".shaped-form {\n\theight: 400px;\n\twidth: 400px;\n\tfloat: left;\n\tbackground: gainsboro;\n\t-webkit-clip-path: var(--cp-parallelogram);\n\tshape-outside: var(--cp-parallelogram);\n\tshape-margin: 5px;\n\tpadding: 10px;\n}\n",""]),e.default=a},917:function(t,e,n){"use strict";n.r(e);var r=n(14),a=n.n(r),s=n(12),o=n.n(s),i=n(10),p=n.n(i),l=n(15),c=n.n(l),u=n(16),g=n.n(u),h=n(8),d=n.n(h),f=n(7),m=n.n(f),v=n(0),y=n.n(v),b=n(1),k=n.n(b),w=n(192),x=n.n(w);n(3079);function C(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=d()(t);if(e){var a=d()(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return g()(this,n)}}var S=["octagon","triangle","trapezoid","parallelogram","rhombus","pentagon","hexagon","heptagon","nonagon","decagon","bevel","rabbet","left-arrow","right-arrow","left-point","right-point","left-chevron","right-chevron","star","cross","message","close","frame"],P=function(t){c()(n,t);var e=C(n);function n(t){var r;return a()(this,n),r=e.call(this,t),m()(p()(r),"getImage",(function(){var t=new Image;r.props.image?t.src=r.props.image:t.src=r.props.svg,t.onload=function(){r.setState({loaded:!0})}})),r.state={loaded:!1},x()(S,t.type)&&(r.type=t.type,t.image||t.svg||(r.state.loaded=!0)),r}return o()(n,[{key:"componentDidMount",value:function(){(this.type&&this.props.image||this.props.svg)&&this.getImage()}},{key:"getStyle",value:function(){var t="var(--cp-"+this.type+")";return{webkitClipPath:t,clipPath:t,shapeOutside:t,margin:this.props.margin}}},{key:"render",value:function(){if(!this.state.loaded)return null;var t=this.getStyle();return Object.assign(t,this.props.style),this.props.image&&(t.backgroundImage="url("+this.props.image+")",this.props.style.backgroundSize||(t.backgroundSize="100% 100%")),this.props.svg&&(t.shapeOutside="url("+this.props.svg+")",t.webkitClipPath="url("+this.props.svg+")",t.clipPath="url("+this.props.svg+")",t.backgroundImage="url("+this.props.svg+")",this.props.style.backgroundSize||(t.backgroundSize="100% 100%")),y.a.createElement("div",{role:"button",tabIndex:0,onKeyPress:this.props.onClick,onClick:this.props.onClick,style:t,className:"shaped-form"},this.props.children)}}]),n}(v.Component);P.propTypes={margin:k.a.number,onClick:k.a.func,image:k.a.string,svg:k.a.string,style:k.a.object},P.defaultProps={svg:null,image:null,margin:10,style:{},onClick:null},e.default=P}}]);