diff --git a/dist/onfido.min.js b/dist/onfido.min.js index 648f741d9f..67a0450b5e 100644 --- a/dist/onfido.min.js +++ b/dist/onfido.min.js @@ -1,4 +1,4 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Onfido=t():e.Onfido=t()}(this,function(){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=156)}([function(e,t,n){"use strict";function r(){}function o(e,t){var n,o,i,a,s=R;for(a=arguments.length;a-- >2;)N.push(arguments[a]);for(t&&null!=t.children&&(N.length||N.push(t.children),delete t.children);N.length;)if((o=N.pop())&&void 0!==o.pop)for(a=o.length;a--;)N.push(o[a]);else"boolean"==typeof o&&(o=null),(i="function"!=typeof e)&&(null==o?o="":"number"==typeof o?o+="":"string"!=typeof o&&(i=!1)),i&&n?s[s.length-1]+=o:s===R?s=[o]:s.push(o),n=i;var c=new r;return c.nodeName=e,c.children=s,c.attributes=null==t?void 0:t,c.key=null==t?void 0:t.key,void 0!==j.vnode&&j.vnode(c),c}function i(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t){return o(e.nodeName,i(i({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}function s(e){!e._dirty&&(e._dirty=!0)&&1==U.push(e)&&(j.debounceRendering||I)(c)}function c(){var e,t=U;for(U=[];e=t.pop();)e._dirty&&T(e)}function u(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&l(e,t.nodeName):n||e._componentConstructor===t.nodeName}function l(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function f(e){var t=i({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function p(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}function d(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,n,r,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),r&&r(e);else if("class"!==t||o)if("style"===t){if(r&&"string"!=typeof r&&"string"!=typeof n||(e.style.cssText=r||""),r&&"object"==typeof r){if("string"!=typeof n)for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"==typeof r[i]&&!1===L.test(i)?r[i]+"px":r[i]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,v,a):e.removeEventListener(t,v,a),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e)m(e,t,null==r?"":r),null!=r&&!1!==r||e.removeAttribute(t);else{var s=o&&t!==(t=t.replace(/^xlink\:?/,""));null==r||!1===r?s?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof r&&(s?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function m(e,t,n){try{e[t]=n}catch(e){}}function v(e){return this._listeners[e.type](j.event&&j.event(e)||e)}function y(){for(var e;e=F.pop();)j.afterMount&&j.afterMount(e),e.componentDidMount&&e.componentDidMount()}function g(e,t,n,r,o,i){B++||(W=null!=o&&void 0!==o.ownerSVGElement,q=null!=e&&!("__preactattr_"in e));var a=b(e,t,n,r,i);return o&&a.parentNode!==o&&o.appendChild(a),--B||(q=!1,i||y()),a}function b(e,t,n,r,o){var i=e,a=W;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||o)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),w(e,!0))),i.__preactattr_=!0,i;var s=t.nodeName;if("function"==typeof s)return P(e,t,n,r);if(W="svg"===s||"foreignObject"!==s&&W,s+="",(!e||!l(e,s))&&(i=p(s,W),e)){for(;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),w(e,!0)}var c=i.firstChild,u=i.__preactattr_,f=t.children;if(null==u){u=i.__preactattr_={};for(var d=i.attributes,h=d.length;h--;)u[d[h].name]=d[h].value}return!q&&f&&1===f.length&&"string"==typeof f[0]&&null!=c&&void 0!==c.splitText&&null==c.nextSibling?c.nodeValue!=f[0]&&(c.nodeValue=f[0]):(f&&f.length||null!=c)&&_(i,f,n,r,q||null!=u.dangerouslySetInnerHTML),x(i,t.attributes,u),W=a,i}function _(e,t,n,r,o){var i,a,s,c,l,f=e.childNodes,p=[],h={},m=0,v=0,y=f.length,g=0,_=t?t.length:0;if(0!==y)for(var k=0;y>k;k++){var x=f[k],C=x.__preactattr_,E=_&&C?x._component?x._component.__key:C.key:null;null!=E?(m++,h[E]=x):(C||(void 0!==x.splitText?!o||x.nodeValue.trim():o))&&(p[g++]=x)}if(0!==_)for(var k=0;_>k;k++){c=t[k],l=null;var E=c.key;if(null!=E)m&&void 0!==h[E]&&(l=h[E],h[E]=void 0,m--);else if(!l&&g>v)for(i=v;g>i;i++)if(void 0!==p[i]&&u(a=p[i],c,o)){l=a,p[i]=void 0,i===g-1&&g--,i===v&&v++;break}l=b(l,c,n,r),s=f[k],l&&l!==e&&l!==s&&(null==s?e.appendChild(l):l===s.nextSibling?d(s):e.insertBefore(l,s))}if(m)for(var k in h)void 0!==h[k]&&w(h[k],!1);for(;g>=v;)void 0!==(l=p[g--])&&w(l,!1)}function w(e,t){var n=e._component;n?A(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||d(e),k(e))}function k(e){for(e=e.lastChild;e;){var t=e.previousSibling;w(e,!0),e=t}}function x(e,t,n){var r;for(r in n)t&&null!=t[r]||null==n[r]||h(e,r,n[r],n[r]=void 0,W);for(r in t)"children"===r||"innerHTML"===r||r in n&&t[r]===("value"===r||"checked"===r?e[r]:n[r])||h(e,r,n[r],n[r]=t[r],W)}function C(e){var t=e.constructor.name;(H[t]||(H[t]=[])).push(e)}function E(e,t,n){var r,o=H[e.name];if(e.prototype&&e.prototype.render?(r=new e(t,n),D.call(r,t,n)):(r=new D(t,n),r.constructor=e,r.render=S),o)for(var i=o.length;i--;)if(o[i].constructor===e){r.nextBase=o[i].nextBase,o.splice(i,1);break}return r}function S(e,t,n){return this.constructor(e,n)}function O(e,t,n,r,o){e._disable||(e._disable=!0,(e.__ref=t.ref)&&delete t.ref,(e.__key=t.key)&&delete t.key,!e.base||o?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===j.syncComponentUpdates&&e.base?s(e):T(e,1,o)),e.__ref&&e.__ref(e))}function T(e,t,n,r){if(!e._disable){var o,a,s,c=e.props,u=e.state,l=e.context,p=e.prevProps||c,d=e.prevState||u,h=e.prevContext||l,m=e.base,v=e.nextBase,b=m||v,_=e._component,k=!1;if(m&&(e.props=p,e.state=d,e.context=h,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(c,u,l)?k=!0:e.componentWillUpdate&&e.componentWillUpdate(c,u,l),e.props=c,e.state=u,e.context=l),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!k){o=e.render(c,u,l),e.getChildContext&&(l=i(i({},l),e.getChildContext()));var x,C,S=o&&o.nodeName;if("function"==typeof S){var P=f(o);a=_,a&&a.constructor===S&&P.key==a.__key?O(a,P,1,l,!1):(x=a,e._component=a=E(S,P,l),a.nextBase=a.nextBase||v,a._parentComponent=e,O(a,P,0,l,!1),T(a,1,n,!0)),C=a.base}else s=b,x=_,x&&(s=e._component=null),(b||1===t)&&(s&&(s._component=null),C=g(s,o,l,n||!m,b&&b.parentNode,!0));if(b&&C!==b&&a!==_){var D=b.parentNode;D&&C!==D&&(D.replaceChild(C,b),x||(b._component=null,w(b,!1)))}if(x&&A(x),e.base=C,C&&!r){for(var M=e,N=e;N=N._parentComponent;)(M=N).base=C;C._component=M,C._componentConstructor=M.constructor}}if(!m||n?F.unshift(e):k||(e.componentDidUpdate&&e.componentDidUpdate(p,d,h),j.afterUpdate&&j.afterUpdate(e)),null!=e._renderCallbacks)for(;e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);B||r||y()}}function P(e,t,n,r){for(var o=e&&e._component,i=o,a=e,s=o&&e._componentConstructor===t.nodeName,c=s,u=f(t);o&&!c&&(o=o._parentComponent);)c=o.constructor===t.nodeName;return o&&c&&(!r||o._component)?(O(o,u,3,n,r),e=o.base):(i&&!s&&(A(i),e=a=null),o=E(t.nodeName,u,n),e&&!o.nextBase&&(o.nextBase=e,a=null),O(o,u,1,n,r),e=o.base,a&&e!==a&&(a._component=null,w(a,!1))),e}function A(e){j.beforeUnmount&&j.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?A(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.nextBase=t,d(t),C(e),k(t)),e.__ref&&e.__ref(null)}function D(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{}}function M(e,t,n){return g(n,e,{},!1,t,!1)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"h",function(){return o}),n.d(t,"createElement",function(){return o}),n.d(t,"cloneElement",function(){return a}),n.d(t,"Component",function(){return D}),n.d(t,"render",function(){return M}),n.d(t,"rerender",function(){return c}),n.d(t,"options",function(){return j});var j={},N=[],R=[],I="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,L=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,U=[],F=[],B=0,W=!1,q=!1,H={};i(D.prototype,{setState:function(e,t){var n=this.state;this.prevState||(this.prevState=i({},n)),i(n,"function"==typeof e?e(n,this.props):e),t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),s(this)},forceUpdate:function(e){e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),T(this,2)},render:function(){}}),t.default={h:o,createElement:o,cloneElement:a,Component:D,render:M,rerender:c,options:j}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n=e.exports={version:"2.5.1"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(5),n(8),n(28),n(7),n(4),n(70),n(69),n(6),n(47),n(0),n(276),n(74),n(267),n(296)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u,l,f,p,d,h){"use strict";function m(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?(0,w.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return(0,x.default)(e)}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(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 _(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=(0,E.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(C.default?(0,C.default)(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var w=m(n),k=m(r),x=m(o),C=m(i),E=m(a),S=m(s),O=m(c),T=m(u),P=m(l),A=m(p),D=m(h),M=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,w.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),j=k.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N="function"==typeof O.default&&"symbol"==typeof S.default?function(e){return typeof e}:function(e){return e&&"function"==typeof O.default&&e.constructor===O.default&&e!==O.default.prototype?"symbol":typeof e},R=A.default.config("https://6e3dc0335efc49889187ec90288a84fd@sentry.io/109946"),I=new window.WoopraTracker("onfidojssdkwoopra"),L=function(){I.init(),I.config({domain:"onfido-js-sdk.com",cookie_name:"onfido-js-sdk-woopra",cookie_domain:location.hostname,referer:location.href});var e=window.location.hostname;I.identify(e.match(/^(id|id-dev)\.onfido\.com$/)?{sdk_version:"2.0.0-rc.2"}:{sdk_version:"2.0.0-rc.2",client:e}),A.default.TraceKit.collectWindowErrors=!0},U=function(){I.track(),R.install()},F=function(e){return e?(0,D.default)(e,function(e){return"object"===(void 0===e?"undefined":N(e))?(0,P.default)(e):e}):null},B=function(e,t){return I.track(e,F(t))},W=function(e){return"screen_"+(0,d.cleanFalsy)(e).join("_")},q=function(e,t){return B(W(e),t)},H=function(e,t){return function(n){function r(){var n,o,i,a;g(this,r);for(var s=arguments.length,c=Array(s),u=0;s>u;u++)c[u]=arguments[u];return o=i=b(this,(n=r.__proto__||(0,T.default)(r)).call.apply(n,[this].concat(c))),i.trackScreen=function(e){for(var n,r=arguments.length,o=Array(r>1?r-1:0),a=1;r>a;a++)o[a-1]=arguments[a];return(n=i.props).trackScreen.apply(n,[[].concat(y((0,d.wrapArray)(t)),y((0,d.wrapArray)(e)))].concat(o))},i.render=function(){return(0,f.h)(e,j({},i.props,{trackScreen:i.trackScreen}))},a=o,b(i,a)}return _(r,n),r}(f.Component)},V=function(e,t){return function(n){function r(){var t,n,o,i;g(this,r);for(var a=arguments.length,s=Array(a),c=0;a>c;c++)s[c]=arguments[c];return n=o=b(this,(t=r.__proto__||(0,T.default)(r)).call.apply(t,[this].concat(s))),o.render=function(){return(0,f.h)(e,o.props)},i=n,b(o,i)}return _(r,n),M(r,[{key:"componentDidMount",value:function(){this.props.trackScreen(t)}}]),r}(f.Component)},z=function(e,t){return function(n){function r(){var t,n,o,i;g(this,r);for(var a=arguments.length,s=Array(a),c=0;a>c;c++)s[c]=arguments[c];return n=o=b(this,(t=r.__proto__||(0,T.default)(r)).call.apply(t,[this].concat(s))),o.render=function(){return(0,f.h)(e,o.props)},i=n,b(o,i)}return _(r,n),M(r,[{key:"componentDidMount",value:function(){this.trackScreen(this.props)}},{key:"trackScreen",value:function(e){var n,r=e[t],o=r?[t,v({},t,r)]:[];(n=this.props).trackScreen.apply(n,o)}},{key:"componentWillReceiveProps",value:function(e){this.props[t]!==e[t]&&this.trackScreen(e)}}]),r}(f.Component)},K=function(e,t,n){return H(z(e,n),t)};t.default={setUp:L,track:U,sendError:function(e,t){R.captureException(Error(e),{extra:t})},sendEvent:B,sendScreen:q,trackComponent:V,trackComponentAndMode:K,appendToTracking:H,setWoopraCookie:function(e){var t=I.config("cookie_name"),n=I.config("cookie_expire"),r=I.config("cookie_path"),o=I.config("cookie_domain");I.docCookies.setItem(t,e,n,r,o),I.cookie=e},getWoopraCookie:function(){return I.cookie}},e.exports=t.default})},function(e,t,n){e.exports={default:n(173),__esModule:!0}},function(e,t,n){e.exports={default:n(174),__esModule:!0}},function(e,t,n){e.exports={default:n(176),__esModule:!0}},function(e,t,n){e.exports={default:n(177),__esModule:!0}},function(e,t,n){e.exports={default:n(172),__esModule:!0}},function(e,t){e.exports={step:"onfido-sdk-ui-Theme-step",title:"onfido-sdk-ui-Theme-title","mbottom-large":"onfido-sdk-ui-Theme-mbottom-large",btn:"onfido-sdk-ui-Theme-btn","btn-centered":"onfido-sdk-ui-Theme-btn-centered","btn-primary":"onfido-sdk-ui-Theme-btn-primary","btn-alternative":"onfido-sdk-ui-Theme-btn-alternative",center:"onfido-sdk-ui-Theme-center","overlay-shape":"onfido-sdk-ui-Theme-overlay-shape",overlay:"onfido-sdk-ui-Theme-overlay",icon:"onfido-sdk-ui-Theme-icon",actions:"onfido-sdk-ui-Theme-actions",help:"onfido-sdk-ui-Theme-help",header:"onfido-sdk-ui-Theme-header",helpList:"onfido-sdk-ui-Theme-helpList"}},function(e,t,n){var r=n(58)("wks"),o=n(41),i=n(15).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(15),o=n(2),i=n(40),a=n(24),s=function(e,t,n){var c,u,l,f=e&s.F,p=e&s.G,d=e&s.S,h=e&s.P,m=e&s.B,v=e&s.W,y=p?o:o[t]||(o[t]={}),g=y.prototype,b=p?r:d?r[t]:(r[t]||{}).prototype;p&&(n=t);for(c in n)(u=!f&&b&&void 0!==b[c])&&c in y||(l=u?b[c]:n[c],y[c]=p&&"function"!=typeof b[c]?n[c]:m&&u?i(l,r):v&&b[c]==l?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(l):h&&"function"==typeof l?i(Function.call,l):l,h&&((y.virtual||(y.virtual={}))[c]=l,e&s.R&&g&&!g[c]&&a(g,c,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(38),n(37),n(268),n(0),n(228)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.humanizeField=e.checkIfHasWebcam=e.isDesktop=e.preventDefaultOnClick=e.wrapWithClass=e.getCSSMilisecsValue=e.getCSSValue=e.functionalSwitch=void 0;var s=a(t),c=a(n),u=a(r),l=a(i),f=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=(0,c.default)(e);!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,s.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=(e.functionalSwitch=function(e,t){return(t[e]||function(){return null})()},e.getCSSValue=function(e,t){var n=(0,u.default)(t),r=f(n,2),o=r[0],i=r[1];return i!==e&&console.warn("The css @value: "+t+" unit is "+i+" but it should be "+e),o}),d=(e.getCSSMilisecsValue=function(e){return p("ms",e)},e.wrapWithClass=function(e,t){return(0,o.h)("div",{className:e},t)},e.preventDefaultOnClick=function(e){return function(t){t.preventDefault(),e()}},e.isDesktop=!/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i.test(navigator.userAgent||""),function(e,t){try{(0,l.default)().then(e).catch(t)}catch(e){t(e)}});e.checkIfHasWebcam=function(e){d(function(t){return e(t.some(function(e){return"videoinput"===e.kind}))},function(){return e(!1)})},e.humanizeField=function(e){return e.substr(0,1).toUpperCase()+e.substr(1).split("_").join(" ")}})},function(e,t,n){"use strict";function r(){return null}function o(e){var t=e.nodeName,n=e.attributes;e.attributes={},t.defaultProps&&w(e.attributes,t.defaultProps),n&&w(e.attributes,n)}function i(e,t){var n,r,o;if(t){for(o in t)if(n=z.test(o))break;if(n){r=e.attributes={};for(o in t)t.hasOwnProperty(o)&&(r[z.test(o)?o.replace(/([A-Z0-9])/,"-$1").toLowerCase():o]=t[o])}}}function a(e,t,r){var o=t&&t._preactCompatRendered&&t._preactCompatRendered.base;o&&o.parentNode!==t&&(o=null),o||(o=t.children[0]);for(var i=t.childNodes.length;i--;)t.childNodes[i]!==o&&t.removeChild(t.childNodes[i]);var a=n.i(F.render)(e,t,o);return t&&(t._preactCompatRendered=a&&(a._component||{base:a})),"function"==typeof r&&r(),a&&a._component||a}function s(e,t,r,o){var i=n.i(F.h)(Y,{context:e.context},t),s=a(i,r);return o&&o(s),s._component||s.base}function c(e){var t=e._preactCompatRendered&&e._preactCompatRendered.base;return!(!t||t.parentNode!==e)&&(n.i(F.render)(n.i(F.h)(r),e,t),!0)}function u(e){return h.bind(null,e)}function l(e,t){for(var n=t||0;e.length>n;n++){var r=e[n];Array.isArray(r)?l(r):r&&"object"==typeof r&&!y(r)&&(r.props&&r.type||r.attributes&&r.nodeName||r.children)&&(e[n]=h(r.type||r.nodeName,r.props||r.attributes,r.children))}}function f(e){return"function"==typeof e&&!(e.prototype&&e.prototype.render)}function p(e){return E({displayName:e.displayName||e.name,render:function(){return e(this.props,this.context)}})}function d(e){var t=e[H];return t?!0===t?e:t:(t=p(e),Object.defineProperty(t,H,{configurable:!0,value:!0}),t.displayName=e.displayName,t.propTypes=e.propTypes,t.defaultProps=e.defaultProps,Object.defineProperty(e,H,{configurable:!0,value:t}),t)}function h(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return l(e,2),m(F.h.apply(void 0,e))}function m(e){e.preactCompatNormalized=!0,_(e),f(e.nodeName)&&(e.nodeName=d(e.nodeName));var t=e.attributes.ref,n=t&&typeof t;return!Q||"string"!==n&&"number"!==n||(e.attributes.ref=g(t,Q)),b(e),e}function v(e,t){for(var r=[],o=arguments.length-2;o-- >0;)r[o]=arguments[o+2];if(!y(e))return e;var i=e.attributes||e.props,a=n.i(F.h)(e.nodeName||e.type,i,e.children||i&&i.children),s=[a,t];return r&&r.length?s.push(r):t&&t.children&&s.push(t.children),m(F.cloneElement.apply(void 0,s))}function y(e){return e&&(e instanceof X||e.$$typeof===q)}function g(e,t){return t._refProxies[e]||(t._refProxies[e]=function(n){t&&t.refs&&(t.refs[e]=n,null===n&&(delete t._refProxies[e],t=null))})}function b(e){var t=e.nodeName,n=e.attributes;if(n&&"string"==typeof t){var r={};for(var o in n)r[o.toLowerCase()]=o;if(r.ondoubleclick&&(n.ondblclick=n[r.ondoubleclick],delete n[r.ondoubleclick]),r.onchange&&("textarea"===t||"input"===t.toLowerCase()&&!/^fil|che|rad/i.test(n.type))){var i=r.oninput||"oninput";n[i]||(n[i]=A([n[i],n[r.onchange]]),delete n[r.onchange])}}}function _(e){var t=e.attributes;if(t){var n=t.className||t.class;n&&(t.className=n)}}function w(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function k(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}function x(e){return e&&e.base||e}function C(){}function E(e){function t(e,t){T(this),R.call(this,e,t,K),D.call(this,e,t)}return e=w({constructor:t},e),e.mixins&&O(e,S(e.mixins)),e.statics&&w(t,e.statics),e.propTypes&&(t.propTypes=e.propTypes),e.defaultProps&&(t.defaultProps=e.defaultProps),e.getDefaultProps&&(t.defaultProps=e.getDefaultProps()),C.prototype=R.prototype,t.prototype=w(new C,e),t.displayName=e.displayName||"Component",t}function S(e){for(var t={},n=0;e.length>n;n++){var r=e[n];for(var o in r)r.hasOwnProperty(o)&&"function"==typeof r[o]&&(t[o]||(t[o]=[])).push(r[o])}return t}function O(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=A(t[n].concat(e[n]||Z),"getDefaultProps"===n||"getInitialState"===n||"getChildContext"===n))}function T(e){for(var t in e){var n=e[t];"function"!=typeof n||n.__bound||V.hasOwnProperty(t)||((e[t]=n.bind(e)).__bound=!0)}}function P(e,t,n){if("string"==typeof t&&(t=e.constructor.prototype[t]),"function"==typeof t)return t.apply(e,n)}function A(e,t){return function(){for(var n,r=arguments,o=this,i=0;e.length>i;i++){var a=P(o,e[i],r);if(t&&null!=a){n||(n={});for(var s in a)a.hasOwnProperty(s)&&(n[s]=a[s])}else void 0!==a&&(n=a)}return n}}function D(e,t){M.call(this,e,t),this.componentWillReceiveProps=A([M,this.componentWillReceiveProps||"componentWillReceiveProps"]),this.render=A([M,j,this.render||"render",N])}function M(e,t){if(e){var n=e.children;if(n&&Array.isArray(n)&&1===n.length&&(e.children=n[0])&&"object"==typeof e.children&&(e.children.length=1,e.children[0]=e.children),G){var r="function"==typeof this?this:this.constructor,o=this.propTypes||r.propTypes,i=this.displayName||r.name;o&&U.a.checkPropTypes(o,e,"prop",i)}}}function j(e){Q=this}function N(){Q===this&&(Q=null)}function R(e,t,n){F.Component.call(this,e,t),this.state=this.getInitialState?this.getInitialState():{},this.refs={},this._refProxies={},n!==K&&D.call(this,e,t)}function I(e,t){R.call(this,e,t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"version",function(){return B}),n.d(t,"DOM",function(){return te}),n.d(t,"Children",function(){return ee}),n.d(t,"render",function(){return a}),n.d(t,"createClass",function(){return E}),n.d(t,"createFactory",function(){return u}),n.d(t,"createElement",function(){return h}),n.d(t,"cloneElement",function(){return v}),n.d(t,"isValidElement",function(){return y}),n.d(t,"findDOMNode",function(){return x}),n.d(t,"unmountComponentAtNode",function(){return c}),n.d(t,"Component",function(){return R}),n.d(t,"PureComponent",function(){return I}),n.d(t,"unstable_renderSubtreeIntoContainer",function(){return s});var L=n(271),U=n.n(L),F=n(0);n.d(t,"PropTypes",function(){return U.a});var B="15.1.0",W="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "),q="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,H="undefined"!=typeof Symbol?Symbol.for("__preactCompatWrapper"):"__preactCompatWrapper",V={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},z=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vert|word|writing|x)[A-Z]/,K={},G="undefined"==typeof process||!process.env||!1,X=n.i(F.h)("a",null).constructor;X.prototype.$$typeof=q,X.prototype.preactCompatUpgraded=!1,X.prototype.preactCompatNormalized=!1,Object.defineProperty(X.prototype,"type",{get:function(){return this.nodeName},set:function(e){this.nodeName=e},configurable:!0}),Object.defineProperty(X.prototype,"props",{get:function(){return this.attributes},set:function(e){this.attributes=e},configurable:!0});var $=F.options.event;F.options.event=function(e){return $&&(e=$(e)),e.persist=Object,e.nativeEvent=e,e};var J=F.options.vnode;F.options.vnode=function(e){if(!e.preactCompatUpgraded){e.preactCompatUpgraded=!0;var t=e.nodeName,n=e.attributes=w({},e.attributes);"function"==typeof t?(!0===t[H]||t.prototype&&"isReactComponent"in t.prototype)&&(e.children&&e.children+""==""&&(e.children=void 0),e.children&&(n.children=e.children),e.preactCompatNormalized||m(e),o(e)):(e.children&&e.children+""==""&&(e.children=void 0),e.children&&(n.children=e.children),n.defaultValue&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),i(e,n))}J&&J(e)};var Y=function(){};Y.prototype.getChildContext=function(){return this.props.context},Y.prototype.render=function(e){return e.children[0]};for(var Q,Z=[],ee={map:function(e,t,n){return null==e?null:(e=ee.toArray(e),n&&n!==e&&(t=t.bind(n)),e.map(t))},forEach:function(e,t,n){if(null==e)return null;e=ee.toArray(e),n&&n!==e&&(t=t.bind(n)),e.forEach(t)},count:function(e){return e&&e.length||0},only:function(e){if(e=ee.toArray(e),1!==e.length)throw Error("Children.only() expects only one child.");return e[0]},toArray:function(e){return null==e?[]:Array.isArray&&Array.isArray(e)?e:Z.concat(e)}},te={},ne=W.length;ne--;)te[W[ne]]=u(W[ne]);w(R.prototype=new F.Component,{constructor:R,isReactComponent:{},replaceState:function(e,t){var n=this;this.setState(e,t);for(var r in n.state)r in e||delete n.state[r]},getDOMNode:function(){return this.base},isMounted:function(){return!!this.base}}),C.prototype=R.prototype,I.prototype=new C,I.prototype.isPureReactComponent=!0,I.prototype.shouldComponentUpdate=function(e,t){return k(this.props,e)||k(this.state,t)},t.default={version:B,DOM:te,PropTypes:U.a,Children:ee,render:a,createClass:E,createFactory:u,createElement:h,cloneElement:v,isValidElement:y,findDOMNode:x,unmountComponentAtNode:c,Component:R,PureComponent:I,unstable_renderSubtreeIntoContainer:s}},function(e,t,n){function r(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,r)}}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function s(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}t=e.exports=n(219),t.log=i,t.formatArgs=o,t.save=a,t.load=s,t.useColors=r,t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(s())},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(17),o=n(84),i=n(61),a=Object.defineProperty;t.f=n(18)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(25);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(19)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(52),o=n(50);e.exports=function(e){return r(o(e))}},function(e,t,n){var r,o,i;!function(n,a){o=[t],r=a,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.SET_DOCUMENT_TYPE="SET_DOCUMENT_TYPE",e.SET_ROOM_ID="SET_ROOM_ID",e.SET_SOCKET="SET_SOCKET",e.SET_CLIENT_SUCCESS="SET_CLIENT_SUCCESS",e.CAPTURE_CREATE="CAPTURE_CREATE",e.CAPTURE_VALIDATE="CAPTURE_VALIDATE",e.CAPTURE_DELETE="CAPTURE_DELETE",e.RESET_STORE="RESET_STORE"})},function(e,t,n){function r(e){if(e)return o(e)}function o(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,o=0;n.length>o;o++)if((r=n[o])===t||r.fn===t){n.splice(o,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n){n=n.slice(0);for(var r=0,o=n.length;o>r;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){var r=n(16),o=n(32);e.exports=n(18)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports={}},function(e,t,n){(function(e){function r(e,n){return n("b"+t.packets[e.type]+e.data.data)}function o(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=e.data,i=new Uint8Array(o),a=new Uint8Array(1+o.byteLength);a[0]=g[e.type];for(var s=0;i.length>s;s++)a[s+1]=i[s];return r(a.buffer)}function i(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=new FileReader;return o.onload=function(){e.data=o.result,t.encodePacket(e,n,!0,r)},o.readAsArrayBuffer(e.data)}function a(e,n,r){if(!n)return t.encodeBase64Packet(e,r);if(y)return i(e,n,r);var o=new Uint8Array(1);return o[0]=g[e.type],r(new w([o.buffer,e.data]))}function s(e){try{e=h.decode(e,{strict:!1})}catch(e){return!1}return e}function c(e,t,n){for(var r=Array(e.length),o=d(e.length,n),i=0;e.length>i;i++)!function(e,n,o){t(n,function(t,n){r[e]=n,o(t,r)})}(i,e[i],o)}var u,l=n(226),f=n(96),p=n(122),d=n(121),h=n(227);e&&e.ArrayBuffer&&(u=n(161));var m="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),v="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),y=m||v;t.protocol=3;var g=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},b=l(g),_={type:"error",data:"parser error"},w=n(162);t.encodePacket=function(t,n,i,s){"function"==typeof n&&(s=n,n=!1),"function"==typeof i&&(s=i,i=null);var c=void 0===t.data?void 0:t.data.buffer||t.data;if(e.ArrayBuffer&&c instanceof ArrayBuffer)return o(t,n,s);if(w&&c instanceof e.Blob)return a(t,n,s);if(c&&c.base64)return r(t,s);var u=g[t.type];return void 0!==t.data&&(u+=i?h.encode(t.data+"",{strict:!1}):t.data+""),s(""+u)},t.encodeBase64Packet=function(n,r){var o="b"+t.packets[n.type];if(w&&n.data instanceof e.Blob){var i=new FileReader;return i.onload=function(){var e=i.result.split(",")[1];r(o+e)},i.readAsDataURL(n.data)}var a;try{a=String.fromCharCode.apply(null,new Uint8Array(n.data))}catch(e){for(var s=new Uint8Array(n.data),c=Array(s.length),u=0;s.length>u;u++)c[u]=s[u];a=String.fromCharCode.apply(null,c)}return o+=e.btoa(a),r(o)},t.decodePacket=function(e,n,r){if(void 0===e)return _;if("string"==typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(r&&!1===(e=s(e)))return _;var o=e.charAt(0);return+o==o&&b[o]?e.length>1?{type:b[o],data:e.substring(1)}:{type:b[o]}:_}var i=new Uint8Array(e),o=i[0],a=p(e,1);return w&&"blob"===n&&(a=new w([a])),{type:b[o],data:a}},t.decodeBase64Packet=function(e,t){var n=b[e.charAt(0)];if(!u)return{type:n,data:{base64:!0,data:e.substr(1)}};var r=u.decode(e.substr(1));return"blob"===t&&w&&(r=new w([r])),{type:n,data:r}},t.encodePayload=function(e,n,r){function o(e){return e.length+":"+e}function i(e,r){t.encodePacket(e,!!a&&n,!1,function(e){r(null,o(e))})}"function"==typeof n&&(r=n,n=null);var a=f(e);return n&&a?w&&!y?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r):e.length?void c(e,i,function(e,t){return r(t.join(""))}):r("0:")},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);"function"==typeof n&&(r=n,n=null);var o;if(""===e)return r(_,0,1);for(var i,a,s="",c=0,u=e.length;u>c;c++){var l=e.charAt(c);if(":"===l){if(""===s||s!=(i=+s))return r(_,0,1);if(a=e.substr(c+1,i),s!=a.length)return r(_,0,1);if(a.length){if(o=t.decodePacket(a,n,!1),_.type===o.type&&_.data===o.data)return r(_,0,1);if(!1===r(o,c+i,u))return}c+=i,s=""}else s+=l}return""!==s?r(_,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){function r(e,n){t.encodePacket(e,!0,!0,function(e){return n(null,e)})}if(!e.length)return n(new ArrayBuffer(0));c(e,r,function(e,t){var r=t.reduce(function(e,t){var n;return n="string"==typeof t?t.length:t.byteLength,e+(""+n).length+n+2},0),o=new Uint8Array(r),i=0;return t.forEach(function(e){var t="string"==typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),a=0;e.length>a;a++)r[a]=e.charCodeAt(a);n=r.buffer}o[i++]=t?0:1;for(var s=""+n.byteLength,a=0;s.length>a;a++)o[i++]=parseInt(s[a]);o[i++]=255;for(var r=new Uint8Array(n),a=0;r.length>a;a++)o[i++]=r[a]}),n(o.buffer)})},t.encodePayloadAsBlob=function(e,n){function r(e,n){t.encodePacket(e,!0,!0,function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var r=new Uint8Array(e.length),o=0;e.length>o;o++)r[o]=e.charCodeAt(o);e=r.buffer,t[0]=0}for(var i=e instanceof ArrayBuffer?e.byteLength:e.size,a=""+i,s=new Uint8Array(a.length+1),o=0;a.length>o;o++)s[o]=parseInt(a[o]);if(s[a.length]=255,w){var c=new w([t.buffer,s.buffer,e]);n(null,c)}})}c(e,r,function(e,t){return n(new w(t))})},t.decodePayloadAsBinary=function(e,n,r){"function"==typeof n&&(r=n,n=null);for(var o=e,i=[];o.byteLength>0;){for(var a=new Uint8Array(o),s=0===a[0],c="",u=1;255!==a[u];u++){if(c.length>310)return r(_,0,1);c+=a[u]}o=p(o,2+c.length),c=parseInt(c);var l=p(o,0,c);if(s)try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(e){var f=new Uint8Array(l);l="";for(var u=0;f.length>u;u++)l+=String.fromCharCode(f[u])}i.push(l),o=p(o,c)}var d=i.length;i.forEach(function(e,o){r(t.decodePacket(e,n,!0),o,d)})}}).call(t,n(1))},function(e,t,n){e.exports={default:n(167),__esModule:!0}},function(e,t,n){var r;!function(o){"use strict";function i(e,t,n){var r,o=document.createElement("img");return o.onerror=function(r){return i.onerror(o,r,e,t,n)},o.onload=function(r){return i.onload(o,r,e,t,n)},"string"==typeof e?(i.fetchBlob(e,function(t){t?(e=t,r=i.createObjectURL(e)):(r=e,n&&n.crossOrigin&&(o.crossOrigin=n.crossOrigin)),o.src=r},n),o):i.isInstanceOf("Blob",e)||i.isInstanceOf("File",e)?(r=o._objectURL=i.createObjectURL(e),r?(o.src=r,o):i.readFile(e,function(e){var n=e.target;n&&n.result?o.src=n.result:t&&t(e)})):void 0}function a(e,t){!e._objectURL||t&&t.noRevoke||(i.revokeObjectURL(e._objectURL),delete e._objectURL)}var s=window.createObjectURL&&window||window.URL&&URL.revokeObjectURL&&URL||window.webkitURL&&webkitURL;i.fetchBlob=function(e,t,n){t()},i.isInstanceOf=function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"},i.transform=function(e,t,n,r,o){n(e,o)},i.onerror=function(e,t,n,r,o){a(e,o),r&&r.call(e,t)},i.onload=function(e,t,n,r,o){a(e,o),r&&i.transform(e,o,r,n,{})},i.createObjectURL=function(e){return!!s&&s.createObjectURL(e)},i.revokeObjectURL=function(e){return!!s&&s.revokeObjectURL(e)},i.readFile=function(e,t,n){if(window.FileReader){var r=new FileReader;if(r.onload=r.onerror=t,n=n||"readAsDataURL",r[n])return r[n](e),r}return!1},void 0!==(r=function(){return i}.call(t,n,t,e))&&(e.exports=r)}(window)},function(e,t,n){var r=n(90),o=n(51);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(50);e.exports=function(e){return Object(r(e))}},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 o=n(109),i=r(o),a=n(292),s=r(a),c=n(291),u=r(c),l=n(290),f=r(l),p=n(108),d=r(p),h=n(110);r(h);t.createStore=i.default,t.combineReducers=s.default,t.bindActionCreators=u.default,t.applyMiddleware=f.default,t.compose=d.default},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(77),n(151),n(155)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.selectors=e.unboundActions=e.actions=e.store=void 0;var o=function(e){return e&&e.__esModule?e:{default:e}}(t),i=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}(r);e.store=o.default,e.actions=n.actions,e.unboundActions=n.unboundActions,e.selectors=i})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.connect=t.Provider=void 0;var o=n(285),i=r(o),a=n(286),s=r(a);t.Provider=i.default,t.connect=s.default},function(e,t,n){e.exports={default:n(169),__esModule:!0}},function(e,t,n){e.exports={default:n(170),__esModule:!0}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(180);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,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){"use strict";var r=n(200)(!0);n(86)(String,"String",function(e){this._t=e+"",this._i=0},function(){var e,t=this._t,n=this._i;return t.length>n?(e=r(t,n),this._i+=e.length,{value:e,done:!1}):{value:void 0,done:!0}})},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,o=n.length;o>r;r++){var i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(0),n(239)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(){return(0,n.h)("div",{className:o.default.loader},(0,n.h)("div",{className:o.default.inner},(0,n.h)("div",null),(0,n.h)("div",null),(0,n.h)("div",null)))},e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(299),n(75)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.canvasToBase64Images=e.toLossyImageDataUrl=e.cloneCanvas=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(t),o=e.cloneCanvas=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=document.createElement("canvas"),o=r.getContext("2d");return null===t&&(t=e.width),null===n&&(n=e.height),r.width=t,r.height=n,o.drawImage(e,0,0,t,n),r},i=function(e,t){var n=e.width,r=e.height,i=n/r,a=Math.min(t,e.height);return o(e,a*i,a)},a=function(e){return function(t,r){return(0,n.tick)(function(){return r(t.toDataURL(e))})}},s="image/"+(r.default?"webp":"jpeg"),c=e.toLossyImageDataUrl=a(s),u=a("image/png");e.canvasToBase64Images=function(e,t){if(e){var r=function(t){return(0,n.asyncFunc)(i,[e,200],function(e){return o(e,t)})},o=function(e,t){return c(e,function(e){return a(e,t)})},a=function(e,n){return t(e,n)};(0,n.tick)(function(){return u(e,r)})}}})},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(29),n(45),n(164),n(163)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fileToLossyBase64Image=e.isOfFileType=e.fileType=e.base64toBlob=e.fileToBase64=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(t),o=(e.fileToBase64=function(e,t,n){var r=new FileReader;r.readAsDataURL(e),r.onload=function(){t(r.result)},r.onerror=function(e){console.warn("File Reading Error: ",e),n(e)}},function(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(t.length),o=0;t.length>o;o++)r[o]=t.charCodeAt(o);return{integerArray:r,mimeString:n}}),i=(e.base64toBlob=function(e){var t=o(e);return new Blob([t.integerArray],{type:t.mimeString})},e.fileType=function(e){return e.type.split("/")[1]}),a=(e.isOfFileType=function(e,t){return e.some(function(e){return e===i(t)})},function(e,t,n){return(0,r.default)(e,function(e){"error"===e.type?n(e):t(e)},{maxWidth:960,maxHeight:960,orientation:!0})});e.fileToLossyBase64Image=function(e,t,r){return a(e,function(e){return(0,n.toLossyImageDataUrl)(e,t)},r)}})},function(e,t,n){e.exports={default:n(171),__esModule:!0}},function(e,t,n){var r,o;/*! +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Onfido=t():e.Onfido=t()}(this,function(){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=156)}([function(e,t,n){"use strict";function r(){}function o(e,t){var n,o,i,a,s=R;for(a=arguments.length;a-- >2;)N.push(arguments[a]);for(t&&null!=t.children&&(N.length||N.push(t.children),delete t.children);N.length;)if((o=N.pop())&&void 0!==o.pop)for(a=o.length;a--;)N.push(o[a]);else"boolean"==typeof o&&(o=null),(i="function"!=typeof e)&&(null==o?o="":"number"==typeof o?o+="":"string"!=typeof o&&(i=!1)),i&&n?s[s.length-1]+=o:s===R?s=[o]:s.push(o),n=i;var c=new r;return c.nodeName=e,c.children=s,c.attributes=null==t?void 0:t,c.key=null==t?void 0:t.key,void 0!==j.vnode&&j.vnode(c),c}function i(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t){return o(e.nodeName,i(i({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}function s(e){!e._dirty&&(e._dirty=!0)&&1==U.push(e)&&(j.debounceRendering||I)(c)}function c(){var e,t=U;for(U=[];e=t.pop();)e._dirty&&T(e)}function u(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&l(e,t.nodeName):n||e._componentConstructor===t.nodeName}function l(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function f(e){var t=i({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function p(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}function d(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,n,r,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),r&&r(e);else if("class"!==t||o)if("style"===t){if(r&&"string"!=typeof r&&"string"!=typeof n||(e.style.cssText=r||""),r&&"object"==typeof r){if("string"!=typeof n)for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"==typeof r[i]&&!1===L.test(i)?r[i]+"px":r[i]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,v,a):e.removeEventListener(t,v,a),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e)m(e,t,null==r?"":r),null!=r&&!1!==r||e.removeAttribute(t);else{var s=o&&t!==(t=t.replace(/^xlink\:?/,""));null==r||!1===r?s?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof r&&(s?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function m(e,t,n){try{e[t]=n}catch(e){}}function v(e){return this._listeners[e.type](j.event&&j.event(e)||e)}function y(){for(var e;e=F.pop();)j.afterMount&&j.afterMount(e),e.componentDidMount&&e.componentDidMount()}function g(e,t,n,r,o,i){B++||(W=null!=o&&void 0!==o.ownerSVGElement,q=null!=e&&!("__preactattr_"in e));var a=b(e,t,n,r,i);return o&&a.parentNode!==o&&o.appendChild(a),--B||(q=!1,i||y()),a}function b(e,t,n,r,o){var i=e,a=W;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||o)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),w(e,!0))),i.__preactattr_=!0,i;var s=t.nodeName;if("function"==typeof s)return P(e,t,n,r);if(W="svg"===s||"foreignObject"!==s&&W,s+="",(!e||!l(e,s))&&(i=p(s,W),e)){for(;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),w(e,!0)}var c=i.firstChild,u=i.__preactattr_,f=t.children;if(null==u){u=i.__preactattr_={};for(var d=i.attributes,h=d.length;h--;)u[d[h].name]=d[h].value}return!q&&f&&1===f.length&&"string"==typeof f[0]&&null!=c&&void 0!==c.splitText&&null==c.nextSibling?c.nodeValue!=f[0]&&(c.nodeValue=f[0]):(f&&f.length||null!=c)&&_(i,f,n,r,q||null!=u.dangerouslySetInnerHTML),x(i,t.attributes,u),W=a,i}function _(e,t,n,r,o){var i,a,s,c,l,f=e.childNodes,p=[],h={},m=0,v=0,y=f.length,g=0,_=t?t.length:0;if(0!==y)for(var k=0;y>k;k++){var x=f[k],C=x.__preactattr_,E=_&&C?x._component?x._component.__key:C.key:null;null!=E?(m++,h[E]=x):(C||(void 0!==x.splitText?!o||x.nodeValue.trim():o))&&(p[g++]=x)}if(0!==_)for(var k=0;_>k;k++){c=t[k],l=null;var E=c.key;if(null!=E)m&&void 0!==h[E]&&(l=h[E],h[E]=void 0,m--);else if(!l&&g>v)for(i=v;g>i;i++)if(void 0!==p[i]&&u(a=p[i],c,o)){l=a,p[i]=void 0,i===g-1&&g--,i===v&&v++;break}l=b(l,c,n,r),s=f[k],l&&l!==e&&l!==s&&(null==s?e.appendChild(l):l===s.nextSibling?d(s):e.insertBefore(l,s))}if(m)for(var k in h)void 0!==h[k]&&w(h[k],!1);for(;g>=v;)void 0!==(l=p[g--])&&w(l,!1)}function w(e,t){var n=e._component;n?A(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||d(e),k(e))}function k(e){for(e=e.lastChild;e;){var t=e.previousSibling;w(e,!0),e=t}}function x(e,t,n){var r;for(r in n)t&&null!=t[r]||null==n[r]||h(e,r,n[r],n[r]=void 0,W);for(r in t)"children"===r||"innerHTML"===r||r in n&&t[r]===("value"===r||"checked"===r?e[r]:n[r])||h(e,r,n[r],n[r]=t[r],W)}function C(e){var t=e.constructor.name;(H[t]||(H[t]=[])).push(e)}function E(e,t,n){var r,o=H[e.name];if(e.prototype&&e.prototype.render?(r=new e(t,n),D.call(r,t,n)):(r=new D(t,n),r.constructor=e,r.render=S),o)for(var i=o.length;i--;)if(o[i].constructor===e){r.nextBase=o[i].nextBase,o.splice(i,1);break}return r}function S(e,t,n){return this.constructor(e,n)}function O(e,t,n,r,o){e._disable||(e._disable=!0,(e.__ref=t.ref)&&delete t.ref,(e.__key=t.key)&&delete t.key,!e.base||o?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===j.syncComponentUpdates&&e.base?s(e):T(e,1,o)),e.__ref&&e.__ref(e))}function T(e,t,n,r){if(!e._disable){var o,a,s,c=e.props,u=e.state,l=e.context,p=e.prevProps||c,d=e.prevState||u,h=e.prevContext||l,m=e.base,v=e.nextBase,b=m||v,_=e._component,k=!1;if(m&&(e.props=p,e.state=d,e.context=h,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(c,u,l)?k=!0:e.componentWillUpdate&&e.componentWillUpdate(c,u,l),e.props=c,e.state=u,e.context=l),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!k){o=e.render(c,u,l),e.getChildContext&&(l=i(i({},l),e.getChildContext()));var x,C,S=o&&o.nodeName;if("function"==typeof S){var P=f(o);a=_,a&&a.constructor===S&&P.key==a.__key?O(a,P,1,l,!1):(x=a,e._component=a=E(S,P,l),a.nextBase=a.nextBase||v,a._parentComponent=e,O(a,P,0,l,!1),T(a,1,n,!0)),C=a.base}else s=b,x=_,x&&(s=e._component=null),(b||1===t)&&(s&&(s._component=null),C=g(s,o,l,n||!m,b&&b.parentNode,!0));if(b&&C!==b&&a!==_){var D=b.parentNode;D&&C!==D&&(D.replaceChild(C,b),x||(b._component=null,w(b,!1)))}if(x&&A(x),e.base=C,C&&!r){for(var M=e,N=e;N=N._parentComponent;)(M=N).base=C;C._component=M,C._componentConstructor=M.constructor}}if(!m||n?F.unshift(e):k||(e.componentDidUpdate&&e.componentDidUpdate(p,d,h),j.afterUpdate&&j.afterUpdate(e)),null!=e._renderCallbacks)for(;e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);B||r||y()}}function P(e,t,n,r){for(var o=e&&e._component,i=o,a=e,s=o&&e._componentConstructor===t.nodeName,c=s,u=f(t);o&&!c&&(o=o._parentComponent);)c=o.constructor===t.nodeName;return o&&c&&(!r||o._component)?(O(o,u,3,n,r),e=o.base):(i&&!s&&(A(i),e=a=null),o=E(t.nodeName,u,n),e&&!o.nextBase&&(o.nextBase=e,a=null),O(o,u,1,n,r),e=o.base,a&&e!==a&&(a._component=null,w(a,!1))),e}function A(e){j.beforeUnmount&&j.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?A(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.nextBase=t,d(t),C(e),k(t)),e.__ref&&e.__ref(null)}function D(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{}}function M(e,t,n){return g(n,e,{},!1,t,!1)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"h",function(){return o}),n.d(t,"createElement",function(){return o}),n.d(t,"cloneElement",function(){return a}),n.d(t,"Component",function(){return D}),n.d(t,"render",function(){return M}),n.d(t,"rerender",function(){return c}),n.d(t,"options",function(){return j});var j={},N=[],R=[],I="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,L=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,U=[],F=[],B=0,W=!1,q=!1,H={};i(D.prototype,{setState:function(e,t){var n=this.state;this.prevState||(this.prevState=i({},n)),i(n,"function"==typeof e?e(n,this.props):e),t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),s(this)},forceUpdate:function(e){e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),T(this,2)},render:function(){}}),t.default={h:o,createElement:o,cloneElement:a,Component:D,render:M,rerender:c,options:j}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n=e.exports={version:"2.5.1"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(5),n(8),n(28),n(7),n(4),n(70),n(69),n(6),n(47),n(0),n(276),n(74),n(267),n(296)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u,l,f,p,d,h){"use strict";function m(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?(0,w.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return(0,x.default)(e)}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(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 _(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=(0,E.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(C.default?(0,C.default)(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var w=m(n),k=m(r),x=m(o),C=m(i),E=m(a),S=m(s),O=m(c),T=m(u),P=m(l),A=m(p),D=m(h),M=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,w.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),j=k.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N="function"==typeof O.default&&"symbol"==typeof S.default?function(e){return typeof e}:function(e){return e&&"function"==typeof O.default&&e.constructor===O.default&&e!==O.default.prototype?"symbol":typeof e},R=A.default.config("https://6e3dc0335efc49889187ec90288a84fd@sentry.io/109946"),I=new window.WoopraTracker("onfidojssdkwoopra"),L=function(){I.init(),I.config({domain:"onfido-js-sdk.com",cookie_name:"onfido-js-sdk-woopra",cookie_domain:location.hostname,referer:location.href});var e=window.location.hostname;I.identify(e.match(/^(id|id-dev)\.onfido\.com$/)?{sdk_version:"2.0.0"}:{sdk_version:"2.0.0",client:e}),A.default.TraceKit.collectWindowErrors=!0},U=function(){I.track(),R.install()},F=function(e){return e?(0,D.default)(e,function(e){return"object"===(void 0===e?"undefined":N(e))?(0,P.default)(e):e}):null},B=function(e,t){return I.track(e,F(t))},W=function(e){return"screen_"+(0,d.cleanFalsy)(e).join("_")},q=function(e,t){return B(W(e),t)},H=function(e,t){return function(n){function r(){var n,o,i,a;g(this,r);for(var s=arguments.length,c=Array(s),u=0;s>u;u++)c[u]=arguments[u];return o=i=b(this,(n=r.__proto__||(0,T.default)(r)).call.apply(n,[this].concat(c))),i.trackScreen=function(e){for(var n,r=arguments.length,o=Array(r>1?r-1:0),a=1;r>a;a++)o[a-1]=arguments[a];return(n=i.props).trackScreen.apply(n,[[].concat(y((0,d.wrapArray)(t)),y((0,d.wrapArray)(e)))].concat(o))},i.render=function(){return(0,f.h)(e,j({},i.props,{trackScreen:i.trackScreen}))},a=o,b(i,a)}return _(r,n),r}(f.Component)},V=function(e,t){return function(n){function r(){var t,n,o,i;g(this,r);for(var a=arguments.length,s=Array(a),c=0;a>c;c++)s[c]=arguments[c];return n=o=b(this,(t=r.__proto__||(0,T.default)(r)).call.apply(t,[this].concat(s))),o.render=function(){return(0,f.h)(e,o.props)},i=n,b(o,i)}return _(r,n),M(r,[{key:"componentDidMount",value:function(){this.props.trackScreen(t)}}]),r}(f.Component)},z=function(e,t){return function(n){function r(){var t,n,o,i;g(this,r);for(var a=arguments.length,s=Array(a),c=0;a>c;c++)s[c]=arguments[c];return n=o=b(this,(t=r.__proto__||(0,T.default)(r)).call.apply(t,[this].concat(s))),o.render=function(){return(0,f.h)(e,o.props)},i=n,b(o,i)}return _(r,n),M(r,[{key:"componentDidMount",value:function(){this.trackScreen(this.props)}},{key:"trackScreen",value:function(e){var n,r=e[t],o=r?[t,v({},t,r)]:[];(n=this.props).trackScreen.apply(n,o)}},{key:"componentWillReceiveProps",value:function(e){this.props[t]!==e[t]&&this.trackScreen(e)}}]),r}(f.Component)},K=function(e,t,n){return H(z(e,n),t)};t.default={setUp:L,track:U,sendError:function(e,t){R.captureException(Error(e),{extra:t})},sendEvent:B,sendScreen:q,trackComponent:V,trackComponentAndMode:K,appendToTracking:H,setWoopraCookie:function(e){var t=I.config("cookie_name"),n=I.config("cookie_expire"),r=I.config("cookie_path"),o=I.config("cookie_domain");I.docCookies.setItem(t,e,n,r,o),I.cookie=e},getWoopraCookie:function(){return I.cookie}},e.exports=t.default})},function(e,t,n){e.exports={default:n(173),__esModule:!0}},function(e,t,n){e.exports={default:n(174),__esModule:!0}},function(e,t,n){e.exports={default:n(176),__esModule:!0}},function(e,t,n){e.exports={default:n(177),__esModule:!0}},function(e,t,n){e.exports={default:n(172),__esModule:!0}},function(e,t){e.exports={step:"onfido-sdk-ui-Theme-step",title:"onfido-sdk-ui-Theme-title","mbottom-large":"onfido-sdk-ui-Theme-mbottom-large",btn:"onfido-sdk-ui-Theme-btn","btn-centered":"onfido-sdk-ui-Theme-btn-centered","btn-primary":"onfido-sdk-ui-Theme-btn-primary","btn-alternative":"onfido-sdk-ui-Theme-btn-alternative",center:"onfido-sdk-ui-Theme-center","overlay-shape":"onfido-sdk-ui-Theme-overlay-shape",overlay:"onfido-sdk-ui-Theme-overlay",icon:"onfido-sdk-ui-Theme-icon",actions:"onfido-sdk-ui-Theme-actions",help:"onfido-sdk-ui-Theme-help",header:"onfido-sdk-ui-Theme-header",helpList:"onfido-sdk-ui-Theme-helpList"}},function(e,t,n){var r=n(58)("wks"),o=n(41),i=n(15).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(15),o=n(2),i=n(40),a=n(24),s=function(e,t,n){var c,u,l,f=e&s.F,p=e&s.G,d=e&s.S,h=e&s.P,m=e&s.B,v=e&s.W,y=p?o:o[t]||(o[t]={}),g=y.prototype,b=p?r:d?r[t]:(r[t]||{}).prototype;p&&(n=t);for(c in n)(u=!f&&b&&void 0!==b[c])&&c in y||(l=u?b[c]:n[c],y[c]=p&&"function"!=typeof b[c]?n[c]:m&&u?i(l,r):v&&b[c]==l?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(l):h&&"function"==typeof l?i(Function.call,l):l,h&&((y.virtual||(y.virtual={}))[c]=l,e&s.R&&g&&!g[c]&&a(g,c,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(38),n(37),n(268),n(0),n(228)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.humanizeField=e.checkIfHasWebcam=e.isDesktop=e.preventDefaultOnClick=e.wrapWithClass=e.getCSSMilisecsValue=e.getCSSValue=e.functionalSwitch=void 0;var s=a(t),c=a(n),u=a(r),l=a(i),f=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=(0,c.default)(e);!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,s.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=(e.functionalSwitch=function(e,t){return(t[e]||function(){return null})()},e.getCSSValue=function(e,t){var n=(0,u.default)(t),r=f(n,2),o=r[0],i=r[1];return i!==e&&console.warn("The css @value: "+t+" unit is "+i+" but it should be "+e),o}),d=(e.getCSSMilisecsValue=function(e){return p("ms",e)},e.wrapWithClass=function(e,t){return(0,o.h)("div",{className:e},t)},e.preventDefaultOnClick=function(e){return function(t){t.preventDefault(),e()}},e.isDesktop=!/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i.test(navigator.userAgent||""),function(e,t){try{(0,l.default)().then(e).catch(t)}catch(e){t(e)}});e.checkIfHasWebcam=function(e){d(function(t){return e(t.some(function(e){return"videoinput"===e.kind}))},function(){return e(!1)})},e.humanizeField=function(e){return e.substr(0,1).toUpperCase()+e.substr(1).split("_").join(" ")}})},function(e,t,n){"use strict";function r(){return null}function o(e){var t=e.nodeName,n=e.attributes;e.attributes={},t.defaultProps&&w(e.attributes,t.defaultProps),n&&w(e.attributes,n)}function i(e,t){var n,r,o;if(t){for(o in t)if(n=z.test(o))break;if(n){r=e.attributes={};for(o in t)t.hasOwnProperty(o)&&(r[z.test(o)?o.replace(/([A-Z0-9])/,"-$1").toLowerCase():o]=t[o])}}}function a(e,t,r){var o=t&&t._preactCompatRendered&&t._preactCompatRendered.base;o&&o.parentNode!==t&&(o=null),o||(o=t.children[0]);for(var i=t.childNodes.length;i--;)t.childNodes[i]!==o&&t.removeChild(t.childNodes[i]);var a=n.i(F.render)(e,t,o);return t&&(t._preactCompatRendered=a&&(a._component||{base:a})),"function"==typeof r&&r(),a&&a._component||a}function s(e,t,r,o){var i=n.i(F.h)(Y,{context:e.context},t),s=a(i,r);return o&&o(s),s._component||s.base}function c(e){var t=e._preactCompatRendered&&e._preactCompatRendered.base;return!(!t||t.parentNode!==e)&&(n.i(F.render)(n.i(F.h)(r),e,t),!0)}function u(e){return h.bind(null,e)}function l(e,t){for(var n=t||0;e.length>n;n++){var r=e[n];Array.isArray(r)?l(r):r&&"object"==typeof r&&!y(r)&&(r.props&&r.type||r.attributes&&r.nodeName||r.children)&&(e[n]=h(r.type||r.nodeName,r.props||r.attributes,r.children))}}function f(e){return"function"==typeof e&&!(e.prototype&&e.prototype.render)}function p(e){return E({displayName:e.displayName||e.name,render:function(){return e(this.props,this.context)}})}function d(e){var t=e[H];return t?!0===t?e:t:(t=p(e),Object.defineProperty(t,H,{configurable:!0,value:!0}),t.displayName=e.displayName,t.propTypes=e.propTypes,t.defaultProps=e.defaultProps,Object.defineProperty(e,H,{configurable:!0,value:t}),t)}function h(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return l(e,2),m(F.h.apply(void 0,e))}function m(e){e.preactCompatNormalized=!0,_(e),f(e.nodeName)&&(e.nodeName=d(e.nodeName));var t=e.attributes.ref,n=t&&typeof t;return!Q||"string"!==n&&"number"!==n||(e.attributes.ref=g(t,Q)),b(e),e}function v(e,t){for(var r=[],o=arguments.length-2;o-- >0;)r[o]=arguments[o+2];if(!y(e))return e;var i=e.attributes||e.props,a=n.i(F.h)(e.nodeName||e.type,i,e.children||i&&i.children),s=[a,t];return r&&r.length?s.push(r):t&&t.children&&s.push(t.children),m(F.cloneElement.apply(void 0,s))}function y(e){return e&&(e instanceof X||e.$$typeof===q)}function g(e,t){return t._refProxies[e]||(t._refProxies[e]=function(n){t&&t.refs&&(t.refs[e]=n,null===n&&(delete t._refProxies[e],t=null))})}function b(e){var t=e.nodeName,n=e.attributes;if(n&&"string"==typeof t){var r={};for(var o in n)r[o.toLowerCase()]=o;if(r.ondoubleclick&&(n.ondblclick=n[r.ondoubleclick],delete n[r.ondoubleclick]),r.onchange&&("textarea"===t||"input"===t.toLowerCase()&&!/^fil|che|rad/i.test(n.type))){var i=r.oninput||"oninput";n[i]||(n[i]=A([n[i],n[r.onchange]]),delete n[r.onchange])}}}function _(e){var t=e.attributes;if(t){var n=t.className||t.class;n&&(t.className=n)}}function w(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function k(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}function x(e){return e&&e.base||e}function C(){}function E(e){function t(e,t){T(this),R.call(this,e,t,K),D.call(this,e,t)}return e=w({constructor:t},e),e.mixins&&O(e,S(e.mixins)),e.statics&&w(t,e.statics),e.propTypes&&(t.propTypes=e.propTypes),e.defaultProps&&(t.defaultProps=e.defaultProps),e.getDefaultProps&&(t.defaultProps=e.getDefaultProps()),C.prototype=R.prototype,t.prototype=w(new C,e),t.displayName=e.displayName||"Component",t}function S(e){for(var t={},n=0;e.length>n;n++){var r=e[n];for(var o in r)r.hasOwnProperty(o)&&"function"==typeof r[o]&&(t[o]||(t[o]=[])).push(r[o])}return t}function O(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=A(t[n].concat(e[n]||Z),"getDefaultProps"===n||"getInitialState"===n||"getChildContext"===n))}function T(e){for(var t in e){var n=e[t];"function"!=typeof n||n.__bound||V.hasOwnProperty(t)||((e[t]=n.bind(e)).__bound=!0)}}function P(e,t,n){if("string"==typeof t&&(t=e.constructor.prototype[t]),"function"==typeof t)return t.apply(e,n)}function A(e,t){return function(){for(var n,r=arguments,o=this,i=0;e.length>i;i++){var a=P(o,e[i],r);if(t&&null!=a){n||(n={});for(var s in a)a.hasOwnProperty(s)&&(n[s]=a[s])}else void 0!==a&&(n=a)}return n}}function D(e,t){M.call(this,e,t),this.componentWillReceiveProps=A([M,this.componentWillReceiveProps||"componentWillReceiveProps"]),this.render=A([M,j,this.render||"render",N])}function M(e,t){if(e){var n=e.children;if(n&&Array.isArray(n)&&1===n.length&&(e.children=n[0])&&"object"==typeof e.children&&(e.children.length=1,e.children[0]=e.children),G){var r="function"==typeof this?this:this.constructor,o=this.propTypes||r.propTypes,i=this.displayName||r.name;o&&U.a.checkPropTypes(o,e,"prop",i)}}}function j(e){Q=this}function N(){Q===this&&(Q=null)}function R(e,t,n){F.Component.call(this,e,t),this.state=this.getInitialState?this.getInitialState():{},this.refs={},this._refProxies={},n!==K&&D.call(this,e,t)}function I(e,t){R.call(this,e,t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"version",function(){return B}),n.d(t,"DOM",function(){return te}),n.d(t,"Children",function(){return ee}),n.d(t,"render",function(){return a}),n.d(t,"createClass",function(){return E}),n.d(t,"createFactory",function(){return u}),n.d(t,"createElement",function(){return h}),n.d(t,"cloneElement",function(){return v}),n.d(t,"isValidElement",function(){return y}),n.d(t,"findDOMNode",function(){return x}),n.d(t,"unmountComponentAtNode",function(){return c}),n.d(t,"Component",function(){return R}),n.d(t,"PureComponent",function(){return I}),n.d(t,"unstable_renderSubtreeIntoContainer",function(){return s});var L=n(271),U=n.n(L),F=n(0);n.d(t,"PropTypes",function(){return U.a});var B="15.1.0",W="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "),q="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,H="undefined"!=typeof Symbol?Symbol.for("__preactCompatWrapper"):"__preactCompatWrapper",V={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},z=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vert|word|writing|x)[A-Z]/,K={},G="undefined"==typeof process||!process.env||!1,X=n.i(F.h)("a",null).constructor;X.prototype.$$typeof=q,X.prototype.preactCompatUpgraded=!1,X.prototype.preactCompatNormalized=!1,Object.defineProperty(X.prototype,"type",{get:function(){return this.nodeName},set:function(e){this.nodeName=e},configurable:!0}),Object.defineProperty(X.prototype,"props",{get:function(){return this.attributes},set:function(e){this.attributes=e},configurable:!0});var $=F.options.event;F.options.event=function(e){return $&&(e=$(e)),e.persist=Object,e.nativeEvent=e,e};var J=F.options.vnode;F.options.vnode=function(e){if(!e.preactCompatUpgraded){e.preactCompatUpgraded=!0;var t=e.nodeName,n=e.attributes=w({},e.attributes);"function"==typeof t?(!0===t[H]||t.prototype&&"isReactComponent"in t.prototype)&&(e.children&&e.children+""==""&&(e.children=void 0),e.children&&(n.children=e.children),e.preactCompatNormalized||m(e),o(e)):(e.children&&e.children+""==""&&(e.children=void 0),e.children&&(n.children=e.children),n.defaultValue&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),i(e,n))}J&&J(e)};var Y=function(){};Y.prototype.getChildContext=function(){return this.props.context},Y.prototype.render=function(e){return e.children[0]};for(var Q,Z=[],ee={map:function(e,t,n){return null==e?null:(e=ee.toArray(e),n&&n!==e&&(t=t.bind(n)),e.map(t))},forEach:function(e,t,n){if(null==e)return null;e=ee.toArray(e),n&&n!==e&&(t=t.bind(n)),e.forEach(t)},count:function(e){return e&&e.length||0},only:function(e){if(e=ee.toArray(e),1!==e.length)throw Error("Children.only() expects only one child.");return e[0]},toArray:function(e){return null==e?[]:Array.isArray&&Array.isArray(e)?e:Z.concat(e)}},te={},ne=W.length;ne--;)te[W[ne]]=u(W[ne]);w(R.prototype=new F.Component,{constructor:R,isReactComponent:{},replaceState:function(e,t){var n=this;this.setState(e,t);for(var r in n.state)r in e||delete n.state[r]},getDOMNode:function(){return this.base},isMounted:function(){return!!this.base}}),C.prototype=R.prototype,I.prototype=new C,I.prototype.isPureReactComponent=!0,I.prototype.shouldComponentUpdate=function(e,t){return k(this.props,e)||k(this.state,t)},t.default={version:B,DOM:te,PropTypes:U.a,Children:ee,render:a,createClass:E,createFactory:u,createElement:h,cloneElement:v,isValidElement:y,findDOMNode:x,unmountComponentAtNode:c,Component:R,PureComponent:I,unstable_renderSubtreeIntoContainer:s}},function(e,t,n){function r(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,r)}}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function s(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}t=e.exports=n(219),t.log=i,t.formatArgs=o,t.save=a,t.load=s,t.useColors=r,t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(s())},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(17),o=n(84),i=n(61),a=Object.defineProperty;t.f=n(18)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(25);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(19)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(52),o=n(50);e.exports=function(e){return r(o(e))}},function(e,t,n){var r,o,i;!function(n,a){o=[t],r=a,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.SET_DOCUMENT_TYPE="SET_DOCUMENT_TYPE",e.SET_ROOM_ID="SET_ROOM_ID",e.SET_SOCKET="SET_SOCKET",e.SET_CLIENT_SUCCESS="SET_CLIENT_SUCCESS",e.CAPTURE_CREATE="CAPTURE_CREATE",e.CAPTURE_VALIDATE="CAPTURE_VALIDATE",e.CAPTURE_DELETE="CAPTURE_DELETE",e.RESET_STORE="RESET_STORE"})},function(e,t,n){function r(e){if(e)return o(e)}function o(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,o=0;n.length>o;o++)if((r=n[o])===t||r.fn===t){n.splice(o,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n){n=n.slice(0);for(var r=0,o=n.length;o>r;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){var r=n(16),o=n(32);e.exports=n(18)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports={}},function(e,t,n){(function(e){function r(e,n){return n("b"+t.packets[e.type]+e.data.data)}function o(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=e.data,i=new Uint8Array(o),a=new Uint8Array(1+o.byteLength);a[0]=g[e.type];for(var s=0;i.length>s;s++)a[s+1]=i[s];return r(a.buffer)}function i(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=new FileReader;return o.onload=function(){e.data=o.result,t.encodePacket(e,n,!0,r)},o.readAsArrayBuffer(e.data)}function a(e,n,r){if(!n)return t.encodeBase64Packet(e,r);if(y)return i(e,n,r);var o=new Uint8Array(1);return o[0]=g[e.type],r(new w([o.buffer,e.data]))}function s(e){try{e=h.decode(e,{strict:!1})}catch(e){return!1}return e}function c(e,t,n){for(var r=Array(e.length),o=d(e.length,n),i=0;e.length>i;i++)!function(e,n,o){t(n,function(t,n){r[e]=n,o(t,r)})}(i,e[i],o)}var u,l=n(226),f=n(96),p=n(122),d=n(121),h=n(227);e&&e.ArrayBuffer&&(u=n(161));var m="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),v="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),y=m||v;t.protocol=3;var g=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},b=l(g),_={type:"error",data:"parser error"},w=n(162);t.encodePacket=function(t,n,i,s){"function"==typeof n&&(s=n,n=!1),"function"==typeof i&&(s=i,i=null);var c=void 0===t.data?void 0:t.data.buffer||t.data;if(e.ArrayBuffer&&c instanceof ArrayBuffer)return o(t,n,s);if(w&&c instanceof e.Blob)return a(t,n,s);if(c&&c.base64)return r(t,s);var u=g[t.type];return void 0!==t.data&&(u+=i?h.encode(t.data+"",{strict:!1}):t.data+""),s(""+u)},t.encodeBase64Packet=function(n,r){var o="b"+t.packets[n.type];if(w&&n.data instanceof e.Blob){var i=new FileReader;return i.onload=function(){var e=i.result.split(",")[1];r(o+e)},i.readAsDataURL(n.data)}var a;try{a=String.fromCharCode.apply(null,new Uint8Array(n.data))}catch(e){for(var s=new Uint8Array(n.data),c=Array(s.length),u=0;s.length>u;u++)c[u]=s[u];a=String.fromCharCode.apply(null,c)}return o+=e.btoa(a),r(o)},t.decodePacket=function(e,n,r){if(void 0===e)return _;if("string"==typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(r&&!1===(e=s(e)))return _;var o=e.charAt(0);return+o==o&&b[o]?e.length>1?{type:b[o],data:e.substring(1)}:{type:b[o]}:_}var i=new Uint8Array(e),o=i[0],a=p(e,1);return w&&"blob"===n&&(a=new w([a])),{type:b[o],data:a}},t.decodeBase64Packet=function(e,t){var n=b[e.charAt(0)];if(!u)return{type:n,data:{base64:!0,data:e.substr(1)}};var r=u.decode(e.substr(1));return"blob"===t&&w&&(r=new w([r])),{type:n,data:r}},t.encodePayload=function(e,n,r){function o(e){return e.length+":"+e}function i(e,r){t.encodePacket(e,!!a&&n,!1,function(e){r(null,o(e))})}"function"==typeof n&&(r=n,n=null);var a=f(e);return n&&a?w&&!y?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r):e.length?void c(e,i,function(e,t){return r(t.join(""))}):r("0:")},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);"function"==typeof n&&(r=n,n=null);var o;if(""===e)return r(_,0,1);for(var i,a,s="",c=0,u=e.length;u>c;c++){var l=e.charAt(c);if(":"===l){if(""===s||s!=(i=+s))return r(_,0,1);if(a=e.substr(c+1,i),s!=a.length)return r(_,0,1);if(a.length){if(o=t.decodePacket(a,n,!1),_.type===o.type&&_.data===o.data)return r(_,0,1);if(!1===r(o,c+i,u))return}c+=i,s=""}else s+=l}return""!==s?r(_,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){function r(e,n){t.encodePacket(e,!0,!0,function(e){return n(null,e)})}if(!e.length)return n(new ArrayBuffer(0));c(e,r,function(e,t){var r=t.reduce(function(e,t){var n;return n="string"==typeof t?t.length:t.byteLength,e+(""+n).length+n+2},0),o=new Uint8Array(r),i=0;return t.forEach(function(e){var t="string"==typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),a=0;e.length>a;a++)r[a]=e.charCodeAt(a);n=r.buffer}o[i++]=t?0:1;for(var s=""+n.byteLength,a=0;s.length>a;a++)o[i++]=parseInt(s[a]);o[i++]=255;for(var r=new Uint8Array(n),a=0;r.length>a;a++)o[i++]=r[a]}),n(o.buffer)})},t.encodePayloadAsBlob=function(e,n){function r(e,n){t.encodePacket(e,!0,!0,function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var r=new Uint8Array(e.length),o=0;e.length>o;o++)r[o]=e.charCodeAt(o);e=r.buffer,t[0]=0}for(var i=e instanceof ArrayBuffer?e.byteLength:e.size,a=""+i,s=new Uint8Array(a.length+1),o=0;a.length>o;o++)s[o]=parseInt(a[o]);if(s[a.length]=255,w){var c=new w([t.buffer,s.buffer,e]);n(null,c)}})}c(e,r,function(e,t){return n(new w(t))})},t.decodePayloadAsBinary=function(e,n,r){"function"==typeof n&&(r=n,n=null);for(var o=e,i=[];o.byteLength>0;){for(var a=new Uint8Array(o),s=0===a[0],c="",u=1;255!==a[u];u++){if(c.length>310)return r(_,0,1);c+=a[u]}o=p(o,2+c.length),c=parseInt(c);var l=p(o,0,c);if(s)try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(e){var f=new Uint8Array(l);l="";for(var u=0;f.length>u;u++)l+=String.fromCharCode(f[u])}i.push(l),o=p(o,c)}var d=i.length;i.forEach(function(e,o){r(t.decodePacket(e,n,!0),o,d)})}}).call(t,n(1))},function(e,t,n){e.exports={default:n(167),__esModule:!0}},function(e,t,n){var r;!function(o){"use strict";function i(e,t,n){var r,o=document.createElement("img");return o.onerror=function(r){return i.onerror(o,r,e,t,n)},o.onload=function(r){return i.onload(o,r,e,t,n)},"string"==typeof e?(i.fetchBlob(e,function(t){t?(e=t,r=i.createObjectURL(e)):(r=e,n&&n.crossOrigin&&(o.crossOrigin=n.crossOrigin)),o.src=r},n),o):i.isInstanceOf("Blob",e)||i.isInstanceOf("File",e)?(r=o._objectURL=i.createObjectURL(e),r?(o.src=r,o):i.readFile(e,function(e){var n=e.target;n&&n.result?o.src=n.result:t&&t(e)})):void 0}function a(e,t){!e._objectURL||t&&t.noRevoke||(i.revokeObjectURL(e._objectURL),delete e._objectURL)}var s=window.createObjectURL&&window||window.URL&&URL.revokeObjectURL&&URL||window.webkitURL&&webkitURL;i.fetchBlob=function(e,t,n){t()},i.isInstanceOf=function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"},i.transform=function(e,t,n,r,o){n(e,o)},i.onerror=function(e,t,n,r,o){a(e,o),r&&r.call(e,t)},i.onload=function(e,t,n,r,o){a(e,o),r&&i.transform(e,o,r,n,{})},i.createObjectURL=function(e){return!!s&&s.createObjectURL(e)},i.revokeObjectURL=function(e){return!!s&&s.revokeObjectURL(e)},i.readFile=function(e,t,n){if(window.FileReader){var r=new FileReader;if(r.onload=r.onerror=t,n=n||"readAsDataURL",r[n])return r[n](e),r}return!1},void 0!==(r=function(){return i}.call(t,n,t,e))&&(e.exports=r)}(window)},function(e,t,n){var r=n(90),o=n(51);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(50);e.exports=function(e){return Object(r(e))}},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 o=n(109),i=r(o),a=n(292),s=r(a),c=n(291),u=r(c),l=n(290),f=r(l),p=n(108),d=r(p),h=n(110);r(h);t.createStore=i.default,t.combineReducers=s.default,t.bindActionCreators=u.default,t.applyMiddleware=f.default,t.compose=d.default},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(77),n(151),n(155)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.selectors=e.unboundActions=e.actions=e.store=void 0;var o=function(e){return e&&e.__esModule?e:{default:e}}(t),i=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}(r);e.store=o.default,e.actions=n.actions,e.unboundActions=n.unboundActions,e.selectors=i})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.connect=t.Provider=void 0;var o=n(285),i=r(o),a=n(286),s=r(a);t.Provider=i.default,t.connect=s.default},function(e,t,n){e.exports={default:n(169),__esModule:!0}},function(e,t,n){e.exports={default:n(170),__esModule:!0}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(180);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,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){"use strict";var r=n(200)(!0);n(86)(String,"String",function(e){this._t=e+"",this._i=0},function(){var e,t=this._t,n=this._i;return t.length>n?(e=r(t,n),this._i+=e.length,{value:e,done:!1}):{value:void 0,done:!0}})},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,o=n.length;o>r;r++){var i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(0),n(239)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(){return(0,n.h)("div",{className:o.default.loader},(0,n.h)("div",{className:o.default.inner},(0,n.h)("div",null),(0,n.h)("div",null),(0,n.h)("div",null)))},e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(299),n(75)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.canvasToBase64Images=e.toLossyImageDataUrl=e.cloneCanvas=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(t),o=e.cloneCanvas=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=document.createElement("canvas"),o=r.getContext("2d");return null===t&&(t=e.width),null===n&&(n=e.height),r.width=t,r.height=n,o.drawImage(e,0,0,t,n),r},i=function(e,t){var n=e.width,r=e.height,i=n/r,a=Math.min(t,e.height);return o(e,a*i,a)},a=function(e){return function(t,r){return(0,n.tick)(function(){return r(t.toDataURL(e))})}},s="image/"+(r.default?"webp":"jpeg"),c=e.toLossyImageDataUrl=a(s),u=a("image/png");e.canvasToBase64Images=function(e,t){if(e){var r=function(t){return(0,n.asyncFunc)(i,[e,200],function(e){return o(e,t)})},o=function(e,t){return c(e,function(e){return a(e,t)})},a=function(e,n){return t(e,n)};(0,n.tick)(function(){return u(e,r)})}}})},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(29),n(45),n(164),n(163)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fileToLossyBase64Image=e.isOfFileType=e.fileType=e.base64toBlob=e.fileToBase64=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(t),o=(e.fileToBase64=function(e,t,n){var r=new FileReader;r.readAsDataURL(e),r.onload=function(){t(r.result)},r.onerror=function(e){console.warn("File Reading Error: ",e),n(e)}},function(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(t.length),o=0;t.length>o;o++)r[o]=t.charCodeAt(o);return{integerArray:r,mimeString:n}}),i=(e.base64toBlob=function(e){var t=o(e);return new Blob([t.integerArray],{type:t.mimeString})},e.fileType=function(e){return e.type.split("/")[1]}),a=(e.isOfFileType=function(e,t){return e.some(function(e){return e===i(t)})},function(e,t,n){return(0,r.default)(e,function(e){"error"===e.type?n(e):t(e)},{maxWidth:960,maxHeight:960,orientation:!0})});e.fileToLossyBase64Image=function(e,t,r){return a(e,function(e){return(0,n.toLossyImageDataUrl)(e,t)},r)}})},function(e,t,n){e.exports={default:n(171),__esModule:!0}},function(e,t,n){var r,o;/*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames @@ -14,7 +14,7 @@ * * http://api.jqueryui.com/category/ui-core/ */ -function r(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&i(e)}function o(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||"none"===e.style.display}function i(e){for(;e&&e!==document.body;){if(o(e))return!1;e=e.parentNode}return!0}function a(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&r(e,!n)}function s(e){return[].slice.call(e.querySelectorAll("*"),0).filter(function(e){return a(e)})}e.exports=s},function(e,t,n){"use strict";t.__esModule=!0;var r=n(13);t.default=r.PropTypes.shape({subscribe:r.PropTypes.func.isRequired,dispatch:r.PropTypes.func.isRequired,getState:r.PropTypes.func.isRequired})},function(e,t,n){"use strict";function r(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw Error(e)}catch(e){}}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];if(0===t.length)return function(e){return e};var r=function(){var e=t[t.length-1],n=t.slice(0,-1);return{v:function(){return n.reduceRight(function(e,t){return t(e)},e.apply(void 0,arguments))}}}();return"object"==typeof r?r.v:void 0}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){function r(){y===v&&(y=v.slice())}function i(){return m}function s(e){if("function"!=typeof e)throw Error("Expected listener to be a function.");var t=!0;return r(),y.push(e),function(){if(t){t=!1,r();var n=y.indexOf(e);y.splice(n,1)}}}function l(e){if(!(0,a.default)(e))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(g)throw Error("Reducers may not dispatch actions.");try{g=!0,m=h(m,e)}finally{g=!1}for(var t=v=y,n=0;t.length>n;n++)t[n]();return e}function f(e){if("function"!=typeof e)throw Error("Expected the nextReducer to be a function.");h=e,l({type:u.INIT})}function p(){var e,t=s;return e={subscribe:function(e){function n(){e.next&&e.next(i())}if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");return n(),{unsubscribe:t(n)}}},e[c.default]=function(){return this},e}var d;if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw Error("Expected the enhancer to be a function.");return n(o)(e,t)}if("function"!=typeof e)throw Error("Expected the reducer to be a function.");var h=e,m=t,v=[],y=v,g=!1;return l({type:u.INIT}),d={dispatch:l,subscribe:s,getState:i,replaceReducer:f},d[c.default]=p,d}t.__esModule=!0,t.ActionTypes=void 0,t.default=o;var i=n(67),a=r(i),s=n(300),c=r(s),u=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t,n){"use strict";function r(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw Error(e)}catch(e){}}t.__esModule=!0,t.default=r},function(e,t,n){function r(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r=o(e),i=r.source,u=r.id,l=r.path,f=c[u]&&l in c[u].nsps,p=t.forceNew||t["force new connection"]||!1===t.multiplex||f;return p?(s("ignoring socket cache for %s",i),n=a(i,t)):(c[u]||(s("new io instance for %s",i),c[u]=a(i,t)),n=c[u]),r.query&&!t.query&&(t.query=r.query),n.socket(r.path,t)}var o=n(297),i=n(68),a=n(112),s=n(14)("socket.io-client");e.exports=t=r;var c=t.managers={};t.protocol=i.protocol,t.connect=r,t.Manager=n(112),t.Socket=n(114)},function(e,t,n){function r(e,t){if(!(this instanceof r))return new r(e,t);e&&"object"==typeof e&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||s;this.encoder=new n.Encoder,this.decoder=new n.Decoder,(this.autoConnect=!1!==t.autoConnect)&&this.open()}var o=n(221),i=n(114),a=n(23),s=n(68),c=n(113),u=n(79),l=n(14)("socket.io-client:manager"),f=n(98),p=n(160),d=Object.prototype.hasOwnProperty;e.exports=r,r.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var e in this.nsps)d.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},r.prototype.updateSocketIds=function(){for(var e in this.nsps)d.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},r.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},a(r.prototype),r.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},r.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},r.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},r.prototype.open=r.prototype.connect=function(e,t){if(l("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;l("opening %s",this.uri),this.engine=o(this.uri,this.opts);var n=this.engine,r=this;this.readyState="opening",this.skipReconnect=!1;var i=c(n,"open",function(){r.onopen(),e&&e()}),a=c(n,"error",function(t){if(l("connect_error"),r.cleanup(),r.readyState="closed",r.emitAll("connect_error",t),e){var n=Error("Connection error");n.data=t,e(n)}else r.maybeReconnectOnOpen()});if(!1!==this._timeout){var s=this._timeout;l("connect attempt will timeout after %d",s);var u=setTimeout(function(){l("connect attempt timed out after %d",s),i.destroy(),n.close(),n.emit("error","timeout"),r.emitAll("connect_timeout",s)},s);this.subs.push({destroy:function(){clearTimeout(u)}})}return this.subs.push(i),this.subs.push(a),this},r.prototype.onopen=function(){l("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(c(e,"data",u(this,"ondata"))),this.subs.push(c(e,"ping",u(this,"onping"))),this.subs.push(c(e,"pong",u(this,"onpong"))),this.subs.push(c(e,"error",u(this,"onerror"))),this.subs.push(c(e,"close",u(this,"onclose"))),this.subs.push(c(this.decoder,"decoded",u(this,"ondecoded")))},r.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},r.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},r.prototype.ondata=function(e){this.decoder.add(e)},r.prototype.ondecoded=function(e){this.emit("packet",e)},r.prototype.onerror=function(e){l("error",e),this.emitAll("error",e)},r.prototype.socket=function(e,t){function n(){~f(o.connecting,r)||o.connecting.push(r)}var r=this.nsps[e];if(!r){r=new i(this,e,t),this.nsps[e]=r;var o=this;r.on("connecting",n),r.on("connect",function(){r.id=o.generateId(e)}),this.autoConnect&&n()}return r},r.prototype.destroy=function(e){var t=f(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},r.prototype.packet=function(e){l("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(n){for(var r=0;n.length>r;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()}))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){this.packet(this.packetBuffer.shift())}},r.prototype.cleanup=function(){l("cleanup");for(var e=this.subs.length,t=0;e>t;t++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){l("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(e){l("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attemptse;e++)p.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;this.sendBuffer.length>e;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},r.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},r.prototype.destroy=function(){if(this.subs){for(var e=0;this.subs.length>e;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},r.prototype.close=r.prototype.disconnect=function(){return this.connected&&(u("performing disconnect (%s)",this.nsp),this.packet({type:o.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},r.prototype.compress=function(e){return this.flags=this.flags||{},this.flags.compress=e,this}},function(e,t,n){(function(t){function n(e){return t.Buffer&&t.Buffer.isBuffer(e)||t.ArrayBuffer&&e instanceof ArrayBuffer}e.exports=n}).call(t,n(1))},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";function r(e){var t="";do{t=s[e%c]+t,e=Math.floor(e/c)}while(e>0);return t}function o(e){var t=0;for(f=0;e.length>f;f++)t=t*c+u[e.charAt(f)];return t}function i(){var e=r(+new Date);return e!==a?(l=0,a=e):e+"."+r(l++)}for(var a,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),c=64,u={},l=0,f=0;c>f;f++)u[s[f]]=f;i.encode=r,i.decode=o,e.exports=i},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(5),n(7),n(4),n(6),n(238),n(284),n(0),n(12)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n={};for(var r in e)0>t.indexOf(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(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 h(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=(0,y.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(v.default?(0,v.default)(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var m=l(n),v=l(r),y=l(o),g=l(i),b=l(a),_=l(s),w=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,m.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),k=(0,u.getCSSMilisecsValue)(b.default.modal_animation_duration),x=function(e){return(0,u.wrapWithClass)(b.default.content,e.children)},C=function(e){return(0,u.wrapWithClass)(b.default.inner,(0,c.h)(x,null,e.children))},E=function(e){function t(e){p(this,t);var n=d(this,(t.__proto__||(0,g.default)(t)).call(this,e));return n.openModal=function(){n.setState({isOpen:!0})},n.onRequestClose=function(){n.setState({isOpen:!1})},n.state={isOpen:!1},n}return h(t,e),w(t,[{key:"componentDidMount",value:function(){var e=this.props.buttonId,t=document.getElementById(e);if(!t)return void console.warn("The button with id #"+e+" cannot be found");t.addEventListener("click",this.openModal),t.disabled=!1,this.setState({button:t})}},{key:"componentWillUnmount",value:function(){var e=this.state.button;e&&e.removeEventListener("click",this.openModal)}},{key:"render",value:function(){return(0,c.h)(_.default,{isOpen:this.state.isOpen||this.props.isOpen,onRequestClose:this.onRequestClose,portalClassName:b.default.portal,overlayClassName:b.default.overlay,bodyClassName:b.default.modalBody,className:b.default.inner,shouldCloseOnOverlayClick:!0,closeTimeoutMS:k},(0,c.h)(x,null,this.props.children))}}]),t}(c.Component),S=function(e){var t=e.useModal,n=e.children,r=f(e,["useModal","children"]);return t?(0,c.h)(E,r,n):(0,c.h)(C,null,n)};t.default=function(e){function t(){var e,n,r,o;p(this,t);for(var i=arguments.length,a=Array(i),s=0;i>s;s++)a[s]=arguments[s];return n=r=d(this,(e=t.__proto__||(0,g.default)(t)).call.apply(e,[this].concat(a))),r.render=function(){return(0,c.h)(S,r.props)},o=n,d(r,o)}return h(t,e),t}(c.Component),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(8),n(5),n(7),n(4),n(6),n(0),n(34),n(36),n(111),n(254),n(132),n(133),n(44),n(140),n(35),n(12),n(145),n(3)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u,l,f,p,d,h,m,v,y,g,b){"use strict";function _(e){return e&&e.__esModule?e:{default:e}}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(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 x(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=(0,P.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(T.default?(0,T.default)(e,t):e.__proto__=t)}function C(e){return L({},e.globals)}function E(e){return{actions:(0,c.bindActionCreators)(v.unboundActions,e)}}Object.defineProperty(t,"__esModule",{value:!0});var S=_(n),O=_(r),T=_(o),P=_(i),A=_(a),D=_(l),M=_(f),j=_(d),N=_(h),R=_(m),I=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,O.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),L=S.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U=(0,M.default)(),F=function(e){return(0,s.h)(e.options.mobileFlow?B:q,L({},e,{allowCrossDeviceFlow:!e.options.mobileFlow&&y.isDesktop}))},B=function(e){function t(e){w(this,t);var n=k(this,(t.__proto__||(0,A.default)(t)).call(this,e));return W.call(n),n.state={token:null,steps:null,step:null,socket:(0,D.default)("https://sync.onfido.com",{autoConnect:!1}),roomId:window.location.pathname.substring(3),error:!1,loading:!0},n.state.socket.on("config",n.setConfig(e.actions)),n.state.socket.on("connect",function(){n.state.socket.emit("join",{roomId:n.state.roomId})}),n.state.socket.open(),n.requestConfig(),n}return x(t,e),I(t,[{key:"componentDidMount",value:function(){this.state.socket.on("custom disconnect",this.onDisconnect),this.state.socket.on("disconnect pong",this.onDisconnectPong)}},{key:"componentWillUnmount",value:function(){this.clearConfigTimeout(),this.clearPingTimeout(),this.state.socket.close()}}]),t}(s.Component),W=function(){var e=this;this.configTimeoutId=null,this.pingTimeoutId=null,this.sendMessage=function(t,n){e.state.socket.emit("message",{roomId:e.state.roomId,event:t,payload:n})},this.requestConfig=function(){e.sendMessage("get config"),e.clearConfigTimeout(),e.configTimeoutId=setTimeout(function(){e.state.loading&&e.setError()},5e3)},this.clearConfigTimeout=function(){return e.configTimeoutId&&clearTimeout(e.configTimeoutId)},this.clearPingTimeout=function(){e.pingTimeoutId&&(clearTimeout(e.pingTimeoutId),e.pingTimeoutId=null)},this.setConfig=function(t){return function(n){var r=n.token,o=n.steps,i=n.documentType,a=n.step;return(0,b.setWoopraCookie)(n.woopraCookie),r?(0,g.jwtExpired)(r)?(console.error("Desktop token has expired"),(0,b.sendError)("Token has expired: "+r),e.setError()):(e.setState({token:r,steps:o,step:a,loading:!1}),void t.setDocumentType(i)):(console.error("Desktop did not send token"),(0,b.sendError)("Desktop did not send token"),e.setError())}},this.setError=function(){return e.setState({error:!0,loading:!1})},this.onDisconnect=function(){e.pingTimeoutId=setTimeout(e.setError,3e3),e.sendMessage("disconnect ping")},this.onDisconnectPong=function(){return e.clearPingTimeout()},this.onStepChange=function(t){e.setState({step:t.step})},this.sendClientSuccess=function(){e.state.socket.off("custom disconnect",e.onDisconnect),e.sendMessage("client success")},this.render=function(t){return e.state.loading?(0,s.h)(N.default,null):e.state.error?(0,s.h)(R.default,null):(0,s.h)(V,L({},t,e.state,{onStepChange:e.onStepChange,sendClientSuccess:e.sendClientSuccess,crossDeviceClientError:e.setError}))}},q=function(e){function t(e){w(this,t);var n=k(this,(t.__proto__||(0,A.default)(t)).call(this,e));return H.call(n),n.state={mobileInitialStep:null},n}return x(t,e),t}(s.Component),H=function(){var e=this;this.mobileConfig=function(){var t=e.props,n=t.documentType,r=t.options,o=r.steps,i=r.token,a=(0,b.getWoopraCookie)();return{steps:o,token:i,documentType:n,step:e.state.mobileInitialStep,woopraCookie:a}},this.onFlowChange=function(t,n,r,o){"crossDeviceSteps"===t&&e.setState({mobileInitialStep:o})},this.render=function(t){return(0,s.h)(V,L({},t,{steps:t.options.steps,onFlowChange:e.onFlowChange,mobileConfig:e.mobileConfig()}))}},V=function(e){function t(e){w(this,t);var n=k(this,(t.__proto__||(0,A.default)(t)).call(this,e));return z.call(n),n.state={flow:"captureSteps",step:n.props.step||0},n.unlisten=U.listen(n.onHistoryChange),n.setStepIndex(n.state.step,n.state.flow),n}return x(t,e),I(t,[{key:"componentWillUnmount",value:function(){this.unlisten()}}]),t}(s.Component),z=function(){var e=this;this.onHistoryChange=function(t){var n=t.state;e.props.onStepChange(n),e.setState(L({},n))},this.changeFlowTo=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.state,o=r.flow,i=r.step;o!==t&&(e.props.onFlowChange(t,n,o,i),e.setStepIndex(n,t))},this.nextStep=function(){var t=e.state.step,n=e.componentsList(),r=t+1;n.length===r?e.props.options.events.emit("complete"):e.setStepIndex(r)},this.previousStep=function(){e.setStepIndex(e.state.step-1)},this.back=function(){U.goBack()},this.setStepIndex=function(t,n){var r=e.state.flow,o={step:t,flow:n||r},i=""+location.pathname+location.search+location.hash;U.push(i,o)},this.componentsList=function(){return e.buildComponentsList(e.state,e.props)},this.buildComponentsList=function(e,t){return(0,p.componentsList)({flow:e.flow,documentType:t.documentType,steps:t.steps,mobileFlow:t.options.mobileFlow})},this.render=function(t){return(0,s.h)(j.default,L({},t,{componentsList:e.componentsList(),step:e.state.step,changeFlowTo:e.changeFlowTo,nextStep:e.nextStep,previousStep:e.previousStep,back:e.back}))}};V.defaultProps={onStepChange:function(){},onFlowChange:function(){}},t.default=(0,u.connect)(C,E)(F),e.exports=t.default})},function(e,t,n){var r;!function(o){function i(){this._events={},this._conf&&a.call(this,this._conf)}function a(e){e?(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),this._events.maxListeners=e.maxListeners!==o?e.maxListeners:p,e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this.newListener=e.newListener),this.wildcard&&(this.listenerTree={})):this._events.maxListeners=p}function s(e){console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",e),console.trace&&console.trace()}function c(e){this._events={},this.newListener=!1,a.call(this,e)}function u(e,t,n,r){if(!n)return[];var o,i,a,s,c,l,f,p=[],d=t.length,h=t[r],m=t[r+1];if(r===d&&n._listeners){if("function"==typeof n._listeners)return e&&e.push(n._listeners),[n];for(o=0,i=n._listeners.length;i>o;o++)e&&e.push(n._listeners[o]);return[n]}if("*"===h||"**"===h||n[h]){if("*"===h){for(a in n)"_listeners"!==a&&n.hasOwnProperty(a)&&(p=p.concat(u(e,t,n[a],r+1)));return p}if("**"===h){f=r+1===d||r+2===d&&"*"===m,f&&n._listeners&&(p=p.concat(u(e,t,n,d)));for(a in n)"_listeners"!==a&&n.hasOwnProperty(a)&&("*"===a||"**"===a?(n[a]._listeners&&!f&&(p=p.concat(u(e,t,n[a],d))),p=p.concat(u(e,t,n[a],r))):p=p.concat(a===m?u(e,t,n[a],r+2):u(e,t,n[a],r)));return p}p=p.concat(u(e,t,n[h],r+1))}if(s=n["*"],s&&u(e,t,s,r+1),c=n["**"])if(d>r){c._listeners&&u(e,t,c,d);for(a in c)"_listeners"!==a&&c.hasOwnProperty(a)&&(a===m?u(e,t,c[a],r+2):a===h?u(e,t,c[a],r+1):(l={},l[a]=c[a],u(e,t,{"**":l},r+1)))}else c._listeners?u(e,t,c,d):c["*"]&&c["*"]._listeners&&u(e,t,c["*"],d);return p}function l(e,t){e="string"==typeof e?e.split(this.delimiter):e.slice();for(var n=0,r=e.length;r>n+1;n++)if("**"===e[n]&&"**"===e[n+1])return;for(var i=this.listenerTree,a=e.shift();a!==o;){if(i[a]||(i[a]={}),i=i[a],0===e.length)return i._listeners?("function"==typeof i._listeners&&(i._listeners=[i._listeners]),i._listeners.push(t),!i._listeners.warned&&this._events.maxListeners>0&&i._listeners.length>this._events.maxListeners&&(i._listeners.warned=!0,s(i._listeners.length))):i._listeners=t,!0;a=e.shift()}return!0}var f=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},p=10;c.EventEmitter2=c,c.prototype.delimiter=".",c.prototype.setMaxListeners=function(e){e!==o&&(this._events||i.call(this),this._events.maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},c.prototype.event="",c.prototype.once=function(e,t){return this.many(e,1,t),this},c.prototype.many=function(e,t,n){function r(){0==--t&&o.off(e,r),n.apply(this,arguments)}var o=this;if("function"!=typeof n)throw Error("many only accepts instances of Function");return r._origin=n,this.on(e,r),o},c.prototype.emit=function(){this._events||i.call(this);var e=arguments[0];if("newListener"===e&&!this.newListener&&!this._events.newListener)return!1;var t,n,r,o,a,s=arguments.length;if(this._all&&this._all.length){if(a=this._all.slice(),s>3)for(t=Array(s),o=0;s>o;o++)t[o]=arguments[o];for(r=0,n=a.length;n>r;r++)switch(this.event=e,s){case 1:a[r].call(this,e);break;case 2:a[r].call(this,e,arguments[1]);break;case 3:a[r].call(this,e,arguments[1],arguments[2]);break;default:a[r].apply(this,t)}}if(this.wildcard){a=[];u.call(this,a,"string"==typeof e?e.split(this.delimiter):e.slice(),this.listenerTree,0)}else{if("function"==typeof(a=this._events[e])){switch(this.event=e,s){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:for(t=Array(s-1),o=1;s>o;o++)t[o-1]=arguments[o];a.apply(this,t)}return!0}a&&(a=a.slice())}if(a&&a.length){if(s>3)for(t=Array(s-1),o=1;s>o;o++)t[o-1]=arguments[o];for(r=0,n=a.length;n>r;r++)switch(this.event=e,s){case 1:a[r].call(this);break;case 2:a[r].call(this,arguments[1]);break;case 3:a[r].call(this,arguments[1],arguments[2]);break;default:a[r].apply(this,t)}return!0}if(!this._all&&"error"===e)throw arguments[1]instanceof Error?arguments[1]:Error("Uncaught, unspecified 'error' event.");return!!this._all},c.prototype.emitAsync=function(){this._events||i.call(this);var e=arguments[0];if("newListener"===e&&!this.newListener&&!this._events.newListener)return Promise.resolve([!1]);var t,n,r,o,a,s=[],c=arguments.length;if(this._all){if(c>3)for(t=Array(c),o=1;c>o;o++)t[o]=arguments[o];for(r=0,n=this._all.length;n>r;r++)switch(this.event=e,c){case 1:s.push(this._all[r].call(this,e));break;case 2:s.push(this._all[r].call(this,e,arguments[1]));break;case 3:s.push(this._all[r].call(this,e,arguments[1],arguments[2]));break;default:s.push(this._all[r].apply(this,t))}}if(this.wildcard){a=[];u.call(this,a,"string"==typeof e?e.split(this.delimiter):e.slice(),this.listenerTree,0)}else a=this._events[e];if("function"==typeof a)switch(this.event=e,c){case 1:s.push(a.call(this));break;case 2:s.push(a.call(this,arguments[1]));break;case 3:s.push(a.call(this,arguments[1],arguments[2]));break;default:for(t=Array(c-1),o=1;c>o;o++)t[o-1]=arguments[o];s.push(a.apply(this,t))}else if(a&&a.length){if(c>3)for(t=Array(c-1),o=1;c>o;o++)t[o-1]=arguments[o];for(r=0,n=a.length;n>r;r++)switch(this.event=e,c){case 1:s.push(a[r].call(this));break;case 2:s.push(a[r].call(this,arguments[1]));break;case 3:s.push(a[r].call(this,arguments[1],arguments[2]));break;default:s.push(a[r].apply(this,t))}}else if(!this._all&&"error"===e)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(s)},c.prototype.on=function(e,t){if("function"==typeof e)return this.onAny(e),this;if("function"!=typeof t)throw Error("on only accepts instances of Function");return this._events||i.call(this),this.emit("newListener",e,t),this.wildcard?(l.call(this,e,t),this):(this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),this._events[e].push(t),!this._events[e].warned&&this._events.maxListeners>0&&this._events[e].length>this._events.maxListeners&&(this._events[e].warned=!0,s(this._events[e].length))):this._events[e]=t,this)},c.prototype.onAny=function(e){if("function"!=typeof e)throw Error("onAny only accepts instances of Function");return this._all||(this._all=[]),this._all.push(e),this},c.prototype.addListener=c.prototype.on,c.prototype.off=function(e,t){function n(e){if(e!==o){var t=Object.keys(e);for(var r in t){var i=t[r],a=e[i];a instanceof Function||"object"!=typeof a||null===a||(Object.keys(a).length>0&&n(e[i]),0===Object.keys(a).length&&delete e[i])}}}if("function"!=typeof t)throw Error("removeListener only takes instances of Function");var r,i=[];if(this.wildcard){i=u.call(this,null,"string"==typeof e?e.split(this.delimiter):e.slice(),this.listenerTree,0)}else{if(!this._events[e])return this;r=this._events[e],i.push({_listeners:r})}for(var a=0;i.length>a;a++){var s=i[a];if(r=s._listeners,f(r)){for(var c=-1,l=0,p=r.length;p>l;l++)if(r[l]===t||r[l].listener&&r[l].listener===t||r[l]._origin&&r[l]._origin===t){c=l;break}if(0>c)continue;return this.wildcard?s._listeners.splice(c,1):this._events[e].splice(c,1),0===r.length&&(this.wildcard?delete s._listeners:delete this._events[e]),this.emit("removeListener",e,t),this}(r===t||r.listener&&r.listener===t||r._origin&&r._origin===t)&&(this.wildcard?delete s._listeners:delete this._events[e],this.emit("removeListener",e,t))}return n(this.listenerTree),this},c.prototype.offAny=function(e){var t,n=0,r=0;if(e&&this._all&&this._all.length>0){for(t=this._all,n=0,r=t.length;r>n;n++)if(e===t[n])return t.splice(n,1),this.emit("removeListenerAny",e),this}else{for(t=this._all,n=0,r=t.length;r>n;n++)this.emit("removeListenerAny",t[n]);this._all=[]}return this},c.prototype.removeListener=c.prototype.off,c.prototype.removeAllListeners=function(e){if(0===arguments.length)return!this._events||i.call(this),this;if(this.wildcard)for(var t="string"==typeof e?e.split(this.delimiter):e.slice(),n=u.call(this,null,t,this.listenerTree,0),r=0;n.length>r;r++){var o=n[r];o._listeners=null}else this._events&&(this._events[e]=null);return this},c.prototype.listeners=function(e){if(this.wildcard){var t=[];return u.call(this,t,"string"==typeof e?e.split(this.delimiter):e.slice(),this.listenerTree,0),t}return this._events||i.call(this),this._events[e]||(this._events[e]=[]),f(this._events[e])||(this._events[e]=[this._events[e]]),this._events[e]},c.prototype.listenerCount=function(e){return this.listeners(e).length},c.prototype.listenersAny=function(){return this._all?this._all:[]},(r=function(){return c}.call(t,n,t,e))!==o&&(e.exports=r)}()},function(e,t){function n(e,t,n){function o(e,r){if(0>=o.count)throw Error("after called too many times");--o.count,e?(i=!0,t(e),t=n):0!==o.count||i||t(null,r)}var i=!1;return n=n||r,o.count=e,0===e?t():o}function r(){}e.exports=n},function(e,t){e.exports=function(e,t,n){var r=e.byteLength;if(t=t||0,n=n||r,e.slice)return e.slice(t,n);if(0>t&&(t+=r),0>n&&(n+=r),n>r&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(e),i=new Uint8Array(n-t),a=t,s=0;n>a;a++,s++)i[s]=o[a];return i.buffer}},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(8),n(38),n(37),n(5),n(7),n(4),n(6),n(0),n(289),n(218),n(104),n(304),n(71),n(72),n(129),n(12),n(45),n(75),n(9),n(230)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u,l,f,p,d,h,m,v,y,g,b,_,w){"use strict";function k(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(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 E(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=(0,D.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(A.default?(0,A.default)(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var S=k(n),O=k(r),T=k(o),P=k(i),A=k(a),D=k(s),M=k(c),j=k(l),N=k(f),R=k(p),I=k(d),L=k(v),U=k(_),F=k(w),B=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,P.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),W=S.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=(0,T.default)(e);!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,O.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),H=function(e){var t=e.countDownRef;return(0,y.functionalSwitch)(e.method,{document:function(){return(0,u.h)(h.DocumentOverlay,null)},face:function(){return(0,u.h)("div",{className:F.default.overlay},(0,u.h)(L.default,{ref:t}),(0,u.h)(m.FaceOverlay,null))}})},V=function(e){var t=e.onUploadFallback,n=e.onFallbackClick;return(0,u.h)(R.default,{onDrop:function(e){var n=q(e,1);return t(n[0])},className:F.default.uploadFallback,multiple:!1},(0,u.h)("button",{onClick:n()}," Having problems? Click here to upload a file"))},z=function(e){return(0,u.h)("div",{className:F.default.captureActions},(0,u.h)("button",{className:U.default.btn+" "+U.default["btn-primary"]+" "+U.default["btn-centered"],onClick:e.handeClick},"Take photo"))},K=function(e){var t=e.method,n=e.autoCapture,r=e.onUploadFallback,o=e.onFallbackClick,i=e.onUserMedia,a=e.faceCaptureClick,s=e.countDownRef;return(0,u.h)("div",null,(0,u.h)("div",{className:F.default["video-overlay"]},(0,u.h)(j.default,W({className:F.default.video,audio:!1,width:960,height:720},{onUserMedia:i,ref:e.webcamRef,onFailure:e.onWebcamError})),(0,u.h)(H,{method:t,countDownRef:s}),(0,u.h)(V,{onUploadFallback:r,onFallbackClick:o})),n?"":(0,u.h)(z,{handeClick:a}))};t.default=function(e){function t(){var e,n,r,o;x(this,t);for(var i=arguments.length,a=Array(i),s=0;i>s;s++)a[s]=arguments[s];return n=r=C(this,(e=t.__proto__||(0,M.default)(t)).call.apply(e,[this].concat(a))),r.webcam=null,r.capture={start:function(){r.capture.stop(),r.interval=I.default.every(1e3,r.screenshot)},stop:function(){return I.default.stop(r.interval)},once:function(){new N.default(r.countdown.base,3,0,0,3,{useEasing:!1,useGrouping:!1}).start(function(){return r.screenshot()})}},r.screenshot=function(){var e=r.props.onScreenshot,t=r.webcam.getCanvas();if(!t)return void console.error("webcam canvas is null");(0,b.asyncFunc)(g.cloneCanvas,[t],e)},r.stopCamera=function(){r.capture.stop()},r.render=function(e){return(0,u.h)(K,{method:e.method,onUserMedia:e.onUserMedia,onUploadFallback:e.onUploadFallback,onWebcamError:e.onWebcamError,autoCapture:e.autoCapture,faceCaptureClick:r.capture.once,countDownRef:function(e){r.countdown=e},webcamRef:function(e){r.webcam=e},onFallbackClick:function(){return r.stopCamera}})},o=n,C(r,o)}return E(t,e),B(t,[{key:"webcamMounted",value:function(){this.props.autoCapture&&this.capture.start()}},{key:"webcamUnmounted",value:function(){this.capture.stop()}},{key:"componentDidMount",value:function(){this.webcamMounted(),this.props.trackScreen("camera")}},{key:"componentWillUnmount",value:function(){this.webcamUnmounted()}}]),t}(u.Component),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(8),n(5),n(7),n(4),n(47),n(6),n(0),n(35),n(48),n(36),n(147),n(135),n(123),n(72),n(71),n(231),n(12),n(45),n(46),n(148)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u,l,f,p,d,h,m,v,y,g,b,_,w){"use strict";function k(e){return e&&e.__esModule?e:{default:e}}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e,t){var n={};for(var r in e)0>t.indexOf(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function E(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 O(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=(0,D.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(A.default?(0,A.default)(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var T=k(n),P=k(r),A=k(o),D=k(i),M=k(a),j=k(s),N=k(l),R=k(p),I=k(h),L=k(y),U=T.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,P.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),B=!0;(0,g.checkIfHasWebcam)(function(e){return B=e});var W=function(e){function t(e){E(this,t);var n=S(this,(t.__proto__||(0,j.default)(t)).call(this,e));return n.checkWebcamSupport=function(){(0,g.checkIfHasWebcam)(function(e){return n.setState({hasWebcam:e})})},n.maxAutomaticCaptures=3,n.onValidationServiceResponse=function(e,t){var r=t.valid,o=n.props.nextStep;n.validateCaptures(e,r),r&&o()},n.handleCapture=function(e,t){if(!e)return void console.warn("Cannot handle a null image");var r=n.initialiseCapturePayload(e,t);(0,g.functionalSwitch)(n.props.method,{document:function(){return n.handleDocument(r)},face:function(){return n.handleFace(r)}})},n.initialiseCapturePayload=function(e,t){return{id:(0,R.default)(),blob:e,base64:t}},n.validationServicePayload=function(e){return(0,M.default)({id:e.id,image:e.base64})},n.onUploadFallback=function(e){n.setState({uploadFallback:!0}),n.clearErrors(),n.deleteCaptures(),n.onImageFileSelected(e)},n.onWebcamError=function(){n.setState({uploadFallback:!0}),n.deleteCaptures()},n.onScreenshot=function(e){return(0,b.canvasToBase64Images)(e,function(e,t){var r=(0,_.base64toBlob)(t);n.handleCapture(r,e)})},n.onImageFileSelected=function(e){var t=["jpg","jpeg","png"],r=["pdf"],o=[].concat(t,r);if(!(0,_.isOfFileType)(o,e))return void n.onFileTypeError();if(e.size>1e7)return void n.onFileSizeError();var i=function(e){return(0,_.fileToBase64)(e,function(t){return n.handleCapture(e,t)},n.onFileGeneralError)};(0,_.isOfFileType)(r,e)?i(e):(0,_.isOfFileType)(t,e)&&(0,_.fileToLossyBase64Image)(e,function(t){return n.handleCapture(e,t)},function(){return i(e)})},n.onFileTypeError=function(){return n.setError("INVALID_TYPE")},n.onFileSizeError=function(){return n.setError("INVALID_SIZE")},n.onFileGeneralError=function(){return n.setError("INVALID_CAPTURE")},n.onValidationServerError=function(){n.deleteCaptures(),n.setError("SERVER_ERROR")},n.setError=function(e){return n.setState({error:{name:e}})},n.deleteCaptures=function(){var e=n.props;(0,e.actions.deleteCaptures)({method:e.method,side:e.side})},n.validateCaptures=function(e,t){var r=n.props;r.actions.validateCapture({id:e.id,valid:t,method:r.method})},n.clearErrors=function(){n.setState({error:{}})},n.state={uploadFallback:!1,error:{},hasWebcam:B},n}return O(t,e),F(t,[{key:"componentDidMount",value:function(){this.webcamChecker=setInterval(this.checkWebcamSupport,2e3),this.checkWebcamSupport()}},{key:"componentWillUnmount",value:function(){this.setState({uploadFallback:!1}),clearInterval(this.webcamChecker)}},{key:"componentWillReceiveProps",value:function(e){var t=e.validCaptures,n=e.unprocessedCaptures,r=e.allInvalid;t.length>0&&this.setState({uploadFallback:!1}),n.length>0&&this.clearErrors(),r&&this.onFileGeneralError()}},{key:"createCapture",value:function(e){var t=this.props;t.actions.createCapture({method:t.method,capture:U({},e,{side:t.side}),maxCaptures:this.maxAutomaticCaptures})}},{key:"validateAndProceed",value:function(e){var t=this.props.nextStep;this.validateCaptures(e,!0),t()}},{key:"handleAutocapture",value:function(e){var t=this,n=this.props,r=n.token;if(n.unprocessedCaptures.length===this.maxAutomaticCaptures)return void console.warn("Server response is slow, waiting for responses before uploading more");(0,w.postToBackend)(this.validationServicePayload(e),r,function(n){return t.onValidationServiceResponse(e,n)},this.onValidationServerError)}},{key:"handleCaptureFromUploader",value:function(e){this.validateAndProceed(e)}},{key:"createDocumentPayload",value:function(e){return U({},e,{documentType:this.props.documentType})}},{key:"handleDocument",value:function(e){var t=this.createDocumentPayload(e);this.createCapture(t),this.props.useWebcam&&!this.state.uploadFallback?this.handleAutocapture(t):this.handleCaptureFromUploader(t)}},{key:"handleFace",value:function(e){this.createCapture(e),this.validateAndProceed(e)}},{key:"render",value:function(e){var t=e.method,n=e.side,r=e.validCaptures,o=e.useWebcam,i=C(e,["method","side","validCaptures","useWebcam"]);return(0,c.h)(V,U({method:t,side:n,validCaptures:r,useCapture:!this.state.uploadFallback&&o&&g.isDesktop&&this.state.hasWebcam,onScreenshot:this.onScreenshot,onUploadFallback:this.onUploadFallback,onImageSelected:this.onImageFileSelected,onWebcamError:this.onWebcamError,error:this.state.error},i))}}]),t}(c.Component),q=function(e){var t=e.method,n=e.side,r=e.useCapture;return(0,g.functionalSwitch)(t,{document:function(){return(0,c.h)(v.DocumentTitle,{useCapture:r,side:n})},face:function(){return(0,c.h)(m.FaceTitle,{useCapture:r})}})},H=function(e){var t=e.method,n=e.side,r=e.useCapture,o=C(e,["method","side","useCapture"]);return(0,c.h)("div",null,(0,c.h)(q,{method:t,side:n,useCapture:r}),r?(0,c.h)(I.default,U({method:t},o)):(0,c.h)(d.Uploader,U({method:t,side:n},o)))},V=function(e){var t,n=e.validCaptures,r=e.useCapture,o=C(e,["validCaptures","useCapture"]),i=n.length>0;return(0,c.h)("div",{className:(0,N.default)((t={},x(t,L.default.camera,r&&!i),x(t,L.default.uploader,!r&&!i),t))},(0,c.h)(H,U({useCapture:r},o)))};t.default=(0,f.connect)(function(e,t){return{allInvalid:u.selectors.allInvalidCaptureSelector(e,t),validCaptures:u.selectors.currentValidCaptures(e,t),unprocessedCaptures:u.selectors.unprocessedCaptures(e,t)}})(W),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(8),n(0),n(124),n(3)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=a(n),c=a(o),u=s.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(e){return(0,r.h)(c.default,u({autoCapture:!0},e))};l.defaultProps={useWebcam:!1,method:"document"};var f=function(e){return(0,r.h)(l,e)};f.defaultProps={side:"front"};var p=function(e){return(0,r.h)(l,e)};p.defaultProps={side:"back"};var d=function(e){return(0,r.h)(c.default,u({autoCapture:!1},e))};d.defaultProps={useWebcam:!0,method:"face",side:null},t.default={FrontDocumentCapture:(0,i.appendToTracking)(f,"front_capture"),BackDocumentCapture:(0,i.appendToTracking)(p,"back_capture"),FaceCapture:(0,i.appendToTracking)(d,"capture")},e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(5),n(7),n(4),n(6),n(0),n(3),n(9),n(232)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(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 d(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=(0,v.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(m.default?(0,m.default)(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var h=l(n),m=l(r),v=l(o),y=l(i),g=l(c),b=l(u),_=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,h.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),w=function(e){function t(){return f(this,t),p(this,(t.__proto__||(0,y.default)(t)).apply(this,arguments))}return d(t,e),_(t,[{key:"componentDidMount",value:function(){this.props.nextStep()}},{key:"render",value:function(e){var t=e.message,n=e.submessage;return(0,a.h)("div",null,(0,a.h)("div",{className:g.default.step},(0,a.h)("span",{className:g.default.icon+" "+b.default.icon}),(0,a.h)("h1",{className:g.default.title},t),(0,a.h)("p",{className:g.default["mbottom-large"]+" "+g.default.center+" "+b.default.submessage},n)))}}]),t}(a.Component);w.defaultProps={message:"Verification complete",submessage:"Thank you."},t.default=(0,s.trackComponent)(w),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(5),n(7),n(4),n(6),n(0),n(269),n(12),n(95)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(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 d(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=(0,v.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(m.default?(0,m.default)(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var h=l(n),m=l(r),v=l(o),y=l(i),g=l(s),b=l(u),_=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,h.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),w=function(e){var t=e.blob;return(0,a.h)("a",{href:"#",onClick:(0,c.preventDefaultOnClick)(function(){window.navigator.msSaveOrOpenBlob(t,"document.pdf")}),className:b.default.pdfIcon})},k=0,x=function(e){function t(e){f(this,t);var n=p(this,(t.__proto__||(0,y.default)(t)).call(this,e));return n.options={width:"92%",height:"290px","max-height":"70vh",border:0,fallbackLink:""},n.id="pdfContainer"+k++,n}return d(t,e),_(t,[{key:"embedPDF",value:function(e){g.default.embed(e,"#"+this.id,this.options)}},{key:"componentDidMount",value:function(){this.embedPDF(this.props.previewUrl)}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentWillReceiveProps",value:function(e){var t=e.previewUrl;this.props.pdfPreview!==t&&this.embedPDF(t)}},{key:"render",value:function(){return(0,a.h)("div",{id:this.id})}}]),t}(a.Component);t.default=function(e){function t(){return f(this,t),p(this,(t.__proto__||(0,y.default)(t)).apply(this,arguments))}return d(t,e),_(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"render",value:function(){var e=this.props,t=e.blob,n=e.previewUrl;return(0,a.h)("div",null,window.navigator.msSaveOrOpenBlob?(0,a.h)(w,{blob:t}):(0,a.h)(x,{previewUrl:n}))}}]),t}(a.Component),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(38),n(37),n(159),n(8),n(5),n(7),n(4),n(6),n(0),n(35),n(36),n(9),n(95),n(48),n(46),n(12),n(146),n(127),n(131),n(44),n(3)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u,l,f,p,d,h,m,v,y,g,b,_,w){"use strict";function k(e){return e&&e.__esModule?e:{default:e}}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(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=(0,j.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(M.default?(0,M.default)(e,t):e.__proto__=t)}Object.defineProperty(e,"__esModule",{value:!0}),e.FaceConfirm=e.DocumentBackConfrim=e.DocumentFrontConfirm=void 0;var O=k(t),T=k(n),P=k(r),A=k(o),D=k(i),M=k(a),j=k(s),N=k(c),R=k(p),I=k(d),L=k(h),U=k(g),F=k(b),B=k(_),W=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=(0,T.default)(e);!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,O.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),q=A.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,D.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),V=function(e){var t=e.capture,n=t.blob,r=t.base64,o=t.previewUrl;return(0,u.h)("div",{className:I.default.captures},(0,m.isOfFileType)(["pdf"],n)?(0,u.h)(U.default,{previewUrl:o,blob:n}):(0,u.h)("img",{className:I.default.image,src:n instanceof File?r:o}))},z=function(e){function t(e){C(this,t);var n=E(this,(t.__proto__||(0,N.default)(t)).call(this,e));return K.call(n),n.state=n.previewUrlState(e.capture.blob),n}return S(t,e),H(t,[{key:"updateBlobPreview",value:function(e){this.revokePreviewURL(),this.setState(this.previewUrlState(e))}},{key:"revokePreviewURL",value:function(){URL.revokeObjectURL(this.state.previewUrl)}},{key:"componentWillReceiveProps",value:function(e){var t=e.capture.blob;this.props.capture.blob!==t&&this.updateBlobPreview(t)}},{key:"componentWillUnmount",value:function(){this.revokePreviewURL()}},{key:"render",value:function(){return(0,u.h)(V,{capture:q({},this.props.capture,{previewUrl:this.state.previewUrl})})}}]),t}(u.Component),K=function(){this.previewUrlState=function(e){return e?{previewUrl:URL.createObjectURL(e)}:{}}},G=function(){return(0,u.h)("div",null,(0,u.h)("h1",{className:R.default.title},"Confirm capture"),(0,u.h)("p",null,"Please confirm that you are happy with this photo."))},X=function(e){return(0,u.h)("button",{onClick:e.retakeAction,className:R.default.btn+" "+I.default["btn-outline"]},"Take again")},$=function(e){var t=e.confirmAction,n=e.error;return(0,u.h)("a",{href:"#",className:R.default.btn+" "+R.default["btn-primary"],onClick:(0,v.preventDefaultOnClick)(t)},"warn"===n.type?"Continue":"Confirm")},J=function(e){var t=e.retakeAction,n=e.confirmAction,r=e.error;return(0,u.h)("div",null,(0,u.h)("div",{className:(0,L.default)(R.default.actions,I.default.actions,x({},I.default.error,"error"===r.type))},(0,u.h)(X,{retakeAction:t}),"error"===r.type?null:(0,u.h)($,{confirmAction:n,error:r})))},Y=function(e){var t=e.capture,n=e.retakeAction,r=e.confirmAction,o=e.error;return(0,u.h)("div",{className:R.default.previews+" "+R.default.step},o.type?(0,u.h)(F.default,{error:o}):(0,u.h)(G,null),(0,u.h)(z,{capture:t}),(0,u.h)(J,{retakeAction:n,confirmAction:r,error:o}))},Q=function(){return(0,u.h)("div",{className:R.default.center},(0,u.h)(B.default,null))},Z=function(e){function t(e){C(this,t);var n=E(this,(t.__proto__||(0,N.default)(t)).call(this,e));return n.onGlareWarning=function(){n.setWarning("GLARE_DETECTED")},n.setError=function(e){return n.setState({error:{name:e,type:"error"}})},n.setWarning=function(e){return n.setState({error:{name:e,type:"warn"}})},n.onfidoErrorFieldMap=function(e){var t=W(e,2),n=t[0],r=t[1];return"document_detection"===n?"INVALID_CAPTURE":"file"===n?"INVALID_TYPE":"attachment"===n||"attachment_content_type"===n?"UNSUPPORTED_FILE":"face_detection"===n?-1===r[0].indexOf("Multiple faces")?"NO_FACE_ERROR":"MULTIPLE_FACES_ERROR":void 0},n.onfidoErrorReduce=function(e){var t=e.fields,r=(0,P.default)(t).map(n.onfidoErrorFieldMap);return W(r,1)[0]},n.onApiError=function(e){var t=e.status,r=e.response,o=void 0;if(n.props.mobileFlow&&401===t)return n.props.crossDeviceClientError();422===t?o=n.onfidoErrorReduce(r.error):((0,w.sendError)(t+" - "+r),o="SERVER_ERROR"),n.setState({uploadInProgress:!1}),n.setError(o)},n.onApiSuccess=function(e){n.setState({onfidoId:e.id});var t=e.sdk_warnings;t&&!t.detect_glare.valid?(n.setState({uploadInProgress:!1}),n.onGlareWarning()):n.props.nextStep()},n.uploadCaptureToOnfido=function(){n.setState({uploadInProgress:!0});var e=n.props,t=e.validCaptures,r=e.method,o=e.side,i=e.token,a=t[0],s=a.blob,c=a.documentType;if(n.setState({captureId:a.id}),"document"===r)(0,y.uploadDocument)({file:s,type:c,side:o},i,n.onApiSuccess,n.onApiError);else if("face"===r){var u={file:s};(0,y.uploadLivePhoto)(u,i,n.onApiSuccess,n.onApiError)}},n.onConfirm=function(){"warn"===n.state.error.type?n.props.nextStep():n.uploadCaptureToOnfido()},n.render=function(e){var t=e.validCaptures,r=e.previousStep;return n.state.uploadInProgress?(0,u.h)(Q,null):(0,u.h)(Y,{capture:t[0],retakeAction:function(){r()},confirmAction:n.onConfirm,error:n.state.error})},n.state={uploadInProgress:!1,error:{},captureId:null,onfidoId:null},n}return S(t,e),t}(u.Component),ee=function(e,t){return{validCaptures:l.selectors.currentValidCaptures(e,t),unprocessedCaptures:l.selectors.unprocessedCaptures(e,t)}},te=(0,w.trackComponentAndMode)(Z,"confirmation","error"),ne=(0,f.connect)(ee)(te),re=function(e){return(0,u.h)(ne,q({},e,{method:"document",side:"front"}))},oe=function(e){return(0,u.h)(ne,q({},e,{method:"document",side:"back"}))},ie=function(e){return(0,u.h)(ne,q({},e,{method:"face"}))},ae=(0,w.appendToTracking)(re,"front"),se=(0,w.appendToTracking)(oe,"back");e.DocumentFrontConfirm=ae,e.DocumentBackConfrim=se,e.FaceConfirm=ie})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(0),n(233)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(){return(0,n.h)("span",{className:o.default.countdown})},e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(5),n(7),n(4),n(6),n(0),n(235)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s){"use strict";function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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 f(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=(0,h.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(d.default?(0,d.default)(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var p=c(n),d=c(r),h=c(o),m=c(i),v=c(s),y=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,p.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=[{value:"passport",label:"Passport",icon:"icon-passport"},{value:"driving_licence",label:"Driver's License",icon:"icon-license"},{value:"national_identity_card",label:"Identity Card",icon:"icon-identity"}];t.default=function(e){function t(){var e,n,r,o;u(this,t);for(var i=arguments.length,s=Array(i),c=0;i>c;c++)s[c]=arguments[c];return n=r=l(this,(e=t.__proto__||(0,m.default)(t)).call.apply(e,[this].concat(s))),r.handleSelect=function(e,t){e.stopPropagation();var n=r.props,o=n.setDocumentType,i=n.nextStep;o(t),i()},r.renderOption=function(e){return(0,a.h)("div",{class:v.default.option,onClick:function(t){return r.handleSelect(t,e.value)}},(0,a.h)("div",{class:v.default.icon+" "+v.default[e.icon]}),(0,a.h)("span",null,e.label))},o=n,l(r,o)}return f(t,e),y(t,[{key:"render",value:function(){var e=this;return(0,a.h)("div",{class:v.default.selector},g.map(function(t){return e.renderOption(t)}))}}]),t}(a.Component),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(0),n(73),n(236)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=function(e){var t=e.error,o=r.errors[t.name],a="error"===t.type?"error":"warning";return(0,n.h)("div",{className:i.default["container-"+a]},(0,n.h)("div",{className:i.default.title},(0,n.h)("span",{className:i.default["title-icon-"+a]}),(0,n.h)("span",{className:i.default["title-text"]},o.message)),(0,n.h)("p",{className:i.default.instruction},o.instruction))},e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(28),n(158),n(0),n(136),n(134),n(125),n(128),n(126),n(142),n(138),n(137)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u,l,f){"use strict";function p(e){return e&&e.__esModule?e:{default:e}}function d(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return(0,h.default)(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.componentsList=void 0;var h=p(t),m=p(n),v=p(o),y=p(i),g=p(c),b=p(u),_=p(l),w=p(f),k=(e.componentsList=function(e){var t=e.flow,n=e.documentType,r=e.steps,o=e.mobileFlow,i="complete"===r[r.length-1].type,a=o?k(r,i):r;return"captureSteps"===t?O(x(n,o),a):O(S,E(i))},function(e,t){return t?e:[].concat(d(e),[{type:"complete"}])}),x=function(e,t){var n=t?[w.default]:[g.default];return{welcome:function(){return[v.default]},face:function(){return[a.FaceCapture,s.FaceConfirm]},document:function(){return C(e)},complete:function(){return n}}},C=function(e){var t=["driving_licence","national_identity_card"],n=[y.default,a.FrontDocumentCapture,s.DocumentFrontConfirm];return(0,m.default)(t,e)?[].concat(n,[a.BackDocumentCapture,s.DocumentBackConfrim]):n},E=function(e){var t=[{type:"crossDevice"}];return e?[].concat(t,[{type:"complete"}]):t},S={crossDevice:function(){return[_.default,b.default]},complete:function(){return[g.default]}},O=function(e,t){return A(t.map(function(t){return T(e,t)}))},T=function(e,t){var n=t.type;return n in e||console.error("No such step: "+n),e[n]().map(P(t))},P=function(e){return function(t){return{component:t,step:e}}},A=function(e){var t;return(t=[]).concat.apply(t,d(e))}})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(8),n(28),n(7),n(4),n(6),n(0),n(3),n(74)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n={};for(var r in e)0>t.indexOf(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function p(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return(0,y.default)(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(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 m(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=(0,b.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(g.default?(0,g.default)(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var v=l(n),y=l(r),g=l(o),b=l(i),_=l(a),w=v.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e){function t(e){d(this,t);var n=h(this,(t.__proto__||(0,_.default)(t)).call(this,e));return n.trackScreen=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.currentComponent(),o=r.step;(0,c.sendScreen)([o.type].concat(p((0,u.wrapArray)(e))),w({},t,o.options))},n.currentComponent=function(){return n.props.componentsList[n.props.step]},n.render=function(e){var t=f(e.options,[]),r=f(e,["options"]),o=n.currentComponent();return(0,s.h)("div",null,(0,s.h)(o.component,w({},w({},o.step.options,t,r),{trackScreen:n.trackScreen})))},n}return m(t,e),t}(s.Component),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(8),n(0),n(9),n(130),n(3)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var c=s(n),u=s(o),l=s(i),f=c.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(e){var t=e.actions.setDocumentType,n=e.data,o=n.title,i=n.hint;return(0,r.h)("div",{className:u.default.step},(0,r.h)("h1",{className:u.default.title},o),(0,r.h)("div",null,(0,r.h)("p",{className:u.default["mbottom-large"]},i),(0,r.h)(l.default,f({setDocumentType:t},e))))};p.defaultProps={data:{hint:"Select the type of document you would like to upload",title:"Verify your identity"}},t.default=(0,a.trackComponent)(p,"type_select"),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(38),n(37),n(0),n(104),n(9),n(240),n(73),n(3),n(143),n(144)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u,l){"use strict";function f(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.Uploader=void 0;var p=f(t),d=f(n),h=f(o),m=f(i),v=f(a),y=f(u),g=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=(0,d.default)(e);!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,p.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=function(e,t,n){var r=n?l.desktopCopy.instructions:l.mobileCopy.instructions;return"document"===e?r[e][t]:r[e]},_=function(e){var t=e.error,n=e.method,o=e.side,i=e.allowCrossDeviceFlow;return(0,r.h)("div",{className:v.default.base},(0,r.h)("span",{className:m.default.icon+" "+v.default.icon}),(0,r.h)("p",{className:v.default.text},b(n,o,i)),(0,r.h)(w,{error:s.errors[t.name]}))},w=function(e){var t=e.error;return t&&(0,r.h)("div",{className:v.default.text+" "+v.default.error},t.message+". "+t.instruction+".")},k=function(e){var t=e.method,n=e.side,o=e.onImageSelected,i=e.error,a=e.changeFlowTo,s=e.allowCrossDeviceFlow;return(0,r.h)("div",null,s&&(0,r.h)(y.default,{changeFlowTo:a}),(0,r.h)(h.default,{onDrop:function(e){var t=g(e,1),n=t[0];URL.revokeObjectURL(n.preview),delete n.preview,o(n)},multiple:!1,className:v.default.dropzone},(0,r.h)(_,{error:i,method:t,side:n,allowCrossDeviceFlow:s})))};e.Uploader=(0,c.trackComponentAndMode)(k,"file_upload","error")})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(0),n(9),n(241),n(12),n(3)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var c=s(r),u=s(o),l=function(e){var t=e.title,r=e.descriptions,o=e.nextButton,a=e.nextStep;return(0,n.h)("div",null,(0,n.h)("div",{className:c.default.step},(0,n.h)("h1",{className:c.default.title},t),(0,n.h)("div",{className:u.default["mtop-large"]+" "+c.default["mbottom-large"]},r.map(function(e){return(0,n.h)("p",null,e)})),(0,n.h)("a",{href:"",className:c.default.btn+" "+c.default["btn-centered"]+" "+c.default["btn-primary"],onClick:(0,i.preventDefaultOnClick)(a)},o)))};l.defaultProps={title:"Open your new bank account",descriptions:["To open a bank account, we will need to verify your identity.","It will only take a couple of minutes."],nextButton:"Verify Identity"},t.default=(0,a.trackComponent)(l),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(5),n(7),n(4),n(6),n(0),n(9),n(242),n(3)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(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 d(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=(0,v.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(m.default?(0,m.default)(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var h=l(n),m=l(r),v=l(o),y=l(i),g=l(s),b=l(c),_=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,h.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=(0,u.trackComponent)(function(e){function t(){return f(this,t),p(this,(t.__proto__||(0,y.default)(t)).apply(this,arguments))}return d(t,e),_(t,[{key:"componentDidMount",value:function(){this.props.sendClientSuccess()}},{key:"render",value:function(){return(0,a.h)("div",{className:b.default.base},(0,a.h)("h1",{className:g.default.title},"Uploads successful"),(0,a.h)("p",{className:g.default.center+" "+b.default.submessage},"You can now return to your computer to continue"),(0,a.h)("span",{className:g.default.icon+" "+b.default.icon}),(0,a.h)("div",{className:b.default.text},"Your computer may take a few seconds to update"))}}]),t}(a.Component),"crossdevice_mobile_success"),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(5),n(7),n(4),n(6),n(0),n(48),n(111),n(9),n(243),n(44),n(3)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u,l,f,p){"use strict";function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(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 y(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=(0,_.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(b.default?(0,b.default)(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var g=d(n),b=d(r),_=d(o),w=d(i),k=d(s),x=d(c),C=d(u),E=d(l),S=d(f),O=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,g.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),T=function(e){function t(e){m(this,t);var n=v(this,(t.__proto__||(0,w.default)(t)).call(this,e));if(n.unlisten=function(e){e&&(e.off("get config",n.onGetConfig),e.off("client success",n.onClientSuccess))},n.listen=function(e){e&&(e.on("get config",n.onGetConfig),e.on("client success",n.onClientSuccess))},n.onJoined=function(e){var t=n.props,r=t.actions;t.roomId||(r.setRoomId(e.roomId),n.setState({roomId:e.roomId}))},n.onGetConfig=function(e){var t=n.props,r=t.roomId,o=t.mobileConfig,i=t.socket,a=t.nextStep;r&&r!==e.roomId&&i.emit("leave",{roomId:r}),n.sendMessage("config",e.roomId,o),a()},n.onClientSuccess=function(){n.props.actions.setClientSuccess(!0),n.props.nextStep()},n.sendMessage=function(e,t,r){n.props.socket.emit("message",{event:e,payload:r,roomId:t})},n.render=function(){return n.props.roomId?(0,a.h)(P,{roomId:n.props.roomId}):(0,a.h)(S.default,null)},!e.socket){var r=(0,x.default)("https://sync.onfido.com",{autoConnect:!1});r.on("connect",function(){r.emit("join",{roomId:n.props.roomId||null})}),r.on("joined",n.onJoined),r.open(),e.actions.setSocket(r)}return n}return y(t,e),O(t,[{key:"componentDidMount",value:function(){this.listen(this.props.socket)}},{key:"componentWillReceiveProps",value:function(e){e.socket!==this.props.socket&&(this.unlisten(this.props.socket),this.listen(e.socket))}},{key:"componentWillUnmount",value:function(){this.unlisten(this.props.socket)}}]),t}(a.Component),P=function(e){function t(e){m(this,t);var n=v(this,(t.__proto__||(0,w.default)(t)).call(this,e));return n.copyToClipboard=function(e){n.textArea.select(),document.execCommand("copy"),e.target.focus(),n.setState({copySuccess:!0})},n.state={copySuccess:!1},n}return y(t,e),O(t,[{key:"render",value:function(e){var t=this,n=e.roomId,r="AA"+n,o="https://id.onfido.com/"+r,i=this.state.copySuccess?"Copied":"Copy link";return(0,a.h)("div",{className:C.default.step},(0,a.h)("h1",{className:C.default.title},"Continue verification on your mobile"),(0,a.h)("div",null,"Copy and send the below link to your mobile"),(0,a.h)("div",{className:E.default.linkSection},(0,a.h)("div",{className:E.default.linkTitle},"Secure link"),(0,a.h)("div",{className:(0,k.default)(E.default.actionContainer,h({},E.default.copySuccess,this.state.copySuccess))},(0,a.h)("textarea",{ref:function(e){return t.textArea=e},value:o}),document.queryCommandSupported("copy")&&(0,a.h)("button",{className:C.default.btn+" "+C.default["btn-primary"]+" "+E.default.btn,onClick:this.copyToClipboard},i)),(0,a.h)("div",{className:E.default.infoText},"This link will expire in one hour")),(0,a.h)("div",{className:C.default.header},"How do I do this?"),(0,a.h)("div",{className:C.default.help},(0,a.h)("ul",{className:E.default.helpList+" "+C.default.helpList},(0,a.h)("li",null,(0,a.h)("b",null,"OPTION 1:")," Copy link – Email to your mobile – Open"),(0,a.h)("li",null,(0,a.h)("b",null,"OPTION 2:")," Type link into your mobile web browser"))))}}]),t}(a.Component);t.default=(0,p.trackComponent)(T,"crossdevice_link"),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(5),n(7),n(4),n(6),n(0),n(3),n(12),n(9),n(244)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u,l){"use strict";function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(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 h(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=(0,y.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(v.default?(0,v.default)(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var m=f(n),v=f(r),y=f(o),g=f(i),b=f(u),_=f(l),w=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,m.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=(0,s.trackComponent)(function(e){function t(){var e,n,r,o;p(this,t);for(var i=arguments.length,a=Array(i),s=0;i>s;s++)a[s]=arguments[s];return n=r=d(this,(e=t.__proto__||(0,g.default)(t)).call.apply(e,[this].concat(a))),r.hasMultipleDocuments=function(){return r.props.steps.filter(function(e){return"document"===e.type}).length>1},r.hasFace=function(){return r.props.steps.filter(function(e){return"face"===e.type}).length>0},o=n,d(r,o)}return h(t,e),w(t,[{key:"render",value:function(){var e=this.hasMultipleDocuments()?"Documents uploaded":"Document uploaded";return(0,a.h)("div",null,(0,a.h)("div",{className:b.default.step},(0,a.h)("h1",{className:b.default.title},"Great, that’s everything we need"),(0,a.h)("p",{className:b.default.center+" "+_.default.submessage},"We’re now ready to verify your identity"),(0,a.h)("ul",{className:_.default.uploadList},(0,a.h)("li",null,(0,a.h)("span",{className:b.default.icon+" "+_.default.icon}),(0,a.h)("span",{className:_.default.listText},e)),this.hasFace()&&(0,a.h)("li",null,(0,a.h)("span",{className:b.default.icon+" "+_.default.icon}),(0,a.h)("span",{className:_.default.listText},"Selfie uploaded"))),(0,a.h)("div",null,(0,a.h)("button",{className:b.default.btn+" "+b.default["btn-primary"]+" "+b.default["btn-centered"],onClick:(0,c.preventDefaultOnClick)(this.props.nextStep)},"Submit verification"))))}}]),t}(a.Component),"desktop_submit"),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(5),n(7),n(4),n(6),n(0),n(9),n(245),n(3)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(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 d(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=(0,v.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(m.default?(0,m.default)(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var h=l(n),m=l(r),v=l(o),y=l(i),g=l(s),b=l(c),_=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,h.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=function(e){function t(){return f(this,t),p(this,(t.__proto__||(0,y.default)(t)).apply(this,arguments))}return d(t,e),_(t,[{key:"componentDidMount",value:function(){(0,u.sendScreen)(["generic_client_error"])}},{key:"render",value:function(){return(0,a.h)("div",{className:g.default.step+" "+b.default.step},(0,a.h)("h1",{className:g.default.title},"Something’s gone wrong"),(0,a.h)("p",{className:g.default.center+" "+b.default.submessage},"You’ll need to restart your verification on your computer"),(0,a.h)("span",{className:g.default.icon+" "+b.default.icon}))}}]),t}(a.Component),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(0),n(9),n(246),n(3),n(12)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var c=s(r),u=s(o),l=function(e){var t=e.message,r=e.submessage,o=e.back;return(0,n.h)("div",{className:c.default.step},(0,n.h)("h1",{className:c.default.title},t),(0,n.h)("p",{className:u.default.submessage},r),(0,n.h)("span",{className:c.default.icon+" "+u.default.icon}),(0,n.h)("div",{className:c.default.header},"Tips"),(0,n.h)("div",{className:u.default.help+" "+c.default.help},(0,n.h)("ul",{className:u.default.helpList+" "+c.default.helpList},(0,n.h)("li",null,"Keep this window open while using your mobile"),(0,n.h)("li",null,"Your mobile link will expire in one hour"),(0,n.h)("li",null,"Don't refresh this page"))),(0,n.h)("div",{href:"#",className:u.default.cancel,onClick:(0,a.preventDefaultOnClick)(o)},"Cancel"))};l.defaultProps={message:"Connected to your mobile",submessage:"Once you've finished we'll take you to the next step"},t.default=(0,i.trackComponent)(l,"mobile_connected"),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(5),n(7),n(4),n(6),n(0),n(141),n(139)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c){"use strict";function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(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 p(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=(0,m.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(h.default?(0,h.default)(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var d=u(n),h=u(r),m=u(o),v=u(i),y=u(s),g=u(c),b=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,d.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=function(e){function t(){var e,n,r,o;l(this,t);for(var i=arguments.length,s=Array(i),c=0;i>c;c++)s[c]=arguments[c];return n=r=f(this,(e=t.__proto__||(0,v.default)(t)).call.apply(e,[this].concat(s))),r.sendConfig=function(e){var t=r.props,n=t.roomId,o=t.mobileConfig,i=t.socket,a=t.actions;n&&n!==e.roomId&&i.emit("leave",{roomId:n}),a.setRoomId(e.roomId),r.sendMessage("config",e.roomId,o)},r.sendMessage=function(e,t,n){r.props.socket.emit("message",{event:e,payload:n,roomId:t})},r.onClientSuccess=function(){r.props.actions.setClientSuccess(!0)},r.onDisconnectPing=function(e){r.sendMessage("disconnect pong",e.roomId)},r.render=function(e){return r.props.clientSuccess?(0,a.h)(g.default,e):(0,a.h)(y.default,e)},o=n,f(r,o)}return p(t,e),b(t,[{key:"componentDidMount",value:function(){this.props.socket.on("disconnect ping",this.onDisconnectPing),this.props.socket.on("get config",this.sendConfig),this.props.socket.on("client success",this.onClientSuccess)}},{key:"componentWillUnmount",value:function(){this.props.socket.off("disconnect ping"),this.props.socket.off("get config"),this.props.socket.off("client success");var e=this.props;e.socket.emit("disconnecting",{roomId:e.roomId})}}]),t}(a.Component),e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(0),n(12),n(247)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=function(e){var t=e.changeFlowTo;return(0,n.h)("a",{href:"#",onClick:(0,r.preventDefaultOnClick)(function(){return t("crossDeviceSteps")})},(0,n.h)("div",{className:i.default.container},(0,n.h)("div",{className:i.default.icon}),(0,n.h)("div",{className:i.default.copy},(0,n.h)("div",{className:i.default.header},"Need to use your mobile to take photos?"),(0,n.h)("p",{className:i.default.submessage},"Securely continue verification on your mobile")),(0,n.h)("div",{className:i.default.chevron})))},e.exports=t.default})},function(e,t,n){var r,o,i;!function(n,a){o=[t],r=a,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.desktopCopy={instructions:{document:{front:"Upload front of document from your computer",back:"Upload back of document from your computer"},face:"Upload a photo of your face"}},e.mobileCopy={instructions:{document:{front:"Take a photo of document front",back:"Take a photo of document back"},face:"Take a photo of your face"}}})},function(e,t,n){var r,o,i;!function(n,a){o=[t],r=a,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=function(e){var t=e.split(".")[1],n=t.replace("-","+").replace("_","/");return JSON.parse(atob(n))};e.jwtExpired=function(e){var n=t(e).exp;return(Date.now()/1e3|0)>n}})},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(8),n(47),n(76),n(102),n(46)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.uploadLivePhoto=e.uploadDocument=void 0;var s=a(t),c=a(n),u=a(o),l=s.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(e,t){var n=e.response;return t({status:e.status,response:JSON.parse(n)})},p=function(e){var t={detect_document:"error"};return(0,i.isOfFileType)(["pdf"],e.file)?t:l({},t,{detect_glare:"warn"})},d=(e.uploadDocument=function(e,t,n,r){var o=p(e);e=l({},e,{sdk_validations:(0,c.default)(o)});h("https://api.onfido.com/v2/documents",e,t,n,r)},e.uploadLivePhoto=function(e,t,n,r){h("https://api.onfido.com/v2/live_photos",e,t,n,r)},function(e){var t=new FormData;return(0,u.default)(e,function(e,n){return t.append(n,e)}),t}),h=function(e,t,n,o,i){t=l({},t,{sdk_source:"onfido_web_sdk",sdk_version:"2.0.0-rc.2"});var a={payload:d(t),endpoint:e,token:"Bearer "+n};(0,r.performHttpReq)(a,o,function(e){return f(e,i)})}})},function(e,t,n){var r,o,i;!function(n,a){o=[e,t],r=a,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return Math.random().toString(36).substring(7)},e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(76),n(3)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.postToBackend=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n),o=function(e,t){var n=e.status,o=e.response;console.error(n,o),r.default.sendError(n+" - "+o),t()};e.postToBackend=function(e,n,r,i){(0,t.performHttpReq)({payload:e,endpoint:"https://sdk.onfido.com/validate_document",token:n,contentType:"application/json"},r,function(e){return o(e,i)})}})},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(8),n(22)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deleteCaptures=e.validateCapture=e.createCapture=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(t),o=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}(n),i=r.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){return e},s=function(e,t){return function(n){return{type:e,payload:(t||a)(n)}}};e.createCapture=s(o.CAPTURE_CREATE,function(e){return i({maxCaptures:3},e)}),e.validateCapture=s(o.CAPTURE_VALIDATE,function(e){return i({valid:!0},e)}),e.deleteCaptures=s(o.CAPTURE_DELETE)})},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(22)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t){"use strict";function n(e){return{type:a.SET_DOCUMENT_TYPE,payload:e}}function r(e){return{type:a.SET_ROOM_ID,payload:e}}function o(e){return{type:a.SET_SOCKET,payload:e}}function i(e){return{type:a.SET_CLIENT_SUCCESS,payload:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.setDocumentType=n,e.setRoomId=r,e.setSocket=o,e.setClientSuccess=i;var a=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)})},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(8),n(34),n(77),n(150),n(149),n(22)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a){"use strict";function s(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 c(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.actions=e.unboundActions=void 0;var u=c(t),l=c(r),f=s(o),p=s(i),d=u.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h=function(e){return{type:a.RESET_STORE,payload:e}},m=e.unboundActions=d({},f,p,{reset:h});e.actions=(0,n.bindActionCreators)(m,l.default.dispatch)})},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(28),n(5),n(8),n(22)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return(0,u.default)(e)}function s(e,t,n){return t in e?(0,l.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=arguments[1],n=t.payload||{},r=n.method,o=e[r],i=function(t){return d({},e,s({},r,t))},c=m.bind(this,o,function(e){return e.id===n.id});switch(t.type){case p.CAPTURE_CREATE:return i([n.capture].concat(a(o.slice(0,n.maxCaptures-1))));case p.CAPTURE_VALIDATE:return i(c({valid:n.valid,processed:!0}));case p.CAPTURE_DELETE:return i(o.filter(function(e){return e.side!==n.side}));default:return e}}Object.defineProperty(e,"__esModule",{value:!0}),e.captures=c;var u=i(t),l=i(n),f=i(r),p=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}(o),d=f.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h={document:[],face:[]},m=function(e,t,n){return e.map(function(e){return t(e)?d({},e,n):e})}})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(8),n(22)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r){"use strict";function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=arguments[1];switch(t.type){case a.SET_DOCUMENT_TYPE:return s({},e,{documentType:t.payload});case a.SET_ROOM_ID:return s({},e,{roomId:t.payload});case a.SET_SOCKET:return s({},e,{socket:t.payload});case a.SET_CLIENT_SUCCESS:return s({},e,{clientSuccess:t.payload});default:return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=function(e){return e&&e.__esModule?e:{default:e}}(n),a=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}(r),s=i.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c={documentType:null,roomId:null,socket:null,clientSuccess:!1};e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(34),n(152),n(153),n(22)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){return e&&e.__esModule?e:{default:e}}(o),s=(0,n.combineReducers)({captures:r.captures,globals:a.default});t.default=function(e,t){return t.type===i.RESET_STORE?s({},{}):s(e,t)},e.exports=t.default})},function(e,t,n){var r,o,i;!function(a,s){o=[t,n(293)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.socket=e.allInvalidCaptureSelector=e.unprocessedCaptures=e.currentValidCaptures=void 0;var n=function(e,t){var n=t.method,r=t.side,o=void 0===r?null:r;return e.captures[n].filter(function(e){return e.side===o})};e.currentValidCaptures=(0,t.createSelector)(n,function(e){return e.filter(function(e){return e.valid})}),e.unprocessedCaptures=(0,t.createSelector)(n,function(e){return e.filter(function(e){return!e.processed})}),e.allInvalidCaptureSelector=(0,t.createSelector)(n,function(e){return e.length>0&&e.every(function(e){return e.processed&&!e.valid})}),e.socket=function(e){return e.globals.socket}})},function(e,t,n){var r,o,i;!function(a,s){o=[e,t,n(70),n(69),n(8),n(0),n(36),n(120),n(35),n(118),n(119),n(3)],r=s,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t,n,r,o,i,a,s,c,u,l,f){"use strict";function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var n={};for(var r in e)0>t.indexOf(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var h=p(n),m=p(r),v=p(o),y=p(s),g=p(u),b=p(l),_=p(f),w="function"==typeof m.default&&"symbol"==typeof h.default?function(e){return typeof e}:function(e){return e&&"function"==typeof m.default&&e.constructor===m.default&&e!==m.default.prototype?"symbol":typeof e},k=v.default||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x=new y.default;_.default.setUp();var C=function(e){var t=e.options,n=t.useModal,r=t.isModalOpen,o=t.buttonId,a=d(t,["useModal","isModalOpen","buttonId"]),s=d(e,["options"]);return(0,i.h)(g.default,k({useModal:n,buttonId:o},{isOpen:r}),(0,i.h)(b.default,k({options:a},s)))},E=function(e){return(0,i.h)(a.Provider,{store:c.store},(0,i.h)(C,{options:e.options}))},S=function(e,t,n){return(0,i.render)((0,i.h)(E,{options:e}),t,n)};x.on("complete",function(){return _.default.sendEvent("completed flow")});var O=function(e){x.on("complete",e.onComplete)},T=function(e,t){x.off("complete",e.onComplete),O(t)},P={},A=function(){},D={token:"some token",buttonId:"onfido-button",containerId:"onfido-mount",onComplete:A},M=function(e){return"object"===(void 0===e?"undefined":w(e))},j=function(e){return M(e)?e:{type:e}},N=function(e){var t=e.steps,n=d(e,["steps"]);return k({},n,{steps:(t||["welcome","document","face","complete"]).map(j)})};P.init=function(e){console.log("onfido_sdk_version","2.0.0-rc.2"),_.default.track();var t=N(k({},D,e,{events:x}));O(t);var n=document.getElementById(t.containerId);return{options:t,element:S(t,n),setOptions:function(e){var t=this.options;return this.options=N(k({},this.options,e)),T(t,this.options),this.element=S(this.options,n,this.element),this.options},tearDown:function(){var e=c.selectors.socket(c.store.getState());e&&e.close(),c.actions.reset(),(0,i.render)(null,n,this.element)}}},t.default=P,e.exports=t.default})},function(e,t,n){e.exports={default:n(166),__esModule:!0}},function(e,t,n){e.exports={default:n(168),__esModule:!0}},function(e,t,n){e.exports={default:n(175),__esModule:!0}},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&1>=e.jitter?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},function(e,t){!function(){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;e.length>r;r++)n[e.charCodeAt(r)]=r;t.encode=function(t){var n,r=new Uint8Array(t),o=r.length,i="";for(n=0;o>n;n+=3)i+=e[r[n]>>2],i+=e[(3&r[n])<<4|r[n+1]>>4],i+=e[(15&r[n+1])<<2|r[n+2]>>6],i+=e[63&r[n+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},t.decode=function(e){var t,r,o,i,a,s=.75*e.length,c=e.length,u=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var l=new ArrayBuffer(s),f=new Uint8Array(l);for(t=0;c>t;t+=4)r=n[e.charCodeAt(t)],o=n[e.charCodeAt(t+1)],i=n[e.charCodeAt(t+2)],a=n[e.charCodeAt(t+3)],f[u++]=r<<2|o>>4,f[u++]=(15&o)<<4|i>>2,f[u++]=(3&i)<<6|63&a;return l}}()},function(e,t,n){(function(t){function n(e){for(var t=0;e.length>t;t++){var n=e[t];if(n.buffer instanceof ArrayBuffer){var r=n.buffer;if(n.byteLength!==r.byteLength){var o=new Uint8Array(n.byteLength);o.set(new Uint8Array(r,n.byteOffset,n.byteLength)),r=o.buffer}e[t]=r}}}function r(e,t){t=t||{};var r=new i;n(e);for(var o=0;e.length>o;o++)r.append(e[o]);return t.type?r.getBlob(t.type):r.getBlob()}function o(e,t){return n(e),new Blob(e,t||{})}var i=t.BlobBuilder||t.WebKitBlobBuilder||t.MSBlobBuilder||t.MozBlobBuilder,a=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),s=a&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),c=i&&i.prototype.append&&i.prototype.getBlob;e.exports=function(){return a?s?t.Blob:o:c?r:void 0}()}).call(t,n(1))},function(e,t,n){var r,o,i;!function(a){"use strict";o=[n(29),n(78)],r=a,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(function(e){"use strict";e.ExifMap=function(){return this},e.ExifMap.prototype.map={Orientation:274},e.ExifMap.prototype.get=function(e){return this[e]||this[this.map[e]]},e.getExifThumbnail=function(e,t,n){var r,o,i;if(!n||t+n>e.byteLength)return void console.log("Invalid Exif data: Invalid thumbnail data.");for(r=[],o=0;n>o;o+=1)i=e.getUint8(t+o),r.push((16>i?"0":"")+i.toString(16));return"data:image/jpeg,%"+r.join("%")},e.exifTagTypes={1:{getValue:function(e,t){return e.getUint8(t)},size:1},2:{getValue:function(e,t){return String.fromCharCode(e.getUint8(t))},size:1,ascii:!0},3:{getValue:function(e,t,n){return e.getUint16(t,n)},size:2},4:{getValue:function(e,t,n){return e.getUint32(t,n)},size:4},5:{getValue:function(e,t,n){return e.getUint32(t,n)/e.getUint32(t+4,n)},size:8},9:{getValue:function(e,t,n){return e.getInt32(t,n)},size:4},10:{getValue:function(e,t,n){return e.getInt32(t,n)/e.getInt32(t+4,n)},size:8}},e.exifTagTypes[7]=e.exifTagTypes[1],e.getExifValue=function(t,n,r,o,i,a){var s,c,u,l,f,p,d=e.exifTagTypes[o];if(!d)return void console.log("Invalid Exif data: Invalid tag type.");if(s=d.size*i,(c=s>4?n+t.getUint32(r+8,a):r+8)+s>t.byteLength)return void console.log("Invalid Exif data: Invalid data offset.");if(1===i)return d.getValue(t,c,a);for(u=[],l=0;i>l;l+=1)u[l]=d.getValue(t,c+l*d.size,a);if(d.ascii){for(f="",l=0;u.length>l&&"\0"!==(p=u[l]);l+=1)f+=p;return f}return u},e.parseExifTag=function(t,n,r,o,i){i.exif[t.getUint16(r,o)]=e.getExifValue(t,n,r,t.getUint16(r+2,o),t.getUint32(r+4,o),o)},e.parseExifTags=function(e,t,n,r,o){var i,a,s;if(n+6>e.byteLength)return void console.log("Invalid Exif data: Invalid directory offset.");if(i=e.getUint16(n,r),(a=n+2+12*i)+4>e.byteLength)return void console.log("Invalid Exif data: Invalid directory size.");for(s=0;i>s;s+=1)this.parseExifTag(e,t,n+2+12*s,r,o);return e.getUint32(a,r)},e.parseExifData=function(t,n,r,o,i){if(!i.disableExif){var a,s,c,u=n+10;if(1165519206===t.getUint32(n+4)){if(u+8>t.byteLength)return void console.log("Invalid Exif data: Invalid segment size.");if(0!==t.getUint16(n+8))return void console.log("Invalid Exif data: Missing byte alignment offset.");switch(t.getUint16(u)){case 18761:a=!0;break;case 19789:a=!1;break;default:return void console.log("Invalid Exif data: Invalid byte alignment marker.")}if(42!==t.getUint16(u+2,a))return void console.log("Invalid Exif data: Missing TIFF marker.");s=t.getUint32(u+4,a),o.exif=new e.ExifMap,s=e.parseExifTags(t,u,u+s,a,o),s&&!i.disableExifThumbnail&&(c={exif:{}},s=e.parseExifTags(t,u,u+s,a,c),c.exif[513]&&(o.exif.Thumbnail=e.getExifThumbnail(t,u+c.exif[513],c.exif[514]))),o.exif[34665]&&!i.disableExifSub&&e.parseExifTags(t,u,u+o.exif[34665],a,o),o.exif[34853]&&!i.disableExifGps&&e.parseExifTags(t,u,u+o.exif[34853],a,o)}}},e.metaDataParsers.jpeg[65505].push(e.parseExifData)})},function(e,t,n){var r,o,i;!function(a){"use strict";o=[n(29),n(165),n(78)],r=a,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(function(e){"use strict";var t=e.hasCanvasOption,n=e.hasMetaOption,r=e.transformCoordinates,o=e.getTransformedOptions;e.hasCanvasOption=function(n){return!!n.orientation||t.call(e,n)},e.hasMetaOption=function(t){return t&&!0===t.orientation||n.call(e,t)},e.transformCoordinates=function(t,n){r.call(e,t,n);var o=t.getContext("2d"),i=t.width,a=t.height,s=t.style.width,c=t.style.height,u=n.orientation;if(u&&8>=u)switch(u>4&&(t.width=a,t.height=i,t.style.width=c,t.style.height=s),u){case 2:o.translate(i,0),o.scale(-1,1);break;case 3:o.translate(i,a),o.rotate(Math.PI);break;case 4:o.translate(0,a),o.scale(1,-1);break;case 5:o.rotate(.5*Math.PI),o.scale(1,-1);break;case 6:o.rotate(.5*Math.PI),o.translate(0,-a);break;case 7:o.rotate(.5*Math.PI),o.translate(i,-a),o.scale(-1,1);break;case 8:o.rotate(-.5*Math.PI),o.translate(-i,0)}},e.getTransformedOptions=function(t,n,r){var i,a,s=o.call(e,t,n),c=s.orientation;if(!0===c&&r&&r.exif&&(c=r.exif.get("Orientation")),!c||c>8||1===c)return s;i={};for(a in s)s.hasOwnProperty(a)&&(i[a]=s[a]);switch(i.orientation=c,c){case 2:i.left=s.right,i.right=s.left;break;case 3:i.left=s.right,i.top=s.bottom,i.right=s.left,i.bottom=s.top;break;case 4:i.top=s.bottom,i.bottom=s.top;break;case 5:i.left=s.top,i.top=s.left,i.right=s.bottom,i.bottom=s.right;break;case 6:i.left=s.top,i.top=s.right,i.right=s.bottom,i.bottom=s.left;break;case 7:i.left=s.bottom,i.top=s.right,i.right=s.top,i.bottom=s.left;break;case 8:i.left=s.bottom,i.top=s.left,i.right=s.top,i.bottom=s.right}return i.orientation>4&&(i.maxWidth=s.maxHeight,i.maxHeight=s.maxWidth,i.minWidth=s.minHeight,i.minHeight=s.minWidth,i.sourceWidth=s.sourceHeight,i.sourceHeight=s.sourceWidth),i}})},function(e,t,n){var r,o,i;!function(a){"use strict";o=[n(29)],r=a,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(function(e){"use strict";var t=e.transform;e.transform=function(n,r,o,i,a){t.call(e,e.scale(n,r,a),r,o,i,a)},e.transformCoordinates=function(){},e.getTransformedOptions=function(e,t){var n,r,o,i,a=t.aspectRatio;if(!a)return t;n={};for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n.crop=!0,o=e.naturalWidth||e.width,i=e.naturalHeight||e.height,o/i>a?(n.maxWidth=i*a,n.maxHeight=i):(n.maxWidth=o,n.maxHeight=o/a),n},e.renderImageToCanvas=function(e,t,n,r,o,i,a,s,c,u){return e.getContext("2d").drawImage(t,n,r,o,i,a,s,c,u),e},e.hasCanvasOption=function(e){return e.canvas||e.crop||!!e.aspectRatio},e.scale=function(t,n,r){function o(){var e=Math.max((c||w)/w,(u||k)/k);e>1&&(w*=e,k*=e)}function i(){var e=Math.min((a||w)/w,(s||k)/k);1>e&&(w*=e,k*=e)}n=n||{};var a,s,c,u,l,f,p,d,h,m,v,y=document.createElement("canvas"),g=t.getContext||e.hasCanvasOption(n)&&y.getContext,b=t.naturalWidth||t.width,_=t.naturalHeight||t.height,w=b,k=_;if(g&&(n=e.getTransformedOptions(t,n,r),p=n.left||0,d=n.top||0,n.sourceWidth?(l=n.sourceWidth,void 0!==n.right&&void 0===n.left&&(p=b-l-n.right)):l=b-p-(n.right||0),n.sourceHeight?(f=n.sourceHeight,void 0!==n.bottom&&void 0===n.top&&(d=_-f-n.bottom)):f=_-d-(n.bottom||0),w=l,k=f),a=n.maxWidth,s=n.maxHeight,c=n.minWidth,u=n.minHeight,g&&a&&s&&n.crop?(w=a,k=s,v=l/f-a/s,0>v?(f=s*l/a,void 0===n.top&&void 0===n.bottom&&(d=(_-f)/2)):v>0&&(l=a*f/s,void 0===n.left&&void 0===n.right&&(p=(b-l)/2))):((n.contain||n.cover)&&(c=a=a||c,u=s=s||u),n.cover?(i(),o()):(o(),i())),g){if(h=n.pixelRatio,h>1&&(y.style.width=w+"px",y.style.height=k+"px",w*=h,k*=h,y.getContext("2d").scale(h,h)),(m=n.downsamplingRatio)>0&&1>m&&l>w&&f>k)for(;l*m>w;)y.width=l*m,y.height=f*m,e.renderImageToCanvas(y,t,p,d,l,f,0,0,y.width,y.height),p=0,d=0,l=y.width,f=y.height,t=document.createElement("canvas"),t.width=l,t.height=f,e.renderImageToCanvas(t,y,0,0,l,f,0,0,l,f);return y.width=w,y.height=k,e.transformCoordinates(y,n),e.renderImageToCanvas(y,t,p,d,l,f,0,0,w,k)}return t.width=w,t.height=k,t}})},function(e,t,n){n(204),e.exports=n(2).Array.filter},function(e,t,n){n(42),n(205),e.exports=n(2).Array.from},function(e,t,n){n(214),e.exports=n(2).Array.includes},function(e,t,n){n(64),n(42),e.exports=n(202)},function(e,t,n){n(64),n(42),e.exports=n(203)},function(e,t,n){var r=n(2),o=r.JSON||(r.JSON={stringify:JSON.stringify});e.exports=function(e){return o.stringify.apply(o,arguments)}},function(e,t,n){n(207),e.exports=n(2).Object.assign},function(e,t,n){n(208);var r=n(2).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){n(209);var r=n(2).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){n(215),e.exports=n(2).Object.entries},function(e,t,n){n(210),e.exports=n(2).Object.getPrototypeOf},function(e,t,n){n(211),e.exports=n(2).Object.setPrototypeOf},function(e,t,n){n(213),n(212),n(216),n(217),e.exports=n(2).Symbol},function(e,t,n){n(42),n(64),e.exports=n(63).f("iterator")},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(40),o=n(52),i=n(33),a=n(60),s=n(183);e.exports=function(e,t){var n=1==e,c=2==e,u=3==e,l=4==e,f=6==e,p=5==e||f,d=t||s;return function(t,s,h){for(var m,v,y=i(t),g=o(y),b=r(s,h,3),_=a(g.length),w=0,k=n?d(t,_):c?d(t,0):void 0;_>w;w++)if((p||w in g)&&(m=g[w],v=b(m,w,y),e))if(n)k[w]=v;else if(v)switch(e){case 3:return!0;case 5:return m;case 6:return w;case 2:k.push(m)}else if(l)return!1;return f?-1:u||l?l:k}}},function(e,t,n){var r=n(25),o=n(85),i=n(10)("species");e.exports=function(e){var t;return o(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var r=n(182);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){"use strict";var r=n(16),o=n(32);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){var r=n(30),o=n(55),i=n(31);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var a,s=n(e),c=i.f,u=0;s.length>u;)c.call(e,a=s[u++])&&t.push(a);return t}},function(e,t,n){var r=n(15).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(26),o=n(10)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(17);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){"use strict";var r=n(54),o=n(32),i=n(56),a={};n(24)(a,n(10)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(10)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(41)("meta"),o=n(25),i=n(20),a=n(16).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(19)(function(){return c(Object.preventExtensions({}))}),l=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},f=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!c(e))return"F";if(!t)return"E";l(e)}return e[r].i},p=function(e,t){if(!i(e,r)){if(!c(e))return!0;if(!t)return!1;l(e)}return e[r].w},d=function(e){return u&&h.NEED&&c(e)&&!i(e,r)&&l(e),e},h=e.exports={KEY:r,NEED:!1,fastKey:f,getWeak:p,onFreeze:d}},function(e,t,n){"use strict";var r=n(30),o=n(55),i=n(31),a=n(33),s=n(52),c=Object.assign;e.exports=!c||n(19)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=r})?function(e,t){for(var n=a(e),c=arguments.length,u=1,l=o.f,f=i.f;c>u;)for(var p,d=s(arguments[u++]),h=l?r(d).concat(l(d)):r(d),m=h.length,v=0;m>v;)f.call(d,p=h[v++])&&(n[p]=d[p]);return n}:c},function(e,t,n){var r=n(16),o=n(17),i=n(30);e.exports=n(18)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),s=a.length,c=0;s>c;)r.f(e,n=a[c++],t[n]);return e}},function(e,t,n){var r=n(21),o=n(88).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return o(e)}catch(e){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?s(e):o(r(e))}},function(e,t,n){var r=n(11),o=n(2),i=n(19);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(e,t,n){var r=n(30),o=n(21),i=n(31).f;e.exports=function(e){return function(t){for(var n,a=o(t),s=r(a),c=s.length,u=0,l=[];c>u;)i.call(a,n=s[u++])&&l.push(e?[n,a[n]]:a[n]);return l}}},function(e,t,n){var r=n(25),o=n(17),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(40)(Function.call,n(87).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){"use strict";var r=n(19);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){var r=n(59),o=n(50);e.exports=function(e){return function(t,n){var i,a,s=o(t)+"",c=r(n),u=s.length;return 0>c||c>=u?e?"":void 0:(i=s.charCodeAt(c),55296>i||i>56319||c+1===u||56320>(a=s.charCodeAt(c+1))||a>57343?e?s.charAt(c):i:e?s.slice(c,c+2):a-56320+(i-55296<<10)+65536)}}},function(e,t,n){var r=n(59),o=Math.max,i=Math.min;e.exports=function(e,t){return e=r(e),0>e?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(17),o=n(92);e.exports=n(2).getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){var r=n(82),o=n(10)("iterator"),i=n(26);e.exports=n(2).isIterable=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||i.hasOwnProperty(r(t))}},function(e,t,n){"use strict";var r=n(11),o=n(181)(2);r(r.P+r.F*!n(199)([].filter,!0),"Array",{filter:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(40),o=n(11),i=n(33),a=n(188),s=n(187),c=n(60),u=n(184),l=n(92);o(o.S+o.F*!n(190)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,o,f,p=i(e),d="function"==typeof this?this:Array,h=arguments.length,m=h>1?arguments[1]:void 0,v=void 0!==m,y=0,g=l(p);if(v&&(m=r(m,h>2?arguments[2]:void 0,2)),void 0==g||d==Array&&s(g))for(t=c(p.length),n=new d(t);t>y;y++)u(n,y,v?m(p[y],y):p[y]);else for(f=g.call(p),n=new d;!(o=f.next()).done;y++)u(n,y,v?a(f,m,[o.value,y],!0):o.value);return n.length=y,n}})},function(e,t,n){"use strict";var r=n(80),o=n(191),i=n(26),a=n(21);e.exports=n(86)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return e&&e.length>n?"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]]):(this._t=void 0,o(1))},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var r=n(11);r(r.S+r.F,"Object",{assign:n(193)})},function(e,t,n){var r=n(11);r(r.S,"Object",{create:n(54)})},function(e,t,n){var r=n(11);r(r.S+r.F*!n(18),"Object",{defineProperty:n(16).f})},function(e,t,n){var r=n(33),o=n(89);n(196)("getPrototypeOf",function(){return function(e){return o(r(e))}})},function(e,t,n){var r=n(11);r(r.S,"Object",{setPrototypeOf:n(198).set})},function(e,t){},function(e,t,n){"use strict";var r=n(15),o=n(20),i=n(18),a=n(11),s=n(91),c=n(192).KEY,u=n(19),l=n(58),f=n(56),p=n(41),d=n(10),h=n(63),m=n(62),v=n(185),y=n(85),g=n(17),b=n(21),_=n(61),w=n(32),k=n(54),x=n(195),C=n(87),E=n(16),S=n(30),O=C.f,T=E.f,P=x.f,A=r.Symbol,D=r.JSON,M=D&&D.stringify,j=d("_hidden"),N=d("toPrimitive"),R={}.propertyIsEnumerable,I=l("symbol-registry"),L=l("symbols"),U=l("op-symbols"),F=Object.prototype,B="function"==typeof A,W=r.QObject,q=!W||!W.prototype||!W.prototype.findChild,H=i&&u(function(){return 7!=k(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=O(F,t);r&&delete F[t],T(e,t,n),r&&e!==F&&T(F,t,r)}:T,V=function(e){var t=L[e]=k(A.prototype);return t._k=e,t},z=B&&"symbol"==typeof A.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof A},K=function(e,t,n){return e===F&&K(U,t,n),g(e),t=_(t,!0),g(n),o(L,t)?(n.enumerable?(o(e,j)&&e[j][t]&&(e[j][t]=!1),n=k(n,{enumerable:w(0,!1)})):(o(e,j)||T(e,j,w(1,{})),e[j][t]=!0),H(e,t,n)):T(e,t,n)},G=function(e,t){g(e);for(var n,r=v(t=b(t)),o=0,i=r.length;i>o;)K(e,n=r[o++],t[n]);return e},X=function(e,t){return void 0===t?k(e):G(k(e),t)},$=function(e){var t=R.call(this,e=_(e,!0));return!(this===F&&o(L,e)&&!o(U,e))&&(!(t||!o(this,e)||!o(L,e)||o(this,j)&&this[j][e])||t)},J=function(e,t){if(e=b(e),t=_(t,!0),e!==F||!o(L,t)||o(U,t)){var n=O(e,t);return!n||!o(L,t)||o(e,j)&&e[j][t]||(n.enumerable=!0),n}},Y=function(e){for(var t,n=P(b(e)),r=[],i=0;n.length>i;)o(L,t=n[i++])||t==j||t==c||r.push(t);return r},Q=function(e){for(var t,n=e===F,r=P(n?U:b(e)),i=[],a=0;r.length>a;)!o(L,t=r[a++])||n&&!o(F,t)||i.push(L[t]);return i};B||(A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===F&&t.call(U,n),o(this,j)&&o(this[j],e)&&(this[j][e]=!1),H(this,e,w(1,n))};return i&&q&&H(F,e,{configurable:!0,set:t}),V(e)},s(A.prototype,"toString",function(){return this._k}),C.f=J,E.f=K,n(88).f=x.f=Y,n(31).f=$,n(55).f=Q,i&&!n(53)&&s(F,"propertyIsEnumerable",$,!0),h.f=function(e){return V(d(e))}),a(a.G+a.W+a.F*!B,{Symbol:A});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Z.length>ee;)d(Z[ee++]);for(var te=S(d.store),ne=0;te.length>ne;)m(te[ne++]);a(a.S+a.F*!B,"Symbol",{for:function(e){return o(I,e+="")?I[e]:I[e]=A(e)},keyFor:function(e){if(!z(e))throw TypeError(e+" is not a symbol!");for(var t in I)if(I[t]===e)return t},useSetter:function(){q=!0},useSimple:function(){q=!1}}),a(a.S+a.F*!B,"Object",{create:X,defineProperty:K,defineProperties:G,getOwnPropertyDescriptor:J,getOwnPropertyNames:Y,getOwnPropertySymbols:Q}),D&&a(a.S+a.F*(!B||u(function(){var e=A();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!z(e)){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);return t=r[1],"function"==typeof t&&(n=t),!n&&y(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!z(t))return t}),r[1]=t,M.apply(D,r)}}}),A.prototype[N]||n(24)(A.prototype,N,A.prototype.valueOf),f(A,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,n){"use strict";var r=n(11),o=n(81)(!0);r(r.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(80)("includes")},function(e,t,n){var r=n(11),o=n(197)(!0);r(r.S,"Object",{entries:function(e){return o(e)}})},function(e,t,n){n(62)("asyncIterator")},function(e,t,n){n(62)("observable")},function(e,t,n){var r,o;!function(i,a){r=a,void 0!==(o="function"==typeof r?r.call(t,n,t,e):r)&&(e.exports=o)}(0,function(e,t,n){return function(e,t,n,r,o,i){for(var a=0,s=["webkit","moz","ms","o"],c=0;4>c&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[s[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[s[c]+"CancelAnimationFrame"]||window[s[c]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,t){var n=(new Date).getTime(),r=Math.max(0,16-(n-a)),o=window.setTimeout(function(){e(n+r)},r);return a=n+r,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)});var u=this;u.options={useEasing:!0,useGrouping:!0,separator:",",decimal:".",easingFn:null,formattingFn:null};for(var l in i)i.hasOwnProperty(l)&&(u.options[l]=i[l]);""===u.options.separator&&(u.options.useGrouping=!1),u.options.prefix||(u.options.prefix=""),u.options.suffix||(u.options.suffix=""),u.d="string"==typeof e?document.getElementById(e):e,u.startVal=+t,u.endVal=+n,u.countDown=u.startVal>u.endVal,u.frameVal=u.startVal,u.decimals=Math.max(0,r||0),u.dec=Math.pow(10,u.decimals),u.duration=1e3*+o||2e3,u.formatNumber=function(e){e=e.toFixed(u.decimals),e+="";var t,n,r,o;if(t=e.split("."),n=t[0],r=t.length>1?u.options.decimal+t[1]:"",o=/(\d+)(\d{3})/,u.options.useGrouping)for(;o.test(n);)n=n.replace(o,"$1"+u.options.separator+"$2");return u.options.prefix+n+r+u.options.suffix},u.easeOutExpo=function(e,t,n,r){return n*(1-Math.pow(2,-10*e/r))*1024/1023+t},u.easingFn=u.options.easingFn?u.options.easingFn:u.easeOutExpo,u.formattingFn=u.options.formattingFn?u.options.formattingFn:u.formatNumber,u.version=function(){return"1.7.1"},u.printValue=function(e){var t=u.formattingFn(e);"INPUT"===u.d.tagName?this.d.value=t:"text"===u.d.tagName||"tspan"===u.d.tagName?this.d.textContent=t:this.d.innerHTML=t},u.count=function(e){u.startTime||(u.startTime=e),u.timestamp=e;var t=e-u.startTime;u.remaining=u.duration-t,u.frameVal=u.options.useEasing?u.countDown?u.startVal-u.easingFn(t,0,u.startVal-u.endVal,u.duration):u.easingFn(t,u.startVal,u.endVal-u.startVal,u.duration):u.countDown?u.startVal-t/u.duration*(u.startVal-u.endVal):u.startVal+t/u.duration*(u.endVal-u.startVal),u.frameVal=u.countDown?u.endVal>u.frameVal?u.endVal:u.frameVal:u.frameVal>u.endVal?u.endVal:u.frameVal,u.frameVal=Math.round(u.frameVal*u.dec)/u.dec,u.printValue(u.frameVal),u.duration>t?u.rAF=requestAnimationFrame(u.count):u.callback&&u.callback()},u.start=function(e){return u.callback=e,u.rAF=requestAnimationFrame(u.count),!1},u.pauseResume=function(){u.paused?(u.paused=!1,delete u.startTime,u.duration=u.remaining,u.startVal=u.frameVal,requestAnimationFrame(u.count)):(u.paused=!0,cancelAnimationFrame(u.rAF))},u.reset=function(){u.paused=!1,delete u.startTime,u.startVal=t,cancelAnimationFrame(u.rAF),u.printValue(u.startVal)},u.update=function(e){cancelAnimationFrame(u.rAF),u.paused=!1,delete u.startTime,u.startVal=u.frameVal,u.endVal=+e,u.countDown=u.startVal>u.endVal,u.rAF=requestAnimationFrame(u.count)},u.printValue(u.startVal)}})},function(e,t,n){function r(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}function o(e){function n(){if(n.enabled){var e=n,r=+new Date;e.diff=r-(u||r),e.prev=u,e.curr=r,u=r;for(var o=Array(arguments.length),i=0;o.length>i;i++)o[i]=arguments[i];o[0]=t.coerce(o[0]),"string"!=typeof o[0]&&o.unshift("%O");var a=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;a++;var i=t.formatters[r];if("function"==typeof i){n=i.call(e,o[a]),o.splice(a,1),a--}return n}),t.formatArgs.call(e,o);(n.log||t.log||console.log.bind(console)).apply(e,o)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=r(e),"function"==typeof t.init&&t.init(n),n}function i(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,o=0;r>o;o++)n[o]&&(e=n[o].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(RegExp("^"+e.substr(1)+"$")):t.names.push(RegExp("^"+e+"$")))}function a(){t.enable("")}function s(e){var n,r;for(n=0,r=t.skips.length;r>n;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;r>n;n++)if(t.names[n].test(e))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=o.debug=o.default=o,t.coerce=c,t.disable=a,t.enable=i,t.enabled=s,t.humanize=n(266),t.names=[],t.skips=[],t.formatters={};var u},function(e,t){function n(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function r(e){if(!(this instanceof r))return new r(e);e||(e={}),e.nodeType&&(e={el:e}),this.opts=e,"object"!=typeof(this.el=e.el||document.body)&&(this.el=document.querySelector(this.el))}e.exports=function(e){return new r(e)},r.prototype.add=function(e){var t=this.el;if(t){if(""===t.className)return t.className=e;var r=t.className.split(" ");return n(r,e)>-1?r:(r.push(e),t.className=r.join(" "),r)}},r.prototype.remove=function(e){var t=this.el;if(t&&""!==t.className){var r=t.className.split(" "),o=n(r,e);return o>-1&&r.splice(o,1),t.className=r.join(" "),r}},r.prototype.has=function(e){var t=this.el;if(t){return n(t.className.split(" "),e)>-1}},r.prototype.toggle=function(e){this.el&&(this.has(e)?this.remove(e):this.add(e))}},function(e,t,n){e.exports=n(222),e.exports.parser=n(27)},function(e,t,n){(function(t){function r(e,n){if(!(this instanceof r))return new r(e,n);n=n||{},e&&"object"==typeof e&&(n=e,e=null),e?(e=l(e),n.hostname=e.host,n.secure="https"===e.protocol||"wss"===e.protocol,n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=l(n.host).host),this.secure=null!=n.secure?n.secure:t.location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.agent=n.agent||!1,this.hostname=n.hostname||(t.location?location.hostname:"localhost"),this.port=n.port||(t.location&&location.port?location.port:this.secure?443:80),this.query=n.query||{},"string"==typeof this.query&&(this.query=f.decode(this.query)),this.upgrade=!1!==n.upgrade,this.path=(n.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!n.forceJSONP,this.jsonp=!1!==n.jsonp,this.forceBase64=!!n.forceBase64,this.enablesXDR=!!n.enablesXDR,this.timestampParam=n.timestampParam||"t",this.timestampRequests=n.timestampRequests,this.transports=n.transports||["polling","websocket"],this.transportOptions=n.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=n.policyPort||843,this.rememberUpgrade=n.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=n.onlyBinaryUpgrades,this.perMessageDeflate=!1!==n.perMessageDeflate&&(n.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=n.pfx||null,this.key=n.key||null,this.passphrase=n.passphrase||null,this.cert=n.cert||null,this.ca=n.ca||null,this.ciphers=n.ciphers||null,this.rejectUnauthorized=void 0===n.rejectUnauthorized||n.rejectUnauthorized,this.forceNode=!!n.forceNode;var o="object"==typeof t&&t;o.global===o&&(n.extraHeaders&&Object.keys(n.extraHeaders).length>0&&(this.extraHeaders=n.extraHeaders),n.localAddress&&(this.localAddress=n.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}function o(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var i=n(93),a=n(23),s=n(14)("engine.io-client:socket"),c=n(98),u=n(27),l=n(103),f=n(43);e.exports=r,r.priorWebsocketSuccess=!1,a(r.prototype),r.protocol=u.protocol,r.Socket=r,r.Transport=n(65),r.transports=n(93),r.parser=n(27),r.prototype.createTransport=function(e){s('creating transport "%s"',e);var t=o(this.query);t.EIO=u.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new i[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0})},r.prototype.open=function(){var e;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},r.prototype.setTransport=function(e){s("setting transport %s",e.name);var t=this;this.transport&&(s("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},r.prototype.probe=function(e){function t(){if(p.onlyBinaryUpgrades){var t=!this.supportsBinary&&p.transport.supportsBinary;f=f||t}f||(s('probe transport "%s" opened',e),l.send([{type:"ping",data:"probe"}]),l.once("packet",function(t){if(!f)if("pong"===t.type&&"probe"===t.data){if(s('probe transport "%s" pong',e),p.upgrading=!0,p.emit("upgrading",l),!l)return;r.priorWebsocketSuccess="websocket"===l.name,s('pausing current transport "%s"',p.transport.name),p.transport.pause(function(){f||"closed"!==p.readyState&&(s("changing transport and sending upgrade packet"),u(),p.setTransport(l),l.send([{type:"upgrade"}]),p.emit("upgrade",l),l=null,p.upgrading=!1,p.flush())})}else{s('probe transport "%s" failed',e);var n=Error("probe error");n.transport=l.name,p.emit("upgradeError",n)}}))}function n(){f||(f=!0,u(),l.close(),l=null)}function o(t){var r=Error("probe error: "+t);r.transport=l.name,n(),s('probe transport "%s" failed because of error: %s',e,t),p.emit("upgradeError",r)}function i(){o("transport closed")}function a(){o("socket closed")}function c(e){l&&e.name!==l.name&&(s('"%s" works - aborting "%s"',e.name,l.name),n())}function u(){l.removeListener("open",t),l.removeListener("error",o),l.removeListener("close",i),p.removeListener("close",a),p.removeListener("upgrading",c)}s('probing transport "%s"',e);var l=this.createTransport(e,{probe:1}),f=!1,p=this;r.priorWebsocketSuccess=!1,l.once("open",t),l.once("error",o),l.once("close",i),this.once("close",a),this.once("upgrading",c),l.open()},r.prototype.onOpen=function(){if(s("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){s("starting upgrade probes");for(var e=0,t=this.upgrades.length;t>e;e++)this.probe(this.upgrades[e])}},r.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(s('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else s('packet received with socket readyState "%s"',this.readyState)},r.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},r.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!==t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},r.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){s("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},r.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})},r.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},r.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(s("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},r.prototype.write=r.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},r.prototype.sendPacket=function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){n=n||{},n.compress=!1!==n.compress;var o={type:e,data:t,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},r.prototype.close=function(){function e(){r.onClose("forced close"),s("socket closing - telling transport to close"),r.transport.close()}function t(){r.removeListener("upgrade",t),r.removeListener("upgradeError",t),e()}function n(){r.once("upgrade",t),r.once("upgradeError",t)}if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():e()}):this.upgrading?n():e()}return this},r.prototype.onError=function(e){s("socket error %j",e),r.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},r.prototype.onClose=function(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){s('socket close with reason: "%s"',e);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),n.writeBuffer=[],n.prevBufferLen=0}},r.prototype.filterUpgrades=function(e){for(var t=[],n=0,r=e.length;r>n;n++)~c(this.transports,e[n])&&t.push(e[n]);return t}}).call(t,n(1))},function(e,t,n){(function(t){function r(){}function o(e){i.call(this,e),this.query=this.query||{},s||(t.___eio||(t.___eio=[]),s=t.___eio),this.index=s.length;var n=this;s.push(function(e){n.onData(e)}),this.query.j=this.index,t.document&&t.addEventListener&&t.addEventListener("beforeunload",function(){n.script&&(n.script.onerror=r)},!1)}var i=n(94),a=n(39);e.exports=o;var s,c=/\n/g,u=/\\n/g;a(o,i),o.prototype.supportsBinary=!1,o.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),i.prototype.doClose.call(this)},o.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},o.prototype.doWrite=function(e,t){function n(){r(),t()}function r(){if(o.iframe)try{o.form.removeChild(o.iframe)}catch(e){o.onError("jsonp polling iframe removal error",e)}try{var e='