/*! For license information please see dll.Gate.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[49],{1856:function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r).a.createContext("anonymous");t.default=o},848:function(e,t,n){"use strict";n.r(t);var r=n(14),o=n.n(r),i=n(12),s=n.n(i),a=n(15),l=n.n(a),c=n(16),u=n.n(c),h=n(8),d=n.n(h),p=n(0),f=n.n(p),v=n(1),k=n.n(v),w=n(105),b=n(200),m=n(36),E=n(1856);function y(e){var t=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(e){return!1}}();return function(){var n,r=d()(e);if(t){var o=d()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var O=function(e){l()(n,e);var t=y(n);function n(e,r){var i;return o()(this,n),(i=t.call(this,e)).state={isEnrolled:!1,isOwner:!1,validCheck:!e.check||e.check(r)},i}return s()(n,[{key:"componentDidMount",value:function(){var e=this;this._isMounted=!0;var t=this.context;t&&(this.unsubscribe=t.subscribe((function(n,r){if(n!==w.RECEIVED_USER_RIGHTS&&n!==w.LOGGED_IN&&n!==w.LOGGED_OUT&&n!==b.TOGGLE_PRESENTATION_MODE||e.checkAuthorization(),e.props.check){var o=e.props.check(t);if(o!==e.state.validCheck)return e.setState({validCheck:o})}e._isMounted&&e.forceUpdate()})),this.checkAuthorization())}},{key:"componentDidUpdate",value:function(){if(this.props.check){var e=this.props.check(this.context);if(e!==this.state.validCheck)return this.setState({validCheck:e})}}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe(),this._isMounted=!1}},{key:"checkAuthorization",value:function(){var e=this.context,t={isEnrolled:e.isEnrolled(),isOwner:e.isOwner(),presentationMode:e.presentationMode};t.isEnrolled===this.state.isEnrolled&&t.isOwner===this.state.isOwner&&t.presentationMode===this.state.presentationMode||this.setState(t)}},{key:"isTimeActive",value:function(){if(!this.props.after&&!this.props.until)return!0;var e=this.context;return this.props.after&&this.props.until?this.props.after<e.startTime&&e.startTime<=this.props.until:this.props.until?e.startTime<=this.props.until:this.props.after<e.startTime}},{key:"renderChildren",value:function(e){return f.a.createElement(p.Fragment,null,e?null:this.props.banner,f.a.createElement("div",{className:"gate outer-element",style:{display:e?"inline":"none"}},this.props.children))}},{key:"render",value:function(){var e=this,t=this.context;return f.a.createElement(E.default.Consumer,null,(function(n){var r=e.props,o=r.disabled,i=r.user,s=r.notUser,a=r.enrolled,l=r.notEnrolled,c=r.owner,u=r.notOwner,h=e.state.isEnrolled||"enrolled"===n,d=e.state.isOwner||"owner"===n,p=t&&!t.anonymous||"anonymous"!==n,f=!1;return o||!e.state.validCheck||s&&p||u&&d||l&&h?e.renderChildren(!1):e.isTimeActive()?(i&&p||a&&h||c&&d&&(e.props.showOwnerInPresentationMode||!e.state.presentationMode)?f=!0:i||c||a||(f=!0),e.renderChildren(f)):e.renderChildren(!1)}))}}]),n}(p.Component);O.defaultProps={user:!1,notUser:!1,enrolled:!1,notEnrolled:!1,owner:!1,notOwner:!1,after:null,until:null,banner:null,disabled:!1,showOwnerInPresentationMode:!1,check:null},O.propTypes={user:k.a.bool,notUser:k.a.bool,enrolled:k.a.bool,notEnrolled:k.a.bool,owner:k.a.bool,notOwner:k.a.bool,after:k.a.instanceOf(Date),until:k.a.instanceOf(Date),banner:k.a.node,disabled:k.a.bool,showOwnerInPresentationMode:k.a.bool,check:k.a.func},O.contextType=m.default,t.default=O}}]);