@imposium-hub/components 1.33.2 → 1.33.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,5 +5,5 @@
5
5
  *
6
6
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
7
7
  * Released under the MIT license
8
- */!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=i(),!!0){var a=window.Cookies,s=window.Cookies=i();s.noConflict=function(){return window.Cookies=a,s}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var l=t(s[0]);if(c=(r.read||r)(c,l)||t(c),n)try{c=JSON.parse(c)}catch(e){}if(o[l]=c,e===l)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t,n){"use strict";n.r(t),function(e,r){n.d(t,"Authentication",(function(){return Ht})),n.d(t,"Management",(function(){return Ut})),n.d(t,"WebAuth",(function(){return Lt})),n.d(t,"version",(function(){return se}));var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function i(e,t){return e(t={exports:{}},t.exports),t.exports}var a=i((function(e){var t,n;t=o,n=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<e.length;r++){var o=e[r];if("string"!=typeof o)throw new TypeError("Url must be a string. Received "+o);""!==o&&(r>0&&(o=o.replace(/^[\/]+/,"")),o=r<e.length-1?o.replace(/[\/]+$/,""):o.replace(/[\/]+$/,"/"),t.push(o))}var i=t.join("/"),a=(i=i.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a.shift()+(a.length>0?"?":"")+a.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=n():t.urljoin=n()})),s=Object.prototype.hasOwnProperty,c=Array.isArray,l=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},p={arrayToObject:u,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],i=o.obj[o.prop],a=Object.keys(i),s=0;s<a.length;++s){var l=a[s],u=i[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:i,prop:l}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(c(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n){if(0===e.length)return e;var r=e;if("symbol"==typeof e?r=Symbol.prototype.toString.call(e):"string"!=typeof e&&(r=String(e)),"iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",i=0;i<r.length;++i){var a=r.charCodeAt(i);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?o+=r.charAt(i):a<128?o+=l[a]:a<2048?o+=l[192|a>>6]+l[128|63&a]:a<55296||a>=57344?o+=l[224|a>>12]+l[128|a>>6&63]+l[128|63&a]:(i+=1,a=65536+((1023&a)<<10|1023&r.charCodeAt(i)),o+=l[240|a>>18]+l[128|a>>12&63]+l[128|a>>6&63]+l[128|63&a])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(c(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(c(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!s.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var o=t;return c(t)&&!c(n)&&(o=u(t,r)),c(t)&&c(n)?(n.forEach((function(n,o){if(s.call(t,o)){var i=t[o];i&&"object"==typeof i&&n&&"object"==typeof n?t[o]=e(i,n,r):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var i=n[o];return s.call(t,o)?t[o]=e(t[o],i,r):t[o]=i,t}),o)}},f=String.prototype.replace,d=/%20/g,h={RFC1738:"RFC1738",RFC3986:"RFC3986"},v=p.assign({default:h.RFC3986,formatters:{RFC1738:function(e){return f.call(e,d,"+")},RFC3986:function(e){return String(e)}}},h),g=Object.prototype.hasOwnProperty,m={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},y=Array.isArray,b=Array.prototype.push,_=function(e,t){b.apply(e,y(t)?t:[t])},w=Date.prototype.toISOString,x=v.default,E={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:p.encode,encodeValuesOnly:!1,format:x,formatter:v.formatters[x],indices:!1,serializeDate:function(e){return w.call(e)},skipNulls:!1,strictNullHandling:!1},O=function e(t,n,r,o,i,a,s,c,l,u,f,d,h){var v=t;if("function"==typeof s?v=s(n,v):v instanceof Date?v=u(v):"comma"===r&&y(v)&&(v=p.maybeMap(v,(function(e){return e instanceof Date?u(e):e})).join(",")),null===v){if(o)return a&&!d?a(n,E.encoder,h,"key"):n;v=""}if(function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(v)||p.isBuffer(v))return a?[f(d?n:a(n,E.encoder,h,"key"))+"="+f(a(v,E.encoder,h,"value"))]:[f(n)+"="+f(String(v))];var g,m=[];if(void 0===v)return m;if(y(s))g=s;else{var b=Object.keys(v);g=c?b.sort(c):b}for(var w=0;w<g.length;++w){var x=g[w],O=v[x];if(!i||null!==O){var C=y(v)?"function"==typeof r?r(n,x):n:n+(l?"."+x:"["+x+"]");_(m,e(O,C,r,o,i,a,s,c,l,u,f,d,h))}}return m},C=Object.prototype.hasOwnProperty,T=Array.isArray,A={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:p.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},S=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},P=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},k=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(o),s=a?o.slice(0,a.index):o,c=[];if(s){if(!n.plainObjects&&C.call(Object.prototype,s)&&!n.allowPrototypes)return;c.push(s)}for(var l=0;n.depth>0&&null!==(a=i.exec(o))&&l<n.depth;){if(l+=1,!n.plainObjects&&C.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+o.slice(a.index)+"]"),function(e,t,n,r){for(var o=r?t:P(t,n),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=o:a[c]=o:a={0:o}}o=a}return o}(c,t,n,r)}},j=function(e,t){var n,r=e,o=function(e){if(!e)return E;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||E.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=v.default;if(void 0!==e.format){if(!g.call(v.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=v.formatters[n],o=E.filter;return("function"==typeof e.filter||y(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:E.addQueryPrefix,allowDots:void 0===e.allowDots?E.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:E.charsetSentinel,delimiter:void 0===e.delimiter?E.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:E.encode,encoder:"function"==typeof e.encoder?e.encoder:E.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:E.encodeValuesOnly,filter:o,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:E.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:E.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:E.strictNullHandling}}(t);"function"==typeof o.filter?r=(0,o.filter)("",r):y(o.filter)&&(n=o.filter);var i,a=[];if("object"!=typeof r||null===r)return"";i=t&&t.arrayFormat in m?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=m[i];n||(n=Object.keys(r)),o.sort&&n.sort(o.sort);for(var c=0;c<n.length;++c){var l=n[c];o.skipNulls&&null===r[l]||_(a,O(r[l],l,s,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.formatter,o.encodeValuesOnly,o.charset))}var u=a.join(o.delimiter),p=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),u.length>0?p+u:""},I=i((function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}})),N=L;L.default=L,L.stable=F,L.stableStringify=F;var R=[],D=[];function L(e,t,n){var r;for(function e(t,n,r,o){var i;if("object"==typeof t&&null!==t){for(i=0;i<r.length;i++)if(r[i]===t){var a=Object.getOwnPropertyDescriptor(o,n);return void(void 0!==a.get?a.configurable?(Object.defineProperty(o,n,{value:"[Circular]"}),R.push([o,n,t,a])):D.push([t,n]):(o[n]="[Circular]",R.push([o,n,t])))}if(r.push(t),Array.isArray(t))for(i=0;i<t.length;i++)e(t[i],i,r,t);else{var s=Object.keys(t);for(i=0;i<s.length;i++){var c=s[i];e(t[c],c,r,t)}}r.pop()}}(e,"",[],void 0),r=0===D.length?JSON.stringify(e,t,n):JSON.stringify(e,H(t),n);0!==R.length;){var o=R.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return r}function M(e,t){return e<t?-1:e>t?1:0}function F(e,t,n){var r,o=function e(t,n,r,o){var i;if("object"==typeof t&&null!==t){for(i=0;i<r.length;i++)if(r[i]===t){var a=Object.getOwnPropertyDescriptor(o,n);return void(void 0!==a.get?a.configurable?(Object.defineProperty(o,n,{value:"[Circular]"}),R.push([o,n,t,a])):D.push([t,n]):(o[n]="[Circular]",R.push([o,n,t])))}if("function"==typeof t.toJSON)return;if(r.push(t),Array.isArray(t))for(i=0;i<t.length;i++)e(t[i],i,r,t);else{var s={},c=Object.keys(t).sort(M);for(i=0;i<c.length;i++){var l=c[i];e(t[l],l,r,t),s[l]=t[l]}if(void 0===o)return s;R.push([o,n,t]),o[n]=s}r.pop()}}(e,"",[],void 0)||e;for(r=0===D.length?JSON.stringify(o,t,n):JSON.stringify(o,H(t),n);0!==R.length;){var i=R.pop();4===i.length?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}return r}function H(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(D.length>0)for(var r=0;r<D.length;r++){var o=D[r];if(o[1]===t&&o[0]===n){n="[Circular]",D.splice(r,1);break}}return e.call(this,t,n)}}function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var z=function(e){return null!==e&&"object"===U(e)};function B(e){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var V=q;function q(e){if(e)return function(e){for(var t in q.prototype)Object.prototype.hasOwnProperty.call(q.prototype,t)&&(e[t]=q.prototype[t]);return e}(e)}q.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},q.prototype.parse=function(e){return this._parser=e,this},q.prototype.responseType=function(e){return this._responseType=e,this},q.prototype.serialize=function(e){return this._serializer=e,this},q.prototype.timeout=function(e){if(!e||"object"!==B(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},q.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var G=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];q.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!==t.status)return!0;if(e){if(e.code&&G.includes(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},q.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},q.prototype.then=function(e,t){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){r.on("abort",(function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)t(n.timedoutError);else{var e=new Error("Aborted");e.code="ABORTED",e.status=n.status,e.method=n.method,e.url=n.url,t(e)}})),r.end((function(n,r){n?t(n):e(r)}))}))}return this._fullfilledPromise.then(e,t)},q.prototype.catch=function(e){return this.then(void 0,e)},q.prototype.use=function(e){return e(this),this},q.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},q.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},q.prototype.get=function(e){return this._header[e.toLowerCase()]},q.prototype.getHeader=q.prototype.get,q.prototype.set=function(e,t){if(z(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},q.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},q.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(z(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.field(e,t[r]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),this._getFormData().append(e,t),this},q.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},q.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},q.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},q.prototype.redirects=function(e){return this._maxRedirects=e,this},q.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},q.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},q.prototype.send=function(e){var t=z(e),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&z(this._data))for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this._data[r]=e[r]);else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},q.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},q.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.slice(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,t)+"?"+n.join("&")}}},q.prototype._appendQueryString=function(){console.warn("Unsupported")},q.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error("".concat(e+t,"ms exceeded"));r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},q.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))};var W=Y;function Y(e){if(e)return function(e){for(var t in Y.prototype)Object.prototype.hasOwnProperty.call(Y.prototype,t)&&(e[t]=Y.prototype[t]);return e}(e)}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $(){this._defaults=[]}Y.prototype.get=function(e){return this.header[e.toLowerCase()]},Y.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=t.split(/ *; */).shift();var n=function(e){return e.split(/ *; */).reduce((function(e,t){var n=t.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(e[r]=o),e}),{})}(t);for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(this[r]=n[r]);this.links={};try{e.link&&(this.links=function(e){return e.split(/ *, */).reduce((function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e}),{})}(e.link))}catch(e){}},Y.prototype._setStatusProperties=function(e){var t=e/100|0;this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e},["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(e){$.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this._defaults.push({fn:e,args:n}),this}})),$.prototype._setDefaults=function(e){this._defaults.forEach((function(t){e[t.fn].apply(e,function(e){return function(e){if(Array.isArray(e))return X(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return X(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X(e,void 0):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.args))}))};for(var J=$,K=i((function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;function o(){}"undefined"!=typeof window?r=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),r=void 0):r=self,e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1===arguments.length?new t.Request("GET",e):new t.Request(e,n)};var i=t=e.exports;t.Request=f,i.getXHR=function(){if(r.XMLHttpRequest&&(!r.location||"file:"!==r.location.protocol||!r.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("Browser-only version of superagent could not find XHR")};var a="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function s(e){if(!z(e))return e;var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&c(t,n,e[n]);return t.join("&")}function c(e,t,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach((function(n){c(e,t,n)}));else if(z(n))for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&c(e,"".concat(t,"[").concat(r,"]"),n[r]);else e.push(encodeURI(t)+"="+encodeURIComponent(n));else e.push(encodeURI(t))}function l(e){for(var t,n,r={},o=e.split("&"),i=0,a=o.length;i<a;++i)-1===(n=(t=o[i]).indexOf("="))?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function u(e){return/[/+]json($|[^-\w])/.test(e)}function p(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){for(var t,n,r,o,i=e.split(/\r?\n/),s={},c=0,l=i.length;c<l;++c)-1!==(t=(n=i[c]).indexOf(":"))&&(r=n.slice(0,t).toLowerCase(),o=a(n.slice(t+1)),s[r]=o);return s}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function f(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,r=null;try{r=new p(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",r);try{n._isResponseOK(r)||(e=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=r,e.status=r.status,n.callback(e,r)):n.callback(null,r)}))}function d(e,t,n){var r=i("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}i.serializeObject=s,i.parseString=l,i.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},i.serialize={"application/x-www-form-urlencoded":s,"application/json":N},i.parse={"application/x-www-form-urlencoded":l,"application/json":JSON.parse},W(p.prototype),p.prototype._parseBody=function(e){var t=i.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&u(this.type)&&(t=i.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},p.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),o=new Error(r);return o.status=this.status,o.method=t,o.url=n,o},i.Response=p,I(f.prototype),V(f.prototype),f.prototype.type=function(e){return this.set("Content-Type",i.types[e]||e),this},f.prototype.accept=function(e){return this.set("Accept",i.types[e]||e),this},f.prototype.auth=function(e,t,r){1===arguments.length&&(t=""),"object"===n(t)&&null!==t&&(r=t,t=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var o=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,r,o)},f.prototype.query=function(e){return"string"!=typeof e&&(e=s(e)),e&&this._query.push(e),this},f.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},f.prototype._getFormData=function(){return this._formData||(this._formData=new r.FormData),this._formData},f.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},f.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},f.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},f.prototype.ca=f.prototype.agent,f.prototype.buffer=f.prototype.ca,f.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},f.prototype.pipe=f.prototype.write,f.prototype._isHost=function(e){return e&&"object"===n(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},f.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||o,this._finalizeQueryString(),this._end()},f.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},f.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=i.getXHR();var t=this.xhr,n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",r.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",r.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],a=this._serializer||i.serialize[o?o.split(";")[0]:""];!a&&u(o)&&(a=i.serialize["application/json"]),a&&(n=a(n))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&t.setRequestHeader(s,this.header[s]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},i.agent=function(){return new J},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){J.prototype[e.toLowerCase()]=function(t,n){var r=new i.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}})),J.prototype.del=J.prototype.delete,i.get=function(e,t,n){var r=i("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},i.head=function(e,t,n){var r=i("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},i.options=function(e,t,n){var r=i("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},i.del=d,i.delete=d,i.patch=function(e,t,n){var r=i("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},i.post=function(e,t,n){var r=i("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},i.put=function(e,t,n){var r=i("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}})),Q=(K.Request,[]),Z=[],ee=("undefined"!=typeof Uint8Array&&Uint8Array,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),te=0,ne=ee.length;te<ne;++te)Q[te]=ee[te],Z[ee.charCodeAt(te)]=te;function re(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&t,[n,n===t?0:4-n%4]}function oe(e,t,n){for(var r,o,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(Q[(o=r)>>18&63]+Q[o>>12&63]+Q[o>>6&63]+Q[63&o]);return i.join("")}Z["-".charCodeAt(0)]=62,Z["_".charCodeAt(0)]=63;var ie=function(e){for(var t,n=e.length,r=n%3,o=[],i=0,a=n-r;i<a;i+=16383)o.push(oe(e,i,i+16383>a?a:i+16383));return 1===r?(t=e[n-1],o.push(Q[t>>2]+Q[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(Q[t>>10]+Q[t>>4&63]+Q[t<<2&63]+"=")),o.join("")},ae=function(e){return ie(function(e){for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(e)).replace(/\+/g,"-").replace(/\//g,"_")},se={raw:"9.16.2"},ce=Object.prototype.toString;function le(e,t,n,r){if(n="array"===n?"object":n,e&&typeof e[t]!==n)throw new Error(r)}function ue(e,t,n){if(typeof e!==t)throw new Error(n)}function pe(e,t,n){if(-1===t.indexOf(e))throw new Error(n)}var fe={check:function(e,t,n){if(t.optional&&!e||ue(e,t.type,t.message),"object"===t.type&&n)for(var r=Object.keys(n),o=0;o<r.length;o++){var i=r[o];n[i].optional&&!e[i]||n[i].condition&&!n[i].condition(e)||(le(e,i,n[i].type,n[i].message),n[i].values&&pe(e[i],n[i].values,n[i].value_message))}},attribute:le,variable:ue,value:pe,isArray:function(e){return this.supportsIsArray()?Array.isArray(e):"[object Array]"===ce.call(e)},supportsIsArray:function(){return null!=Array.isArray}};function de(e){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o=Object.keys(Object(r)),i=0,a=o.length;i<a;i++){var s=o[i],c=Object.getOwnPropertyDescriptor(r,s);void 0!==c&&c.enumerable&&(t[s]=r[s])}}return t}var he=function(){return Object.assign?Object.assign:de};function ve(e,t){return t.reduce((function(t,n){return e[n]&&(t[n]=e[n]),t}),{})}function ge(e){var t=[];for(var n in e)t.push(e[n]);return t}function me(){var e=ge(arguments);return e.unshift({}),he().apply(void 0,e)}function ye(e){var t=e.match(/^(https?:|file:|chrome-extension:)\/\/(([^:/?#]*)(?::([0-9]+))?)([/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return t&&{href:e,protocol:t[1],host:t[2],hostname:t[3],port:t[4],pathname:t[5],search:t[6],hash:t[7]}}function be(e,t){var n=me(e);return e[t]&&(n[t]=e[t].trim()),n}var _e={toSnakeCase:function e(t,n){return"object"!=typeof t||fe.isArray(t)||null===t?t:(n=n||[],Object.keys(t).reduce((function(r,o){return r[-1===n.indexOf(o)?function(e){for(var t,n="",r=0,o=!0,i=!0;r<e.length;)t=e.charCodeAt(r),!i&&t>=65&&t<=90||!o&&t>=48&&t<=57?(n+="_",n+=e[r].toLowerCase()):n+=e[r].toLowerCase(),o=t>=48&&t<=57,i=t>=65&&t<=90,r++;return n}(o):o]=e(t[o]),r}),{}))},toCamelCase:function e(t,n,r){return"object"!=typeof t||fe.isArray(t)||null===t?t:(n=n||[],r=r||{},Object.keys(t).reduce((function(o,i){var a,s=-1===n.indexOf(i)?(a=i.split("_")).reduce((function(e,t){return e+t.charAt(0).toUpperCase()+t.slice(1)}),a.shift()):i;return o[s]=e(t[s]||t[i],[],r),r.keepOriginal&&(o[i]=e(t[i],[],r)),o}),{}))},blacklist:function(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})},merge:function(e,t){return{base:t?ve(e,t):e,with:function(e,t){return e=t?ve(e,t):e,me(this.base,e)}}},pick:ve,getKeysNotIn:function(e,t){var n=[];for(var r in e)-1===t.indexOf(r)&&n.push(r);return n},extend:me,getOriginFromUrl:function(e){if(e){var t=ye(e);if(!t)return null;var n=t.protocol+"//"+t.hostname;return t.port&&(n+=":"+t.port),n}},getLocationFromUrl:ye,trimUserDetails:function(e){return function(e,t){return["username","email","phoneNumber"].reduce(be,e)}(e)},updatePropertyOn:function e(t,n,r){"string"==typeof n&&(n=n.split("."));var o=n[0];t.hasOwnProperty(o)&&(1===n.length?t[o]=r:e(t[o],n.slice(1),r))}};function we(e){this.request=e,this.method=e.method,this.url=e.url,this.body=e._data,this.headers=e._header}function xe(e){this.request=e}function Ee(e){this._sendTelemetry=!1!==e._sendTelemetry||e._sendTelemetry,this._telemetryInfo=e._telemetryInfo||null,this._timesToRetryFailedRequests=e._timesToRetryFailedRequests,this.headers=e.headers||{},this._universalLoginPage=e.universalLoginPage}function Oe(){return window}we.prototype.abort=function(){this.request.abort()},we.prototype.getMethod=function(){return this.method},we.prototype.getBody=function(){return this.body},we.prototype.getUrl=function(){return this.url},we.prototype.getHeaders=function(){return this.headers},xe.prototype.set=function(e,t){return this.request=this.request.set(e,t),this},xe.prototype.send=function(e){return this.request=this.request.send(_e.trimUserDetails(e)),this},xe.prototype.withCredentials=function(){return this.request=this.request.withCredentials(),this},xe.prototype.end=function(e){return this.request.end(e),new we(this.request)},Ee.prototype.setCommonConfiguration=function(e,t){if(t=t||{},this._timesToRetryFailedRequests>0&&(e=e.retry(this._timesToRetryFailedRequests)),t.noHeaders)return e;var n=this.headers;e=e.set("Content-Type","application/json");for(var r=Object.keys(this.headers),o=0;o<r.length;o++)e=e.set(r[o],n[r[o]]);return this._sendTelemetry&&(e=e.set("Auth0-Client",this.getTelemetryData())),e},Ee.prototype.getTelemetryData=function(){var e=this._universalLoginPage?"auth0.js-ulp":"auth0.js",t={name:e,version:se.raw};this._telemetryInfo&&((t=_e.extend({},this._telemetryInfo)).env=_e.extend({},this._telemetryInfo.env),t.env[e]=se.raw);var n=JSON.stringify(t);return ae(n)},Ee.prototype.get=function(e,t){return new xe(this.setCommonConfiguration(K.get(e),t))},Ee.prototype.post=function(e,t){return new xe(this.setCommonConfiguration(K.post(e),t))},Ee.prototype.patch=function(e,t){return new xe(this.setCommonConfiguration(K.patch(e),t))};var Ce={redirect:function(e){Oe().location=e},getDocument:function(){return Oe().document},getWindow:Oe,getOrigin:function(){var e=Oe().location,t=e.origin;return t||(t=_e.getOriginFromUrl(e.href)),t}};function Te(){}Te.prototype.getItem=function(){return null},Te.prototype.removeItem=function(){},Te.prototype.setItem=function(){};var Ae=i((function(e,t){var n;n=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var l=t(s[0]);if(c=(r.read||r)(c,l)||t(c),n)try{c=JSON.parse(c)}catch(e){}if(o[l]=c,e===l)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))},e.exports=n()}));function Se(){}function Pe(e){this.disableWarnings=e.disableWarnings}function ke(e){if(this.warn=new Pe({}),this.storage=new Se,!0===e.__tryLocalStorageFirst)try{var t=Ce.getWindow().localStorage;t&&(this.storage=t)}catch(e){this.warn.warning(e),this.warn.warning("Can't use localStorage. Using CookieStorage instead.")}}function je(e){this.handler=new ke(e)}function Ie(e){this.storage=new je(e)}function Ne(e,t){return{error:e,errorDescription:t}}Se.prototype.getItem=function(e){return Ae.get(e)},Se.prototype.removeItem=function(e){Ae.remove(e)},Se.prototype.setItem=function(e,t,n){var r=_e.extend({expires:1},n);"https:"===Ce.getWindow().location.protocol&&(r.secure=!0),Ae.set(e,t,r)},Pe.prototype.warning=function(e){this.disableWarnings||console.warn(e)},ke.prototype.failover=function(){this.storage instanceof Te?this.warn.warning("DummyStorage: ignore failover"):this.storage instanceof Se?(this.warn.warning("CookieStorage: failing over DummyStorage"),this.storage=new Te):(this.warn.warning("LocalStorage: failing over CookieStorage"),this.storage=new Se)},ke.prototype.getItem=function(e){try{return this.storage.getItem(e)}catch(t){return this.warn.warning(t),this.failover(),this.getItem(e)}},ke.prototype.removeItem=function(e){try{return this.storage.removeItem(e)}catch(t){return this.warn.warning(t),this.failover(),this.removeItem(e)}},ke.prototype.setItem=function(e,t,n){try{return this.storage.setItem(e,t,n)}catch(r){return this.warn.warning(r),this.failover(),this.setItem(e,t,n)}},je.prototype.getItem=function(e){var t=this.handler.getItem(e);try{return JSON.parse(t)}catch(e){return t}},je.prototype.removeItem=function(e){return this.handler.removeItem(e)},je.prototype.setItem=function(e,t,n){var r=JSON.stringify(t);return this.handler.setItem(e,r,n)},Ie.prototype.set=function(e,t){var n={lastUsedConnection:e,lastUsedSub:t};this.storage.setItem("auth0.ssodata",JSON.stringify(n))},Ie.prototype.get=function(){var e=this.storage.getItem("auth0.ssodata");if(e)return JSON.parse(e)};var Re={buildResponse:Ne,invalidToken:function(e){return Ne("invalid_token",e)}};function De(e,t){return(t=t||{}).ignoreCasing=!!t.ignoreCasing&&t.ignoreCasing,function(n,r){var o;return n||r?(!n&&r.err&&(n=r.err,r=null),!n&&r.error&&(n=r,r=null),n?(o={original:n},_e.updatePropertyOn(o,"original.response.req._data.password","*****"),n.response&&n.response.statusCode&&(o.statusCode=n.response.statusCode),n.response&&n.response.statusText&&(o.statusText=n.response.statusText),n.response&&n.response.body&&(n=n.response.body),n.err&&(n=n.err),o.code=n.code||n.error||n.error_code||n.status||null,o.description=n.errorDescription||n.error_description||n.description||n.error||n.details||n.err||null,t.forceLegacyError&&(o.error=o.code,o.error_description=o.description),n.error_codes&&n.error_details&&(o.errorDetails={codes:n.error_codes,details:n.error_details}),n.name&&(o.name=n.name),n.policy&&(o.policy=n.policy),e(o)):!r.type||"text/html"!==r.type&&"text/plain"!==r.type?t.ignoreCasing?e(null,r.body||r):e(null,_e.toCamelCase(r.body||r,[],{keepOriginal:t.keepOriginalCasing})):e(null,r.text)):e(Re.buildResponse("generic_error","Something went wrong"))}}var Le=["realm","audience","otp","client_id","client_secret","redirect_uri","scope","code","grant_type","username","password","refresh_token","assertion","client_assertion","client_assertion_type","code_verifier"],Me=["connection","connection_scope","auth0Client","owp","device","realm","organization","invitation","protocol","_csrf","_intstate","login_ticket","client_id","response_type","response_mode","redirect_uri","audience","scope","state","nonce","display","prompt","screen_hint","max_age","ui_locales","claims_locales","id_token_hint","login_hint","acr_values","claims","registration","request","request_uri","code_challenge","code_challenge_method","access_type","display"],Fe=function(e,t){return _e.pick(t,Le)},He=function(e,t){var n=_e.getKeysNotIn(t,Me);return n.length>0&&e.warning("Following parameters are not allowed on the `/authorize` endpoint: ["+n.join(",")+"]"),t},Ue="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function ze(e){var t={exports:{}};return e(t,t.exports),t.exports}var Be=ze((function(e,t){e.exports=function(){function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,o=void 0,i=void 0,a=function(e,t){d[n]=e,d[n+1]=t,2===(n+=2)&&(i?i(h):b())},s="undefined"!=typeof window?window:void 0,c=s||{},l=c.MutationObserver||c.WebKitMutationObserver,u="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(h,1)}}var d=new Array(1e3);function h(){for(var e=0;e<n;e+=2)(0,d[e])(d[e+1]),d[e]=void 0,d[e+1]=void 0;n=0}var v,g,m,y,b=void 0;function _(e,t){var n=this,r=new this.constructor(E);void 0===r[x]&&R(r);var o=n._state;if(o){var i=arguments[o-1];a((function(){return I(o,r,i,n._result)}))}else k(n,r,e,t);return r}function w(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(E);return T(t,e),t}b=u?function(){return r.nextTick(h)}:l?(g=0,m=new l(h),y=document.createTextNode(""),m.observe(y,{characterData:!0}),function(){y.data=g=++g%2}):p?((v=new MessageChannel).port1.onmessage=h,function(){return v.port2.postMessage(0)}):void 0===s?function(){try{var e=Function("return this")().require("vertx");return void 0!==(o=e.runOnLoop||e.runOnContext)?function(){o(h)}:f()}catch(e){return f()}}():f();var x=Math.random().toString(36).substring(2);function E(){}var O=void 0;function C(t,n,r){n.constructor===t.constructor&&r===_&&n.constructor.resolve===w?function(e,t){1===t._state?S(e,t._result):2===t._state?P(e,t._result):k(t,void 0,(function(t){return T(e,t)}),(function(t){return P(e,t)}))}(t,n):void 0===r?S(t,n):e(r)?function(e,t,n){a((function(e){var r=!1,o=function(n,o,i,a){try{n.call(o,(function(n){r||(r=!0,t!==n?T(e,n):S(e,n))}),(function(t){r||(r=!0,P(e,t))}))}catch(e){return e}}(n,t);!r&&o&&(r=!0,P(e,o))}),e)}(t,n,r):S(t,n)}function T(e,t){if(e===t)P(e,new TypeError("You cannot resolve a promise with itself"));else if(o=typeof(r=t),null===r||"object"!==o&&"function"!==o)S(e,t);else{var n=void 0;try{n=t.then}catch(t){return void P(e,t)}C(e,t,n)}var r,o}function A(e){e._onerror&&e._onerror(e._result),j(e)}function S(e,t){e._state===O&&(e._result=t,e._state=1,0!==e._subscribers.length&&a(j,e))}function P(e,t){e._state===O&&(e._state=2,e._result=t,a(A,e))}function k(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=n,o[i+2]=r,0===i&&e._state&&a(j,e)}function j(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)o=t[a+n],(r=t[a])?I(n,r,o,i):o(i);e._subscribers.length=0}}function I(t,n,r,o){var i=e(r),a=void 0,s=void 0,c=!0;if(i){try{a=r(o)}catch(t){c=!1,s=t}if(n===a)return void P(n,new TypeError("A promises callback cannot return that same promise."))}else a=o;n._state!==O||(i&&c?T(n,a):!1===c?P(n,s):1===t?S(n,a):2===t&&P(n,a))}var N=0;function R(e){e[x]=N++,e._state=void 0,e._result=void 0,e._subscribers=[]}var D=function(){function e(e,n){this._instanceConstructor=e,this.promise=new e(E),this.promise[x]||R(this.promise),t(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&S(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===O&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===w){var o=void 0,i=void 0,a=!1;try{o=e.then}catch(e){a=!0,i=e}if(o===_&&e._state!==O)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===L){var s=new n(E);a?P(s,i):C(s,e,o),this._willSettleAt(s,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===O&&(this._remaining--,2===e?P(r,n):this._result[t]=n),0===this._remaining&&S(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;k(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},e}(),L=function(){function t(e){this[x]=N++,this._result=this._state=void 0,this._subscribers=[],E!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){T(e,t)}),(function(t){P(e,t)}))}catch(t){P(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var n=this,r=n.constructor;return e(t)?n.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):n.then(t,t)},t}();return L.prototype.then=_,L.all=function(e){return new D(this,e).promise},L.race=function(e){var n=this;return t(e)?new n((function(t,r){for(var o=e.length,i=0;i<o;i++)n.resolve(e[i]).then(t,r)})):new n((function(e,t){return t(new TypeError("You must pass an array to race."))}))},L.resolve=w,L.reject=function(e){var t=new this(E);return P(t,e),t},L._setScheduler=function(e){i=e},L._setAsap=function(e){a=e},L._asap=a,L.polyfill=function(){var e=void 0;if(void 0!==Ue)e=Ue;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=L},L.Promise=L,L}()})),Ve=ze((function(e,t){var n;e.exports=n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},o=r.lib={},i=o.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=o.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,o=e.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++)t[r+i>>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else for(i=0;i<o;i+=4)t[r+i>>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],o=function(t){t=t;var n=987654321,r=4294967295;return function(){var o=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return o/=4294967296,(o+=.5)*(e.random()>.5?1:-1)}},i=0;i<t;i+=4){var s=o(4294967296*(n||e.random()));n=987654071*s(),r.push(4294967296*s()|0)}return new a.init(r,t)}}),s=r.enc={},c=s.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},l=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++)r.push(String.fromCharCode(t[o>>>2]>>>24-o%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},u=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},p=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,s=o/(4*i),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,l=e.min(4*c,o);if(c){for(var u=0;u<c;u+=i)this._doProcessBlock(r,u);var p=r.splice(0,c);n.sigBytes-=l}return new a.init(p,l)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});o.Hasher=p.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new f.HMAC.init(e,n).finalize(t)}}});var f=r.algo={};return r}(Math)})),qe=ze((function(e,t){var n;e.exports=(n=Ve,function(e){var t=n,r=t.lib,o=r.WordArray,i=r.Hasher,a=t.algo,s=[],c=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,o=0;o<64;)t(r)&&(o<8&&(s[o]=n(e.pow(r,.5))),c[o]=n(e.pow(r,1/3)),o++),r++}();var l=[],u=a.SHA256=i.extend({_doReset:function(){this._hash=new o.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],u=n[5],p=n[6],f=n[7],d=0;d<64;d++){if(d<16)l[d]=0|e[t+d];else{var h=l[d-15],v=l[d-2];l[d]=((h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3)+l[d-7]+((v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10)+l[d-16]}var g=r&o^r&i^o&i,m=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&p)+c[d]+l[d];f=p,p=u,u=s,s=a+m|0,a=i,i=o,o=r,r=m+(((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+g)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+p|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=e.floor(r/4294967296),n[15+(o+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(u),t.HmacSHA256=i._createHmacHelper(u)}(Math),n.SHA256)})),Ge=ze((function(e,t){var n,r;e.exports=(r=(n=Ve).lib.WordArray,n.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var o=[],i=0;i<n;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<n;s++)o.push(r.charAt(a>>>6*(3-s)&63));var c=r.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,n=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<n.length;i++)o[n.charCodeAt(i)]=i}var a=n.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return function(e,t,n){for(var o=[],i=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2,c=n[e.charCodeAt(a)]>>>6-a%4*2;o[i>>>2]|=(s|c)<<24-i%4*8,i++}return r.create(o,i)}(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)})),We=ze((function(e,t){e.exports=Ve.enc.Hex})),Ye=ze((function(e,t){(function(){var t;function n(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):this.fromString(e,null==t&&"string"!=typeof e?256:t))}function r(){return new n(null)}var o="undefined"!=typeof navigator;o&&"Microsoft Internet Explorer"==navigator.appName?(n.prototype.am=function(e,t,n,r,o,i){for(var a=32767&t,s=t>>15;--i>=0;){var c=32767&this[e],l=this[e++]>>15,u=s*c+l*a;o=((c=a*c+((32767&u)<<15)+n[r]+(1073741823&o))>>>30)+(u>>>15)+s*l+(o>>>30),n[r++]=1073741823&c}return o},t=30):o&&"Netscape"!=navigator.appName?(n.prototype.am=function(e,t,n,r,o,i){for(;--i>=0;){var a=t*this[e++]+n[r]+o;o=Math.floor(a/67108864),n[r++]=67108863&a}return o},t=26):(n.prototype.am=function(e,t,n,r,o,i){for(var a=16383&t,s=t>>14;--i>=0;){var c=16383&this[e],l=this[e++]>>14,u=s*c+l*a;o=((c=a*c+((16383&u)<<14)+n[r]+o)>>28)+(u>>14)+s*l,n[r++]=268435455&c}return o},t=28),n.prototype.DB=t,n.prototype.DM=(1<<t)-1,n.prototype.DV=1<<t,n.prototype.FV=Math.pow(2,52),n.prototype.F1=52-t,n.prototype.F2=2*t-52;var i,a,s=new Array;for(i="0".charCodeAt(0),a=0;a<=9;++a)s[i++]=a;for(i="a".charCodeAt(0),a=10;a<36;++a)s[i++]=a;for(i="A".charCodeAt(0),a=10;a<36;++a)s[i++]=a;function c(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function l(e,t){var n=s[e.charCodeAt(t)];return null==n?-1:n}function u(e){var t=r();return t.fromInt(e),t}function p(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function f(e){this.m=e}function d(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function h(e,t){return e&t}function v(e,t){return e|t}function g(e,t){return e^t}function m(e,t){return e&~t}function y(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function b(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function _(){}function w(e){return e}function x(e){this.r2=r(),this.q3=r(),n.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}f.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},f.prototype.revert=function(e){return e},f.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},f.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},f.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},d.prototype.convert=function(e){var t=r();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(n.ZERO)>0&&this.m.subTo(t,t),t},d.prototype.revert=function(e){var t=r();return e.copyTo(t),this.reduce(t),t},d.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},d.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},d.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},n.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},n.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},n.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var o=e.length,i=!1,a=0;--o>=0;){var s=8==r?255&e[o]:l(e,o);s<0?"-"==e.charAt(o)&&(i=!0):(i=!1,0==a?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,(a+=r)>=this.DB&&(a-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),i&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},n.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},n.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},n.prototype.lShiftTo=function(e,t){var n,r=e%this.DB,o=this.DB-r,i=(1<<o)-1,a=Math.floor(e/this.DB),s=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)t[n+a+1]=this[n]>>o|s,s=(this[n]&i)<<r;for(n=a-1;n>=0;--n)t[n]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},n.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,o=this.DB-r,i=(1<<r)-1;t[0]=this[n]>>r;for(var a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&i)<<o,t[a-n]=this[a]>>r;r>0&&(t[this.t-n-1]|=(this.s&i)<<o),t.t=this.t-n,t.clamp()}},n.prototype.subTo=function(e,t){for(var n=0,r=0,o=Math.min(e.t,this.t);n<o;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},n.prototype.multiplyTo=function(e,t){var r=this.abs(),o=e.abs(),i=r.t;for(t.t=i+o.t;--i>=0;)t[i]=0;for(i=0;i<o.t;++i)t[i+r.t]=r.am(0,o[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&n.ZERO.subTo(t,t)},n.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},n.prototype.divRemTo=function(e,t,o){var i=e.abs();if(!(i.t<=0)){var a=this.abs();if(a.t<i.t)return null!=t&&t.fromInt(0),void(null!=o&&this.copyTo(o));null==o&&(o=r());var s=r(),c=this.s,l=e.s,u=this.DB-p(i[i.t-1]);u>0?(i.lShiftTo(u,s),a.lShiftTo(u,o)):(i.copyTo(s),a.copyTo(o));var f=s.t,d=s[f-1];if(0!=d){var h=d*(1<<this.F1)+(f>1?s[f-2]>>this.F2:0),v=this.FV/h,g=(1<<this.F1)/h,m=1<<this.F2,y=o.t,b=y-f,_=null==t?r():t;for(s.dlShiftTo(b,_),o.compareTo(_)>=0&&(o[o.t++]=1,o.subTo(_,o)),n.ONE.dlShiftTo(f,_),_.subTo(s,s);s.t<f;)s[s.t++]=0;for(;--b>=0;){var w=o[--y]==d?this.DM:Math.floor(o[y]*v+(o[y-1]+m)*g);if((o[y]+=s.am(0,w,o,b,0,f))<w)for(s.dlShiftTo(b,_),o.subTo(_,o);o[y]<--w;)o.subTo(_,o)}null!=t&&(o.drShiftTo(f,t),c!=l&&n.ZERO.subTo(t,t)),o.t=f,o.clamp(),u>0&&o.rShiftTo(u,o),c<0&&n.ZERO.subTo(o,o)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},n.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},n.prototype.exp=function(e,t){if(e>4294967295||e<1)return n.ONE;var o=r(),i=r(),a=t.convert(this),s=p(e)-1;for(a.copyTo(o);--s>=0;)if(t.sqrTo(o,i),(e&1<<s)>0)t.mulTo(i,a,o);else{var c=o;o=i,i=c}return t.revert(o)},n.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<<t)-1,o=!1,i="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(n=this[a]>>s)>0&&(o=!0,i=c(n));a>=0;)s<t?(n=(this[a]&(1<<s)-1)<<t-s,n|=this[--a]>>(s+=this.DB-t)):(n=this[a]>>(s-=t)&r,s<=0&&(s+=this.DB,--a)),n>0&&(o=!0),o&&(i+=c(n));return o?i:"0"},n.prototype.negate=function(){var e=r();return n.ZERO.subTo(this,e),e},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(e){var t=r();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(n.ZERO)>0&&e.subTo(t,t),t},n.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new f(t):new d(t),this.exp(e,n)},n.ZERO=u(0),n.ONE=u(1),_.prototype.convert=w,_.prototype.revert=w,_.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},_.prototype.sqrTo=function(e,t){e.squareTo(t)},x.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=r();return e.copyTo(t),this.reduce(t),t},x.prototype.revert=function(e){return e},x.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},x.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},x.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var E,O,C,T=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],A=(1<<26)/T[T.length-1];function S(){var e;e=(new Date).getTime(),O[C++]^=255&e,O[C++]^=e>>8&255,O[C++]^=e>>16&255,O[C++]^=e>>24&255,C>=D&&(C-=D)}if(n.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},n.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),o=u(n),i=r(),a=r(),s="";for(this.divRemTo(o,i,a);i.signum()>0;)s=(n+a.intValue()).toString(e).substr(1)+s,i.divRemTo(o,i,a);return a.intValue().toString(e)+s},n.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),o=Math.pow(t,r),i=!1,a=0,s=0,c=0;c<e.length;++c){var u=l(e,c);u<0?"-"==e.charAt(c)&&0==this.signum()&&(i=!0):(s=t*s+u,++a>=r&&(this.dMultiply(o),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(s,0)),i&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(n.ONE.shiftLeft(e-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(n.ONE.shiftLeft(e-1),this);else{var o=new Array,i=7&e;o.length=1+(e>>3),t.nextBytes(o),i>0?o[0]&=(1<<i)-1:o[0]=0,this.fromString(o,256)}},n.prototype.bitwiseTo=function(e,t,n){var r,o,i=Math.min(e.t,this.t);for(r=0;r<i;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(o=e.s&this.DM,r=i;r<this.t;++r)n[r]=t(this[r],o);n.t=this.t}else{for(o=this.s&this.DM,r=i;r<e.t;++r)n[r]=t(o,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},n.prototype.changeBit=function(e,t){var r=n.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},n.prototype.addTo=function(e,t){for(var n=0,r=0,o=Math.min(e.t,this.t);n<o;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},n.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},n.prototype.multiplyLowerTo=function(e,t,n){var r,o=Math.min(this.t+e.t,t);for(n.s=0,n.t=o;o>0;)n[--o]=0;for(r=n.t-this.t;o<r;++o)n[o+this.t]=this.am(0,e[o],n,o,0,this.t);for(r=Math.min(e.t,t);o<r;++o)this.am(0,e[o],n,o,0,t-o);n.clamp()},n.prototype.multiplyUpperTo=function(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},n.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},n.prototype.millerRabin=function(e){var t=this.subtract(n.ONE),o=t.getLowestSetBit();if(o<=0)return!1;var i=t.shiftRight(o);(e=e+1>>1)>T.length&&(e=T.length);for(var a=r(),s=0;s<e;++s){a.fromInt(T[Math.floor(Math.random()*T.length)]);var c=a.modPow(i,this);if(0!=c.compareTo(n.ONE)&&0!=c.compareTo(t)){for(var l=1;l++<o&&0!=c.compareTo(t);)if(0==(c=c.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=c.compareTo(t))return!1}}return!0},n.prototype.clone=function(){var e=r();return this.copyTo(e),e},n.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},n.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},n.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},n.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var n,r=this.DB-e*this.DB%8,o=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[o++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==o&&(128&this.s)!=(128&n)&&++o,(o>0||n!=this.s)&&(t[o++]=n);return t},n.prototype.equals=function(e){return 0==this.compareTo(e)},n.prototype.min=function(e){return this.compareTo(e)<0?this:e},n.prototype.max=function(e){return this.compareTo(e)>0?this:e},n.prototype.and=function(e){var t=r();return this.bitwiseTo(e,h,t),t},n.prototype.or=function(e){var t=r();return this.bitwiseTo(e,v,t),t},n.prototype.xor=function(e){var t=r();return this.bitwiseTo(e,g,t),t},n.prototype.andNot=function(e){var t=r();return this.bitwiseTo(e,m,t),t},n.prototype.not=function(){for(var e=r(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},n.prototype.shiftLeft=function(e){var t=r();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},n.prototype.shiftRight=function(e){var t=r();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},n.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+y(this[e]);return this.s<0?this.t*this.DB:-1},n.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=b(this[n]^t);return e},n.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},n.prototype.setBit=function(e){return this.changeBit(e,v)},n.prototype.clearBit=function(e){return this.changeBit(e,m)},n.prototype.flipBit=function(e){return this.changeBit(e,g)},n.prototype.add=function(e){var t=r();return this.addTo(e,t),t},n.prototype.subtract=function(e){var t=r();return this.subTo(e,t),t},n.prototype.multiply=function(e){var t=r();return this.multiplyTo(e,t),t},n.prototype.divide=function(e){var t=r();return this.divRemTo(e,t,null),t},n.prototype.remainder=function(e){var t=r();return this.divRemTo(e,null,t),t},n.prototype.divideAndRemainder=function(e){var t=r(),n=r();return this.divRemTo(e,t,n),new Array(t,n)},n.prototype.modPow=function(e,t){var n,o,i=e.bitLength(),a=u(1);if(i<=0)return a;n=i<18?1:i<48?3:i<144?4:i<768?5:6,o=i<8?new f(t):t.isEven()?new x(t):new d(t);var s=new Array,c=3,l=n-1,h=(1<<n)-1;if(s[1]=o.convert(this),n>1){var v=r();for(o.sqrTo(s[1],v);c<=h;)s[c]=r(),o.mulTo(v,s[c-2],s[c]),c+=2}var g,m,y=e.t-1,b=!0,_=r();for(i=p(e[y])-1;y>=0;){for(i>=l?g=e[y]>>i-l&h:(g=(e[y]&(1<<i+1)-1)<<l-i,y>0&&(g|=e[y-1]>>this.DB+i-l)),c=n;0==(1&g);)g>>=1,--c;if((i-=c)<0&&(i+=this.DB,--y),b)s[g].copyTo(a),b=!1;else{for(;c>1;)o.sqrTo(a,_),o.sqrTo(_,a),c-=2;c>0?o.sqrTo(a,_):(m=a,a=_,_=m),o.mulTo(_,s[g],a)}for(;y>=0&&0==(e[y]&1<<i);)o.sqrTo(a,_),m=a,a=_,_=m,--i<0&&(i=this.DB-1,--y)}return o.revert(a)},n.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return n.ZERO;for(var r=e.clone(),o=this.clone(),i=u(1),a=u(0),s=u(0),c=u(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(i.isEven()&&a.isEven()||(i.addTo(this,i),a.subTo(e,a)),i.rShiftTo(1,i)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;o.isEven();)o.rShiftTo(1,o),t?(s.isEven()&&c.isEven()||(s.addTo(this,s),c.subTo(e,c)),s.rShiftTo(1,s)):c.isEven()||c.subTo(e,c),c.rShiftTo(1,c);r.compareTo(o)>=0?(r.subTo(o,r),t&&i.subTo(s,i),a.subTo(c,a)):(o.subTo(r,o),t&&s.subTo(i,s),c.subTo(a,c))}return 0!=o.compareTo(n.ONE)?n.ZERO:c.compareTo(e)>=0?c.subtract(e):c.signum()<0?(c.addTo(e,c),c.signum()<0?c.add(e):c):c},n.prototype.pow=function(e){return this.exp(e,new _)},n.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var o=t.getLowestSetBit(),i=n.getLowestSetBit();if(i<0)return t;for(o<i&&(i=o),i>0&&(t.rShiftTo(i,t),n.rShiftTo(i,n));t.signum()>0;)(o=t.getLowestSetBit())>0&&t.rShiftTo(o,t),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return i>0&&n.lShiftTo(i,n),n},n.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=T[T.length-1]){for(t=0;t<T.length;++t)if(n[0]==T[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<T.length;){for(var r=T[t],o=t+1;o<T.length&&r<A;)r*=T[o++];for(r=n.modInt(r);t<o;)if(r%T[t++]==0)return!1}return n.millerRabin(e)},n.prototype.square=function(){var e=r();return this.squareTo(e),e},n.prototype.Barrett=x,null==O){var P;if(O=new Array,C=0,"undefined"!=typeof window&&window.crypto)if(window.crypto.getRandomValues){var k=new Uint8Array(32);for(window.crypto.getRandomValues(k),P=0;P<32;++P)O[C++]=k[P]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var j=window.crypto.random(32);for(P=0;P<j.length;++P)O[C++]=255&j.charCodeAt(P)}for(;C<D;)P=Math.floor(65536*Math.random()),O[C++]=P>>>8,O[C++]=255&P;C=0,S()}function I(){if(null==E){for(S(),(E=new R).init(O),C=0;C<O.length;++C)O[C]=0;C=0}return E.next()}function N(){}function R(){this.i=0,this.j=0,this.S=new Array}N.prototype.nextBytes=function(e){var t;for(t=0;t<e.length;++t)e[t]=I()},R.prototype.init=function(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)r=this.S[t],this.S[t]=this.S[n=n+this.S[t]+e[t%e.length]&255],this.S[n]=r;this.i=0,this.j=0},R.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]};var D=256;e.exports={default:n,BigInteger:n,SecureRandom:N}}).call(Ue)})),Xe={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},$e={sha256:qe};function Je(e,t){if(this.n=null,this.e=0,!(null!=e&&null!=t&&e.length>0&&t.length>0))throw new Error("Invalid key data");this.n=new Ye.BigInteger(e,16),this.e=parseInt(t,16)}Je.prototype.verify=function(e,t){t=t.replace(/[^0-9a-f]|[\s\n]]/gi,"");var n=new Ye.BigInteger(t,16);if(n.bitLength()>this.n.bitLength())throw new Error("Signature does not match with the key modulus.");var r=function(e){for(var t in Xe){var n=Xe[t],r=n.length;if(e.substring(0,r)===n)return{alg:t,hash:e.substring(r)}}return[]}(n.modPowInt(this.e,this.n).toString(16).replace(/^1f+00/,""));if(0===r.length)return!1;if(!$e.hasOwnProperty(r.alg))throw new Error("Hashing algorithm is not supported.");var o=$e[r.alg](e).toString();return r.hash===o};for(var Ke=[],Qe=[],Ze="undefined"!=typeof Uint8Array?Uint8Array:Array,et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tt=0,nt=et.length;tt<nt;++tt)Ke[tt]=et[tt],Qe[et.charCodeAt(tt)]=tt;Qe["-".charCodeAt(0)]=62,Qe["_".charCodeAt(0)]=63;var rt=function(e){var t,n,r=function(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}(e),o=r[0],i=r[1],a=new Ze(function(e,t,n){return 3*(t+n)/4-n}(0,o,i)),s=0,c=i>0?o-4:o;for(n=0;n<c;n+=4)t=Qe[e.charCodeAt(n)]<<18|Qe[e.charCodeAt(n+1)]<<12|Qe[e.charCodeAt(n+2)]<<6|Qe[e.charCodeAt(n+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;return 2===i&&(t=Qe[e.charCodeAt(n)]<<2|Qe[e.charCodeAt(n+1)]>>4,a[s++]=255&t),1===i&&(t=Qe[e.charCodeAt(n)]<<10|Qe[e.charCodeAt(n+1)]<<4|Qe[e.charCodeAt(n+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t),a};function ot(e){var t=e.length%4;return 0===t?e:e+new Array(4-t+1).join("=")}function it(e){return e=ot(e).replace(/\-/g,"+").replace(/_/g,"/"),decodeURIComponent(function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}(rt(e)).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}function at(e){return function(e){for(var t="",n=0;n<e.length;n++){var r=e[n].toString(16);t+=2===r.length?r:"0"+r}return t}(rt(ot(e)))}var st=ze((function(e){var t,n;t=Ue,n=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0]=e[0].match(/^file:\/\/\//)?e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<e.length;r++){var o=e[r];if("string"!=typeof o)throw new TypeError("Url must be a string. Received "+o);""!==o&&(r>0&&(o=o.replace(/^[\/]+/,"")),o=o.replace(/[\/]+$/,r<e.length-1?"":"/"),t.push(o))}var i=t.join("/"),a=(i=i.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a.shift()+(a.length>0?"?":"")+a.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=n():t.urljoin=n()}));function ct(e,t){return t=t||{},new Promise((function(n,r){var o=new XMLHttpRequest,i=[],a=[],s={},c=function(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(JSON.parse(o.responseText))},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:c,headers:{keys:function(){return i},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var l in o.open(t.method||"get",e,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){i.push(t=t.toLowerCase()),a.push([t,n]),s[t]=s[t]?s[t]+","+n:n})),n(c())},o.onerror=r,o.withCredentials="include"==t.credentials,t.headers)o.setRequestHeader(l,t.headers[l]);o.send(t.body||null)}))}function lt(e){if(e.ok)return e.json();var t=new Error(e.statusText);return t.response=e,Promise.reject(t)}function ut(e){this.name="ConfigurationError",this.message=e||""}function pt(e){this.name="TokenValidationError",this.message=e||""}ut.prototype=Error.prototype,pt.prototype=Error.prototype;var ft=function(){function e(){}var t=e.prototype;return t.get=function(){return null},t.has=function(){return null},t.set=function(){return null},e}();Be.polyfill();var dt=function(e){return"number"==typeof e},ht=function(){return new Date};function vt(e){var t=e||{};if(this.jwksCache=t.jwksCache||new ft,this.expectedAlg=t.expectedAlg||"RS256",this.issuer=t.issuer,this.audience=t.audience,this.leeway=0===t.leeway?0:t.leeway||60,this.jwksURI=t.jwksURI,this.maxAge=t.maxAge,this.__clock="function"==typeof t.__clock?t.__clock:ht,this.leeway<0||this.leeway>300)throw new ut("The leeway should be positive and lower than five minutes.");if("RS256"!==this.expectedAlg)throw new ut('Signature algorithm of "'+this.expectedAlg+'" is not supported. Expected the ID token to be signed with "RS256".')}function gt(e,t){this.plugins=t;for(var n=0;n<this.plugins.length;n++){if(this.plugins[n].version!==se.raw){var r="";throw this.plugins[n].constructor&&this.plugins[n].constructor.name&&(r=this.plugins[n].constructor.name),new Error("Plugin "+r+" version ("+this.plugins[n].version+") is not compatible with the SDK version ("+se.raw+")")}this.plugins[n].setWebAuth(e)}}vt.prototype.verify=function(e,t,n){if(!n&&t&&"function"==typeof t&&(n=t,t=void 0),!e)return n(new pt("ID token is required but missing"),null);var r=this.decode(e);if(r instanceof Error)return n(new pt("ID token could not be decoded"),null);var o=r.encoded.header+"."+r.encoded.payload,i=at(r.encoded.signature),a=r.header.alg,s=r.header.kid,c=r.payload.aud,l=r.payload.sub,u=r.payload.iss,p=r.payload.exp,f=r.payload.nbf,d=r.payload.iat,h=r.payload.azp,v=r.payload.auth_time,g=r.payload.nonce,m=this.__clock(),y=this;if(y.expectedAlg!==a)return n(new pt('Signature algorithm of "'+a+'" is not supported. Expected the ID token to be signed with "RS256".'),null);this.getRsaVerifier(u,s,(function(e,a){if(e)return n(e,null);if(!a.verify(o,i))return n(new pt("Invalid ID token signature."),null);if(!u||"string"!=typeof u)return n(new pt("Issuer (iss) claim must be a string present in the ID token"),null);if(y.issuer!==u)return n(new pt('Issuer (iss) claim mismatch in the ID token, expected "'+y.issuer+'", found "'+u+'"'),null);if(!l||"string"!=typeof l)return n(new pt("Subject (sub) claim must be a string present in the ID token"),null);if(!c||"string"!=typeof c&&!Array.isArray(c))return n(new pt("Audience (aud) claim must be a string or array of strings present in the ID token"),null);if(Array.isArray(c)&&!c.includes(y.audience))return n(new pt('Audience (aud) claim mismatch in the ID token; expected "'+y.audience+'" but was not one of "'+c.join(", ")+'"'),null);if("string"==typeof c&&y.audience!==c)return n(new pt('Audience (aud) claim mismatch in the ID token; expected "'+y.audience+'" but found "'+c+'"'),null);if(t){if(!g||"string"!=typeof g)return n(new pt("Nonce (nonce) claim must be a string present in the ID token"),null);if(g!==t)return n(new pt('Nonce (nonce) claim value mismatch in the ID token; expected "'+t+'", found "'+g+'"'),null)}if(Array.isArray(c)&&c.length>1){if(!h||"string"!=typeof h)return n(new pt("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values"),null);if(h!==y.audience)return n(new pt('Authorized Party (azp) claim mismatch in the ID token; expected "'+y.audience+'", found "'+h+'"'),null)}if(!p||!dt(p))return n(new pt("Expiration Time (exp) claim must be a number present in the ID token"),null);if(!d||!dt(d))return n(new pt("Issued At (iat) claim must be a number present in the ID token"),null);var s=p+y.leeway,b=new Date(0);if(b.setUTCSeconds(s),m>b)return n(new pt('Expiration Time (exp) claim error in the ID token; current time "'+m+'" is after expiration time "'+b+'"'),null);if(f&&dt(f)){var _=f-y.leeway,w=new Date(0);if(w.setUTCSeconds(_),m<w)return n(new pt('Not Before Time (nbf) claim error in the ID token; current time "'+m+'" is before the not before time "'+w+'"'),null)}if(y.maxAge){if(!v||!dt(v))return n(new pt("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified"),null);var x=v+y.maxAge+y.leeway,E=new Date(0);if(E.setUTCSeconds(x),m>E)return n(new pt('Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time "'+m+'" is after last auth time at "'+E+'"'),null)}return n(null,r.payload)}))},vt.prototype.getRsaVerifier=function(e,t,n){var r=this,o=e+t;Promise.resolve(this.jwksCache.has(o)).then((function(n){return n?r.jwksCache.get(o):(i={jwksURI:r.jwksURI,iss:e,kid:t},("undefined"==typeof fetch?ct:fetch)(i.jwksURI||st(i.iss,".well-known","jwks.json")).then(lt).then((function(e){var t,n,r,o=null;for(t=0;t<e.keys.length&&null===o;t++)(n=e.keys[t]).kid===i.kid&&(o=n);if(!o)throw new Error('Could not find a public key for Key ID (kid) "'+i.kid+'"');return{modulus:at((r=o).n),exp:at(r.e)}})).catch((function(e){throw e})));var i})).then((function(e){if(!e||!e.modulus||!e.exp)throw new Error("Empty keyInfo in response");return Promise.resolve(r.jwksCache.set(o,e)).then((function(){n&&n(null,new Je(e.modulus,e.exp))}))})).catch((function(e){n&&n(e)}))},vt.prototype.decode=function(e){var t,n,r=e.split(".");if(3!==r.length)return new pt("Cannot decode a malformed JWT");try{t=JSON.parse(it(r[0])),n=JSON.parse(it(r[1]))}catch(e){return new pt("Token header or payload is not valid JSON")}return{header:t,payload:n,encoded:{header:r[0],payload:r[1],signature:r[2]}}},vt.prototype.validateAccessToken=function(e,t,n,r){if(this.expectedAlg!==t)return r(new pt('Signature algorithm of "'+t+'" is not supported. Expected "'+this.expectedAlg+'"'));var o,i=qe(e),a=We.stringify(i),s=a.substring(0,a.length/2),c=We.parse(s),l=Ge.stringify(c);return r((o={"+":"-","/":"_","=":""},l.replace(/[+/=]/g,(function(e){return o[e]}))!==n?new pt("Invalid access_token"):null))},gt.prototype.get=function(e){for(var t=0;t<this.plugins.length;t++)if(this.plugins[t].supports(e))return this.plugins[t].init();return null};var mt=function(e){var t=new Uint8Array(e),n=[],r="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~",o=Ce.getWindow().crypto||Ce.getWindow().msCrypto;if(!o)return null;for(var i=o.getRandomValues(t),a=0;a<i.length;a++)n.push(r[i[a]%r.length]);return n.join("")};function yt(e){var t=e.transaction||{};this.namespace=t.namespace||"com.auth0.auth.",this.keyLength=t.keyLength||32,this.storage=new je(e),this.options=e}function bt(e){if(this.url=e.url,this.callback=e.callback,this.timeout=e.timeout||6e4,this.timeoutCallback=e.timeoutCallback||null,this.eventListenerType=e.eventListenerType||"message",this.iframe=null,this.timeoutHandle=null,this._destroyTimeout=null,this.transientMessageEventListener=null,this.proxyEventListener=null,this.eventValidator=e.eventValidator||{isValid:function(){return!0}},"function"!=typeof this.callback)throw new Error("options.callback must be a function")}function _t(e){this.webAuth=e,this.warn=new Pe(e.baseOptions)}function wt(e,t){this.webAuth=e,this.baseOptions=t,this.request=new Ee(t),this.webMessageHandler=new _t(e),this.storage=new je(t)}function xt(e,t){return["co/verifier",encodeURIComponent(e),encodeURIComponent(t)].join("/")}function Et(e,t){this.webAuth=e,this.baseOptions=t,this.crossOriginAuthentication=new wt(e,this.baseOptions),this.warn=new Pe({disableWarnings:!!t._disableDeprecationWarnings})}yt.prototype.process=function(e){if(!e.responseType)throw new Error("responseType is required");var t=e.realm||e.connection,n=-1!==e.responseType.indexOf("id_token"),r=this.generateTransaction(e.appState,e.state,e.nonce,t,n,e.organization);return e.state||(e.state=r.state),n&&!e.nonce&&(e.nonce=r.nonce),e},yt.prototype.generateTransaction=function(e,t,n,r,o,i){if(t=t||mt(this.keyLength),n=n||(o?mt(this.keyLength):null),Ce.getWindow().location.host!==this.options.domain){var a={nonce:n,appState:e,state:t,lastUsedConnection:r};i&&(a.organization=i),this.storage.setItem(this.namespace+t,a,{expires:1/48})}return{state:t,nonce:n}},yt.prototype.getStoredTransaction=function(e){var t;return t=this.storage.getItem(this.namespace+e),this.clearTransaction(e),t},yt.prototype.clearTransaction=function(e){this.storage.removeItem(this.namespace+e)},bt.prototype.init=function(){var e=this,t=Ce.getWindow();switch(this.iframe=t.document.createElement("iframe"),this.iframe.style.display="none",this.proxyEventListener=function(t){e.eventListener(t)},this.eventListenerType){case"message":this.eventSourceObject=t;break;case"load":this.eventSourceObject=this.iframe;break;default:throw new Error("Unsupported event listener type: "+this.eventListenerType)}this.eventSourceObject.addEventListener(this.eventListenerType,this.proxyEventListener,!1),t.document.body.appendChild(this.iframe),this.iframe.src=this.url,this.timeoutHandle=setTimeout((function(){e.timeoutHandler()}),this.timeout)},bt.prototype.eventListener=function(e){var t={event:e,sourceObject:this.eventSourceObject};this.eventValidator.isValid(t)&&(this.destroy(),this.callback(t))},bt.prototype.timeoutHandler=function(){this.destroy(),this.timeoutCallback&&this.timeoutCallback()},bt.prototype.destroy=function(){var e=this;clearTimeout(this.timeoutHandle),this._destroyTimeout=setTimeout((function(){e.eventSourceObject.removeEventListener(e.eventListenerType,e.proxyEventListener,!1),e.iframe.parentNode&&e.iframe.parentNode.removeChild(e.iframe)}),0)},_t.prototype.run=function(e,t){var n=this;e.responseMode="web_message",e.prompt="none";var r=Ce.getOrigin(),o=_e.getOriginFromUrl(e.redirectUri);if(o&&r!==o)return t({error:"origin_mismatch",error_description:"The redirectUri's origin ("+o+") should match the window's origin ("+r+")."});!function(e,t,n){new bt({url:e,eventListenerType:"message",callback:function(e){n(null,e)},timeout:t.timeout,eventValidator:{isValid:function(e){return"authorization_response"===e.event.data.type&&t.state===e.event.data.response.state}},timeoutCallback:function(){n({error:"timeout",error_description:"Timeout during executing web_message communication",state:t.state})}}).init()}(this.webAuth.client.buildAuthorizeUrl(e),e,(function(r,o){var i=r;if(!r&&o.event.data.response.error&&(i=o.event.data.response),!i){var a=o.event.data.response;return n.webAuth.validateAuthenticationResponse(e,a,t)}return"consent_required"===i.error&&"localhost"===Ce.getWindow().location.hostname&&n.warn.warning("Consent Required. Consent can't be skipped on localhost. Read more here: https://auth0.com/docs/api-auth/user-consent#skipping-consent-for-first-party-clients"),n.webAuth.transactionManager.clearTransaction(i.state),t(_e.pick(i,["error","error_description"]))}))},wt.prototype.login=function(e,t){var n=this,r=a(this.baseOptions.rootUrl,"/co/authenticate");e.username=e.username||e.email,delete e.email;var o={client_id:e.clientID||this.baseOptions.clientID,username:e.username};e.password&&(o.password=e.password),e.otp&&(o.otp=e.otp);var i=e.realm||this.baseOptions.realm;if(i){var s=e.credentialType||this.baseOptions.credentialType||"http://auth0.com/oauth/grant-type/password-realm";o.realm=i,o.credential_type=s}else o.credential_type="password";this.request.post(r).withCredentials().send(o).end((function(r,o){if(r){var i=r.response&&r.response.body||{error:"request_error",error_description:JSON.stringify(r)};return De(t,{forceLegacyError:!0})(i)}function a(){var r=!0===e.popup;e=_e.blacklist(e,["password","credentialType","otp","popup","onRedirecting"]);var i=_e.merge(e).with({loginTicket:o.body.login_ticket}),a=xt(n.baseOptions.rootUrl,o.body.co_id);n.storage.setItem(a,o.body.co_verifier,{expires:1/96}),r?n.webMessageHandler.run(i,De(t,{forceLegacyError:!0})):n.webAuth.authorize(i)}"function"==typeof e.onRedirecting?e.onRedirecting(a):a()}))},wt.prototype.callback=function(){var e=decodeURIComponent(function(e){var t=("&"+Ce.getWindow().location.hash.substring(1)).split("&origin=");if(2===t.length)return t.pop().split("&").shift()}()),t=Ce.getWindow(),n=this;t.addEventListener("message",(function(e){if("co_verifier_request"===e.data.type){var t=xt(e.origin,e.data.request.id),r=function(e,t){try{var n=e.getItem(t);return e.removeItem(t),n||""}catch(e){return""}}(n.storage,t);e.source.postMessage({type:"co_verifier_response",response:{verifier:r}},e.origin)}})),t.parent.postMessage({type:"ready"},e)},Et.prototype.loginWithCredentials=function(e,t){e.realm=e.realm||e.connection,delete e.connection,this.crossOriginAuthentication.login(e,t)},Et.prototype.signupAndLogin=function(e,t){var n=this;return this.webAuth.client.dbConnection.signup(e,(function(r){return r?t(r):(e.realm=e.realm||e.connection,delete e.connection,n.webAuth.login(e,t))}))};var Ot=i((function(e){var t=function(){function e(e,t,n){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener&&e.addEventListener(t,n,!1)}function t(e,t,n){e.detachEvent?e.detachEvent("on"+t,n):e.removeEventListener&&e.removeEventListener(t,n,!1)}function n(e){/^https?:\/\//.test(e)||(e=window.location.href);var t=/^(https?:\/\/[\-_a-zA-Z\.0-9:]+)/.exec(e);return t?t[1]:e}var r=function(){if("undefined"==typeof navigator)return!1;var e=-1,t=navigator.userAgent;return"Microsoft Internet Explorer"===navigator.appName?null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)):t.indexOf("Trident")>-1&&null!==new RegExp("rv:([0-9]{2,2}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)),e>=8}();return"undefined"!=typeof window&&window.JSON&&window.JSON.stringify&&window.JSON.parse&&window.postMessage?{open:function(o,i){if(!i)throw"missing required callback argument";var a,s;o.url||(a="missing required 'url' parameter"),o.relay_url||(a="missing required 'relay_url' parameter"),a&&setTimeout((function(){i(a)}),0),o.window_name||(o.window_name=null),o.window_features&&!function(){try{var e=navigator.userAgent;return-1!=e.indexOf("Fennec/")||-1!=e.indexOf("Firefox/")&&-1!=e.indexOf("Android")}catch(e){}return!1}()||(o.window_features=void 0);var c,l=o.origin||n(o.url);if(l!==n(o.relay_url))return setTimeout((function(){i("invalid arguments: origin of url and relay_url must match")}),0);r&&((s=document.createElement("iframe")).setAttribute("src",o.relay_url),s.style.display="none",s.setAttribute("name","__winchan_relay_frame"),document.body.appendChild(s),c=s.contentWindow);var u=o.popup||window.open(o.url,o.window_name,o.window_features);o.popup&&(u.location.href=o.url),c||(c=u);var p=setInterval((function(){u&&u.closed&&(d(),i&&(i("User closed the popup window"),i=null))}),500),f=JSON.stringify({a:"request",d:o.params});function d(){if(s&&document.body.removeChild(s),s=void 0,p&&(p=clearInterval(p)),t(window,"message",h),t(window,"unload",d),u)try{u.close()}catch(e){c.postMessage("die",l)}u=c=void 0}function h(e){if(e.origin===l){try{var t=JSON.parse(e.data)}catch(e){if(i)return i(e);throw e}"ready"===t.a?c.postMessage(f,l):"error"===t.a?(d(),i&&(i(t.d),i=null)):"response"===t.a&&(d(),i&&(i(null,t.d),i=null))}}return e(window,"unload",d),e(window,"message",h),{originalPopup:u,close:d,focus:function(){if(u)try{u.focus()}catch(e){}}}},onOpen:function(n){var o="*",i=r?function(){for(var e=window.opener.frames,t=e.length-1;t>=0;t--)try{if(e[t].location.protocol===window.location.protocol&&e[t].location.host===window.location.host&&"__winchan_relay_frame"===e[t].name)return e[t]}catch(e){}}():window.opener;if(!i)throw"can't find relay frame";function a(e){e=JSON.stringify(e),r?i.doPost(e,o):i.postMessage(e,o)}function s(e){if("die"===e.data)try{window.close()}catch(e){}}e(r?i:window,"message",(function e(r){var i;try{i=JSON.parse(r.data)}catch(e){}i&&"request"===i.a&&(t(window,"message",e),o=r.origin,n&&setTimeout((function(){n(o,i.d,(function(e){n=void 0,a({a:"response",d:e})}))}),0))})),e(r?i:window,"message",s);try{a({a:"ready"})}catch(t){e(i,"load",(function(e){a({a:"ready"})}))}var c=function(){try{t(r?i:window,"message",s)}catch(e){}n&&a({a:"error",d:"client closed window"}),n=void 0;try{window.close()}catch(e){}};return e(window,"unload",c),{detach:function(){t(window,"unload",c)}}}}:{open:function(e,t,n,r){setTimeout((function(){r("unsupported browser")}),0)},onOpen:function(e){setTimeout((function(){e("unsupported browser")}),0)}}}();e.exports&&(e.exports=t)})),Ct=function(e){/^https?:\/\//.test(e)||(e=window.location.href);var t=/^(https?:\/\/[-_a-zA-Z.0-9:]+)/.exec(e);return t?t[1]:e};function Tt(){this._current_popup=null}function At(e,t){this.baseOptions=t,this.baseOptions.popupOrigin=t.popupOrigin,this.client=e.client,this.webAuth=e,this.transactionManager=new yt(this.baseOptions),this.crossOriginAuthentication=new wt(e,this.baseOptions),this.warn=new Pe({disableWarnings:!!t._disableDeprecationWarnings})}function St(e){this.authenticationUrl=e.authenticationUrl,this.timeout=e.timeout||6e4,this.handler=null,this.postMessageDataType=e.postMessageDataType||!1,this.postMessageOrigin=e.postMessageOrigin||Ce.getWindow().location.origin||Ce.getWindow().location.protocol+"//"+Ce.getWindow().location.hostname+(Ce.getWindow().location.port?":"+Ce.getWindow().location.port:"")}function Pt(e){this.baseOptions=e,this.request=new Ee(e),this.transactionManager=new yt(this.baseOptions)}function kt(e,t){this.baseOptions=t,this.client=e,this.baseOptions.universalLoginPage=!0,this.request=new Ee(this.baseOptions),this.warn=new Pe({disableWarnings:!!t._disableDeprecationWarnings})}Tt.prototype.calculatePosition=function(e){var t=e.width||500,n=e.height||600,r=Ce.getWindow(),o=void 0!==r.screenX?r.screenX:r.screenLeft,i=void 0!==r.screenY?r.screenY:r.screenTop,a=void 0!==r.outerWidth?r.outerWidth:r.document.body.clientWidth,s=void 0!==r.outerHeight?r.outerHeight:r.document.body.clientHeight;return{width:t,height:n,left:e.left||o+(a-t)/2,top:e.top||i+(s-n)/2}},Tt.prototype.preload=function(e){var t=this,n=Ce.getWindow(),r=this.calculatePosition(e.popupOptions||{}),o=_e.merge(r).with(e.popupOptions),i=e.url||"about:blank",a=j(o,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed||(this._current_popup=n.open(i,"auth0_signup_popup",a),this._current_popup.kill=function(){this.close(),t._current_popup=null}),this._current_popup},Tt.prototype.load=function(e,t,n,r){var o=this,i=this.calculatePosition(n.popupOptions||{}),a=_e.merge(i).with(n.popupOptions),s=_e.merge({url:e,relay_url:t,window_features:j(a,{delimiter:",",encode:!1}),popup:this._current_popup}).with(n),c=Ot.open(s,(function(e,t){if(!e||"SyntaxError"!==e.name)return o._current_popup=null,r(e,t)}));return c.focus(),c},At.prototype.buildPopupHandler=function(){var e=this.baseOptions.plugins.get("popup.getPopupHandler");return e?e.getPopupHandler():new Tt},At.prototype.preload=function(e){e=e||{};var t=this.buildPopupHandler();return t.preload(e),t},At.prototype.getPopupHandler=function(e,t){return e.popupHandler?e.popupHandler:t?this.preload(e):this.buildPopupHandler()},At.prototype.callback=function(e){var t=this,n=Ce.getWindow(),r=(e=e||{}).popupOrigin||this.baseOptions.popupOrigin||Ce.getOrigin();n.opener?Ot.onOpen((function(n,o,i){if(n!==r)return i({error:"origin_mismatch",error_description:"The popup's origin ("+n+") should match the `popupOrigin` parameter ("+r+")."});t.webAuth.parseHash(e||{},(function(e,t){return i(e||t)}))})):n.doPost=function(e){n.parent&&n.parent.postMessage(e,r)}},At.prototype.authorize=function(e,t){var n,r,o={},i=this.baseOptions.plugins.get("popup.authorize"),s=_e.merge(this.baseOptions,["clientID","scope","domain","audience","tenant","responseType","redirectUri","_csrf","state","_intstate","nonce","organization","invitation"]).with(_e.blacklist(e,["popupHandler"]));return fe.check(s,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),r=a(this.baseOptions.rootUrl,"relay.html"),e.owp?s.owp=!0:(o.origin=Ct(s.redirectUri),r=s.redirectUri),e.popupOptions&&(o.popupOptions=_e.pick(e.popupOptions,["width","height","top","left"])),i&&(s=i.processParams(s)),(s=this.transactionManager.process(s)).scope=s.scope||"openid profile email",delete s.domain,n=this.client.buildAuthorizeUrl(s),this.getPopupHandler(e).load(n,r,o,De(t,{keepOriginalCasing:!0}))},At.prototype.loginWithCredentials=function(e,t){e.realm=e.realm||e.connection,e.popup=!0,e=_e.merge(this.baseOptions,["redirectUri","responseType","state","nonce"]).with(_e.blacklist(e,["popupHandler","connection"])),e=this.transactionManager.process(e),this.crossOriginAuthentication.login(e,t)},At.prototype.passwordlessVerify=function(e,t){var n=this;return this.client.passwordless.verify(_e.blacklist(e,["popupHandler"]),(function(r){if(r)return t(r);e.username=e.phoneNumber||e.email,e.password=e.verificationCode,delete e.email,delete e.phoneNumber,delete e.verificationCode,delete e.type,n.client.loginWithResourceOwner(e,t)}))},At.prototype.signupAndLogin=function(e,t){var n=this;return this.client.dbConnection.signup(e,(function(r){if(r)return t(r);n.loginWithCredentials(e,t)}))},St.create=function(e){return new St(e)},St.prototype.login=function(e,t){this.handler=new bt({auth0:this.auth0,url:this.authenticationUrl,eventListenerType:e?"message":"load",callback:this.getCallbackHandler(t,e),timeout:this.timeout,eventValidator:this.getEventValidator(),timeoutCallback:function(){t(null,"#error=timeout&error_description=Timeout+during+authentication+renew.")},usePostMessage:e||!1}),this.handler.init()},St.prototype.getEventValidator=function(){var e=this;return{isValid:function(t){switch(t.event.type){case"message":return t.event.origin===e.postMessageOrigin&&t.event.source===e.handler.iframe.contentWindow&&(!1===e.postMessageDataType||t.event.data.type&&t.event.data.type===e.postMessageDataType);case"load":if("about:"===t.sourceObject.contentWindow.location.protocol)return!1;default:return!0}}}},St.prototype.getCallbackHandler=function(e,t){return function(n){var r;r=t?"object"==typeof n.event.data&&n.event.data.hash?n.event.data.hash:n.event.data:n.sourceObject.contentWindow.location.hash,e(null,r)}},Pt.prototype.login=function(e,t){var n,r;return n=a(this.baseOptions.rootUrl,"usernamepassword","login"),e.username=e.username||e.email,e=_e.blacklist(e,["email","onRedirecting"]),r=_e.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience"]).with(e),r=this.transactionManager.process(r),r=_e.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(De(t))},Pt.prototype.callback=function(e){var t,n=Ce.getDocument();(t=n.createElement("div")).innerHTML=e,n.body.appendChild(t).children[0].submit()},kt.prototype.login=function(e,t){if(Ce.getWindow().location.host!==this.baseOptions.domain)throw new Error("This method is meant to be used only inside the Universal Login Page.");var n,r=_e.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience","_csrf","state","_intstate","nonce"]).with(e);return fe.check(r,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(n=new Pt(this.baseOptions)).login(r,(function(r,o){if(r)return t(r);function i(){n.callback(o)}if("function"==typeof e.onRedirecting)return e.onRedirecting((function(){i()}));i()}))},kt.prototype.signupAndLogin=function(e,t){var n=this;return n.client.client.dbConnection.signup(e,(function(r){return r?t(r):n.login(e,t)}))},kt.prototype.getSSOData=function(e,t){var n,r="";return"function"==typeof e&&(t=e,e=!1),fe.check(e,{type:"boolean",message:"withActiveDirectories parameter is not valid"}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),e&&(r="?"+j({ldaps:1,client_id:this.baseOptions.clientID})),n=a(this.baseOptions.rootUrl,"user","ssodata",r),this.request.get(n,{noHeaders:!0}).withCredentials().end(De(t))};var jt=function(){},It={lang:"en",templates:{auth0:function(e){var t="code"===e.type?"Enter the code shown above":"Solve the formula shown above";return'<div class="captcha-challenge">\n <img src="'+e.image+'" />\n <button type="button" class="captcha-reload">↺</button>\n</div>\n<input type="text" name="captcha"\n class="form-control captcha-control"\n placeholder="'+t+'" />'},recaptcha_v2:function(){return'<div class="recaptcha" ></div><input type="hidden" name="captcha" />'},recaptcha_enterprise:function(){return'<div class="recaptcha" ></div><input type="hidden" name="captcha" />'},error:function(){return'<div class="error" style="color: red;">Error getting the bot detection challenge. Please contact the system administrator.</div>'}}};function Nt(e){switch(e){case"recaptcha_v2":return window.grecaptcha;case"recaptcha_enterprise":return window.grecaptcha.enterprise;default:throw new Error("Unknown captcha provider")}}var Rt=function(e,t,n,r){function o(r){r=r||jt,e.getChallenge((function(e,i){return e?(t.innerHTML=n.templates.error(e),r(e)):i.required?(t.style.display="","auth0"===i.provider?function(e,t,n,r){e.innerHTML=t.templates[n.provider](n),e.querySelector(".captcha-reload").addEventListener("click",(function(e){e.preventDefault(),r()}))}(t,n,i,o):"recaptcha_v2"!==i.provider&&"recaptcha_enterprise"!==i.provider||function(e,t,n){var r=e.hasAttribute("data-wid")&&e.getAttribute("data-wid");function o(t){e.querySelector('input[name="captcha"]').value=t||""}if(r)return o(),void Nt(n.provider).reset(r);e.innerHTML=t.templates[n.provider](n);var i=e.querySelector(".recaptcha");!function(e,t,n){var r="recaptchaCallback_"+Math.floor(1000001*Math.random());window[r]=function(){delete window[r],n()};var o=window.document.createElement("script");o.src=function(e,t,n){switch(e){case"recaptcha_v2":return"https://www.recaptcha.net/recaptcha/api.js?hl="+t+"&onload="+n;case"recaptcha_enterprise":return"https://www.recaptcha.net/recaptcha/enterprise.js?render=explicit&hl="+t+"&onload="+n;default:throw new Error("Unknown captcha provider")}}(t.provider,t.lang,r),o.async=!0,window.document.body.appendChild(o)}(0,{lang:t.lang,provider:n.provider},(function(){var t=Nt(n.provider);r=t.render(i,{callback:o,"expired-callback":function(){o()},"error-callback":function(){o()},sitekey:n.siteKey}),e.setAttribute("data-wid",r)}))}(t,n,i),void r()):(t.style.display="none",void(t.innerHTML=""))}))}return n=_e.merge(It).with(n||{}),o(r),{reload:o,getValue:function(){var e=t.querySelector('input[name="captcha"]');if(e)return e.value}}};function Dt(){return new Date}function Lt(e){fe.check(e,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},popupOrigin:{optional:!0,type:"string",message:"popupOrigin is not valid"},leeway:{optional:!0,type:"number",message:"leeway is not valid"},plugins:{optional:!0,type:"array",message:"plugins is not valid"},maxAge:{optional:!0,type:"number",message:"maxAge is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"},_timesToRetryFailedRequests:{optional:!0,type:"number",message:"_timesToRetryFailedRequests option is not valid"}}),e.overrides&&fe.check(e.overrides,{type:"object",message:"overrides option is not valid"},{__tenant:{optional:!0,type:"string",message:"__tenant option is required"},__token_issuer:{optional:!0,type:"string",message:"__token_issuer option is required"},__jwks_uri:{optional:!0,type:"string",message:"__jwks_uri is required"}}),this.baseOptions=e,this.baseOptions.plugins=new gt(this,this.baseOptions.plugins||[]),this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions._timesToRetryFailedRequests=e._timesToRetryFailedRequests?parseInt(e._timesToRetryFailedRequests,0):0,this.baseOptions.tenant=this.baseOptions.overrides&&this.baseOptions.overrides.__tenant||this.baseOptions.domain.split(".")[0],this.baseOptions.token_issuer=this.baseOptions.overrides&&this.baseOptions.overrides.__token_issuer||"https://"+this.baseOptions.domain+"/",this.baseOptions.jwksURI=this.baseOptions.overrides&&this.baseOptions.overrides.__jwks_uri,this.transactionManager=new yt(this.baseOptions),this.client=new Ht(this.baseOptions),this.redirect=new Et(this,this.baseOptions),this.popup=new At(this,this.baseOptions),this.crossOriginAuthentication=new wt(this,this.baseOptions),this.webMessageHandler=new _t(this),this._universalLogin=new kt(this,this.baseOptions),this.ssodataStorage=new Ie(this.baseOptions)}function Mt(e,t){this.baseOptions=t,this.request=e}function Ft(e,t){this.baseOptions=t,this.request=e}function Ht(e,t){2===arguments.length?this.auth0=e:t=e,fe.check(t,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=t,this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions.rootUrl=this.baseOptions.domain&&0===this.baseOptions.domain.toLowerCase().indexOf("http")?this.baseOptions.domain:"https://"+this.baseOptions.domain,this.request=new Ee(this.baseOptions),this.passwordless=new Mt(this.request,this.baseOptions),this.dbConnection=new Ft(this.request,this.baseOptions),this.warn=new Pe({disableWarnings:!!t._disableDeprecationWarnings}),this.ssodataStorage=new Ie(this.baseOptions)}function Ut(e){fe.check(e,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},token:{type:"string",message:"token option is required"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=e,this.baseOptions.headers={Authorization:"Bearer "+this.baseOptions.token},this.request=new Ee(this.baseOptions),this.baseOptions.rootUrl=a("https://"+this.baseOptions.domain,"api","v2")}Lt.prototype.parseHash=function(e,t){var n,r;t||"function"!=typeof e?e=e||{}:(t=e,e={});var o=Ce.getWindow(),i=void 0===e.hash?o.location.hash:e.hash;if((n=function(e,t){var n=function(e){if(!e)return A;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?A.charset:e.charset;return{allowDots:void 0===e.allowDots?A.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:A.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:A.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:A.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:A.comma,decoder:"function"==typeof e.decoder?e.decoder:A.decoder,delimiter:"string"==typeof e.delimiter||p.isRegExp(e.delimiter)?e.delimiter:A.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:A.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:A.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:A.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:A.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:A.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof e?function(e,t){var n,r={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,a=o.split(t.delimiter,i),s=-1,c=t.charset;if(t.charsetSentinel)for(n=0;n<a.length;++n)0===a[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[n]?c="utf-8":"utf8=%26%2310003%3B"===a[n]&&(c="iso-8859-1"),s=n,n=a.length);for(n=0;n<a.length;++n)if(n!==s){var l,u,f=a[n],d=f.indexOf("]="),h=-1===d?f.indexOf("="):d+1;-1===h?(l=t.decoder(f,A.decoder,c,"key"),u=t.strictNullHandling?null:""):(l=t.decoder(f.slice(0,h),A.decoder,c,"key"),u=p.maybeMap(P(f.slice(h+1),t),(function(e){return t.decoder(e,A.decoder,c,"value")}))),u&&t.interpretNumericEntities&&"iso-8859-1"===c&&(u=S(u)),f.indexOf("[]=")>-1&&(u=T(u)?[u]:u),C.call(r,l)?r[l]=p.combine(r[l],u):r[l]=u}return r}(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),a=0;a<i.length;++a){var s=i[a],c=k(s,r[s],n,"string"==typeof e);o=p.merge(o,c,n)}return p.compact(o)}(i=i.replace(/^#?\/?/,""))).hasOwnProperty("error"))return r=Re.buildResponse(n.error,n.error_description),n.state&&(r.state=n.state),t(r);if(!n.hasOwnProperty("access_token")&&!n.hasOwnProperty("id_token")&&!n.hasOwnProperty("refresh_token"))return t(null,null);var a=(this.baseOptions.responseType||e.responseType||"").split(" ");return a.length>0&&-1!==a.indexOf("token")&&!n.hasOwnProperty("access_token")?t(Re.buildResponse("invalid_hash","response_type contains `token`, but the parsed hash does not contain an `access_token` property")):a.length>0&&-1!==a.indexOf("id_token")&&!n.hasOwnProperty("id_token")?t(Re.buildResponse("invalid_hash","response_type contains `id_token`, but the parsed hash does not contain an `id_token` property")):this.validateAuthenticationResponse(e,n,t)},Lt.prototype.validateAuthenticationResponse=function(e,t,n){var r=this;e.__enableIdPInitiatedLogin=e.__enableIdPInitiatedLogin||e.__enableImpersonation;var o=t.state,i=this.transactionManager.getStoredTransaction(o),a=e.state||i&&i.state||null,s=a===o;if((o||a||!e.__enableIdPInitiatedLogin)&&!s)return n({error:"invalid_token",errorDescription:"`state` does not match."});var c=e.nonce||i&&i.nonce||null,l=i&&i.organization,u=e.state||i&&i.appState||null,p=function(e,o){return e?n(e):(i&&i.lastUsedConnection&&(o&&(a=o.sub),r.ssodataStorage.set(i.lastUsedConnection,a)),n(null,function(e,t,n){return{accessToken:e.access_token||null,idToken:e.id_token||null,idTokenPayload:n||null,appState:t||null,refreshToken:e.refresh_token||null,state:e.state||null,expiresIn:e.expires_in?parseInt(e.expires_in,10):null,tokenType:e.token_type||null,scope:e.scope||null}}(t,u,o)));var a};return t.id_token?this.validateToken(t.id_token,c,(function(e,n){if(!e){if(l){if(!n.org_id)return p(Re.invalidToken("Organization Id (org_id) claim must be a string present in the ID token"));if(n.org_id!==l)return p(Re.invalidToken('Organization Id (org_id) claim value mismatch in the ID token; expected "'+l+'", found "'+n.org_id+'"'))}return t.access_token&&n.at_hash?(new vt).validateAccessToken(t.access_token,"RS256",n.at_hash,(function(e){return e?p(Re.invalidToken(e.message)):p(null,n)})):p(null,n)}if("invalid_token"!==e.error||e.errorDescription&&e.errorDescription.indexOf("Nonce (nonce) claim value mismatch in the ID token")>-1)return p(e);var o=(new vt).decode(t.id_token);return"HS256"!==o.header.alg?p(e):(o.payload.nonce||null)!==c?p({error:"invalid_token",errorDescription:'Nonce (nonce) claim value mismatch in the ID token; expected "'+c+'", found "'+o.payload.nonce+'"'}):t.access_token?r.client.userInfo(t.access_token,(function(e,t){return e?p(e):p(null,t)})):p({error:"invalid_token",description:"The id_token cannot be validated because it was signed with the HS256 algorithm and public clients (like a browser) can’t store secrets. Please read the associated doc for possible ways to fix this. Read more: https://auth0.com/docs/errors/libraries/auth0-js/invalid-token#parsing-an-hs256-signed-id-token-without-an-access-token"})})):p(null,null)},Lt.prototype.validateToken=function(e,t,n){new vt({issuer:this.baseOptions.token_issuer,jwksURI:this.baseOptions.jwksURI,audience:this.baseOptions.clientID,leeway:this.baseOptions.leeway||60,maxAge:this.baseOptions.maxAge,__clock:this.baseOptions.__clock||Dt}).verify(e,t,(function(e,t){if(e)return n(Re.invalidToken(e.message));n(null,t)}))},Lt.prototype.renewAuth=function(e,t){var n=!!e.usePostMessage,r=e.postMessageDataType||!1,o=e.postMessageOrigin||Ce.getWindow().origin,i=e.timeout,a=this,s=_e.merge(this.baseOptions,["clientID","redirectUri","responseType","scope","audience","_csrf","state","_intstate","nonce"]).with(e);s.responseType=s.responseType||"token",s.responseMode=s.responseMode||"fragment",s=this.transactionManager.process(s),fe.check(s,{type:"object",message:"options parameter is not valid"}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),s.prompt="none",s=_e.blacklist(s,["usePostMessage","tenant","postMessageDataType","postMessageOrigin"]),St.create({authenticationUrl:this.client.buildAuthorizeUrl(s),postMessageDataType:r,postMessageOrigin:o,timeout:i}).login(n,(function(e,n){if("object"==typeof n)return t(e,n);a.parseHash({hash:n},t)}))},Lt.prototype.checkSession=function(e,t){var n=_e.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(e);return"code"===n.responseType?t({error:"error",error_description:"responseType can't be `code`"}):(e.nonce||(n=this.transactionManager.process(n)),n.redirectUri?(fe.check(n,{type:"object",message:"options parameter is not valid"}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=_e.blacklist(n,["usePostMessage","tenant","postMessageDataType"]),void this.webMessageHandler.run(n,De(t,{forceLegacyError:!0,ignoreCasing:!0}))):t({error:"error",error_description:"redirectUri can't be empty"}))},Lt.prototype.changePassword=function(e,t){return this.client.dbConnection.changePassword(e,t)},Lt.prototype.passwordlessStart=function(e,t){var n=_e.merge(this.baseOptions,["responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(e.authParams);return e.authParams=this.transactionManager.process(n),this.client.passwordless.start(e,t)},Lt.prototype.signup=function(e,t){return this.client.dbConnection.signup(e,t)},Lt.prototype.authorize=function(e){var t=_e.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","organization","invitation"]).with(e);fe.check(t,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(t=this.transactionManager.process(t)).scope=t.scope||"openid profile email",Ce.redirect(this.client.buildAuthorizeUrl(t))},Lt.prototype.signupAndAuthorize=function(e,t){var n=this;return this.client.dbConnection.signup(_e.blacklist(e,["popupHandler"]),(function(r){if(r)return t(r);e.realm=e.connection,e.username||(e.username=e.email),n.client.login(e,t)}))},Lt.prototype.login=function(e,t){var n=_e.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting","organization","invitation"]).with(e);n=this.transactionManager.process(n),Ce.getWindow().location.host===this.baseOptions.domain?(n.connection=n.realm,delete n.realm,this._universalLogin.login(n,t)):this.crossOriginAuthentication.login(n,t)},Lt.prototype.passwordlessLogin=function(e,t){var n=_e.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(e);if(n=this.transactionManager.process(n),Ce.getWindow().location.host===this.baseOptions.domain)this.passwordlessVerify(n,t);else{var r=_e.extend({credentialType:"http://auth0.com/oauth/grant-type/passwordless/otp",realm:n.connection,username:n.email||n.phoneNumber,otp:n.verificationCode},_e.blacklist(n,["connection","email","phoneNumber","verificationCode"]));this.crossOriginAuthentication.login(r,t)}},Lt.prototype.crossOriginAuthenticationCallback=function(){this.crossOriginVerification()},Lt.prototype.crossOriginVerification=function(){this.crossOriginAuthentication.callback()},Lt.prototype.logout=function(e){Ce.redirect(this.client.buildLogoutUrl(e))},Lt.prototype.passwordlessVerify=function(e,t){var n=this,r=_e.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(e);return fe.check(r,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),r=this.transactionManager.process(r),this.client.passwordless.verify(r,(function(o){if(o)return t(o);function i(){Ce.redirect(n.client.passwordless.buildVerifyUrl(r))}if("function"==typeof e.onRedirecting)return e.onRedirecting((function(){i()}));i()}))},Lt.prototype.renderCaptcha=function(e,t,n){return Rt(this.client,e,t,n)},Mt.prototype.buildVerifyUrl=function(e){var t,n;return fe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(e){return!e.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(e){return!e.phoneNumber}}}),t=_e.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","protocol","nonce"]).with(e),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t=_e.toSnakeCase(t,["auth0Client"]),n=j(t),a(this.baseOptions.rootUrl,"passwordless","verify_redirect","?"+n)},Mt.prototype.start=function(e,t){var n,r;return fe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},send:{type:"string",message:"send option is required",values:["link","code"],value_message:"send is not valid ([link, code])"},phoneNumber:{optional:!0,type:"string",message:"phoneNumber option is required",condition:function(e){return"code"===e.send||!e.email}},email:{optional:!0,type:"string",message:"email option is required",condition:function(e){return"link"===e.send||!e.phoneNumber}},authParams:{optional:!0,type:"object",message:"authParams option is required"}}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"passwordless","start"),(r=_e.merge(this.baseOptions,["clientID","responseType","redirectUri","scope"]).with(e)).scope&&(r.authParams=r.authParams||{},r.authParams.scope=r.authParams.scope||r.scope),r.redirectUri&&(r.authParams=r.authParams||{},r.authParams.redirect_uri=r.authParams.redirectUri||r.redirectUri),r.responseType&&(r.authParams=r.authParams||{},r.authParams.response_type=r.authParams.responseType||r.responseType),delete r.redirectUri,delete r.responseType,delete r.scope,r=_e.toSnakeCase(r,["auth0Client","authParams"]),this.request.post(n).send(r).end(De(t))},Mt.prototype.verify=function(e,t){var n,r;return fe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(e){return!e.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(e){return!e.phoneNumber}}}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),r=_e.pick(e,["connection","verificationCode","phoneNumber","email","auth0Client"]),r=_e.toSnakeCase(r,["auth0Client"]),n=a(this.baseOptions.rootUrl,"passwordless","verify"),this.request.post(n).send(r).end(De(t))},Ft.prototype.signup=function(e,t){var n,r,o;return fe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"},password:{type:"string",message:"password option is required"}}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"dbconnections","signup"),o=(r=_e.merge(this.baseOptions,["clientID","state"]).with(e)).user_metadata||r.userMetadata,r=_e.blacklist(r,["scope","userMetadata","user_metadata"]),r=_e.toSnakeCase(r,["auth0Client"]),o&&(r.user_metadata=o),this.request.post(n).send(r).end(De(t))},Ft.prototype.changePassword=function(e,t){var n,r;return fe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"}}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"dbconnections","change_password"),r=_e.merge(this.baseOptions,["clientID"]).with(e,["email","connection"]),r=_e.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(De(t))},Ht.prototype.buildAuthorizeUrl=function(e){var t,n;return fe.check(e,{type:"object",message:"options parameter is not valid"}),t=_e.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience"]).with(e),fe.check(t,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},redirectUri:{optional:!0,type:"string",message:"redirectUri option is required"},responseType:{type:"string",message:"responseType option is required"},nonce:{type:"string",message:"nonce option is required",condition:function(e){return-1===e.responseType.indexOf("code")&&-1!==e.responseType.indexOf("id_token")}},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t.connection_scope&&fe.isArray(t.connection_scope)&&(t.connection_scope=t.connection_scope.join(",")),t=_e.blacklist(t,["username","popupOptions","domain","tenant","timeout","appState"]),t=_e.toSnakeCase(t,["auth0Client"]),t=He(this.warn,t),n=j(t),a(this.baseOptions.rootUrl,"authorize","?"+n)},Ht.prototype.buildLogoutUrl=function(e){var t,n;return fe.check(e,{optional:!0,type:"object",message:"options parameter is not valid"}),t=_e.merge(this.baseOptions,["clientID"]).with(e||{}),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t=_e.toSnakeCase(t,["auth0Client","returnTo"]),n=j(_e.blacklist(t,["federated"])),e&&void 0!==e.federated&&!1!==e.federated&&"false"!==e.federated&&(n+="&federated"),a(this.baseOptions.rootUrl,"v2","logout","?"+n)},Ht.prototype.loginWithDefaultDirectory=function(e,t){return fe.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),e.grantType="password",this.oauthToken(e,t)},Ht.prototype.login=function(e,t){return fe.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},realm:{type:"string",message:"realm option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),e.grantType="http://auth0.com/oauth/grant-type/password-realm",this.oauthToken(e,t)},Ht.prototype.oauthToken=function(e,t){var n,r;return fe.check(e,{type:"object",message:"options parameter is not valid"}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"oauth","token"),r=_e.merge(this.baseOptions,["clientID","scope","audience"]).with(e),fe.check(r,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},grantType:{type:"string",message:"grantType option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),r=_e.toSnakeCase(r,["auth0Client"]),r=Fe(this.warn,r),this.request.post(n).send(r).end(De(t))},Ht.prototype.loginWithResourceOwner=function(e,t){var n,r;return fe.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},connection:{type:"string",message:"connection option is required"},scope:{optional:!0,type:"string",message:"scope option is required"}}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"oauth","ro"),r=_e.merge(this.baseOptions,["clientID","scope"]).with(e,["username","password","scope","connection","device"]),(r=_e.toSnakeCase(r,["auth0Client"])).grant_type=r.grant_type||"password",this.request.post(n).send(r).end(De(t))},Ht.prototype.getSSOData=function(e,t){if(this.auth0||(this.auth0=new Lt(this.baseOptions)),Ce.getWindow().location.host===this.baseOptions.domain)return this.auth0._universalLogin.getSSOData(e,t);"function"==typeof e&&(t=e),fe.check(t,{type:"function",message:"cb parameter is not valid"});var n=this.baseOptions.clientID,r=this.ssodataStorage.get()||{};this.auth0.checkSession({responseType:"token id_token",scope:"openid profile email",connection:r.lastUsedConnection,timeout:5e3},(function(e,o){return e?"login_required"===e.error?t(null,{sso:!1}):("consent_required"===e.error&&(e.error_description="Consent required. When using `getSSOData`, the user has to be authenticated with the following scope: `openid profile email`."),t(e,{sso:!1})):r.lastUsedSub&&r.lastUsedSub!==o.idTokenPayload.sub?t(e,{sso:!1}):t(null,{lastUsedConnection:{name:r.lastUsedConnection},lastUsedUserID:o.idTokenPayload.sub,lastUsedUsername:o.idTokenPayload.email||o.idTokenPayload.name,lastUsedClientID:n,sessionClients:[n],sso:!0})}))},Ht.prototype.userInfo=function(e,t){var n;return fe.check(e,{type:"string",message:"accessToken parameter is not valid"}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"userinfo"),this.request.get(n).set("Authorization","Bearer "+e).end(De(t,{ignoreCasing:!0}))},Ht.prototype.getChallenge=function(e){if(fe.check(e,{type:"function",message:"cb parameter is not valid"}),!this.baseOptions.state)return e();var t=a(this.baseOptions.rootUrl,"usernamepassword","challenge");return this.request.post(t).send({state:this.baseOptions.state}).end(De(e,{ignoreCasing:!0}))},Ht.prototype.delegation=function(e,t){var n,r;return fe.check(e,{type:"object",message:"options parameter is not valid"},{grant_type:{type:"string",message:"grant_type option is required"}}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"delegation"),r=_e.merge(this.baseOptions,["clientID"]).with(e),r=_e.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(De(t))},Ht.prototype.getUserCountry=function(e){var t;return fe.check(e,{type:"function",message:"cb parameter is not valid"}),t=a(this.baseOptions.rootUrl,"user","geoloc","country"),this.request.get(t).end(De(e))},Ut.prototype.getUser=function(e,t){var n;return fe.check(e,{type:"string",message:"userId parameter is not valid"}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"users",e),this.request.get(n).end(De(t,{ignoreCasing:!0}))},Ut.prototype.patchUserMetadata=function(e,t,n){var r;return fe.check(e,{type:"string",message:"userId parameter is not valid"}),fe.check(t,{type:"object",message:"userMetadata parameter is not valid"}),fe.check(n,{type:"function",message:"cb parameter is not valid"}),r=a(this.baseOptions.rootUrl,"users",e),this.request.patch(r).send({user_metadata:t}).end(De(n,{ignoreCasing:!0}))},Ut.prototype.patchUserAttributes=function(e,t,n){var r;return fe.check(e,{type:"string",message:"userId parameter is not valid"}),fe.check(t,{type:"object",message:"user parameter is not valid"}),fe.check(n,{type:"function",message:"cb parameter is not valid"}),r=a(this.baseOptions.rootUrl,"users",e),this.request.patch(r).send(t).end(De(n,{ignoreCasing:!0}))},Ut.prototype.linkUser=function(e,t,n){var r;return fe.check(e,{type:"string",message:"userId parameter is not valid"}),fe.check(t,{type:"string",message:"secondaryUserToken parameter is not valid"}),fe.check(n,{type:"function",message:"cb parameter is not valid"}),r=a(this.baseOptions.rootUrl,"users",e,"identities"),this.request.post(r).send({link_with:t}).end(De(n,{ignoreCasing:!0}))};var zt={Authentication:Ht,Management:Ut,WebAuth:Lt,version:se};t.default=zt}.call(this,n(53),n(194))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,l=[],u=!1,p=-1;function f(){u&&c&&(u=!1,c.length?l=c.concat(l):p=-1,l.length&&d())}function d(){if(!u){var e=s(f);u=!0;for(var t=l.length;t;){for(c=l,l=[];++p<t;)c&&c[p].run();p=-1,t=l.length}c=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||u||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(196),s=n(29),c=n(30),l=n(7),u=n(8),p=n(31),f=n(32),d=function(e){function t(n){var r=e.call(this,n)||this;return r.componentDidMount=function(){var e=r.props,t=e.auth0ClientId,n=e.auth0Hash,o=e.onAuthenticated;c.default.bindToClient(t),n?c.default.parseIdFromHash(n).then((function(e){s.default.getAccessData(e.idToken).then((function(t){r.props.login(e),r.props.cacheAccessData(t),s.default.buildFreshSession(e,t),o()})).catch((function(e){c.default.login()}))})).catch((function(e){c.default.login()})):c.default.login()},r.render=function(){return i.createElement("div",{className:"auth-gate"},i.createElement(a.default,{color:t.LOADER_COLOR}))},r}return o(t,e),t.LOADER_COLOR="#2d8ceb",t}(i.PureComponent);t.default=l.connect(null,(function(e){return u.bindActionCreators({login:p.login,cacheAccessData:f.cacheAccessData},e)}))(d)},function(e,t,n){"use strict";var r,o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var s,c,l=a(n(0)),u=n(367),p=n(199),f=u.keyframes(s||(s=o(["\n 0% {transform: scaley(1.0)}\n 50% {transform: scaley(0.4)}\n 100% {transform: scaley(1.0)}\n"],["\n 0% {transform: scaley(1.0)}\n 50% {transform: scaley(0.4)}\n 100% {transform: scaley(1.0)}\n"]))),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.style=function(e){var n=t.props,r=n.color,i=n.width,a=n.height,s=n.margin,l=n.radius,p=n.widthUnit,d=n.heightUnit,h=n.radiusUnit;return u.css(c||(c=o(["\n background-color: ",";\n width: ",";\n height: ",";\n margin: ",";\n border-radius: ",";\n display: inline-block;\n animation: "," 1s ","s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);\n animation-fill-mode: both;\n "],["\n background-color: ",";\n width: ",";\n height: ",";\n margin: ",";\n border-radius: ",";\n display: inline-block;\n animation: "," 1s ","s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);\n animation-fill-mode: both;\n "])),r,""+i+p,""+a+d,s,""+l+h,f,.1*e)},t}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.loading,n=e.css;return t?u.jsx("div",{css:[n]},u.jsx("div",{css:this.style(1)}),u.jsx("div",{css:this.style(2)}),u.jsx("div",{css:this.style(3)}),u.jsx("div",{css:this.style(4)}),u.jsx("div",{css:this.style(5)})):null},t.defaultProps=p.heightWidthRadiusDefaults(35,4,2),t}(l.PureComponent);t.default=d},function(e,t,n){var r=n(198);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(200)),r(n(201))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var o=((r={}).loading=!0,r.color="#000000",r.css={},r);t.sizeDefaults=function(e){return Object.assign({},o,function(e){var t;return(t={}).size=e,t.sizeUnit="px",t}(e))},t.sizeMarginDefaults=function(e){var n;return Object.assign({},t.sizeDefaults(e),((n={}).margin="2px",n))},t.heightWidthDefaults=function(e,t){return Object.assign({},o,function(e,t){var n;return(n={}).height=e,n.heightUnit="px",n.width=t,n.widthUnit="px",n}(e,t))},t.heightWidthRadiusDefaults=function(e,n,r){var o;return void 0===r&&(r=2),Object.assign({},t.heightWidthDefaults(e,n),((o={}).radius=r,o.radiusUnit="px",o.margin="2px",o))}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.maroon="#800000",e.red="#FF0000",e.orange="#FFA500",e.yellow="#FFFF00",e.olive="#808000",e.green="#008000",e.purple="#800080",e.fuchsia="#FF00FF",e.lime="#00FF00",e.teal="#008080",e.aqua="#00FFFF",e.blue="#0000FF",e.navy="#000080",e.black="#000000",e.gray="#808080",e.silver="#C0C0C0",e.white="#FFFFFF"}(r||(r={})),t.calculateRgba=function(e,t){if(Object.keys(r).includes(e)&&(e=r[e]),"#"===e[0]&&(e=e.slice(1)),3===e.length){var n="";e.split("").forEach((function(e){n+=e,n+=e})),e=n}return"rgba("+e.match(/.{2}/g).map((function(e){return parseInt(e,16)})).join(", ")+", "+t+")"}},function(e,t){e.exports=l},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var i,a=n(0),s=n(204),c=n(33),l=n(3),u=n(205),p=n(206),f=function(e){return a.createElement("div",{className:"ip-table-loader"},a.createElement(c.default,null))},d=function(e){return a.createElement("div",{className:"ip-table-empty"},a.createElement("span",{className:"empty-message"},l.ICON_EXCLAIMATION_TRIANGLE," ",e.copy||"No Data Found"))},h=function(e){[32,37,38,39,40].indexOf(e.keyCode)>-1&&e.preventDefault()};t.default=function(e){var t=a.useRef(null),n=a.useRef(null),c=o(a.useState(!1),2),v=c[0],g=c[1],m=o(a.useState([]),2),y=m[0],b=m[1],_=o(a.useState([]),2),w=_[0],x=_[1],E=Array.isArray(e.hiddenColumns)?e.hiddenColumns:[],O=Number.isInteger(e.currentPage)&&"function"==typeof e.onPage,C="function"==typeof e.onSort&&void 0!==e.sortBy,T="function"==typeof e.renderPivotComponent?e.renderPivotComponent:function(){return null},A="function"==typeof e.onRowDoubleClick,S={hiddenColumns:E,sortBy:C?e.sortBy:[],pageIndex:O?e.currentPage-1:void 0,pageSize:e.itemsPerPage,autoResetExpanded:!1},P=u.useTable({columns:w,data:y,manualSortBy:C,manualPagination:O,initialState:S,manualFilters:!0,disableMultiSorting:!0,autoResetExpanded:!1,disableSortRemove:C,pageCount:e.totalPages,pageSize:e.itemsPerPage},u.useFlexLayout,u.useFilters,u.useSortBy,u.useExpanded,u.usePagination,u.useResizeColumns),k=P.getTableProps,j=P.getTableBodyProps,I=P.headerGroups,N=P.page,R=P.rows,D=P.prepareRow,L=P.canPreviousPage,M=P.canNextPage,F=P.pageOptions,H=P.pageCount,U=P.gotoPage,z=P.nextPage,B=P.previousPage,V=P.setPageSize,q=P.setHiddenColumns,G=P.visibleColumns,W=P.totalColumnsWidth,Y=P.toggleAllRowsExpanded,X=P.state,$=X.pageIndex,J=X.pageSize,K=X.sortBy,Q=O?R:N,Z=e.hidePaginator?"hide-paginator":"",ee=t.current&&W>t.current.clientWidth?"horizontal-scroll":"";return a.useEffect((function(){return g(!0)}),[]),a.useEffect((function(){var t,n;x((t=e.columns,Array.isArray(t)?t:!Array.isArray(t)&&"object"==typeof t&&(n=Object.keys(t)).length>0?n.map((function(e){return r(r({},t[e]),{accessor:e})})):[]))}),[e.columns]),a.useEffect((function(){v&&Array.isArray(e.hiddenColumns)&&q(e.hiddenColumns)}),[e.hiddenColumns]),a.useEffect((function(){Array.isArray(e.data)&&b(e.data)}),[e.data]),a.useEffect((function(){v&&O&&Y(!1)}),[e.currentPage]),a.useEffect((function(){v&&C&&e.onSort(K)}),[K]),a.useEffect((function(){if(v&&n.current&&t.current){var e=t.current.children[0],r=n.current,o=e.scrollTop,i=o+e.clientHeight,a=r.offsetTop,s=a+r.clientHeight;a<o?e.scrollTop-=o-a+30:s>i&&(e.scrollTop+=s-i)}}),[e.highlightBy]),a.createElement("section",{ref:t,className:"ip-table-wrapper",tabIndex:e.disableKeyScroll?0:void 0,onKeyDown:e.disableKeyScroll?h:null},e.showInterstitial&&a.createElement(f,null),v&&!e.showInterstitial&&0===y.length&&a.createElement(d,{copy:e.noDataText}),a.createElement("table",r({},k(),{className:"ip-table "+ee+" "+Z}),a.createElement("thead",{className:"ip-table-head"},I.map((function(e){return a.createElement(a.Fragment,{key:"head-fragment"},a.createElement("tr",r({},e.getHeaderGroupProps(),{className:"ip-table-head-row"}),e.headers.map((function(e){var t=e.hasOwnProperty("Search"),n=e.getSortByToggleProps(),o=a.createElement("span",{className:"sort-status"},e.isSorted?e.isSortedDesc?l.ICON_CHEVRON_DOWN:l.ICON_CHEVRON_UP:null);return a.createElement("th",r({},e.getHeaderProps(),{className:"ip-table-header "+(e.canSort?"ip-sortable":"")}),!t&&a.createElement("div",r({},n,{className:"filterable-cell-wrapper"}),e.render("Header"),o),t&&a.createElement("div",{className:"filterable-cell-wrapper"},a.createElement("span",r({},n,{className:"searchable-sort-area"}),e.render("Header"),o),e.hasOwnProperty("Search")&&e.render("Search")),e.canResize&&a.createElement("div",r({},e.getResizerProps(),{className:"ip-table-resizer "+(e.isResizing?"resizing":"")})))}))),e.headers.some((function(e){return e.hasOwnProperty("Filter")}))&&a.createElement("tr",r({},e.getHeaderGroupProps({key:"filters-row"})),e.headers.map((function(e,t){return a.createElement("th",r({},e.getHeaderProps({key:"filter-"+t}),{key:"filter-col-"+t,className:"ip-table-filter"}),e.canFilter&&e.Filter?e.render("Filter"):null)}))))}))),a.createElement("tbody",r({},j(),{className:"ip-table-body"}),Q.map((function(t,o){var s,c="";e.highlightBy&&t.original.hasOwnProperty(e.highlightBy.key)&&t.original[e.highlightBy.key]===e.highlightBy.value&&(c="selected",s=n),D(t);var l=t.getRowProps();l.className="ip-table-row "+c,l.onClick=function(n){var r=function(){"function"==typeof e.onRowClick&&e.onRowClick(t)};A||r(),1===n.detail&&A&&(i=window.setTimeout(r,200))},l.onDoubleClick=function(n){clearTimeout(i),A&&e.onRowDoubleClick(t)};var u=t.cells.map((function(e){return a.createElement("td",r({},e.getCellProps(),{className:("ip-table-col "+(e.column.overflowVisible?"overflow-visible":"")).trim()}),e.render("Cell"))}));return a.createElement(a.Fragment,{key:"row-"+o},e.dnd&&a.createElement(p.default,{rowProps:l,rowRef:s,key:"row-"+o,row:t,dndType:e.dndType,dndName:e.dndName},u),!e.dnd&&a.createElement("tr",r({key:"row-"+o,ref:s},l),u),t.isExpanded&&a.createElement("tr",r({},t.getRowProps({key:"pivot-row"}),{className:"ip-pivot-row"}),a.createElement("td",{className:"ip-pivot-col "+c,colSpan:G.length},T(t))))})))),!e.hidePaginator&&a.createElement(s.default,r({},{totalItems:e.totalItems,pageIndex:e.currentPage?e.currentPage:$,manualPagination:O,pageSize:J,pageCount:H,pageOptions:F,canNextPage:O?e.currentPage+1<=e.totalPages:M,canPreviousPage:O?e.currentPage-1>=1:L,gotoPage:O?e.onPage:U,setPageSize:V,nextPage:O?function(){return e.onPage(e.currentPage+1,J)}:z,previousPage:O?function(){return e.onPage(e.currentPage-1,J)}:B})))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(0),i=n(5),a=n(3);t.default=function(e){e.manualPagination;var t=e.pageCount,n=e.pageIndex,s=e.pageSize,c=(e.pageOptions,e.totalItems),l=e.canPreviousPage,u=e.canNextPage,p=e.gotoPage,f=e.previousPage,d=e.nextPage;e.setPageSize;return o.createElement("section",{className:"ip-table-pagination"},o.createElement("span",null,o.createElement(i.default,{style:"subtle",size:"small",tooltip:"Go to first page",disabled:!l,onClick:function(){return p(1,s)}},a.ICON_ANGLE_DOUBLE_LEFT),o.createElement(i.default,{style:"subtle",size:"small",tooltip:"Go to previous page",disabled:!l,onClick:function(){return f()}},a.ICON_ANGLE_LEFT),o.createElement(i.default,{style:"subtle",size:"small",tooltip:"Go to next page",disabled:!u,onClick:function(){return d()}},a.ICON_ANGLE_RIGHT),o.createElement(i.default,{style:"subtle",size:"small",tooltip:"Go to last page",disabled:!u,onClick:function(){return p(t,s)}},a.ICON_ANGLE_DOUBLE_RIGHT),"  ",o.createElement("span",null,"Page  ",o.createElement("strong",null,n," of ",t),"  "),o.createElement("span",null,"Go to page   ",o.createElement("input",{className:"paginator-input",type:"number",placeholder:n,onChange:function(e){var n,o=e.target.value,i=Number(o);clearTimeout(r),!o||i<1||i>t||(i>=1&&i<=t&&(n=i),r=window.setTimeout((function(){return p(n,s)}),300))}})),"  "),o.createElement("span",{className:"total-assets"},"Total  ",o.createElement("strong",null,c||0)))}},function(e,t){e.exports=u},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(55),s=n(207);t.default=function(e){var t=e.dndType,n=e.dndName,c=e.row,l=o(a.useDrag({type:t,item:{name:n,rowData:c.original,type:t}}),2),u=(l[0],l[1]);return i.createElement("tr",r({},e.rowProps,{ref:s.default([u,e.rowRef])}),e.children)}},function(e,t,n){"use strict";n.r(t),t.default=function(e){return function(t){e.forEach((function(e){"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(5),s=n(34),c=n(3),l=function(e){function t(n){var r=e.call(this,n)||this;return r.render=function(){for(var e=r.props,n=e.page,o=e.totalPages,l=e.totalItems,u=Number.isInteger(o),p=Number.isInteger(o)&&o>1,f=!u||n-1==0,d=!u||n+1>o,h=Math.max(n-t.DEFAULT_STEP,1),v=Math.min(n+t.DEFAULT_STEP,o),g=[],m=h;m<=v;m++)g.push(m);return i.createElement("div",{className:"paginator"},i.createElement("div",{className:"pagination-controls"},i.createElement("span",{className:"paging-button-group"},i.createElement(a.default,{color:"secondary",size:"small",disabled:f,onClick:function(){return r.props.onPage(1)}},c.ICON_ANGLE_DOUBLE_LEFT),i.createElement(a.default,{color:"secondary",size:"small",disabled:f,onClick:function(){return r.props.onPage(n-1)}},c.ICON_ANGLE_LEFT)),i.createElement("div",{className:"jump-to-wrapper"},i.createElement(s.default,{label:"Page",value:n,disable:!p,options:g,onChange:function(e){return r.props.onPage(parseInt(e,10))}})),i.createElement("span",{className:"paging-button-group"},i.createElement(a.default,{color:"secondary",size:"small",disabled:d,onClick:function(){return r.props.onPage(n+1)}},c.ICON_ANGLE_RIGHT),i.createElement(a.default,{color:"secondary",size:"small",disabled:d,onClick:function(){return r.props.onPage(o)}},c.ICON_ANGLE_DOUBLE_RIGHT))),i.createElement("div",{className:"total-assets"},"Total: ",l||t.DEFAULT_TOTAL))},r}return o(t,e),t.DEFAULT_TOTAL=0,t.DEFAULT_STEP=25,t}(i.PureComponent);t.default=l},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(5),s=n(3),c=function(e){function t(t){var n=e.call(this,t)||this;return n.closeStyles={position:"absolute",right:"0px",top:"0px"},n.evtHandlers={onClose:function(e){return n.onClose(e)}},n}return o(t,e),t.prototype.onClose=function(e){(0,this.props.onRequestClose)(e)},t.prototype.render=function(){var e=this.props,t=e.isOpen,n=(e.children,e.style),r=e.wrapperStyle;return t?i.createElement("div",{className:"modal",style:r},i.createElement("div",{className:"modal-bg",onClick:this.evtHandlers.onClose}),i.createElement("div",{className:"modal-container",style:n},i.createElement("div",{className:"modal-content"},this.props.children),i.createElement(a.default,{onClick:this.evtHandlers.onClose,customStyles:this.closeStyles},s.ICON_TIMES))):null},t}(i.PureComponent);t.default=c},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(93),c=n(89),l=n(90),u=n(5),p=n(3),f=function(e){function t(t){var n=e.call(this,t)||this;return n.headerRef=a.createRef(),n.state={allowableTabsInView:0},n}return o(t,e),t.prototype.componentDidMount=function(){var e=Math.floor(this.allowableNumOfTabs());this.setState({allowableTabsInView:e})},t.prototype.componentDidUpdate=function(e){var t=Math.floor(this.allowableNumOfTabs());this.setState({allowableTabsInView:t})},t.prototype.allowableNumOfTabs=function(){var e=this.props,t=e.options,n=e.tabPadding,r=0,o=this.headerRef.current;if(o){for(var i=o.offsetWidth,a=0;a<t.length;a++){var s=t[a],c=s.canClose?20:0,l=document.createElement("div");if(l.className="tab-header-option",l.innerHTML=s.label,o.appendChild(l),r+=l.offsetWidth+c,o.removeChild(l),l=null,r>=i-n-25)return a}return t.length}},t.prototype.renderContent=function(){var e,t,n,r,o=this.props,s=o.options,c=o.activeTab,l=o.keepMounted,u=o.width,p=o.height;if(l){var f=[];try{for(var d=i(s),h=d.next();!h.done;h=d.next()){var v=(b=h.value).key===c,g=a.cloneElement(b.content,{active:v,width:u,height:p});f.push(g)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}return f.length>0?f:null}try{for(var m=i(s),y=m.next();!y.done;y=m.next()){var b;if((b=y.value).key===c||!c)return b.content}}catch(e){n={error:e}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}return null},t.prototype.renderHeader=function(){for(var e=this,t=this.props,n=t.options,r=t.activeTab,o=[],i=[],s=!1,f=function(t){var c=n[t],f=c.canClose,h=c.key,v=c.label,g=f?a.createElement(u.default,{style:"subtle",size:"small",onClick:function(t){t.preventDefault(),t.stopPropagation(),e.props.onClose(h)}},p.ICON_TIMES):null,m=h===r?"active":"";t<d.state.allowableTabsInView?o.push(a.createElement("div",{className:"tab-header-option "+m,onClick:function(){return e.props.onChange(h)},key:h},v,g)):(r!==h||s||(s=!0),i.push(a.createElement(l.default,{key:h,label:a.createElement("span",null,v,g),onClick:function(){return e.props.onChange(h)},active:r===h})))},d=this,h=0;h<n.length;h++)f(h);var v=a.createElement(u.default,{size:"large",style:"subtle",color:s?"primary":null},p.ICON_BARS);return a.createElement(a.Fragment,null,o,i.length>0?a.createElement("span",{className:"tab-header-menu"},a.createElement(c.default,{position:"left",items:i,button:v})):null)},t.prototype.render=function(){return a.createElement("div",{className:"tabs"},a.createElement("div",{ref:this.headerRef,className:"tab-header"},this.renderHeader()),a.createElement("div",{className:"tab-content"},this.renderContent()))},t}(a.PureComponent);t.default=s.withResizeDetector(f)},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),c=n(56),l=n(5),u=n(9),p=n(92),f=n(6),d=n(3),h=function(e){function t(t){var n=e.call(this,t)||this;return n.state={textInputValue:""},n.inputRef=s.createRef(),c.default.filter=function(e){return f.filterHotkeys(e)},n.submitHandler=function(){return n.submitOption()},n}return o(t,e),t.prototype.deleteOption=function(e){var t=a([],i(this.props.options));t.splice(e,1),this.props.onChange(t)},t.prototype.componentWillUnmount=function(){c.default.unbind("enter",this.submitHandler)},t.prototype.inputBlur=function(e){c.default.unbind("enter",this.submitHandler)},t.prototype.inputChanged=function(e){this.setState({textInputValue:e.target.value})},t.prototype.inputFocus=function(e){this.inputRef.current&&c.default("enter",this.submitHandler)},t.prototype.submitOption=function(){var e=this,t=this.state.textInputValue,n=this.props.onError;if(""!==t){var r=void 0;-1===(r=this.props.options?a([],i(this.props.options)):[]).indexOf(t)?(r.push(t),this.props.onChange(r),this.setState({textInputValue:""},(function(){var t=e.inputRef.current;t&&t.focus()}))):n&&this.props.onError('"'+t+'" already exists in the list.')}else n&&this.props.onError("Can not add an empty item to the list")},t.prototype.render=function(){var e=this,t=this.props,n=t.label,r=t.options,o=t.placeholder,i=t.disabled,a=t.width,c=t.tooltip,l=(t.tooltipAdd,t.info),f=t.labelPosition,d=this.state.textInputValue;return s.createElement(u.default,{customClass:"list-field",label:n,tooltip:c,buttons:this.renderButtons(),info:l,labelPosition:f,width:a},s.createElement("input",{type:"text",placeholder:o,value:d,ref:this.inputRef,disabled:i,onChange:function(t){return e.inputChanged(t)},onFocus:function(t){return e.inputFocus(t)},onBlur:function(t){return e.inputBlur(t)}}),s.createElement(p.default,{items:r,removable:!0,onRemove:function(t){return e.deleteOption(t)}}))},t.prototype.renderButtons=function(){var e=this,t=this.props,n=t.buttons,r=t.tooltipAdd,o=n?a([],i(n)):[];return o.push(s.createElement(l.default,{key:"btn-submit",style:"subtle",tooltip:r,color:"primary",onClick:function(){return e.submitOption()}},d.ICON_PLUS)),o},t}(s.PureComponent);t.default=h},function(e,t){e.exports=p},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(9),s=function(e){function t(t){var n=e.call(this,t)||this;return n.state={tempValue:null},n}return o(t,e),t.prototype.componentWillUnmount=function(){clearTimeout(this.updateTimeout)},t.prototype.updateValue=function(e){this.props.onChange(e)},t.prototype.rangeInputChange=function(e){var t=this,n=e.target.value,r=parseFloat(n);clearTimeout(this.updateTimeout),this.setState({tempValue:r},(function(){t.updateTimeout=setTimeout((function(){t.updateValue(r),t.setState({tempValue:null})}),100)}))},t.prototype.numberInputChange=function(e){var t=this.props,n=t.min,r=t.max,o=e.target.value;(o=""===o?0:parseFloat(o))>=n&&o<=r&&this.updateValue(o)},t.prototype.render=function(){var e=this,t=this.props,n=t.label,r=t.width,o=t.min,s=t.max,c=t.step,l=t.defaultValue,u=t.value,p=t.tooltip,f=t.info,d=t.labelPosition,h=this.state.tempValue,v=null!==h?h:null==u?l:u;return i.createElement(a.default,{customClass:"slider-field",label:n,tooltip:p,info:f,labelPosition:d,width:r},i.createElement("input",{onChange:function(t){return e.rangeInputChange(t)},type:"range",min:o,max:s,value:v,step:c}),i.createElement("input",{className:"val",onChange:function(t){return e.numberInputChange(t)},type:"number",value:v}))},t}(i.PureComponent);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=s(n(215)),o=s(n(59)),i=s(n(227)),a=s(n(228));function s(e){return e&&e.__esModule?e:{default:e}}var c=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,a.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,i.default)(t)?(0,o.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,r.default)(t)&&n.push(t)})),n};t.default=c},function(e,t,n){var r=n(16),o=n(10),i=n(14);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(23),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(219)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===n(i[c],c,i))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(16),o=n(14);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(16),o=n(62),i=n(14),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},function(e,t,n){var r=n(65),o=n(225),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(101)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(103);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t,n){var r=n(16),o=n(66),i=n(14),a=Function.prototype,s=Object.prototype,c=a.toString,l=s.hasOwnProperty,u=c.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==u}},function(e,t,n){var r=n(104),o=n(229),i=n(287),a=n(10);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){var r=n(230),o=n(274),i=n(103),a=n(10),s=n(284);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):s(e)}},function(e,t,n){var r=n(231),o=n(273),i=n(114);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(67),o=n(106);e.exports=function(e,t,n,i){var a=n.length,s=a,c=!i;if(null==e)return!s;for(e=Object(e);a--;){var l=n[a];if(c&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<s;){var u=(l=n[a])[0],p=e[u],f=l[1];if(c&&l[2]){if(void 0===p&&!(u in e))return!1}else{var d=new r;if(i)var h=i(p,f,u,e,t,d);if(!(void 0===h?o(f,p,3,i,d):h))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(38),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(38);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(38);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(38);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(37);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(37),o=n(69),i=n(70);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(102),o=n(243),i=n(19),a=n(105),s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,p=l.hasOwnProperty,f=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?f:s).test(a(e))}},function(e,t,n){var r,o=n(244),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(12)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(247),o=n(37),i=n(69);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(248),o=n(249),i=n(250),a=n(251),s=n(252);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},function(e,t,n){var r=n(39);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(39),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(39),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(39);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(40);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(40);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(40);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(40);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(67),o=n(107),i=n(264),a=n(267),s=n(41),c=n(10),l=n(60),u=n(100),p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,d,h,v){var g=c(e),m=c(t),y=g?"[object Array]":s(e),b=m?"[object Array]":s(t),_=(y="[object Arguments]"==y?p:y)==p,w=(b="[object Arguments]"==b?p:b)==p,x=y==b;if(x&&l(e)){if(!l(t))return!1;g=!0,_=!1}if(x&&!_)return v||(v=new r),g||u(e)?o(e,t,n,d,h,v):i(e,t,y,n,d,h,v);if(!(1&n)){var E=_&&f.call(e,"__wrapped__"),O=w&&f.call(t,"__wrapped__");if(E||O){var C=E?e.value():e,T=O?t.value():t;return v||(v=new r),h(C,T,n,d,v)}}return!!x&&(v||(v=new r),a(e,t,n,d,h,v))}},function(e,t,n){var r=n(70),o=n(260),i=n(261);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(23),o=n(108),i=n(68),a=n(107),s=n(265),c=n(266),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,p,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!p(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var h=1&r;if(d||(d=c),e.size!=t.size&&!h)return!1;var v=f.get(e);if(v)return v==t;r|=2,f.set(e,t);var g=a(d(e),d(t),r,l,p,f);return f.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(109),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,s){var c=1&n,l=r(e),u=l.length;if(u!=r(t).length&&!c)return!1;for(var p=u;p--;){var f=l[p];if(!(c?f in t:o.call(t,f)))return!1}var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var v=!0;s.set(e,t),s.set(t,e);for(var g=c;++p<u;){var m=e[f=l[p]],y=t[f];if(i)var b=c?i(y,m,f,t,e,s):i(m,y,f,e,t,s);if(!(void 0===b?m===y||a(m,y,n,i,s):b)){v=!1;break}g||(g="constructor"==f)}if(v&&!g){var _=e.constructor,w=t.constructor;_==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w||(v=!1)}return s.delete(e),s.delete(t),v}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},function(e,t,n){var r=n(17)(n(12),"DataView");e.exports=r},function(e,t,n){var r=n(17)(n(12),"Promise");e.exports=r},function(e,t,n){var r=n(17)(n(12),"Set");e.exports=r},function(e,t,n){var r=n(17)(n(12),"WeakMap");e.exports=r},function(e,t,n){var r=n(113),o=n(24);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},function(e,t,n){var r=n(106),o=n(275),i=n(281),a=n(72),s=n(113),c=n(114),l=n(42);e.exports=function(e,t){return a(e)&&s(t)?c(l(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},function(e,t,n){var r=n(115);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=n(277),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=a},function(e,t,n){var r=n(278);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(70);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},function(e,t,n){var r=n(280);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(23),o=n(104),i=n(10),a=n(73),s=r?r.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(282),o=n(283);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(116),o=n(98),i=n(10),a=n(99),s=n(62),c=n(42);e.exports=function(e,t,n){for(var l=-1,u=(t=r(t,e)).length,p=!1;++l<u;){var f=c(t[l]);if(!(p=null!=e&&n(e,f)))break;e=e[f]}return p||++l!=u?p:!!(u=null==e?0:e.length)&&s(u)&&a(f,u)&&(i(e)||o(e))}},function(e,t,n){var r=n(285),o=n(286),i=n(72),a=n(42);e.exports=function(e){return i(e)?r(a(e)):o(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(115);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(288),o=n(36);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}},function(e,t,n){var r=n(96),o=n(289)(r);e.exports=o},function(e,t,n){var r=n(36);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a<i)&&!1!==o(s[a],a,s););return n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var r=a(n(59)),o=a(n(291)),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function a(e){return e&&e.__esModule?e:{default:e}}var s=t.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map((function(t){var o=e[t];return o&&(0,r.default)(o,(function(e,t){n[t]||(n[t]={}),n[t]=i({},n[t],o[t])})),t})),n};t.default=s},function(e,t,n){var r=n(292);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(67),o=n(293),i=n(117),a=n(295),s=n(296),c=n(299),l=n(300),u=n(301),p=n(302),f=n(109),d=n(303),h=n(41),v=n(304),g=n(305),m=n(310),y=n(10),b=n(60),_=n(312),w=n(19),x=n(314),E=n(24),O=n(74),C={};C["[object Arguments]"]=C["[object Array]"]=C["[object ArrayBuffer]"]=C["[object DataView]"]=C["[object Boolean]"]=C["[object Date]"]=C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Map]"]=C["[object Number]"]=C["[object Object]"]=C["[object RegExp]"]=C["[object Set]"]=C["[object String]"]=C["[object Symbol]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C["[object Error]"]=C["[object Function]"]=C["[object WeakMap]"]=!1,e.exports=function e(t,n,T,A,S,P){var k,j=1&n,I=2&n,N=4&n;if(T&&(k=S?T(t,A,S,P):T(t)),void 0!==k)return k;if(!w(t))return t;var R=y(t);if(R){if(k=v(t),!j)return l(t,k)}else{var D=h(t),L="[object Function]"==D||"[object GeneratorFunction]"==D;if(b(t))return c(t,j);if("[object Object]"==D||"[object Arguments]"==D||L&&!S){if(k=I||L?{}:m(t),!j)return I?p(t,s(k,t)):u(t,a(k,t))}else{if(!C[D])return S?t:{};k=g(t,D,j)}}P||(P=new r);var M=P.get(t);if(M)return M;P.set(t,k),x(t)?t.forEach((function(r){k.add(e(r,n,T,r,t,P))})):_(t)&&t.forEach((function(r,o){k.set(o,e(r,n,T,o,t,P))}));var F=R?void 0:(N?I?d:f:I?O:E)(t);return o(F||t,(function(r,o){F&&(r=t[o=r]),i(k,o,e(r,n,T,o,t,P))})),k}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(17),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(43),o=n(24);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(43),o=n(74);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(19),o=n(65),i=n(298),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(12),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(61)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(43),o=n(71);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(43),o=n(119);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(110),o=n(119),i=n(74);e.exports=function(e){return r(e,i,o)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(75),o=n(306),i=n(307),a=n(308),s=n(309);e.exports=function(e,t,n){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return i(e);case"[object Set]":return new c;case"[object Symbol]":return a(e)}}},function(e,t,n){var r=n(75);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(23),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},function(e,t,n){var r=n(75);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(311),o=n(66),i=n(65);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},function(e,t,n){var r=n(19),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t,n){var r=n(313),o=n(63),i=n(64),a=i&&i.isMap,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(41),o=n(14);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(315),o=n(63),i=n(64),a=i&&i.isSet,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(41),o=n(14);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var r,o=n(59),i=(r=o)&&r.__esModule?r:{default:r},a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var s={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){var n=t[e];return n||{extend:e}}},c=t.autoprefix=function(e){var t={};return(0,i.default)(e,(function(e,n){var r={};(0,i.default)(e,(function(e,t){var n=s[t];n?r=a({},r,n(e)):r[t]=e})),t[n]=r})),t};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hover=void 0;var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0),a=(r=i)&&r.__esModule?r:{default:r};function s(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 l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=t.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,i,l;s(this,r);for(var u=arguments.length,p=Array(u),f=0;f<u;f++)p[f]=arguments[f];return i=l=c(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(p))),l.state={hover:!1},l.handleMouseOver=function(){return l.setState({hover:!0})},l.handleMouseOut=function(){return l.setState({hover:!1})},l.render=function(){return a.default.createElement(t,{onMouseOver:l.handleMouseOver,onMouseOut:l.handleMouseOut},a.default.createElement(e,o({},l.props,l.state)))},c(l,i)}return l(r,n),r}(a.default.Component)};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.active=void 0;var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0),a=(r=i)&&r.__esModule?r:{default:r};function s(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 l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=t.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,i,l;s(this,r);for(var u=arguments.length,p=Array(u),f=0;f<u;f++)p[f]=arguments[f];return i=l=c(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(p))),l.state={active:!1},l.handleMouseDown=function(){return l.setState({active:!0})},l.handleMouseUp=function(){return l.setState({active:!1})},l.render=function(){return a.default.createElement(t,{onMouseDown:l.handleMouseDown,onMouseUp:l.handleMouseUp},a.default.createElement(e,o({},l.props,l.state)))},c(l,i)}return l(r,n),r}(a.default.Component)};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){var n={},r=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";var r=n(321);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e){var t="string"==typeof e.className?e.className:"",n=e.isLoading?r.createElement("div",{className:"loading-bar"}):null,o=r.createElement("div",{className:"title"},e.title);return e.hasOwnProperty("tabs")&&Array.isArray(e.tabs)&&(o=e.tabs.map((function(t,n){return r.createElement("div",{key:n,className:"tab "+(e.activeTabName===t?"active":""),onClick:function(){return e.selectTab(t,n)}},t)}))),r.createElement("div",{className:"section "+t},r.createElement("div",{className:"section-header"},o,r.createElement("div",{className:"buttons"},e.buttons)),r.createElement("div",{className:"section-content"},e.children),n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(6),i=r.memo((function(e){return r.createElement(r.Fragment,null,o.formatDateDefault(e.cell.row.values.date_created))}));t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secondsToTime=void 0;var r=n(0),o=n(15),i=n(7),a=n(8);t.secondsToTime=function(e){var t=Math.floor(e/60),n=Math.floor(e-60*t);return n<10&&(n="0"+n),t+":"+n};t.default=i.connect((function(e){return{}}),(function(e){return a.bindActionCreators({updateAssetName:o.updateAssetName},e)}))((function(e){var n=e.cell.row.original,o=n.duration;n.id;return null!=o?r.createElement("div",{className:"asset-duration-cell"},t.secondsToTime(o)):null}))},function(e,t){e.exports=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ASSET_DND_TYPES=void 0,t.ASSET_DND_TYPES={ASSET_NAME:"asset_name"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(11),i=n(15),a=n(7),s=n(8);t.default=a.connect((function(e){return{}}),(function(e){return s.bindActionCreators({updateAssetName:i.updateAssetName},e)}))((function(e){var t=e.cell.row.original,n=t.name,i=t.id;return r.createElement("div",null,r.createElement(o.default,{controlled:!0,value:n,width:"100%",onSubmit:function(t){return e.updateAssetName(e.api,i,t)}}))}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(11),s=n(20),c=n(7),l=n(8),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.render=function(){var e=t.props.assetFilters;return i.createElement(a.default,{submittable:!0,submittableType:"search",value:e.name,doSubmit:function(e){return t.props.updateFilters({name:e})}})},t}return o(t,e),t}(i.PureComponent),p=c.connect((function(e){return{assetFilters:e.assetFilters}}),(function(e){return l.bindActionCreators({updateFilters:s.updateFilters},e)}))(i.memo(u));t.default=p},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(25),s=n(22),c=n(7),l=n(8),u=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=n.props,t=e.cell,r=e.selectedAssets,o=t.row.original.id,a=r.indexOf(o)>-1;return i.createElement("div",{className:"select-cell"},i.createElement(s.default,{label:"",width:"auto",value:a,onChange:function(e,t){return function(e,t){e?t.shiftKey&&r.length>0?n.props.selectMultipleAssets(o):n.props.selectAsset(o):n.props.deselectAsset(o)}(e,t)}}))},n}return o(t,e),t}(i.PureComponent),p=c.connect((function(e){return{selectedAssets:e.selectedAssets}}),(function(e){return l.bindActionCreators({selectAsset:a.selectAsset,deselectAsset:a.deselectAsset,selectMultipleAssets:a.selectMultipleAssets},e)}))(i.memo(u));t.default=p},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(22),s=n(25),c=n(7),l=n(8),u=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=0===n.props.selectedAssets.length,t=e?function(){return n.props.selectAll()}:function(){return n.props.resetSelection()};return i.createElement(a.default,{label:"",propagate:!1,value:!e,onChange:t})},n}return o(t,e),t}(i.PureComponent),p=c.connect((function(e){return{selectedAssets:e.selectedAssets}}),(function(e){return l.bindActionCreators({selectAll:s.selectAll,resetSelection:s.resetSelection},e)}))(i.memo(u));t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(5),i=r.memo((function(e){return r.createElement(o.default,{color:"secondary",style:"subtle",size:"small",onClick:e.onClick},e.cell.row.values.tags.length)}));t.default=i},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(20),s=n(11),c=n(7),l=n(8),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.render=function(){var e=t.props.assetFilters;return i.createElement(s.default,{submittable:!0,submittableType:"search",value:e.tags,doSubmit:function(e){return t.props.updateFilters({tags:e})}})},t}return o(t,e),t}(i.PureComponent),p=c.connect((function(e){return{assetFilters:e.assetFilters}}),(function(e){return l.bindActionCreators({updateFilters:a.updateFilters},e)}))(i.memo(u));t.default=p},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(13),s=n(44),c=n(11),l=n(15),u=n(7),p=n(8),f=n(5),d=n(3),h=function(e){function t(n){var r=e.call(this,n)||this;return r.addTags=function(e,t){t&&r.props.addAssetTag(r.props.api,e,t)},r.render=function(){var e=r.props,n=e.row.original,o=n.id,l=n.tags,u=e.assetTags,p=l.map((function(e){return i.createElement(s.default,{key:e,copy:e,colorize:t.COLORIZE_TAGS,removeHandler:function(){return r.props.deleteAssetTag(r.props.api,o,e)}})}));return i.createElement("div",{className:"tags-column"},i.createElement(i.Fragment,null,i.createElement(c.default,{submittable:!0,submittableType:"add",suggestions:u,label:a.assets.tags.add,width:t.ADD_TAG_INPUT_WIDTH,doSubmit:function(e){return r.addTags(o,e)}}),p,i.createElement(f.default,{customStyles:{position:"absolute",right:"1px",top:"9px"},style:"subtle",onClick:function(e){return r.props.onClose(e,r.props.row)}},d.ICON_TIMES)))},r}return o(t,e),t.ADD_TAG_INPUT_WIDTH="280px",t.COLORIZE_TAGS=!0,t}(i.PureComponent);t.default=u.connect((function(e){return{assetTags:e.assetTags}}),(function(e){return p.bindActionCreators({addAssetTag:l.addAssetTag,deleteAssetTag:l.deleteAssetTag},e)}))(h)},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(44),s=n(11),c=n(15),l=n(7),u=n(8),p=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=n.props,t=e.cell,r=e.assetTags,o=t.row.original.tags.map((function(e){return i.createElement(a.default,{key:e,copy:e,colorize:!0,removeHandler:function(){return n.removeTag(e)}})}));return i.createElement("div",{className:"tags-complex-column"},o,i.createElement("div",{className:"new-tag"},i.createElement(s.default,{submittable:!0,submittableType:"add",placeholder:"+",hideButtons:!0,suggestions:r,doSubmit:function(e){return n.onSubmit(e)},width:"150px",buttons:[],value:n.state.newTag})))},n.state={newTag:""},n.inputRef=i.createRef(),n}return o(t,e),t.prototype.onSubmit=function(e){var t=this.props.cell.row.original,n=t.id;-1===t.tags.indexOf(e)&&this.props.addAssetTag(this.props.api,n,e),this.setState({newTag:""})},t.prototype.removeTag=function(e){var t=this.props.cell.row.original.id;this.props.deleteAssetTag(this.props.api,t,e)},t}(i.Component),f=l.connect((function(e){return{assetTags:e.assetTags}}),(function(e){return u.bindActionCreators({addAssetTag:c.addAssetTag,deleteAssetTag:c.deleteAssetTag},e)}))(i.memo(p));t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(79),i=r.memo((function(e){return r.createElement("div",{className:"asset-type-cell"},r.createElement(o.default,{type:e.cell.row.values.type}))}));t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=r.memo((function(e){var t=e.cell.row.original.processing?"processing":"complete";return r.createElement("div",{className:"asset-status-cell"},r.createElement("div",{className:"status-indicator "+t}))}));t.default=o},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(79),s=n(5),c=n(51),l=n(20),u=n(7),p=n(8),f=n(26),d=function(e){function t(t){var n=e.call(this,t)||this;return n.handleFilterChange=function(e){var t=e!==f.ASSET_TYPES.ALL?e:"";n.props.updateFilters({type:t,page:1})},n.render=function(){var e=n.state.openMenu,t=n.props.assetFilters.type,r=[],o=function(e){if(f.ASSET_TYPES.hasOwnProperty(e)){var t=f.ASSET_TYPES[e];r.push(i.createElement("div",{key:t,className:"asset-filter",onClick:function(){return n.handleFilterChange(t)}},i.createElement(a.default,{type:t})))}};for(var l in f.ASSET_TYPES)o(l);return i.createElement("div",{className:"centered cell"},i.createElement(s.default,{tooltip:"Filter by Asset type",buttonRef:n.typeFilterRef,onClick:function(){return n.setState({openMenu:!e})}},i.createElement(a.default,{type:t||"filter"}),i.createElement(c.default,{fixed:!0,show:e,position:"bottomleft",toggleRef:n.typeFilterRef,onOutsideClick:function(){return n.setState({openMenu:!1})}},r)))},n.state={openMenu:!1},n.typeFilterRef=i.createRef(),n}return o(t,e),t}(i.PureComponent),h=u.connect((function(e){return{assetFilters:e.assetFilters}}),(function(e){return p.bindActionCreators({updateFilters:l.updateFilters},e)}))(i.memo(d));t.default=h},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(27),s=n(21),c=n(80),l=function(e){function t(t){var n=e.call(this,t)||this;return n.defaultSize=600,n}return o(t,e),t.prototype.getWrapperStyle=function(){var e=this.props,t=e.padding,n=e.width,r=e.height,o=void 0!==t?t:a.DEFAULT_PADDING;return s.getPlayerStyle(n,r,this.defaultSize,this.defaultSize,o,this.defaultSize,this.defaultSize)},t.prototype.render=function(){var e=this.props,t=e.active,n=e.asset,r=n.name,o=n.url,a=n.id,s=e.width,l=e.height,u=this.getWrapperStyle();return!1!==t?i.createElement("div",{className:"media-player"},i.createElement("div",{className:"inner-viewer",style:u},i.createElement(c.default,{options:{width:s,height:l,x:0,y:0,rotation:0,id:"xxx",name:"xxx",content:"ABCDEFGHIJKLM\nNOPQRSTUVWXYZ\nabcdefghijklm\nnopqrstuvwxyz\n1234567890",color:"#000000",background_color:"#ffffff",font_size:80,font_type:"custom",font:r,custom_font_url:o,custom_font_id:a,letter_spacing:null,word_spacing:null,line_height:null,horizontal_alignment:"center",vertical_alignment:"center",text_wrap:!0,text_fit:!0}}))):null},t}(i.PureComponent);t.default=l},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(13),s=n(22),c=n(120),l=n(46),u=n(8),p=n(7),f=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e,t=n.props.assetUploads,r=t.uploads,o=t.autoTag,l=t.assignToStory;return e=r.length>0?r.map((function(e){var t=e.filename,n=e.percent<100?i.createElement(c.default,{progress:e.percent}):i.createElement("span",null,a.assets.uploads.preparePhase);return i.createElement("div",{className:"ongoing-upload",key:t},i.createElement("span",{className:"upload-filename"},t),n)})):i.createElement("div",{className:"no-ongoing-uploads"},a.assets.uploads.noUploads),i.createElement("div",{className:"uploads-menu"},i.createElement("div",{className:"uploads-controls"},i.createElement(s.default,{width:"50%",label:a.assets.uploads.autoTagInput,value:o,onChange:function(){return n.props.toggleAutoTag(!o)}}),i.createElement(s.default,{width:"50%",label:a.assets.uploads.assignToStoryInput,info:a.assets.uploads.assignToStoryInfo,value:l,onChange:function(){return n.props.toggleAssignToStory(!l)}})),i.createElement("div",{className:"uploads-list"},e))},n}return o(t,e),t}(i.PureComponent);t.default=p.connect((function(e){return{assetUploads:e.assetUploads}}),(function(e){return u.bindActionCreators({toggleAutoTag:l.toggleAutoTag,toggleAssignToStory:l.toggleAssignToStory},e)}))(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewNotAvailable=void 0;var r=n(0),o=n(3),i=n(13);t.PreviewNotAvailable=function(e){return!0===e.active||void 0===e.active?r.createElement("div",{className:"preview-not-available"},r.createElement("div",{className:"cta"},r.createElement("div",{className:"icon"},o.ICON_BAN),r.createElement("p",null,i.assets.previewNotAvailable))):null}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(27),s=n(21),c=function(e){function t(t){var n=e.call(this,t)||this;return n.width=1280,n.height=720,n.audioNode=i.createRef(),n}return o(t,e),t.prototype.getImageStyle=function(){var e=this.props,t=e.padding,n=e.width,r=e.height,o=void 0!==t?t:a.DEFAULT_PADDING;return s.getPlayerStyle(n,r,this.width,this.height,o)},t.prototype.render=function(){var e=this.props,t=e.url;return!1!==e.active?i.createElement("div",{className:"media-player"},i.createElement("div",{className:"inner-viewer",style:this.getImageStyle()},i.createElement("audio",{controls:!0,src:t,ref:this.audioNode}))):null},t}(i.PureComponent);t.default=c},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(27),s=n(21),c=function(e){function t(t){var n=e.call(this,t)||this;return n.state={imageHeight:1080,imageWidth:1920},n.imgNode=i.createRef(),n}return o(t,e),t.prototype.getImageStyle=function(){var e=this.state,t=e.imageHeight,n=e.imageWidth,r=this.props,o=r.padding,i=r.width,c=r.height,l=void 0!==o?o:a.DEFAULT_PADDING;return t&&n?s.getPlayerStyle(i,c,n,t,l):{}},t.prototype.metadataLoaded=function(e){this.setState({imageWidth:e.target.naturalWidth,imageHeight:e.target.naturalHeight})},t.prototype.render=function(){var e=this.props;e.url;return!1!==e.active?i.createElement("div",{className:"mediap-player"},i.createElement("div",{className:"inner-viewer",style:this.getImageStyle()})):null},t}(i.PureComponent);t.default=c},function(e,t,n){var r,o,i;o=[t],void 0===(i="function"==typeof(r=function(e){"use strict";var t,n=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};!function(e){e[e.EOS=0]="EOS",e[e.Text=1]="Text",e[e.Incomplete=2]="Incomplete",e[e.ESC=3]="ESC",e[e.Unknown=4]="Unknown",e[e.SGR=5]="SGR",e[e.OSCURL=6]="OSCURL"}(t||(t={}));var r=function(){function e(){this.VERSION="4.0.4",this.setup_palettes(),this._use_classes=!1,this._escape_for_html=!0,this.bold=!1,this.fg=this.bg=null,this._buffer="",this._url_whitelist={http:1,https:1}}return Object.defineProperty(e.prototype,"use_classes",{get:function(){return this._use_classes},set:function(e){this._use_classes=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"escape_for_html",{get:function(){return this._escape_for_html},set:function(e){this._escape_for_html=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url_whitelist",{get:function(){return this._url_whitelist},set:function(e){this._url_whitelist=e},enumerable:!0,configurable:!0}),e.prototype.setup_palettes=function(){var e=this;this.ansi_colors=[[{rgb:[0,0,0],class_name:"ansi-black"},{rgb:[187,0,0],class_name:"ansi-red"},{rgb:[0,187,0],class_name:"ansi-green"},{rgb:[187,187,0],class_name:"ansi-yellow"},{rgb:[0,0,187],class_name:"ansi-blue"},{rgb:[187,0,187],class_name:"ansi-magenta"},{rgb:[0,187,187],class_name:"ansi-cyan"},{rgb:[255,255,255],class_name:"ansi-white"}],[{rgb:[85,85,85],class_name:"ansi-bright-black"},{rgb:[255,85,85],class_name:"ansi-bright-red"},{rgb:[0,255,0],class_name:"ansi-bright-green"},{rgb:[255,255,85],class_name:"ansi-bright-yellow"},{rgb:[85,85,255],class_name:"ansi-bright-blue"},{rgb:[255,85,255],class_name:"ansi-bright-magenta"},{rgb:[85,255,255],class_name:"ansi-bright-cyan"},{rgb:[255,255,255],class_name:"ansi-bright-white"}]],this.palette_256=[],this.ansi_colors.forEach((function(t){t.forEach((function(t){e.palette_256.push(t)}))}));for(var t=[0,95,135,175,215,255],n=0;n<6;++n)for(var r=0;r<6;++r)for(var o=0;o<6;++o){var i={rgb:[t[n],t[r],t[o]],class_name:"truecolor"};this.palette_256.push(i)}for(var a=8,s=0;s<24;++s,a+=10){var c={rgb:[a,a,a],class_name:"truecolor"};this.palette_256.push(c)}},e.prototype.escape_txt_for_html=function(e){return e.replace(/[&<>]/gm,(function(e){return"&"===e?"&amp;":"<"===e?"&lt;":">"===e?"&gt;":void 0}))},e.prototype.append_buffer=function(e){var t=this._buffer+e;this._buffer=t},e.prototype.get_next_packet=function(){var e={kind:t.EOS,text:"",url:""},r=this._buffer.length;if(0==r)return e;var i=this._buffer.indexOf("");if(-1==i)return e.kind=t.Text,e.text=this._buffer,this._buffer="",e;if(i>0)return e.kind=t.Text,e.text=this._buffer.slice(0,i),this._buffer=this._buffer.slice(i),e;if(0==i){if(1==r)return e.kind=t.Incomplete,e;var a=this._buffer.charAt(1);if("["!=a&&"]"!=a)return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;if("["==a){if(this._csi_regex||(this._csi_regex=o(n(["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n [ # CSI\n ([<-?]?) # private-mode char\n ([d;]*) # any digits or semicolons\n ([ -/]? # an intermediate modifier\n [@-~]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n [ # CSI\n [ -~]* # anything legal\n ([\0-:]) # anything illegal\n )\n "],["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \\x1b\\[ # CSI\n ([\\x3c-\\x3f]?) # private-mode char\n ([\\d;]*) # any digits or semicolons\n ([\\x20-\\x2f]? # an intermediate modifier\n [\\x40-\\x7e]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \\x1b\\[ # CSI\n [\\x20-\\x7e]* # anything legal\n ([\\x00-\\x1f:]) # anything illegal\n )\n "]))),null===(l=this._buffer.match(this._csi_regex)))return e.kind=t.Incomplete,e;if(l[4])return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;""!=l[1]||"m"!=l[3]?e.kind=t.Unknown:e.kind=t.SGR,e.text=l[2];var s=l[0].length;return this._buffer=this._buffer.slice(s),e}if("]"==a){if(r<4)return e.kind=t.Incomplete,e;if("8"!=this._buffer.charAt(2)||";"!=this._buffer.charAt(3))return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;this._osc_st||(this._osc_st=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=e.raw[0],o=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm,i=r.replace(o,"");return new RegExp(i,"g")}(n(["\n (?: # legal sequence\n (\\) # ESC | # alternate\n () # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\0-] # anything illegal\n | # alternate\n [\b-] # anything illegal\n | # alternate\n [-] # anything illegal\n )\n "],["\n (?: # legal sequence\n (\\x1b\\\\) # ESC \\\n | # alternate\n (\\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\\x00-\\x06] # anything illegal\n | # alternate\n [\\x08-\\x1a] # anything illegal\n | # alternate\n [\\x1c-\\x1f] # anything illegal\n )\n "]))),this._osc_st.lastIndex=0;var c=this._osc_st.exec(this._buffer);if(null===c)return e.kind=t.Incomplete,e;if(c[3])return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;var l,u=this._osc_st.exec(this._buffer);return null===u?(e.kind=t.Incomplete,e):u[3]?(e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e):(this._osc_regex||(this._osc_regex=o(n(["\n ^ # beginning of line\n #\n ]8; # OSC Hyperlink\n [ -:<-~]* # params (excluding ;)\n ; # end of params\n ([!-~]{0,512}) # URL capture\n (?: # ST\n (?:\\) # ESC | # alternate\n (?:) # BEL (what xterm did)\n )\n ([!-~]+) # TEXT capture\n ]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\) # ESC | # alternate\n (?:) # BEL (what xterm did)\n )\n "],["\n ^ # beginning of line\n #\n \\x1b\\]8; # OSC Hyperlink\n [\\x20-\\x3a\\x3c-\\x7e]* # params (excluding ;)\n ; # end of params\n ([\\x21-\\x7e]{0,512}) # URL capture\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n ([\\x21-\\x7e]+) # TEXT capture\n \\x1b\\]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n "]))),null===(l=this._buffer.match(this._osc_regex))?(e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e):(e.kind=t.OSCURL,e.url=l[1],e.text=l[2],s=l[0].length,this._buffer=this._buffer.slice(s),e))}}},e.prototype.ansi_to_html=function(e){this.append_buffer(e);for(var n=[];;){var r=this.get_next_packet();if(r.kind==t.EOS||r.kind==t.Incomplete)break;r.kind!=t.ESC&&r.kind!=t.Unknown&&(r.kind==t.Text?n.push(this.transform_to_html(this.with_state(r))):r.kind==t.SGR?this.process_ansi(r):r.kind==t.OSCURL&&n.push(this.process_hyperlink(r)))}return n.join("")},e.prototype.with_state=function(e){return{bold:this.bold,fg:this.fg,bg:this.bg,text:e.text}},e.prototype.process_ansi=function(e){for(var t=e.text.split(";");t.length>0;){var n=t.shift(),r=parseInt(n,10);if(isNaN(r)||0===r)this.fg=this.bg=null,this.bold=!1;else if(1===r)this.bold=!0;else if(22===r)this.bold=!1;else if(39===r)this.fg=null;else if(49===r)this.bg=null;else if(r>=30&&r<38)this.fg=this.ansi_colors[0][r-30];else if(r>=40&&r<48)this.bg=this.ansi_colors[0][r-40];else if(r>=90&&r<98)this.fg=this.ansi_colors[1][r-90];else if(r>=100&&r<108)this.bg=this.ansi_colors[1][r-100];else if((38===r||48===r)&&t.length>0){var o=38===r,i=t.shift();if("5"===i&&t.length>0){var a=parseInt(t.shift(),10);a>=0&&a<=255&&(o?this.fg=this.palette_256[a]:this.bg=this.palette_256[a])}if("2"===i&&t.length>2){var s=parseInt(t.shift(),10),c=parseInt(t.shift(),10),l=parseInt(t.shift(),10);if(s>=0&&s<=255&&c>=0&&c<=255&&l>=0&&l<=255){var u={rgb:[s,c,l],class_name:"truecolor"};o?this.fg=u:this.bg=u}}}}},e.prototype.transform_to_html=function(e){var t=e.text;if(0===t.length)return t;if(this._escape_for_html&&(t=this.escape_txt_for_html(t)),!e.bold&&null===e.fg&&null===e.bg)return t;var n=[],r=[],o=e.fg,i=e.bg;e.bold&&n.push("font-weight:bold"),this._use_classes?(o&&("truecolor"!==o.class_name?r.push(o.class_name+"-fg"):n.push("color:rgb("+o.rgb.join(",")+")")),i&&("truecolor"!==i.class_name?r.push(i.class_name+"-bg"):n.push("background-color:rgb("+i.rgb.join(",")+")"))):(o&&n.push("color:rgb("+o.rgb.join(",")+")"),i&&n.push("background-color:rgb("+i.rgb+")"));var a="",s="";return r.length&&(a=' class="'+r.join(" ")+'"'),n.length&&(s=' style="'+n.join(";")+'"'),"<span"+s+a+">"+t+"</span>"},e.prototype.process_hyperlink=function(e){var t=e.url.split(":");return t.length<1?"":this._url_whitelist[t[0]]?'<a href="'+this.escape_txt_for_html(e.url)+'">'+this.escape_txt_for_html(e.text)+"</a>":""},e}();function o(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=e.raw[0],o=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm,i=r.replace(o,"");return new RegExp(i)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(125),c=n(345),l=n(11),u=n(5),p=n(33),f=n(35),d=n(34),h=n(57),v=n(9),g=n(45),m=n(21),y=n(123),b=n(346),_=n(93),w=n(13),x=n(6),E=n(126),O=n(124),C=function(e){function t(t){var n=e.call(this,t)||this,r=n.getInventoryDefaults(),o=n.getInventoryOptions();return n.state={inventory:r,inventoryOptions:o,experienceId:null,jobId:null,experience:null,timeElapsed:0,activeOutput:"",rendering:!1},n.timer=new E.default({interval:1e3,onUpdate:function(e){n.setState({timeElapsed:e})}}),n.evtHandlers={toggleOutput:function(e){return n.toggleActiveOutput(e)},createExp:function(){return n.createExperience()},gotExperience:null},n}return o(t,e),t.prototype.componentWillUnmount=function(){this.timer.stop(),this.evtHandlers.gotExperience=null},t.prototype.getInventoryOptions=function(){var e=this.props.variables,t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];r.defaultItem&&r.defaultItem.type&&r.defaultItem.type.toLowerCase()===s.VARIABLE_TYPES.ENUM&&(t[r.id]=r.defaultItem.options)}return t},t.prototype.getInventoryDefaults=function(){var e=this.props.variables,t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t[r.id]=this.getVariableValue(r.previewItem)}return t},t.prototype.checkInventoryDefaults=function(e){var t=this.props.variables,n=i({},this.state.inventory);for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=e[r];if(a){var s=this.getVariableValue(a.previewItem),c=this.getVariableValue(o.previewItem);o.type===a.type&&s===c||(n[r]=c)}}return n},t.prototype.getVariableValue=function(e){if(e&&e.type){var t=e.type.toLowerCase();return t===s.VARIABLE_TYPES.IMAGE||t===s.VARIABLE_TYPES.VIDEO||t===s.VARIABLE_TYPES.AUDIO?e.url:e.src}},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.experienceId,r=t.jobId;n&&r&&this.setState({jobId:r},(function(){e.getExperience(n)}))},t.prototype.componentDidUpdate=function(e,t){if(e.storyId!==this.props.storyId&&(this.evtHandlers.gotExperience=null),e.variables!==this.props.variables){var n=void 0,r=this.getInventoryOptions();n=e.storyId===this.props.storyId?this.checkInventoryDefaults(e.variables):this.getInventoryDefaults(),this.setState({inventoryOptions:r,inventory:n})}},t.prototype.variableInputChanged=function(e,t){var n=i({},this.state.inventory);n[e]=t,this.setState({inventory:n})},t.prototype.getViewerOptions=function(){var e=[],t=this.state,n=t.experience.output,r=t.jobId,o=n.videos,i=n.images;if(o)for(var a in o)if(o.hasOwnProperty(a)){var s={label:"Video: "+a,value:c.OUTPUT_TYPES.VIDEO+"."+a};e.push(s)}if(i)for(var a in i)if(i.hasOwnProperty(a)){var l={label:"Image: "+a,value:c.OUTPUT_TYPES.IMAGE+"."+a};e.push(l)}return r&&e.push({label:w.previewer.btnLog,value:c.OUTPUT_TYPES.LOG+"."+r}),e},t.prototype.renderVariableFields=function(){var e=this,t=this.state,n=t.inventory,r=t.inventoryOptions,o=this.props.variables,i=[],c=function(t){if(o.hasOwnProperty(t)){var c=o[t];switch(c.type.toLowerCase()){case s.VARIABLE_TYPES.TEXT:i.push(a.createElement(l.default,{label:c.name,key:c.id,value:n[c.id],onChange:function(t){return e.variableInputChanged(c.id,t)}}));break;case s.VARIABLE_TYPES.NUMBER:i.push(a.createElement(f.default,{label:c.name,key:c.id,value:n[c.id],onChange:function(t){return e.variableInputChanged(c.id,t)}}));break;case s.VARIABLE_TYPES.ENUM:i.push(a.createElement(d.default,{label:c.name,key:c.id,value:n[c.id],options:r[c.id],onChange:function(t){return e.variableInputChanged(c.id,t)}}));break;case s.VARIABLE_TYPES.BOOLEAN:i.push(a.createElement(h.default,{label:c.name,key:c.id,value:n[c.id],options:s.BOOLEAN_DEFAULT_OPTIONS,onChange:function(t){return e.variableInputChanged(c.id,t)}}));break;case s.VARIABLE_TYPES.IMAGE:i.push(a.createElement(v.default,{label:c.name,key:c.id},a.createElement(b.default,{value:n[c.id],type:c.type,onChange:function(t){return e.variableInputChanged(c.id,t)}})));break;case s.VARIABLE_TYPES.VIDEO:case s.VARIABLE_TYPES.AUDIO:i.push(a.createElement(v.default,{label:c.name,key:c.id},a.createElement(b.default,{type:c.type,value:n[c.id],onChange:function(t){return e.variableInputChanged(c.id,t)}})))}}};for(var u in o)c(u);return i},t.prototype.getFirstOutput=function(e){var t=e.output.videos,n=e.output.images;if(t){for(var r in t)if(t.hasOwnProperty(r))return c.OUTPUT_TYPES.VIDEO+"."+r}else{if(!n)return null;for(var r in n)if(n.hasOwnProperty(r))return c.OUTPUT_TYPES.IMAGE+"."+r}},t.prototype.getExperience=function(e,t,n,r){var o=this;void 0===t&&(t=!1),this.timer.running||this.timer.start();var i=this.props,a=i.api,s=i.onError,c=i.onExperenceLoaded,l=i.onJobCreated;this.setState({rendering:!0},(function(){o.setState({experienceId:e},(function(){t?a.triggerEvent(e,n,r).then((function(t){o.setState({jobId:t.job_id},(function(){l&&l(e,t.job_id),o.evtHandlers.gotExperience=function(e){o.timer.stop(),c&&c(e),o.setState({rendering:!1,activeOutput:o.getFirstOutput(e),experience:e})};a.getExperience(e,!0).then((function(e){o.evtHandlers.gotExperience&&o.evtHandlers.gotExperience(e)})).catch((function(t){o.resetState(),s&&s(w.previewer.runExpError.replace("[expId]",e))}))}))})).catch((function(t){o.resetState(),s&&s(w.previewer.triggerExpError.replace("[expId]",e))})):(o.evtHandlers.gotExperience=function(e){o.timer.stop(),c&&c(e),o.setState({rendering:!1,activeOutput:o.getFirstOutput(e),experience:e})},a.getExperience(e,!0).then((function(e){o.evtHandlers.gotExperience&&o.evtHandlers.gotExperience(e)})).catch((function(t){o.resetState(),s&&s(w.previewer.runExpError.replace("[expId]",e))})))}))}))},t.prototype.createExperience=function(){var e=this,t=this.props,n=t.storyId,r=t.onNotification,o=t.onError,i=t.api,a=t.onExperienceCreated,s=t.compositionId,c=t.useWorkingCopy;this.resetState((function(){e.setState({rendering:!0},(function(){e.timer.start(),r&&r(w.previewer.runExpStart),i.createExperience(n,e.state.inventory,s,c).then((function(t){r&&r(w.previewer.expId.replace("[expId]",t.id)),a&&a(t),e.getExperience(t.id,!0,s,c)})).catch((function(t){e.resetState(),o&&o(w.previewer.createExpError)}))}))}))},t.prototype.resetState=function(e){this.timer.stop(),this.setState({rendering:!1,experienceId:null,experience:null,jobId:null,timeElapsed:0,activeOutput:null},(function(){e&&e()}))},t.prototype.renderViewerContent=function(){var e=this.state,t=e.rendering,n=e.experience,r=e.timeElapsed,o=e.activeOutput,i=this.props,s=i.api,l=i.onError;if(t)return a.createElement("div",{className:"running-prompt"},a.createElement(p.default,null),a.createElement("br",null),a.createElement("h1",null,"  ",w.previewer.expRunning),a.createElement("p",null,w.previewer.time," ",x.formattedTime(r)));if(n&&o){var u=void 0,f=void 0,d=o.split("."),h=d[0],v=d[1];if(h===c.OUTPUT_TYPES.IMAGE)f=n.output.images[v],u=a.createElement(y.default,{url:f,active:!0});else if(h===c.OUTPUT_TYPES.VIDEO){var g=n.output.videos[v],b=void 0!==g.width?parseInt(g.width,10):null,E=void 0!==g.height?parseInt(g.height,10):null;f=g.url,u=a.createElement(m.default,{url:f,active:!0,maxWidth:b,allowManualScale:!0,maxHeight:E})}else h===c.OUTPUT_TYPES.LOG&&(u=a.createElement("div",{className:"log"},a.createElement(O.default,{api:s,onError:l,jobId:v})));return a.createElement(_.default,{handleWidth:!0,handleHeight:!0},u)}return null},t.prototype.toggleActiveOutput=function(e){this.setState({activeOutput:e})},t.prototype.render=function(){var e,t,n=this.state,r=n.rendering,o=n.experience,i=n.activeOutput,s=o?w.previewer.btnReRender:w.previewer.btnRender,c=r?null:a.createElement(u.default,{size:"large",onClick:this.evtHandlers.createExp,color:"primary",style:"bold"},s);if(o){var p=this.getViewerOptions();e=a.createElement(d.default,{width:"130px",options:p,value:i,onChange:this.evtHandlers.toggleOutput}),t=a.createElement(l.default,{readOnly:!0,width:"360px",label:w.previewer.expIdField,showCopy:!0,value:o.id})}return a.createElement("div",{className:"story-viewer viewer"},a.createElement("div",{className:"variables"},a.createElement("h2",null,w.previewer.previewVars),a.createElement(g.default,null),this.renderVariableFields()),a.createElement("div",{className:"viewer-content"},a.createElement("div",{className:"content-header"},c,a.createElement("div",{className:"output"},e),a.createElement("div",{className:"right-interface"},t)),a.createElement("div",{className:"content-wrapper"},this.renderViewerContent())))},t}(a.PureComponent);t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OUTPUT_TYPES=void 0,t.OUTPUT_TYPES={LOG:"log",IMAGE:"image",VIDEO:"video"}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(33),s=n(125),c=n(78),l=n(5),u=n(3),p=function(e){function t(t){var n=e.call(this,t)||this;return n.input=i.createRef(),n.state={processing:!1,processedFile:null},n.evtHandlers={fileUpload:function(e){return n.fileUploaded(e)},fileDrop:function(e,t){return n.onFileDrop(e,t)},clearSelection:function(e){return n.clearSelection(e)},click:function(){return n.onClick()}},n}return o(t,e),t.prototype.clearSelection=function(e){e.preventDefault(),e.stopPropagation(),this.props.onChange(null)},t.prototype.fileUploaded=function(e){var t=e.target.files[0];t&&this.props.onChange(t)},t.prototype.componentDidUpdate=function(e){e.value!==this.props.value&&this.checkFile()},t.prototype.componentDidMount=function(){this.checkFile()},t.prototype.checkFile=function(){var e=this,t=this.props.value;t instanceof File&&this.setState({processing:!0,processedFile:null},(function(){var n=new FileReader;n.onload=function(){e.setState({processing:!1,processedFile:n.result})},n.readAsDataURL(t)}))},t.prototype.renderFields=function(){var e,t=this.state,n=t.processing,r=t.processedFile,o=this.props,c=o.type,l=o.value,u=l instanceof File;if(!l)return null;if(u){if(n)return i.createElement(a.default,null);e=r}else e=l;switch(c.toLowerCase()){case s.VARIABLE_TYPES.IMAGE:return i.createElement("img",{className:"default-preview",src:e});case s.VARIABLE_TYPES.VIDEO:return i.createElement("video",{className:"default-preview",src:e,controls:!0});case s.VARIABLE_TYPES.AUDIO:return i.createElement("audio",{className:"default-preview",src:e,controls:!0})}},t.prototype.getInputFilter=function(){var e=this.props,t=e.type;e.value;switch(t){case s.VARIABLE_TYPES.IMAGE:return"image/*";case s.VARIABLE_TYPES.VIDEO:return"video/*";case s.VARIABLE_TYPES.AUDIO:return"audio/*"}},t.prototype.onClick=function(){var e=this.input.current,t=this.state.processing;e&&!t&&e.click()},t.prototype.renderClearButton=function(){if(this.props.value)return i.createElement(l.default,{onClick:this.evtHandlers.clearSelection},u.ICON_TIMES)},t.prototype.onFileDrop=function(e,t){var n=t.getItem().files[0];n&&this.props.onChange(n)},t.prototype.render=function(){var e=this.state.processing,t=this.getInputFilter();return i.createElement(i.Fragment,null,i.createElement("input",{type:"file",accept:t,style:{display:"none"},ref:this.input,onChange:this.evtHandlers.fileUpload}),i.createElement(c.default,{onDrop:this.evtHandlers.fileDrop,disable:e},i.createElement("div",{className:"variable-default-upload",onClick:this.evtHandlers.click},this.renderFields(),i.createElement("div",{className:"btn-wrapper"},this.renderClearButton()))))},t}(i.PureComponent);t.default=p},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(348),s=n(127),c=n(47),l=function(e){function t(t){var n=e.call(this,t)||this;return n.state={selectedLayer:null},n.eventHandlers={updateSelectedLayer:function(e){return n.updateSelectedLayer(e)}},n}return o(t,e),t.prototype.updateSelectedLayer=function(e){this.setState({selectedLayer:e})},t.prototype.variablesToInventory=function(){var e=this.props.variables,t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],o=r.type,i=r.previewItem;i&&(o===c.VARIABLE_TYPES.IMAGE||o===c.VARIABLE_TYPES.VIDEO||o===c.VARIABLE_TYPES.AUDIO?t[n]=i.url:t[n]=i.src)}return t},t.prototype.render=function(){var e=this.state.selectedLayer,t=this.props,n=t.storyId,r=t.api,o=t.composition;return o?i.createElement("div",{className:"static-composition-editor"},i.createElement("div",{className:"composition-config"},i.createElement(a.default,{storyId:n,api:r,composition:o,onSelectLayer:this.eventHandlers.updateSelectedLayer,selectedLayer:e,onUpdate:this.props.onUpdate})),i.createElement("div",{className:"composition-preview"},i.createElement(s.default,{inventory:this.variablesToInventory(),composition:o,onSelectLayer:this.eventHandlers.updateSelectedLayer,selectedLayer:e,onUpdate:this.props.onUpdate}))):null},t}(i.PureComponent);t.default=l},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var c=n(0),l=n(13),u=n(35),p=n(58),f=n(9),d=n(5),h=n(47),v=n(3),g=n(349),m=function(e){function t(t){var n=e.call(this,t)||this;return n.eventHandlers={inputs:{width:function(e){return n.compValueChanged("width",e)},height:function(e){return n.compValueChanged("height",e)},name:function(e){return n.compValueChanged("name",e)},backgroundColor:function(e){return n.bgChanged(e)}},selectLayer:function(e){return n.props.onSelectLayer(e)}},n.addLayerMenu=c.createElement(d.default,{onClick:function(){return n.addLayer()},style:"subtle",size:"small",color:"primary"},v.ICON_PLUS),n}return o(t,e),t.prototype.addLayer=function(){var e=h.getNewCompositionLayer(),t=i({},this.props.composition),n=s([],a(t.layers));n.push(e),t.layers=n,this.props.onUpdate(t),this.props.onSelectLayer(e.id)},t.prototype.updateLayer=function(e,t){var n=i({},this.props.composition),r=s([],a(n.layers));r[e]=t,n.layers=r,this.props.onUpdate(n)},t.prototype.compValueChanged=function(e,t){var n=i({},this.props.composition);n[e]=t,this.props.onUpdate(n)},t.prototype.bgChanged=function(e){if("transparent"===e.hex)this.compValueChanged("background_color",null);else{var t=e.rgb;this.compValueChanged("background_color","rgba("+t.r+","+t.g+","+t.b+","+t.a+")")}},t.prototype.render=function(){var e=this,t=this.props,n=t.composition,r=t.selectedLayer,o=t.storyId,i=t.api,a=(n.background_color&&n.background_color,c.createElement("span",null,l.compositions.layers," ",this.addLayerMenu));return c.createElement(c.Fragment,null,c.createElement(u.default,{label:l.compositions.width,tooltip:l.compositions.tooltipWidth,value:n.width,width:"30%",labelPosition:"top",onChange:this.eventHandlers.inputs.width}),c.createElement(u.default,{label:l.compositions.height,tooltip:l.compositions.tooltipHeight,value:n.height,width:"30%",labelPosition:"top",onChange:this.eventHandlers.inputs.height}),c.createElement(p.default,{label:l.compositions.backgroundColor,tooltip:l.compositions.tooltipBackgroundColor,enableAlpha:!0,value:n.background_color,width:"40%",labelPosition:"top",pickerPosition:"right",onChange:this.eventHandlers.inputs.backgroundColor}),c.createElement(f.default,{label:a,width:"100%",labelPosition:"top"},n.layers.map((function(t,n){var a=t.id===r;return c.createElement(g.default,{storyId:o,api:i,key:t.id,selected:a,onSelectLayer:e.eventHandlers.selectLayer,onUpdate:function(t){return e.updateLayer(n,t)},options:t})}))))},t}(c.PureComponent);t.default=m},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.V_ALIGN_OPTIONS=t.H_ALIGN_OPTIONS=void 0;var a=n(0),s=n(47),c=n(26),l=n(94),u=n(57),p=n(11),f=n(34),d=n(91),h=n(121),v=n(13),g=n(58),m=n(22),y=n(35),b=n(3);t.H_ALIGN_OPTIONS=[{icon:b.ICON_ALIGN_LEFT,value:"left"},{icon:b.ICON_ALIGN_CENTER,value:"center"},{icon:b.ICON_ALIGN_RIGHT,value:"right"}],t.V_ALIGN_OPTIONS=[{icon:b.ICON_ARROW_UP,value:"flex-start"},{icon:b.ICON_ARROW_CENTER_V,value:"center"},{icon:b.ICON_ARROW_DOWN,value:"flex-end"}];var _=function(e){function n(t){var n=e.call(this,t)||this;return n.eventHandlers={inputs:{name:function(e){return n.optionValueChanged("name",e)},width:function(e){return n.optionValueChanged("width",e)},height:function(e){return n.optionValueChanged("height",e)},x:function(e){return n.optionValueChanged("x",e)},y:function(e){return n.optionValueChanged("y",e)},rotation:function(e){return n.optionValueChanged("rotation",e)},content:function(e){return n.optionValueChanged("content",e)},hAlign:function(e){return n.optionValueChanged("horizontal_alignment",e)},vAlign:function(e){return n.optionValueChanged("vertical_alignment",e)},textWrap:function(e){return n.optionValueChanged("text_wrap",e)},textFit:function(e){return n.optionValueChanged("text_fit",e)},fontSize:function(e){return n.optionValueChanged("font_size",e)},lineHeight:function(e){return n.optionValueChanged("line_height",e)},letterSpacing:function(e){return n.optionValueChanged("letter_spacing",e)},font:function(e){return n.optionValueChanged("font",e)},customFont:function(e){return n.customFontUpdated(e)},fontType:function(e){return n.fontTypeChanged(e)},wordSpacing:function(e){return n.optionValueChanged("word_spacing",e)},color:function(e){return n.optionValueChanged("color",n.formatColor(e))},backgroundColor:function(e){return n.optionValueChanged("background_color",n.formatColor(e))}},onCardOpen:function(e){return n.onCardOpen()},onCardClose:function(e){return n.onCardClose()}},n}return o(n,e),n.prototype.customFontUpdated=function(e){var t=i({},this.props.options);if(e){var n=e.name,r=e.url,o=e.id;t.font=n,t.custom_font_url=r,t.custom_font_id=o}else t.font=s.DEFAULT_FONT,t.custom_font_url=null,t.custom_font_id=null;this.props.onUpdate(t)},n.prototype.onCardOpen=function(){var e=this.props.options.id;this.props.onSelectLayer(e)},n.prototype.onCardClose=function(){this.props.onSelectLayer(null)},n.prototype.fontTypeChanged=function(e){var t=i({},this.props.options);e===s.FONT_TYPES.STANDARD?(t.font_type=s.FONT_TYPES.STANDARD,t.font=s.DEFAULT_FONT):e===s.FONT_TYPES.CUSTOM&&(t.fontType=s.FONT_TYPES.CUSTOM,t.font=s.DEFAULT_FONT,t.custom_font_id=null,t.custom_font_url=null),this.props.onUpdate(t)},n.prototype.formatColor=function(e){var t=e.rgb;return"rgba("+t.r+","+t.g+","+t.b+","+t.a+")"},n.prototype.optionValueChanged=function(e,t){var n=i({},this.props.options);n[e]=t,this.props.onUpdate(n)},n.prototype.renderFontField=function(){var e=this.props,t=e.options,n=t.font_type,r=t.custom_font_id,o=t.font,i=e.storyId,l=e.api;return n===s.FONT_TYPES.STANDARD?a.createElement(f.default,{label:v.compositions.font,labelPosition:"top",width:"50%",options:s.STADARD_FONTS,onChange:this.eventHandlers.inputs.font,value:o}):n===s.FONT_TYPES.CUSTOM?a.createElement(h.default,{api:l,storyId:i,label:v.compositions.font,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.customFont,accepts:c.ASSET_TYPES.FONT,assetId:r}):null},n.prototype.render=function(){var e=this.props,n=e.options,r=e.selected;return a.createElement(d.default,{open:r,onOpen:this.eventHandlers.onCardOpen,onClose:this.eventHandlers.onCardClose,collapsable:!0,title:n.name},a.createElement(p.default,{label:v.compositions.name,tooltip:v.compositions.tooltipName,value:n.name,width:"100%",labelPosition:"top",onChange:this.eventHandlers.inputs.name}),a.createElement(y.default,{label:v.compositions.x,tooltip:v.compositions.tooltipLayerX,value:n.x,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.x}),a.createElement(y.default,{label:v.compositions.y,tooltip:v.compositions.tooltipLayerY,value:n.y,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.y}),a.createElement(y.default,{label:v.compositions.width,tooltip:v.compositions.tooltipLayerWidth,value:n.width,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.width}),a.createElement(y.default,{label:v.compositions.height,tooltip:v.compositions.tooltipLayerHeight,value:n.height,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.height}),a.createElement(y.default,{value:n.rotation,label:v.compositions.rotation,tooltip:v.compositions.tooltipLayerRotation,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.rotation}),a.createElement(l.default,{label:v.compositions.textLayerContent,tooltip:v.compositions.tooltipTextLayerContent,value:n.content,width:"100%",labelPosition:"top",onChange:this.eventHandlers.inputs.content}),a.createElement(u.default,{options:t.H_ALIGN_OPTIONS,value:n.horizontal_alignment,width:"50%",onChange:this.eventHandlers.inputs.hAlign}),a.createElement(u.default,{options:t.V_ALIGN_OPTIONS,value:n.vertical_alignment,width:"50%",onChange:this.eventHandlers.inputs.vAlign}),a.createElement(f.default,{label:v.compositions.fontType,options:s.FONT_TYPE_OPTIONS,value:n.font_type,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.fontType}),this.renderFontField(),a.createElement(y.default,{label:v.compositions.fontSize,value:n.font_size,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.fontSize}),a.createElement(y.default,{label:v.compositions.lineHeight,value:n.line_height,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.lineHeight}),a.createElement(y.default,{label:v.compositions.letterSpacing,value:n.letter_spacing,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.letterSpacing}),a.createElement(y.default,{label:v.compositions.wordSpacing,value:n.word_spacing,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.wordSpacing}),a.createElement(g.default,{label:v.compositions.color,value:n.color,enableAlpha:!0,width:"50%",labelPosition:"top",pickerPosition:"left",onChange:this.eventHandlers.inputs.color}),a.createElement(g.default,{label:v.compositions.backgroundColor,value:n.background_color,enableAlpha:!0,width:"50%",labelPosition:"top",pickerPosition:"right",onChange:this.eventHandlers.inputs.backgroundColor}),a.createElement(m.default,{label:v.compositions.wrap,value:n.text_wrap,width:"25%",labelPosition:"top",onChange:this.eventHandlers.inputs.textWrap}),a.createElement(m.default,{label:v.compositions.fit,value:n.text_fit,width:"25%",labelPosition:"top",onChange:this.eventHandlers.inputs.textFit}))},n}(a.PureComponent);t.default=_},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(45);t.default=function(e){var t=e.shortcutCopyMap,n=e.heading,i=n?r.createElement(r.Fragment,null,r.createElement("h3",null,n),r.createElement(o.default,null)):null;return r.createElement("div",{className:"shortcuts-menu"},i,r.createElement("table",null,r.createElement("tbody",null,Object.keys(t).map((function(e){return r.createElement("tr",{className:"shortcut",key:e},r.createElement("td",{className:"hotkey-cell"},e),r.createElement("td",{className:"shortcut-desc"},t[e]))})))))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(88);t.default=function(e){var t=e.children,n=e.id,i=document.getElementById(n),a=document.createElement("div");return r.useEffect((function(){return i.appendChild(a),function(){i.removeChild(a)}}),[a,i]),o.createPortal(t,a)}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(11),s=n(9),c=n(44),l=n(45),u=n(6),p=n(7),f=n(13),d=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=n.props,t=e.asset,r=e.columns,o=e.newAsset,c=e.assetTags;if(!t)return null;var p=o?f.assets.newDetails:f.assets.details,d=u.formatDateDefault(t.date_created),h=2===r,v=o?void 0:function(e){return n.props.onNameChange(e)},g=o?function(e){return n.props.onNameChange(e)}:void 0,m=i.createElement(a.default,{label:f.assets.name,controlled:!o,width:h?"50%":"100%",onSubmit:v,onChange:g,value:t.name}),y=i.createElement(a.default,{readOnly:!0,label:f.assets.date,width:h?"50%":"100%",value:d}),b=i.createElement(a.default,{submittable:!0,submittableType:"add",label:f.assets.addTag,suggestions:c,doSubmit:function(e){return n.props.onAddTag(e)},width:h?"50%":"100%",buttons:[],value:n.state.newTag}),_=i.createElement(s.default,{label:f.assets.assetTag,width:h?"50%":"100%"},n.renderTags());return i.createElement("div",{className:"asset-details"},i.createElement("h2",null,p),i.createElement("div",{className:"header-buttons"},n.props.headerButtons),i.createElement(l.default,null),m,y,b,_)},n.state={newTag:""},n}return o(t,e),t.prototype.renderTags=function(){var e=this;return this.props.asset.tags.map((function(t){return i.createElement(c.default,{key:t,copy:t,removeHandler:function(){return e.props.onRemoveTag(t)},colorize:!0})}))},t}(i.Component);t.default=p.connect((function(e){return{assetTags:e.assetTags}}),null)(d)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(31),i=n(30),a=null;try{var s=JSON.parse(localStorage.getItem(o.AUTH_CACHE_KEY));if(s){var c=s.idTokenPayload.exp;i.default.checkExpiry(c)&&(a=s)}}catch(e){console.warn("Cached credentials were malformed or missing, redirected to login.")}t.default=function(e,t){switch(void 0===e&&(e=a),t.type){case o.default.LOGIN:return r({},t.auth);case o.default.CLEAR:return null;default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(32),i=null;try{i=JSON.parse(localStorage.getItem(o.ACCESS_CACHE_KEY))}catch(e){console.warn("Cached access data was malformed or missing, redirected to login.")}t.default=function(e,t){switch(void 0===e&&(e=i),t.type){case o.default.SET:case o.default.STORY_ADDED:case o.default.STORY_NAME_MUTATION:case o.default.ORG_NAME_MUTATION:case o.default.STORY_DELETED:return r({},t.accessData);case o.default.CLEAR:return null;default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(20),i={page:1,order:"date_created",order_direction:"desc",name:"",type:"",tags:""};t.default=function(e,t){switch(void 0===e&&(e=i),t.type){case o.default.UPDATE:return r(r({},e),t.newFilters);case o.default.RESET:return r({},i);default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),s={loading:!1};t.default=function(e,t){void 0===e&&(e=s);var n,c=[];switch(t.type){case a.default.TOGGLE_LOADING:return r(r({},e),{loading:t.toggle});case a.default.GET:return r(r({},e),t.assetList);case a.default.ADD_TAG:for(var l=0,u=e.assets.length;l<u;l++)(n=e.assets[l]).id===t.id?c[l]=r(r({},n),{tags:i(i([],o(n.tags)),o(t.freshTags))}):c[l]=n;return r(r({},e),{assets:c});case a.default.DELETE_TAG:return r(r({},e),{assets:e.assets.map((function(e){return e.id===t.id?r(r({},e),{tags:e.tags.filter((function(e){return e!==t.tag}))}):e}))});case a.default.UPDATE_NAME:return r(r({},e),{assets:e.assets.map((function(e){return e.id===t.id?r(r({},e),{name:t.name}):e}))});case a.default.UPDATE_DATA:return r(r({},e),{assets:e.assets.map((function(e){return e.id===t.id?r(r({},e),{data:t.data}):e}))});default:return e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(77),o=[];t.default=function(e,t){switch(void 0===e&&(e=o),t.type){case r.default.GET:return t.assetTags;default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(46),s={autoTag:!0,assignToStory:!0,uploads:[]};t.default=function(e,t){switch(void 0===e&&(e=s),t.type){case a.default.TOGGLE_AUTO_TAG:return r(r({},e),{autoTag:t.toggle});case a.default.TOGGLE_ASSIGN_TO_STORY:return r(r({},e),{assignToStory:t.toggle});case a.default.ADD_UPLOAD:return r(r({},e),{uploads:i(i([],o(e.uploads)),[t.uploadMeta])});case a.default.UPDATE_PERCENT_UPLOADED:var n=e.uploads.map((function(e){return e.filename===t.filename?r(r({},e),{percent:t.percent}):e}));return r(r({},e),{uploads:n});case a.default.REMOVE_UPLOAD:return r(r({},e),{uploads:e.uploads.filter((function(e){return e.filename!==t.filename}))});default:return e}}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),a=[];t.default=function(e,t){switch(void 0===e&&(e=a),t.type){case i.default.SELECT_ALL:return o([],r(t.allIds));case i.default.SELECT_ASSET:return o(o([],r(e)),[t.id]);case i.default.SELECT_MULTIPLE:return o([],r(new Set(o(o([],r(e)),r(t.assets)))));case i.default.DESELECT_ASSET:return e.filter((function(e){return e!==t.id}));case i.default.RESET_SELECTION:return[];default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(52),i=n(6),a=n(362),s=function(){function e(e,t,n){var i=this;this.pollingInterval=1e3,this.cancelTokenCache={player:void 0,system:void 0},this.doRequest=function(e,t){return void 0===t&&(t=""),new Promise((function(n,r){i.http(e).then((function(e){t&&i.clearCache(t),n(e.data)})).catch((function(e){!o.default.isCancel(e)&&t&&i.clearCache(t),r(e)}))}))},this.cancelPrevious=function(e){var t=o.default.CancelToken.source();return i.cancelTokenCache[e]&&i.cancelTokenCache[e].cancel(),i.cancelTokenCache[e]=t,t.token},this.clearCache=function(e){i.cancelTokenCache[e]=void 0},this.doAWSRequest=function(e,t){return void 0===t&&(t=""),new Promise((function(t,n){i.awsHttp(e).then((function(e){t(e.data)})).catch((function(e){n(e)}))}))},this.saveStory=function(e,t){return i.doRequest({method:"PATCH",url:"/story/"+e,data:t})},this.newStory=function(e){return i.doRequest({method:"POST",url:"/story",data:e})},this.deleteStory=function(e){return i.doRequest({method:"DELETE",url:"/story/"+e})},this.getStoryStatus=function(e){return i.doRequest({method:"GET",url:"/story/"+e+"/version"})},this.getSignedUrl=function(e,t){return i.doRequest({method:"GET",url:"/story/"+e+"/upload-url",params:{filename:t.name,content_type:t.type}})},this.uploadToSignedUrl=function(e,t,n){return i.doAWSRequest({url:e,method:"PUT",data:t,onUploadProgress:n,headers:{"Content-Type":t.type}})},this.checkS3Bucket=function(e){var t="/bucket/"+e;return i.doRequest({method:"GET",url:t})},this.createS3Bucket=function(e,t,n,r){var o="/bucket/"+e,a={region:t,create_distribution:r?1:0,read_only:n?1:0};return i.doRequest({method:"POST",url:o,data:a})},this.processStoryFile=function(e,t,n){var r="/story/"+e+"/file",o={};return t?o.file_key=t:n&&(o.url=n),i.doRequest({method:"POST",url:r,data:o})},this.getAssets=function(e,t,n){void 0===n&&(n=!1);var r="/assets?items_per_page=50&optional_story_id="+t+"&unprocessed="+n,o=function(t){e.hasOwnProperty(t)&&(e[t]&&"tags"!==t&&(r+="&"+t+"="+encodeURIComponent(e[t])),e[t]&&"tags"===t&&e[t].split(",").forEach((function(e,n){r+="&"+t+"["+n+"]="+encodeURIComponent(e)})))};for(var a in e)o(a);return i.doRequest({method:"GET",url:r})},this.getAssetItem=function(e){return i.doRequest({method:"GET",url:"/assets/"+e})},this.duplicateAsset=function(e,t){return i.doRequest({method:"POST",url:"/assets/"+e+"/copy",data:{name:t}})},this.uploadAsset=function(e,t,n,r){var o=new FormData;return e&&o.append("story_id",e),o.append("tags",t),o.append("file",n),i.doRequest({method:"POST",url:"/assets",data:o,onUploadProgress:r})},this.createCompositionAsset=function(e,t,n){var r=new FormData;return r.append("story_id",e),r.append("data",t),r.append("type","video_composition"),r.append("name",n||"New Composition"),i.doRequest({method:"POST",url:"/assets",data:r})},this.createStaticCompositionAsset=function(e,t){var n=new FormData;return n.append("story_id",e),n.append("data",t),n.append("type","static_composition"),n.append("name","New Template"),i.doRequest({method:"POST",url:"/assets",data:n})},this.deleteAsset=function(e){return i.doRequest({method:"DELETE",url:"/assets/"+e})},this.deleteAssets=function(e){return i.doRequest({method:"DELETE",url:"/assets",data:{ids:e}})},this.copyAsset=function(e,t){return i.doRequest({method:"POST",url:"/assets/"+e+"/copy",data:t})},this.addAssetTag=function(e,t){return i.doRequest({method:"POST",url:"/assets/"+e+"/tag",data:{tag:t}})},this.deleteAssetTag=function(e,t){return i.doRequest({method:"DELETE",url:"/assets/"+e+"/tag",data:{tag:t}})},this.updateAsset=function(e,t){return i.doRequest({method:"PATCH",url:"/assets/"+e,data:t})},this.getAssetTags=function(e){return i.doRequest({method:"GET",url:"/assets/tags?story_id="+e})},this.getStory=function(e){return i.doRequest({method:"GET",url:"/story/"+e})},this.getExperiences=function(e,t){return i.doRequest({method:"GET",url:"/story/"+e+"/experiences",params:t})},this.exportExperiences=function(e,t){return i.doRequest({method:"GET",url:"/story/"+e+"/experiences/export",params:t})},this.blockByExperience=function(e){var t="/experience/"+e+"/block";return i.doRequest({method:"POST",url:t})},this.getBatches=function(e,t){return i.doRequest({method:"GET",url:"/story/"+e+"/batches",params:t})},this.getBatch=function(e,t){return i.doRequest({method:"GET",url:"/batch/"+e,params:{page:t}})},this.getBatchProgress=function(e){return i.doRequest({method:"GET",url:"/batch/"+e+"/progress"})},this.createFreshBatch=function(e,t){return i.doRequest({method:"POST",url:"/batch",data:{story_id:e,name:t}})},this.updateBatchName=function(e,t){return i.doRequest({method:"PATCH",url:"/batch/"+e+"/rename",data:{name:t}})},this.importBatchDataFromCsv=function(e,t){var n=new FormData;return n.append("file_key",t),i.doRequest({method:"POST",url:"/batch/"+e+"/data/from-csv",data:n})},this.updateBatchColumns=function(e,t){return i.doRequest({method:"PUT",url:"/batch/"+e+"/columns",data:t})},this.insertNewRow=function(e,t){return i.doRequest({method:"POST",url:"/batch/"+e+"/row/"+t})},this.updateCellValue=function(e,t,n,r){return i.doRequest({method:"PUT",url:"/batch/"+e+"/cell",data:{column_index:t,row_index:n,value:r}})},this.prepareBatchForRender=function(e){return i.doRequest({method:"POST",url:"/batch/"+e+"/prepare"})},this.checkBatchExportStatus=function(e){return i.doRequest({method:"GET",url:"/batch/"+e+"/export"})},this.invokeBatchExportJob=function(e){return i.doRequest({method:"POST",url:"/batch/"+e+"/export"})},this.downloadBatchExport=function(e,t){return i.doRequest({method:"GET",url:"/batch/"+e+"/export/"+t,responseType:"blob",params:{preserve:"true"}})},this.duplicateBatch=function(e){return i.doRequest({method:"POST",url:"/batch/"+e+"/duplicate"})},this.deleteBatch=function(e){return i.doRequest({method:"DELETE",url:"/batch/"+e})},this.updateModerationStatus=function(e,t,n){return i.doRequest({method:"POST",url:"/experience/"+e+"/status",data:{status:t,reason:n}})},this.addOrReplaceNote=function(e,t){return i.doRequest({method:"POST",url:"/experience/"+e+"/notes",data:{notes:t}})},this.getJob=function(e){return i.doRequest({method:"GET",url:"/job/"+e})},this.runCut=function(e,t,n,r){var o="/job/"+a.JOB_TYPES.RUN_CUT,s={story_id:e,act_id:t,scene_id:n,cut_id:r};return i.doRequest({method:"POST",url:o,data:s})},this.runReRenderCuts=function(e,t,n){var r="/job/"+a.JOB_TYPES.RE_RUN_CUTS,o={story_id:e,act_id:t,scene_id:n};return i.doRequest({method:"POST",url:r,data:o})},this.runProcessBaseVideo=function(e,t){var n="/job/"+a.JOB_TYPES.PROCESS_BASE_VIDEO,r={story_id:e,file_key:t};return i.doRequest({method:"POST",url:n,data:r})},this.runPublish=function(e,t){var n={story_id:e,message:t};return i.doRequest({method:"POST",url:"/job/publish",data:n})},this.cancelPublish=function(e){var t={story_id:e};return i.doRequest({method:"DELETE",url:"/job/publish",data:t})},this.pollJob=function(e){var t={method:"GET",url:"/job/"+e};return new Promise((function(e,n){i.poll(t,e,n)}))},this.getJobLogUrl=function(e){var t="/job/"+e+"/log-url";return i.doRequest({method:"GET",url:t})},this.getJobLog=function(e){return i.doAWSRequest({method:"GET",url:e})},this.createExperience=function(e,t,n,r){void 0===t&&(t={});var o=i.experienceFormData(e,t,n);r&&o.append("published","false");return i.doRequest({method:"POST",url:"/experience",data:o})},this.deleteExperience=function(e,t){void 0===t&&(t=!0);var n="/experience/"+e,r={erase_media:t};return i.doRequest({method:"DELETE",data:r,url:n})},this.triggerEvent=function(e,t,n){var r="/experience/"+e+"/trigger-event";if(t){var o=new FormData;return o.append("composition_id",t),n&&o.append("published","false"),i.doRequest({method:"POST",url:r,data:o})}return i.doRequest({method:"POST",url:r})},this.getExperience=function(e,t){void 0===t&&(t=!1);var n={method:"GET",url:"/experience/"+e};return t?new Promise((function(e,t){i.poll(n,e,t,!1)})):i.doRequest(n)},this.experienceFormData=function(e,t,n){var o=r({},t),i=new FormData;for(var a in i.append("story_id",e),n&&i.append("composition_id",n),o)if(o[a]){var s=o[a];if(s&&"file"===s.type){var c=s.files;c.length>0?(o[a]="",i.append(a,c[0])):o[a]=""}else s&&s instanceof File&&(o[a]="",i.append(a,s,s.name));i.append("inventory["+a+"]",o[a])}return i},this.getAccssCredentials=function(){return i.doRequest({method:"GET",url:"/api-key"})},this.createAccessCredentials=function(e){var t={name:e};return i.doRequest({method:"POST",data:t,url:"/api-key"})},this.deleteAccessCrednetials=function(e){var t={access_key_id:e};return i.doRequest({method:"DELETE",data:t,url:"/api-key"})},this.invokeBatchRenderJob=function(e){return i.doRequest({method:"POST",url:"/job/render-batch",data:{batch_id:e}})},this.cancelBatchRenderJob=function(e){return i.doRequest({method:"POST",url:"/batch/"+e+"/cancel"})},this.getUsers=function(e,t,n){return i.doRequest({url:"/account/"+e+"/users?page="+t+"&items_per_page="+n,method:"GET"})},this.addUser=function(e,t,n){return i.doRequest({url:"/account/"+e+"/grant",method:"POST",data:{email:t,role_id:n}})},this.resendInvite=function(e,t){return i.doRequest({url:"/account/"+e+"/resend",method:"POST",data:{email:t}})},this.revokeInvite=function(e,t){return i.doRequest({url:"/account/"+e+"/revoke",method:"POST",data:{email:t}})},this.updateInviteRole=function(e,t,n){return i.doRequest({url:"/account/"+e+"/grant",method:"PATCH",data:{email:t,role_id:n}})},this.updateRole=function(e,t,n){return i.doRequest({url:"/account/"+e+"/user",method:"PATCH",data:{user_id:t,role_id:n}})},this.deleteUser=function(e,t){return i.doRequest({url:"/account/"+e+"/user",method:"DELETE",data:{user_id:t}})},this.getPlayerMetrics=function(e,t,n,r){void 0===r&&(r="player");var o={method:"GET",url:"/metrics/player/"+e,params:{start:t,end:n},cancelToken:i.cancelPrevious(r)};return i.doRequest(o,r)},this.getSystemMetrics=function(e,t,n,r,o){void 0===o&&(o="system");var a={method:"GET",url:"/metrics/system/"+e,params:{start:t,end:n,step:r},cancelToken:i.cancelPrevious(o)};return i.doRequest(a,o)},this.getOrganizations=function(e,t){return i.doRequest({url:"/account",method:"GET",params:{page:e,items_per_page:t}})},this.addOrganization=function(e,t){return i.doRequest({url:"/account",method:"POST",data:{name:e,initial_story:t}})},this.updateOrgName=function(e,t){return i.doRequest({url:"/account/"+e,method:"PATCH",data:{name:t}})},this.deleteOrg=function(e){},this.changeOrgPlan=function(e,t){return i.doRequest({url:"/account/"+e,method:"PATCH",data:{tier:t}})},this.getAccountInfo=function(e){return i.doRequest({url:"/account/"+e,method:"GET"})},this.cancelOrgPlan=function(e){return i.doRequest({url:"/account/"+e,method:"PATCH",data:{cancel:!0}})},this.getNextBillingPeriod=function(e){return i.doRequest({url:"/account/"+e+"/next-payment",method:"GET"})},this.getRedirectToBillingPortal=function(e){return i.doRequest({url:"/account/"+e+"/billing-portal",method:"GET"})},this.getRedirectToRenew=function(e){return i.doRequest({url:"/account/"+e+"/renew",method:"GET"})},this.getAPIUsageOverview=function(e,t){var n=e&&t?"?start="+e+"&end="+t:"";return i.doRequest({url:"/usage"+n,method:"GET"})},this.getUsageGraph=function(e,t,n){var r=t&&n?"?start="+t+"&end="+n:"";return i.doRequest({url:"/usage/daily/"+e+r,method:"GET"})},this.getBillingPeriods=function(){return i.doRequest({url:"/usage/billing-periods",method:"GET"})},this.http=n?o.default.create({baseURL:e,headers:{Authorization:"Bearer "+t,"X-Imposium-API-Version":"2.0.0","X-Imposium-Account-Id":n||""}}):o.default.create({baseURL:e,headers:{"X-Imposium-Access-Key":""+t,"X-Imposium-API-Version":"2.0.0"}}),this.awsHttp=o.default.create()}return e.prototype.poll=function(e,t,n,r){var o=this;void 0===r&&(r=!0),this.http(e).then((function(a){"failed"===a.data.status?n(a):void 0!==a.data.output?r?t(a.data):i.isObjEmpty(a.data.output)?setTimeout((function(){o.poll(e,t,n,r)}),o.pollingInterval):t(a.data):setTimeout((function(){o.poll(e,t,n,r)}),o.pollingInterval)})).catch((function(e){n(e)}))},e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JOB_TYPES=void 0,t.JOB_TYPES={RUN_CUT:"make-cut",PROCESS_BASE_VIDEO:"process-base-video",RE_RUN_CUTS:"recut-scene"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(52),o=function(e){var t=this;this.doRequest=function(e){return new Promise((function(n,r){t.http(e).then((function(e){n(e.data)})).catch((function(e){r(e)}))}))},this.updateModerationStatus=function(e,n,r){return t.doRequest({method:"POST",url:"/",data:{task:"update-experience-status",experience_id:e,status:n,reason:r}})},this.addOrReplaceNote=function(e,n){return t.doRequest({method:"POST",url:"/",data:{task:"update-experience-notes",experience_id:e,notes:n}})},this.http=r.default.create({baseURL:e+"/1.1"})};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(365),o=function(){function e(){}return e.setItem=function(e,t){return new Promise((function(n,o){r.setItem(e,t).then((function(){return n(null)})).catch((function(e){console.error("Failed to store key value pair:",e),o(e)}))}))},e.getItem=function(e){return new Promise((function(t,n){r.getItem(e).then((function(e){t(e)})).catch((function(e){console.error("Failed to look up value for key:",e),n(e)}))}))},e}();t.default=o},function(e,t){e.exports=h},function(e,t,n){"use strict";n.r(t),n.d(t,"AlphaPicker",(function(){return Wn})),n.d(t,"BlockPicker",(function(){return lo})),n.d(t,"CirclePicker",(function(){return Io})),n.d(t,"default",(function(){return Bo})),n.d(t,"ChromePicker",(function(){return Bo})),n.d(t,"CompactPicker",(function(){return Wo})),n.d(t,"GithubPicker",(function(){return $o})),n.d(t,"HuePicker",(function(){return Zo})),n.d(t,"MaterialPicker",(function(){return ei})),n.d(t,"PhotoshopPicker",(function(){return ci})),n.d(t,"SketchPicker",(function(){return vi})),n.d(t,"SliderPicker",(function(){return _i})),n.d(t,"SwatchesPicker",(function(){return Ti})),n.d(t,"TwitterPicker",(function(){return Si})),n.d(t,"GooglePicker",(function(){return Di})),n.d(t,"CustomPicker",(function(){return Dn}));var r=n(0),o=n.n(r),i=n(2),a=n.n(i),s=function(e,t,n,r,o){var i=o.clientWidth,a=o.clientHeight,s="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,c="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=s-(o.getBoundingClientRect().left+window.pageXOffset),u=c-(o.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var p=void 0;if(p=u<0?0:u>a?1:Math.round(100*u/a)/100,t.a!==p)return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}else{var f=void 0;if(r!==(f=l<0?0:l>i?1:Math.round(100*l/i)/100))return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}return null},c={},l=function(e,t,n,r){var o=e+"-"+t+"-"+n+(r?"-server":"");if(c[o])return c[o];var i=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var i=o.getContext("2d");return i?(i.fillStyle=e,i.fillRect(0,0,o.width,o.height),i.fillStyle=t,i.fillRect(0,0,n,n),i.translate(n,n),i.fillRect(0,0,n,n),o.toDataURL()):null}(e,t,n,r);return c[o]=i,i},u=Object.assign||function(e){for(var t=1;t<arguments.length;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.white,n=e.grey,i=e.size,s=e.renderers,c=e.borderRadius,p=e.boxShadow,f=e.children,d=a()({default:{grid:{borderRadius:c,boxShadow:p,absolute:"0px 0px 0px 0px",background:"url("+l(t,n,i,s.canvas)+") center left"}}});return Object(r.isValidElement)(f)?o.a.cloneElement(f,u({},f.props,{style:u({},f.props.style,d.grid)})):o.a.createElement("div",{style:d.grid})};p.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var f=p,d=Object.assign||function(e){for(var t=1;t<arguments.length;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;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(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}var m=function(e){function t(){var e,n,r;v(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=g(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.handleChange=function(e){var t=s(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},g(r,n)}return 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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),h(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=a()({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:d({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return o.a.createElement("div",{style:n.alpha},o.a.createElement("div",{style:n.checkboard},o.a.createElement(f,{renderers:this.props.renderers})),o.a.createElement("div",{style:n.gradient}),o.a.createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},o.a.createElement("div",{style:n.pointer},this.props.pointer?o.a.createElement(this.props.pointer,this.props):o.a.createElement("div",{style:n.slider}))))}}]),t}(r.PureComponent||r.Component),y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var b=[38,40],_=1,w=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(e){n.setUpdatedValue(e.target.value,e)},n.handleKeyDown=function(e){var t,r=function(e){return Number(String(e).replace(/%/g,""))}(e.target.value);if(!isNaN(r)&&(t=e.keyCode,b.indexOf(t)>-1)){var o=n.getArrowOffset(),i=38===e.keyCode?r+o:r-o;n.setUpdatedValue(i,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+_++,n}return 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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),y(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=a()({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return o.a.createElement("div",{style:t.wrap},o.a.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?o.a.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(r.PureComponent||r.Component),x=function(e,t,n,r){var o=r.clientWidth,i=r.clientHeight,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,c=a-(r.getBoundingClientRect().left+window.pageXOffset),l=s-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var u=void 0;if(l<0)u=359;else if(l>i)u=0;else{u=360*(-100*l/i+100)/100}if(n.h!==u)return{h:u,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var p=void 0;if(c<0)p=0;else if(c>o)p=359;else{p=360*(100*c/o)/100}if(n.h!==p)return{h:p,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},E=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function O(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}var T=function(e){function t(){var e,n,r;O(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=C(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.handleChange=function(e){var t=x(e,r.props.direction,r.props.hsl,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},C(r,n)}return 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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),E(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,r=a()({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return o.a.createElement("div",{style:r.hue},o.a.createElement("div",{className:"hue-"+n,style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},o.a.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),o.a.createElement("div",{style:r.pointer},this.props.pointer?o.a.createElement(this.props.pointer,this.props):o.a.createElement("div",{style:r.slider}))))}}]),t}(r.PureComponent||r.Component),A=n(1),S=n.n(A);var P=function(){this.__data__=[],this.size=0};var k=function(e,t){return e===t||e!=e&&t!=t};var j=function(e,t){for(var n=e.length;n--;)if(k(e[n][0],t))return n;return-1},I=Array.prototype.splice;var N=function(e){var t=this.__data__,n=j(t,e);return!(n<0)&&(n==t.length-1?t.pop():I.call(t,n,1),--this.size,!0)};var R=function(e){var t=this.__data__,n=j(t,e);return n<0?void 0:t[n][1]};var D=function(e){return j(this.__data__,e)>-1};var L=function(e,t){var n=this.__data__,r=j(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function M(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}M.prototype.clear=P,M.prototype.delete=N,M.prototype.get=R,M.prototype.has=D,M.prototype.set=L;var F=M;var H=function(){this.__data__=new F,this.size=0};var U=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var z=function(e){return this.__data__.get(e)};var B=function(e){return this.__data__.has(e)},V=n(4),q=V.a.Symbol,G=Object.prototype,W=G.hasOwnProperty,Y=G.toString,X=q?q.toStringTag:void 0;var $=function(e){var t=W.call(e,X),n=e[X];try{e[X]=void 0;var r=!0}catch(e){}var o=Y.call(e);return r&&(t?e[X]=n:delete e[X]),o},J=Object.prototype.toString;var K=function(e){return J.call(e)},Q=q?q.toStringTag:void 0;var Z=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Q&&Q in Object(e)?$(e):K(e)};var ee=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var te,ne=function(e){if(!ee(e))return!1;var t=Z(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},re=V.a["__core-js_shared__"],oe=(te=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||""))?"Symbol(src)_1."+te:"";var ie=function(e){return!!oe&&oe in e},ae=Function.prototype.toString;var se=function(e){if(null!=e){try{return ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""},ce=/^\[object .+?Constructor\]$/,le=Function.prototype,ue=Object.prototype,pe=le.toString,fe=ue.hasOwnProperty,de=RegExp("^"+pe.call(fe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var he=function(e){return!(!ee(e)||ie(e))&&(ne(e)?de:ce).test(se(e))};var ve=function(e,t){return null==e?void 0:e[t]};var ge=function(e,t){var n=ve(e,t);return he(n)?n:void 0},me=ge(V.a,"Map"),ye=ge(Object,"create");var be=function(){this.__data__=ye?ye(null):{},this.size=0};var _e=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},we=Object.prototype.hasOwnProperty;var xe=function(e){var t=this.__data__;if(ye){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return we.call(t,e)?t[e]:void 0},Ee=Object.prototype.hasOwnProperty;var Oe=function(e){var t=this.__data__;return ye?void 0!==t[e]:Ee.call(t,e)};var Ce=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ye&&void 0===t?"__lodash_hash_undefined__":t,this};function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Te.prototype.clear=be,Te.prototype.delete=_e,Te.prototype.get=xe,Te.prototype.has=Oe,Te.prototype.set=Ce;var Ae=Te;var Se=function(){this.size=0,this.__data__={hash:new Ae,map:new(me||F),string:new Ae}};var Pe=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var ke=function(e,t){var n=e.__data__;return Pe(t)?n["string"==typeof t?"string":"hash"]:n.map};var je=function(e){var t=ke(this,e).delete(e);return this.size-=t?1:0,t};var Ie=function(e){return ke(this,e).get(e)};var Ne=function(e){return ke(this,e).has(e)};var Re=function(e,t){var n=ke(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function De(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}De.prototype.clear=Se,De.prototype.delete=je,De.prototype.get=Ie,De.prototype.has=Ne,De.prototype.set=Re;var Le=De;var Me=function(e,t){var n=this.__data__;if(n instanceof F){var r=n.__data__;if(!me||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Le(r)}return n.set(e,t),this.size=n.size,this};function Fe(e){var t=this.__data__=new F(e);this.size=t.size}Fe.prototype.clear=H,Fe.prototype.delete=U,Fe.prototype.get=z,Fe.prototype.has=B,Fe.prototype.set=Me;var He=Fe,Ue=function(){try{var e=ge(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var ze=function(e,t,n){"__proto__"==t&&Ue?Ue(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var Be=function(e,t,n){(void 0!==n&&!k(e[t],n)||void 0===n&&!(t in e))&&ze(e,t,n)};var Ve=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===n(i[c],c,i))break}return t}}(),qe=n(130),Ge=V.a.Uint8Array;var We=function(e){var t=new e.constructor(e.byteLength);return new Ge(t).set(new Ge(e)),t};var Ye=function(e,t){var n=t?We(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var Xe=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},$e=Object.create,Je=function(){function e(){}return function(t){if(!ee(t))return{};if($e)return $e(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Ke=function(e,t){return function(n){return e(t(n))}},Qe=Ke(Object.getPrototypeOf,Object),Ze=Object.prototype;var et=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ze)};var tt=function(e){return"function"!=typeof e.constructor||et(e)?{}:Je(Qe(e))};var nt=function(e){return null!=e&&"object"==typeof e};var rt=function(e){return nt(e)&&"[object Arguments]"==Z(e)},ot=Object.prototype,it=ot.hasOwnProperty,at=ot.propertyIsEnumerable,st=rt(function(){return arguments}())?rt:function(e){return nt(e)&&it.call(e,"callee")&&!at.call(e,"callee")},ct=Array.isArray;var lt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ut=function(e){return null!=e&&lt(e.length)&&!ne(e)};var pt=function(e){return nt(e)&&ut(e)},ft=n(18),dt=Function.prototype,ht=Object.prototype,vt=dt.toString,gt=ht.hasOwnProperty,mt=vt.call(Object);var yt=function(e){if(!nt(e)||"[object Object]"!=Z(e))return!1;var t=Qe(e);if(null===t)return!0;var n=gt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&vt.call(n)==mt},bt={};bt["[object Float32Array]"]=bt["[object Float64Array]"]=bt["[object Int8Array]"]=bt["[object Int16Array]"]=bt["[object Int32Array]"]=bt["[object Uint8Array]"]=bt["[object Uint8ClampedArray]"]=bt["[object Uint16Array]"]=bt["[object Uint32Array]"]=!0,bt["[object Arguments]"]=bt["[object Array]"]=bt["[object ArrayBuffer]"]=bt["[object Boolean]"]=bt["[object DataView]"]=bt["[object Date]"]=bt["[object Error]"]=bt["[object Function]"]=bt["[object Map]"]=bt["[object Number]"]=bt["[object Object]"]=bt["[object RegExp]"]=bt["[object Set]"]=bt["[object String]"]=bt["[object WeakMap]"]=!1;var _t=function(e){return nt(e)&&lt(e.length)&&!!bt[Z(e)]};var wt=function(e){return function(t){return e(t)}},xt=n(81),Et=xt.a&&xt.a.isTypedArray,Ot=Et?wt(Et):_t;var Ct=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Tt=Object.prototype.hasOwnProperty;var At=function(e,t,n){var r=e[t];Tt.call(e,t)&&k(r,n)&&(void 0!==n||t in e)||ze(e,t,n)};var St=function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],c=r?r(n[s],e[s],s,n,e):void 0;void 0===c&&(c=e[s]),o?ze(n,s,c):At(n,s,c)}return n};var Pt=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},kt=/^(?:0|[1-9]\d*)$/;var jt=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&kt.test(e))&&e>-1&&e%1==0&&e<t},It=Object.prototype.hasOwnProperty;var Nt=function(e,t){var n=ct(e),r=!n&&st(e),o=!n&&!r&&Object(ft.a)(e),i=!n&&!r&&!o&&Ot(e),a=n||r||o||i,s=a?Pt(e.length,String):[],c=s.length;for(var l in e)!t&&!It.call(e,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||jt(l,c))||s.push(l);return s};var Rt=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},Dt=Object.prototype.hasOwnProperty;var Lt=function(e){if(!ee(e))return Rt(e);var t=et(e),n=[];for(var r in e)("constructor"!=r||!t&&Dt.call(e,r))&&n.push(r);return n};var Mt=function(e){return ut(e)?Nt(e,!0):Lt(e)};var Ft=function(e){return St(e,Mt(e))};var Ht=function(e,t,n,r,o,i,a){var s=Ct(e,n),c=Ct(t,n),l=a.get(c);if(l)Be(e,n,l);else{var u=i?i(s,c,n+"",e,t,a):void 0,p=void 0===u;if(p){var f=ct(c),d=!f&&Object(ft.a)(c),h=!f&&!d&&Ot(c);u=c,f||d||h?ct(s)?u=s:pt(s)?u=Xe(s):d?(p=!1,u=Object(qe.a)(c,!0)):h?(p=!1,u=Ye(c,!0)):u=[]:yt(c)||st(c)?(u=s,st(s)?u=Ft(s):ee(s)&&!ne(s)||(u=tt(c))):p=!1}p&&(a.set(c,u),o(u,c,r,i,a),a.delete(c)),Be(e,n,u)}};var Ut=function e(t,n,r,o,i){t!==n&&Ve(n,(function(a,s){if(i||(i=new He),ee(a))Ht(t,n,s,r,e,o,i);else{var c=o?o(Ct(t,s),a,s+"",t,n,i):void 0;void 0===c&&(c=a),Be(t,s,c)}}),Mt)};var zt=function(e){return e};var Bt=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},Vt=Math.max;var qt=function(e,t,n){return t=Vt(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Vt(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),Bt(e,this,s)}};var Gt=function(e){return function(){return e}},Wt=Ue?function(e,t){return Ue(e,"toString",{configurable:!0,enumerable:!1,value:Gt(t),writable:!0})}:zt,Yt=Date.now;var Xt=function(e){var t=0,n=0;return function(){var r=Yt(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Wt);var $t=function(e,t){return Xt(qt(e,t,zt),e+"")};var Jt=function(e,t,n){if(!ee(n))return!1;var r=typeof t;return!!("number"==r?ut(n)&&jt(t,n.length):"string"==r&&t in n)&&k(n[t],e)};var Kt=function(e){return $t((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&Jt(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,i)}return t}))}((function(e,t,n){Ut(e,t,n)})),Qt=function(e){var t=e.zDepth,n=e.radius,r=e.background,i=e.children,s=e.styles,c=void 0===s?{}:s,l=a()(Kt({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:r}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},c),{"zDepth-1":1===t});return o.a.createElement("div",{style:l.wrap},o.a.createElement("div",{style:l.bg}),o.a.createElement("div",{style:l.content},i))};Qt.propTypes={background:S.a.string,zDepth:S.a.oneOf([0,1,2,3,4,5]),radius:S.a.number,styles:S.a.object},Qt.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var Zt=Qt,en=function(){return V.a.Date.now()},tn=/\s/;var nn=function(e){for(var t=e.length;t--&&tn.test(e.charAt(t)););return t},rn=/^\s+/;var on=function(e){return e?e.slice(0,nn(e)+1).replace(rn,""):e};var an=function(e){return"symbol"==typeof e||nt(e)&&"[object Symbol]"==Z(e)},sn=/^[-+]0x[0-9a-f]+$/i,cn=/^0b[01]+$/i,ln=/^0o[0-7]+$/i,un=parseInt;var pn=function(e){if("number"==typeof e)return e;if(an(e))return NaN;if(ee(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ee(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=on(e);var n=cn.test(e);return n||ln.test(e)?un(e.slice(2),n?2:8):sn.test(e)?NaN:+e},fn=Math.max,dn=Math.min;var hn=function(e,t,n){var r,o,i,a,s,c,l=0,u=!1,p=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function d(t){var n=r,i=o;return r=o=void 0,l=t,a=e.apply(i,n)}function h(e){return l=e,s=setTimeout(g,t),u?d(e):a}function v(e){var n=e-c;return void 0===c||n>=t||n<0||p&&e-l>=i}function g(){var e=en();if(v(e))return m(e);s=setTimeout(g,function(e){var n=t-(e-c);return p?dn(n,i-(e-l)):n}(e))}function m(e){return s=void 0,f&&r?d(e):(r=o=void 0,a)}function y(){var e=en(),n=v(e);if(r=arguments,o=this,c=e,n){if(void 0===s)return h(c);if(p)return clearTimeout(s),s=setTimeout(g,t),d(c)}return void 0===s&&(s=setTimeout(g,t)),a}return t=pn(t)||0,ee(n)&&(u=!!n.leading,i=(p="maxWait"in n)?fn(pn(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=c=o=s=void 0},y.flush=function(){return void 0===s?a:m(en())},y};var vn=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return ee(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),hn(e,t,{leading:r,maxWait:t,trailing:o})},gn=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var mn=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleChange=function(e){"function"==typeof n.props.onChange&&n.throttle(n.props.onChange,function(e,t,n){var r=n.getBoundingClientRect(),o=r.width,i=r.height,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,c=a-(n.getBoundingClientRect().left+window.pageXOffset),l=s-(n.getBoundingClientRect().top+window.pageYOffset);c<0?c=0:c>o&&(c=o),l<0?l=0:l>i&&(l=i);var u=c/o,p=1-l/i;return{h:t.h,s:u,v:p,a:t.a,source:"hsv"}}(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=vn((function(e,t,n){e(t,n)}),50),n}return 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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),gn(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,i=t.black,s=t.pointer,c=t.circle,l=a()({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:i,pointer:s,circle:c}},{custom:!!this.props.style});return o.a.createElement("div",{style:l.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},o.a.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),o.a.createElement("div",{style:l.white,className:"saturation-white"},o.a.createElement("div",{style:l.black,className:"saturation-black"}),o.a.createElement("div",{style:l.pointer},this.props.pointer?o.a.createElement(this.props.pointer,this.props):o.a.createElement("div",{style:l.circle}))))}}]),t}(r.PureComponent||r.Component);var yn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},bn=Ke(Object.keys,Object),_n=Object.prototype.hasOwnProperty;var wn=function(e){if(!et(e))return bn(e);var t=[];for(var n in Object(e))_n.call(e,n)&&"constructor"!=n&&t.push(n);return t};var xn=function(e){return ut(e)?Nt(e):wn(e)};var En=function(e,t){return function(n,r){if(null==n)return n;if(!ut(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}((function(e,t){return e&&Ve(e,t,xn)}));var On=function(e){return"function"==typeof e?e:zt};var Cn=function(e,t){return(ct(e)?yn:En)(e,On(t))},Tn=n(28),An=n.n(Tn),Sn=function(e){var t=0,n=0;return Cn(["r","g","b","a","h","s","l","v"],(function(r){if(e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(e[r])&&(n+=1)}})),t===n&&e},Pn=function(e,t){var n=e.hex?An()(e.hex):An()(e),r=n.toHsl(),o=n.toHsv(),i=n.toRgb(),a=n.toHex();return 0===r.s&&(r.h=t||0,o.h=t||0),{hsl:r,hex:"000000"===a&&0===i.a?"transparent":"#"+a,rgb:i,hsv:o,oldHue:e.h||t||r.h,source:e.source}},kn=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&An()(e).isValid()},jn=function(e){if(!e)return"#fff";var t=Pn(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},In=function(e,t){var n=e.replace("°","");return An()(t+" ("+n+")")._ok},Nn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rn=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var Dn=function(e){var t=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(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}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.handleChange=function(e,n){if(Sn(e)){var r=Pn(e,e.h||t.state.oldHue);t.setState(r),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,r,n),t.props.onChange&&t.props.onChange(r,n)}},t.handleSwatchHover=function(e,n){if(Sn(e)){var r=Pn(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(r,n)}},t.state=Nn({},Pn(e.color,0)),t.debounce=hn((function(e,t,n){e(t,n)}),100),t}return 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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),Rn(n,[{key:"render",value:function(){var t={};return this.props.onSwatchHover&&(t.onSwatchHover=this.handleSwatchHover),o.a.createElement(e,Nn({},this.props,this.state,{onChange:this.handleChange},t))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return Nn({},Pn(e.color,t.oldHue))}}]),n}(r.PureComponent||r.Component);return t.propTypes=Nn({},e.propTypes),t.defaultProps=Nn({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t},Ln=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mn=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function Fn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hn(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 Un(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var zn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;Fn(this,r);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return t=n=Hn(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(i))),n.state={focus:!1},n.handleFocus=function(){return n.setState({focus:!0})},n.handleBlur=function(){return n.setState({focus:!1})},Hn(n,t)}return Un(r,n),Mn(r,[{key:"render",value:function(){return o.a.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},o.a.createElement(e,Ln({},this.props,this.state)))}}]),r}(o.a.Component)}((function(e){var t=e.color,n=e.style,r=e.onClick,i=void 0===r?function(){}:r,s=e.onHover,c=e.title,l=void 0===c?t:c,u=e.children,p=e.focus,d=e.focusStyle,h=void 0===d?{}:d,v="transparent"===t,g=a()({default:{swatch:zn({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,p?h:{})}}),m={};return s&&(m.onMouseOver=function(e){return s(t,e)}),o.a.createElement("div",zn({style:g.swatch,onClick:function(e){return i(t,e)},title:l,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&i(t,e)}},m),u,v&&o.a.createElement(f,{borderRadius:g.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))})),Vn=function(e){var t=e.direction,n=a()({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return o.a.createElement("div",{style:n.picker})},qn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gn=function(e){var t=e.rgb,n=e.hsl,r=e.width,i=e.height,s=e.onChange,c=e.direction,l=e.style,u=e.renderers,p=e.pointer,f=e.className,d=void 0===f?"":f,h=a()({default:{picker:{position:"relative",width:r,height:i},alpha:{radius:"2px",style:l}}});return o.a.createElement("div",{style:h.picker,className:"alpha-picker "+d},o.a.createElement(m,qn({},h.alpha,{rgb:t,hsl:n,pointer:p,renderers:u,onChange:s,direction:c})))};Gn.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Vn};var Wn=Dn(Gn);var Yn=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o};var Xn=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var $n=function(e){return this.__data__.has(e)};function Jn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Le;++t<n;)this.add(e[t])}Jn.prototype.add=Jn.prototype.push=Xn,Jn.prototype.has=$n;var Kn=Jn;var Qn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var Zn=function(e,t){return e.has(t)};var er=function(e,t,n,r,o,i){var a=1&n,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var l=i.get(e),u=i.get(t);if(l&&u)return l==t&&u==e;var p=-1,f=!0,d=2&n?new Kn:void 0;for(i.set(e,t),i.set(t,e);++p<s;){var h=e[p],v=t[p];if(r)var g=a?r(v,h,p,t,e,i):r(h,v,p,e,t,i);if(void 0!==g){if(g)continue;f=!1;break}if(d){if(!Qn(t,(function(e,t){if(!Zn(d,t)&&(h===e||o(h,e,n,r,i)))return d.push(t)}))){f=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f};var tr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var nr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},rr=q?q.prototype:void 0,or=rr?rr.valueOf:void 0;var ir=function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Ge(e),new Ge(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return k(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=tr;case"[object Set]":var c=1&r;if(s||(s=nr),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;r|=2,a.set(e,t);var u=er(s(e),s(t),r,o,i,a);return a.delete(e),u;case"[object Symbol]":if(or)return or.call(e)==or.call(t)}return!1};var ar=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e};var sr=function(e,t,n){var r=t(e);return ct(e)?r:ar(r,n(e))};var cr=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i};var lr=function(){return[]},ur=Object.prototype.propertyIsEnumerable,pr=Object.getOwnPropertySymbols,fr=pr?function(e){return null==e?[]:(e=Object(e),cr(pr(e),(function(t){return ur.call(e,t)})))}:lr;var dr=function(e){return sr(e,xn,fr)},hr=Object.prototype.hasOwnProperty;var vr=function(e,t,n,r,o,i){var a=1&n,s=dr(e),c=s.length;if(c!=dr(t).length&&!a)return!1;for(var l=c;l--;){var u=s[l];if(!(a?u in t:hr.call(t,u)))return!1}var p=i.get(e),f=i.get(t);if(p&&f)return p==t&&f==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++l<c;){var v=e[u=s[l]],g=t[u];if(r)var m=a?r(g,v,u,t,e,i):r(v,g,u,e,t,i);if(!(void 0===m?v===g||o(v,g,n,r,i):m)){d=!1;break}h||(h="constructor"==u)}if(d&&!h){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d},gr=ge(V.a,"DataView"),mr=ge(V.a,"Promise"),yr=ge(V.a,"Set"),br=ge(V.a,"WeakMap"),_r=se(gr),wr=se(me),xr=se(mr),Er=se(yr),Or=se(br),Cr=Z;(gr&&"[object DataView]"!=Cr(new gr(new ArrayBuffer(1)))||me&&"[object Map]"!=Cr(new me)||mr&&"[object Promise]"!=Cr(mr.resolve())||yr&&"[object Set]"!=Cr(new yr)||br&&"[object WeakMap]"!=Cr(new br))&&(Cr=function(e){var t=Z(e),n="[object Object]"==t?e.constructor:void 0,r=n?se(n):"";if(r)switch(r){case _r:return"[object DataView]";case wr:return"[object Map]";case xr:return"[object Promise]";case Er:return"[object Set]";case Or:return"[object WeakMap]"}return t});var Tr=Cr,Ar=Object.prototype.hasOwnProperty;var Sr=function(e,t,n,r,o,i){var a=ct(e),s=ct(t),c=a?"[object Array]":Tr(e),l=s?"[object Array]":Tr(t),u="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),p="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),f=c==l;if(f&&Object(ft.a)(e)){if(!Object(ft.a)(t))return!1;a=!0,u=!1}if(f&&!u)return i||(i=new He),a||Ot(e)?er(e,t,n,r,o,i):ir(e,t,c,n,r,o,i);if(!(1&n)){var d=u&&Ar.call(e,"__wrapped__"),h=p&&Ar.call(t,"__wrapped__");if(d||h){var v=d?e.value():e,g=h?t.value():t;return i||(i=new He),o(v,g,n,r,i)}}return!!f&&(i||(i=new He),vr(e,t,n,r,o,i))};var Pr=function e(t,n,r,o,i){return t===n||(null==t||null==n||!nt(t)&&!nt(n)?t!=t&&n!=n:Sr(t,n,r,o,e,i))};var kr=function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var c=(s=n[o])[0],l=e[c],u=s[1];if(a&&s[2]){if(void 0===l&&!(c in e))return!1}else{var p=new He;if(r)var f=r(l,u,c,e,t,p);if(!(void 0===f?Pr(u,l,3,r,p):f))return!1}}return!0};var jr=function(e){return e==e&&!ee(e)};var Ir=function(e){for(var t=xn(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,jr(o)]}return t};var Nr=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}};var Rr=function(e){var t=Ir(e);return 1==t.length&&t[0][2]?Nr(t[0][0],t[0][1]):function(n){return n===e||kr(n,e,t)}},Dr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lr=/^\w*$/;var Mr=function(e,t){if(ct(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!an(e))||(Lr.test(e)||!Dr.test(e)||null!=t&&e in Object(t))};function Fr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Fr.Cache||Le),n}Fr.Cache=Le;var Hr=Fr;var Ur=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zr=/\\(\\)?/g,Br=function(e){var t=Hr(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ur,(function(e,n,r,o){t.push(r?o.replace(zr,"$1"):n||e)})),t})),Vr=q?q.prototype:void 0,qr=Vr?Vr.toString:void 0;var Gr=function e(t){if("string"==typeof t)return t;if(ct(t))return Yn(t,e)+"";if(an(t))return qr?qr.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var Wr=function(e){return null==e?"":Gr(e)};var Yr=function(e,t){return ct(e)?e:Mr(e,t)?[e]:Br(Wr(e))};var Xr=function(e){if("string"==typeof e||an(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var $r=function(e,t){for(var n=0,r=(t=Yr(t,e)).length;null!=e&&n<r;)e=e[Xr(t[n++])];return n&&n==r?e:void 0};var Jr=function(e,t,n){var r=null==e?void 0:$r(e,t);return void 0===r?n:r};var Kr=function(e,t){return null!=e&&t in Object(e)};var Qr=function(e,t,n){for(var r=-1,o=(t=Yr(t,e)).length,i=!1;++r<o;){var a=Xr(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&lt(o)&&jt(a,o)&&(ct(e)||st(e))};var Zr=function(e,t){return null!=e&&Qr(e,t,Kr)};var eo=function(e,t){return Mr(e)&&jr(t)?Nr(Xr(e),t):function(n){var r=Jr(n,e);return void 0===r&&r===t?Zr(n,e):Pr(t,r,3)}};var to=function(e){return function(t){return null==t?void 0:t[e]}};var no=function(e){return function(t){return $r(t,e)}};var ro=function(e){return Mr(e)?to(Xr(e)):no(e)};var oo=function(e){return"function"==typeof e?e:null==e?zt:"object"==typeof e?ct(e)?eo(e[0],e[1]):Rr(e):ro(e)};var io=function(e,t){var n=-1,r=ut(e)?Array(e.length):[];return En(e,(function(e,o,i){r[++n]=t(e,o,i)})),r};var ao=function(e,t){return(ct(e)?Yn:io)(e,oo(t,3))},so=function(e){var t=e.colors,n=e.onClick,r=e.onSwatchHover,i=a()({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return o.a.createElement("div",{style:i.swatches},ao(t,(function(e){return o.a.createElement(Bn,{key:e,color:e,style:i.swatch,onClick:n,onHover:r,focusStyle:{boxShadow:"0 0 4px "+e}})})),o.a.createElement("div",{style:i.clear}))},co=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,i=e.colors,s=e.width,c=e.triangle,l=e.styles,u=void 0===l?{}:l,p=e.className,d=void 0===p?"":p,h="transparent"===r,v=function(e,n){kn(e)&&t({hex:e,source:"hex"},n)},g=a()(Kt({default:{card:{width:s,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:r,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:jn(r),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+r+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},u),{"hide-triangle":"hide"===c});return o.a.createElement("div",{style:g.card,className:"block-picker "+d},o.a.createElement("div",{style:g.triangle}),o.a.createElement("div",{style:g.head},h&&o.a.createElement(f,{borderRadius:"6px 6px 0 0"}),o.a.createElement("div",{style:g.label},r)),o.a.createElement("div",{style:g.body},o.a.createElement(so,{colors:i,onClick:v,onSwatchHover:n}),o.a.createElement(w,{style:{input:g.input},value:r,onChange:v})))};co.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),colors:S.a.arrayOf(S.a.string),triangle:S.a.oneOf(["top","hide"]),styles:S.a.object},co.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};var lo=Dn(co),uo={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},po={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},fo={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},ho={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},vo={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},go={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},mo={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},yo={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},bo={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},_o={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},wo={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},xo={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},Eo={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},Oo={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Co={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},To={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Ao={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},So={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},Po=function(e){var t=e.color,n=e.onClick,r=e.onSwatchHover,i=e.hover,s=e.active,c=e.circleSize,l=e.circleSpacing,u=a()({default:{swatch:{width:c,height:c,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(c/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:i,active:s});return o.a.createElement("div",{style:u.swatch},o.a.createElement(Bn,{style:u.Swatch,color:t,onClick:n,onHover:r,focusStyle:{boxShadow:u.Swatch.boxShadow+", 0 0 5px "+t}}))};Po.defaultProps={circleSize:28,circleSpacing:14};var ko=Object(i.handleHover)(Po),jo=function(e){var t=e.width,n=e.onChange,r=e.onSwatchHover,i=e.colors,s=e.hex,c=e.circleSize,l=e.styles,u=void 0===l?{}:l,p=e.circleSpacing,f=e.className,d=void 0===f?"":f,h=a()(Kt({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-p,marginBottom:-p}}},u)),v=function(e,t){return n({hex:e,source:"hex"},t)};return o.a.createElement("div",{style:h.card,className:"circle-picker "+d},ao(i,(function(e){return o.a.createElement(ko,{key:e,color:e,onClick:v,onSwatchHover:r,active:s===e.toLowerCase(),circleSize:c,circleSpacing:p})})))};jo.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),circleSize:S.a.number,circleSpacing:S.a.number,styles:S.a.object},jo.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[uo[500],po[500],fo[500],ho[500],vo[500],go[500],mo[500],yo[500],bo[500],_o[500],wo[500],xo[500],Eo[500],Oo[500],Co[500],To[500],Ao[500],So[500]],styles:{}};var Io=Dn(jo);var No=function(e){return void 0===e},Ro=n(131),Do=n.n(Ro),Lo=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var Mo=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.toggleViews=function(){"hex"===n.state.view?n.setState({view:"rgb"}):"rgb"===n.state.view?n.setState({view:"hsl"}):"hsl"===n.state.view&&(1===n.props.hsl.a?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(e,t){e.hex?kn(e.hex)&&n.props.onChange({hex:e.hex,source:"hex"},t):e.r||e.g||e.b?n.props.onChange({r:e.r||n.props.rgb.r,g:e.g||n.props.rgb.g,b:e.b||n.props.rgb.b,source:"rgb"},t):e.a?(e.a<0?e.a=0:e.a>1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),n.props.onChange({h:e.h||n.props.hsl.h,s:Number(No(e.s)?n.props.hsl.s:e.s),l:Number(No(e.l)?n.props.hsl.l:e.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return 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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Lo(t,[{key:"render",value:function(){var e=this,t=a()({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=o.a.createElement("div",{style:t.fields,className:"flexbox-fix"},o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=o.a.createElement("div",{style:t.fields,className:"flexbox-fix"},o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),o.a.createElement("div",{style:t.alpha},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=o.a.createElement("div",{style:t.fields,className:"flexbox-fix"},o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),o.a.createElement("div",{style:t.alpha},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),o.a.createElement("div",{style:t.wrap,className:"flexbox-fix"},n,o.a.createElement("div",{style:t.toggle},o.a.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},o.a.createElement(Do.a,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(o.a.Component);Mo.defaultProps={view:"hex"};var Fo=Mo,Ho=function(){var e=a()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return o.a.createElement("div",{style:e.picker})},Uo=function(){var e=a()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return o.a.createElement("div",{style:e.picker})},zo=function(e){var t=e.width,n=e.onChange,r=e.disableAlpha,i=e.rgb,s=e.hsl,c=e.hsv,l=e.hex,u=e.renderers,p=e.styles,d=void 0===p?{}:p,h=e.className,v=void 0===h?"":h,g=e.defaultView,y=a()(Kt({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},d),{disableAlpha:r});return o.a.createElement("div",{style:y.picker,className:"chrome-picker "+v},o.a.createElement("div",{style:y.saturation},o.a.createElement(mn,{style:y.Saturation,hsl:s,hsv:c,pointer:Uo,onChange:n})),o.a.createElement("div",{style:y.body},o.a.createElement("div",{style:y.controls,className:"flexbox-fix"},o.a.createElement("div",{style:y.color},o.a.createElement("div",{style:y.swatch},o.a.createElement("div",{style:y.active}),o.a.createElement(f,{renderers:u}))),o.a.createElement("div",{style:y.toggles},o.a.createElement("div",{style:y.hue},o.a.createElement(T,{style:y.Hue,hsl:s,pointer:Ho,onChange:n})),o.a.createElement("div",{style:y.alpha},o.a.createElement(m,{style:y.Alpha,rgb:i,hsl:s,pointer:Ho,renderers:u,onChange:n})))),o.a.createElement(Fo,{rgb:i,hsl:s,hex:l,view:g,onChange:n,disableAlpha:r})))};zo.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),disableAlpha:S.a.bool,styles:S.a.object,defaultView:S.a.oneOf(["hex","rgb","hsl"])},zo.defaultProps={width:225,disableAlpha:!1,styles:{}};var Bo=Dn(zo),Vo=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,i=e.onSwatchHover,s=e.active,c=a()({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:jn(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:s,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return o.a.createElement(Bn,{style:c.color,color:t,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},o.a.createElement("div",{style:c.dot}))},qo=function(e){var t=e.hex,n=e.rgb,r=e.onChange,i=a()({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),s=function(e,t){e.r||e.g||e.b?r({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):r({hex:e.hex,source:"hex"},t)};return o.a.createElement("div",{style:i.fields,className:"flexbox-fix"},o.a.createElement("div",{style:i.active}),o.a.createElement(w,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:t,onChange:s}),o.a.createElement(w,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:n.r,onChange:s}),o.a.createElement(w,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:n.g,onChange:s}),o.a.createElement(w,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:n.b,onChange:s}))},Go=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.colors,i=e.hex,s=e.rgb,c=e.styles,l=void 0===c?{}:c,u=e.className,p=void 0===u?"":u,f=a()(Kt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),d=function(e,n){e.hex?kn(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return o.a.createElement(Zt,{style:f.Compact,styles:l},o.a.createElement("div",{style:f.compact,className:"compact-picker "+p},o.a.createElement("div",null,ao(r,(function(e){return o.a.createElement(Vo,{key:e,color:e,active:e.toLowerCase()===i,onClick:d,onSwatchHover:n})})),o.a.createElement("div",{style:f.clear})),o.a.createElement(qo,{hex:i,rgb:s,onChange:d})))};Go.propTypes={colors:S.a.arrayOf(S.a.string),styles:S.a.object},Go.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};var Wo=Dn(Go),Yo=Object(i.handleHover)((function(e){var t=e.hover,n=e.color,r=e.onClick,i=e.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},c=a()({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:t});return o.a.createElement("div",{style:c.swatch},o.a.createElement(Bn,{color:n,onClick:r,onHover:i,focusStyle:s}))})),Xo=function(e){var t=e.width,n=e.colors,r=e.onChange,i=e.onSwatchHover,s=e.triangle,c=e.styles,l=void 0===c?{}:c,u=e.className,p=void 0===u?"":u,f=a()(Kt({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":"hide"===s,"top-left-triangle":"top-left"===s,"top-right-triangle":"top-right"===s,"bottom-left-triangle":"bottom-left"===s,"bottom-right-triangle":"bottom-right"===s}),d=function(e,t){return r({hex:e,source:"hex"},t)};return o.a.createElement("div",{style:f.card,className:"github-picker "+p},o.a.createElement("div",{style:f.triangleShadow}),o.a.createElement("div",{style:f.triangle}),ao(n,(function(e){return o.a.createElement(Yo,{color:e,key:e,onClick:d,onSwatchHover:i})})))};Xo.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),colors:S.a.arrayOf(S.a.string),triangle:S.a.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:S.a.object},Xo.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};var $o=Dn(Xo),Jo=function(e){var t=e.direction,n=a()({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return o.a.createElement("div",{style:n.picker})},Ko=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qo=function(e){var t=e.width,n=e.height,r=e.onChange,i=e.hsl,s=e.direction,c=e.pointer,l=e.styles,u=void 0===l?{}:l,p=e.className,f=void 0===p?"":p,d=a()(Kt({default:{picker:{position:"relative",width:t,height:n},hue:{radius:"2px"}}},u));return o.a.createElement("div",{style:d.picker,className:"hue-picker "+f},o.a.createElement(T,Ko({},d.hue,{hsl:i,pointer:c,onChange:function(e){return r({a:1,h:e.h,l:.5,s:1})},direction:s})))};Qo.propTypes={styles:S.a.object},Qo.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Jo,styles:{}};var Zo=Dn(Qo),ei=Dn((function(e){var t=e.onChange,n=e.hex,r=e.rgb,i=e.styles,s=void 0===i?{}:i,c=e.className,l=void 0===c?"":c,u=a()(Kt({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},s)),p=function(e,n){e.hex?kn(e.hex)&&t({hex:e.hex,source:"hex"},n):(e.r||e.g||e.b)&&t({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},n)};return o.a.createElement(Zt,{styles:s},o.a.createElement("div",{style:u.material,className:"material-picker "+l},o.a.createElement(w,{style:{wrap:u.HEXwrap,input:u.HEXinput,label:u.HEXlabel},label:"hex",value:n,onChange:p}),o.a.createElement("div",{style:u.split,className:"flexbox-fix"},o.a.createElement("div",{style:u.third},o.a.createElement(w,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"r",value:r.r,onChange:p})),o.a.createElement("div",{style:u.third},o.a.createElement(w,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"g",value:r.g,onChange:p})),o.a.createElement("div",{style:u.third},o.a.createElement(w,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"b",value:r.b,onChange:p})))))})),ti=function(e){var t=e.onChange,n=e.rgb,r=e.hsv,i=e.hex,s=a()({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),c=function(e,o){e["#"]?kn(e["#"])&&t({hex:e["#"],source:"hex"},o):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},o):(e.h||e.s||e.v)&&t({h:e.h||r.h,s:e.s||r.s,v:e.v||r.v,source:"hsv"},o)};return o.a.createElement("div",{style:s.fields},o.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"h",value:Math.round(r.h),onChange:c}),o.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"s",value:Math.round(100*r.s),onChange:c}),o.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"v",value:Math.round(100*r.v),onChange:c}),o.a.createElement("div",{style:s.divider}),o.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:n.r,onChange:c}),o.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:n.g,onChange:c}),o.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:n.b,onChange:c}),o.a.createElement("div",{style:s.divider}),o.a.createElement(w,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"#",value:i.replace("#",""),onChange:c}),o.a.createElement("div",{style:s.fieldSymbols},o.a.createElement("div",{style:s.symbol},"°"),o.a.createElement("div",{style:s.symbol},"%"),o.a.createElement("div",{style:s.symbol},"%")))},ni=function(e){var t=e.hsl,n=a()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return o.a.createElement("div",{style:n.picker})},ri=function(){var e=a()({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return o.a.createElement("div",{style:e.pointer},o.a.createElement("div",{style:e.left},o.a.createElement("div",{style:e.leftInside})),o.a.createElement("div",{style:e.right},o.a.createElement("div",{style:e.rightInside})))},oi=function(e){var t=e.onClick,n=e.label,r=e.children,i=e.active,s=a()({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return o.a.createElement("div",{style:s.button,onClick:t},n||r)},ii=function(e){var t=e.rgb,n=e.currentColor,r=a()({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return o.a.createElement("div",null,o.a.createElement("div",{style:r.label},"new"),o.a.createElement("div",{style:r.swatches},o.a.createElement("div",{style:r.new}),o.a.createElement("div",{style:r.current})),o.a.createElement("div",{style:r.label},"current"))},ai=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var si=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.state={currentColor:e.hex},n}return 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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),ai(t,[{key:"render",value:function(){var e=this.props,t=e.styles,n=void 0===t?{}:t,r=e.className,i=void 0===r?"":r,s=a()(Kt({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},n));return o.a.createElement("div",{style:s.picker,className:"photoshop-picker "+i},o.a.createElement("div",{style:s.head},this.props.header),o.a.createElement("div",{style:s.body,className:"flexbox-fix"},o.a.createElement("div",{style:s.saturation},o.a.createElement(mn,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:ni,onChange:this.props.onChange})),o.a.createElement("div",{style:s.hue},o.a.createElement(T,{direction:"vertical",hsl:this.props.hsl,pointer:ri,onChange:this.props.onChange})),o.a.createElement("div",{style:s.controls},o.a.createElement("div",{style:s.top,className:"flexbox-fix"},o.a.createElement("div",{style:s.previews},o.a.createElement(ii,{rgb:this.props.rgb,currentColor:this.state.currentColor})),o.a.createElement("div",{style:s.actions},o.a.createElement(oi,{label:"OK",onClick:this.props.onAccept,active:!0}),o.a.createElement(oi,{label:"Cancel",onClick:this.props.onCancel}),o.a.createElement(ti,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(o.a.Component);si.propTypes={header:S.a.string,styles:S.a.object},si.defaultProps={header:"Color Picker",styles:{}};var ci=Dn(si),li=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,i=e.hex,s=e.disableAlpha,c=a()({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:s}),l=function(e,o){e.hex?kn(e.hex)&&t({hex:e.hex,source:"hex"},o):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,a:n.a,source:"rgb"},o):e.a&&(e.a<0?e.a=0:e.a>100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},o))};return o.a.createElement("div",{style:c.fields,className:"flexbox-fix"},o.a.createElement("div",{style:c.double},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"hex",value:i.replace("#",""),onChange:l})),o.a.createElement("div",{style:c.single},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),o.a.createElement("div",{style:c.single},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),o.a.createElement("div",{style:c.single},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),o.a.createElement("div",{style:c.alpha},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:l,dragLabel:"true",dragMax:"100"})))},ui=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pi=function(e){var t=e.colors,n=e.onClick,r=void 0===n?function(){}:n,i=e.onSwatchHover,s=a()({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),c=function(e,t){r({hex:e,source:"hex"},t)};return o.a.createElement("div",{style:s.colors,className:"flexbox-fix"},t.map((function(e){var t="string"==typeof e?{color:e}:e,n=""+t.color+(t.title||"");return o.a.createElement("div",{key:n,style:s.swatchWrap},o.a.createElement(Bn,ui({},t,{style:s.swatch,onClick:c,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+t.color}})))})))};pi.propTypes={colors:S.a.arrayOf(S.a.oneOfType([S.a.string,S.a.shape({color:S.a.string,title:S.a.string})])).isRequired};var fi=pi,di=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hi=function(e){var t=e.width,n=e.rgb,r=e.hex,i=e.hsv,s=e.hsl,c=e.onChange,l=e.onSwatchHover,u=e.disableAlpha,p=e.presetColors,d=e.renderers,h=e.styles,v=void 0===h?{}:h,g=e.className,y=void 0===g?"":g,b=a()(Kt({default:di({picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},v),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},v),{disableAlpha:u});return o.a.createElement("div",{style:b.picker,className:"sketch-picker "+y},o.a.createElement("div",{style:b.saturation},o.a.createElement(mn,{style:b.Saturation,hsl:s,hsv:i,onChange:c})),o.a.createElement("div",{style:b.controls,className:"flexbox-fix"},o.a.createElement("div",{style:b.sliders},o.a.createElement("div",{style:b.hue},o.a.createElement(T,{style:b.Hue,hsl:s,onChange:c})),o.a.createElement("div",{style:b.alpha},o.a.createElement(m,{style:b.Alpha,rgb:n,hsl:s,renderers:d,onChange:c}))),o.a.createElement("div",{style:b.color},o.a.createElement(f,null),o.a.createElement("div",{style:b.activeColor}))),o.a.createElement(li,{rgb:n,hsl:s,hex:r,onChange:c,disableAlpha:u}),o.a.createElement(fi,{colors:p,onClick:c,onSwatchHover:l}))};hi.propTypes={disableAlpha:S.a.bool,width:S.a.oneOfType([S.a.string,S.a.number]),styles:S.a.object},hi.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};var vi=Dn(hi),gi=function(e){var t=e.hsl,n=e.offset,r=e.onClick,i=void 0===r?function(){}:r,s=e.active,c=e.first,l=e.last,u=a()({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+100*n+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:s,first:c,last:l});return o.a.createElement("div",{style:u.swatch,onClick:function(e){return i({h:t.h,s:.5,l:n,source:"hsl"},e)}})},mi=function(e){var t=e.onClick,n=e.hsl,r=a()({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}});return o.a.createElement("div",{style:r.swatches},o.a.createElement("div",{style:r.swatch},o.a.createElement(gi,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<.1&&Math.abs(n.s-.5)<.1,onClick:t,first:!0})),o.a.createElement("div",{style:r.swatch},o.a.createElement(gi,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),o.a.createElement("div",{style:r.swatch},o.a.createElement(gi,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),o.a.createElement("div",{style:r.swatch},o.a.createElement(gi,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),o.a.createElement("div",{style:r.swatch},o.a.createElement(gi,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<.1&&Math.abs(n.s-.5)<.1,onClick:t,last:!0})),o.a.createElement("div",{style:r.clear}))},yi=function(){var e=a()({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return o.a.createElement("div",{style:e.picker})},bi=function(e){var t=e.hsl,n=e.onChange,r=e.pointer,i=e.styles,s=void 0===i?{}:i,c=e.className,l=void 0===c?"":c,u=a()(Kt({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},s));return o.a.createElement("div",{style:u.wrap||{},className:"slider-picker "+l},o.a.createElement("div",{style:u.hue},o.a.createElement(T,{style:u.Hue,hsl:t,pointer:r,onChange:n})),o.a.createElement("div",{style:u.swatches},o.a.createElement(mi,{hsl:t,onClick:n})))};bi.propTypes={styles:S.a.object},bi.defaultProps={pointer:yi,styles:{}};var _i=Dn(bi),wi=n(132),xi=n.n(wi),Ei=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,i=e.onSwatchHover,s=e.first,c=e.last,l=e.active,u=a()({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:jn(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:s,last:c,active:l,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return o.a.createElement(Bn,{color:t,style:u.color,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},o.a.createElement("div",{style:u.check},o.a.createElement(xi.a,null)))},Oi=function(e){var t=e.onClick,n=e.onSwatchHover,r=e.group,i=e.active,s=a()({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return o.a.createElement("div",{style:s.group},ao(r,(function(e,a){return o.a.createElement(Ei,{key:e,color:e,active:e.toLowerCase()===i,first:0===a,last:a===r.length-1,onClick:t,onSwatchHover:n})})))},Ci=function(e){var t=e.width,n=e.height,r=e.onChange,i=e.onSwatchHover,s=e.colors,c=e.hex,l=e.styles,u=void 0===l?{}:l,p=e.className,f=void 0===p?"":p,d=a()(Kt({default:{picker:{width:t,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),h=function(e,t){return r({hex:e,source:"hex"},t)};return o.a.createElement("div",{style:d.picker,className:"swatches-picker "+f},o.a.createElement(Zt,null,o.a.createElement("div",{style:d.overflow},o.a.createElement("div",{style:d.body},ao(s,(function(e){return o.a.createElement(Oi,{key:e.toString(),group:e,active:c,onClick:h,onSwatchHover:i})})),o.a.createElement("div",{style:d.clear})))))};Ci.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),height:S.a.oneOfType([S.a.string,S.a.number]),colors:S.a.arrayOf(S.a.arrayOf(S.a.string)),styles:S.a.object},Ci.defaultProps={width:320,height:240,colors:[[uo[900],uo[700],uo[500],uo[300],uo[100]],[po[900],po[700],po[500],po[300],po[100]],[fo[900],fo[700],fo[500],fo[300],fo[100]],[ho[900],ho[700],ho[500],ho[300],ho[100]],[vo[900],vo[700],vo[500],vo[300],vo[100]],[go[900],go[700],go[500],go[300],go[100]],[mo[900],mo[700],mo[500],mo[300],mo[100]],[yo[900],yo[700],yo[500],yo[300],yo[100]],[bo[900],bo[700],bo[500],bo[300],bo[100]],["#194D33",_o[700],_o[500],_o[300],_o[100]],[wo[900],wo[700],wo[500],wo[300],wo[100]],[xo[900],xo[700],xo[500],xo[300],xo[100]],[Eo[900],Eo[700],Eo[500],Eo[300],Eo[100]],[Oo[900],Oo[700],Oo[500],Oo[300],Oo[100]],[Co[900],Co[700],Co[500],Co[300],Co[100]],[To[900],To[700],To[500],To[300],To[100]],[Ao[900],Ao[700],Ao[500],Ao[300],Ao[100]],[So[900],So[700],So[500],So[300],So[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};var Ti=Dn(Ci),Ai=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,i=e.colors,s=e.width,c=e.triangle,l=e.styles,u=void 0===l?{}:l,p=e.className,f=void 0===p?"":p,d=a()(Kt({default:{card:{width:s,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":"hide"===c,"top-left-triangle":"top-left"===c,"top-right-triangle":"top-right"===c}),h=function(e,n){kn(e)&&t({hex:e,source:"hex"},n)};return o.a.createElement("div",{style:d.card,className:"twitter-picker "+f},o.a.createElement("div",{style:d.triangleShadow}),o.a.createElement("div",{style:d.triangle}),o.a.createElement("div",{style:d.body},ao(i,(function(e,t){return o.a.createElement(Bn,{key:t,color:e,hex:e,style:d.swatch,onClick:h,onHover:n,focusStyle:{boxShadow:"0 0 4px "+e}})})),o.a.createElement("div",{style:d.hash},"#"),o.a.createElement(w,{label:null,style:{input:d.input},value:r.replace("#",""),onChange:h}),o.a.createElement("div",{style:d.clear})))};Ai.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),triangle:S.a.oneOf(["hide","top-left","top-right"]),colors:S.a.arrayOf(S.a.string),styles:S.a.object},Ai.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};var Si=Dn(Ai),Pi=function(e){var t=a()({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(100*e.hsl.s)+"%, "+Math.round(100*e.hsl.l)+"%)"}}});return o.a.createElement("div",{style:t.picker})};Pi.propTypes={hsl:S.a.shape({h:S.a.number,s:S.a.number,l:S.a.number,a:S.a.number})},Pi.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var ki=Pi,ji=function(e){var t=a()({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return o.a.createElement("div",{style:t.picker})};ji.propTypes={hsl:S.a.shape({h:S.a.number,s:S.a.number,l:S.a.number,a:S.a.number})},ji.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Ii=ji,Ni=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,i=e.hex,s=e.hsv,c=function(e,n){if(e.hex)kn(e.hex)&&t({hex:e.hex,source:"hex"},n);else if(e.rgb){var r=e.rgb.split(",");In(e.rgb,"rgb")&&t({r:r[0],g:r[1],b:r[2],a:1,source:"rgb"},n)}else if(e.hsv){var o=e.hsv.split(",");In(e.hsv,"hsv")&&(o[2]=o[2].replace("%",""),o[1]=o[1].replace("%",""),o[0]=o[0].replace("°",""),1==o[1]?o[1]=.01:1==o[2]&&(o[2]=.01),t({h:Number(o[0]),s:Number(o[1]),v:Number(o[2]),source:"hsv"},n))}else if(e.hsl){var i=e.hsl.split(",");In(e.hsl,"hsl")&&(i[2]=i[2].replace("%",""),i[1]=i[1].replace("%",""),i[0]=i[0].replace("°",""),1==f[1]?f[1]=.01:1==f[2]&&(f[2]=.01),t({h:Number(i[0]),s:Number(i[1]),v:Number(i[2]),source:"hsl"},n))}},l=a()({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=n.r+", "+n.g+", "+n.b,p=Math.round(r.h)+"°, "+Math.round(100*r.s)+"%, "+Math.round(100*r.l)+"%",f=Math.round(s.h)+"°, "+Math.round(100*s.s)+"%, "+Math.round(100*s.v)+"%";return o.a.createElement("div",{style:l.wrap,className:"flexbox-fix"},o.a.createElement("div",{style:l.fields},o.a.createElement("div",{style:l.double},o.a.createElement(w,{style:{input:l.input,label:l.label},label:"hex",value:i,onChange:c})),o.a.createElement("div",{style:l.column},o.a.createElement("div",{style:l.single},o.a.createElement(w,{style:{input:l.input2,label:l.label2},label:"rgb",value:u,onChange:c})),o.a.createElement("div",{style:l.single},o.a.createElement(w,{style:{input:l.input2,label:l.label2},label:"hsv",value:f,onChange:c})),o.a.createElement("div",{style:l.single},o.a.createElement(w,{style:{input:l.input2,label:l.label2},label:"hsl",value:p,onChange:c})))))},Ri=function(e){var t=e.width,n=e.onChange,r=e.rgb,i=e.hsl,s=e.hsv,c=e.hex,l=e.header,u=e.styles,p=void 0===u?{}:u,f=e.className,d=void 0===f?"":f,h=a()(Kt({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+r.r+", "+r.g+", "+r.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},p));return o.a.createElement("div",{style:h.picker,className:"google-picker "+d},o.a.createElement("div",{style:h.head},l),o.a.createElement("div",{style:h.swatch}),o.a.createElement("div",{style:h.saturation},o.a.createElement(mn,{hsl:i,hsv:s,pointer:ki,onChange:n})),o.a.createElement("div",{style:h.body},o.a.createElement("div",{style:h.controls,className:"flexbox-fix"},o.a.createElement("div",{style:h.hue},o.a.createElement(T,{style:h.Hue,hsl:i,radius:"4px",pointer:Ii,onChange:n}))),o.a.createElement(Ni,{rgb:r,hsl:i,hex:c,hsv:s,onChange:n})))};Ri.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),styles:S.a.object,header:S.a.string},Ri.defaultProps={width:652,styles:{},header:"Color picker"};var Di=Dn(Ri)},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.r(t),n.d(t,"CacheProvider",(function(){return S})),n.d(t,"ThemeContext",(function(){return A})),n.d(t,"withEmotionCache",(function(){return P})),n.d(t,"css",(function(){return R})),n.d(t,"ClassNames",(function(){return z})),n.d(t,"Global",(function(){return L})),n.d(t,"createElement",(function(){return D})),n.d(t,"jsx",(function(){return D})),n.d(t,"keyframes",(function(){return F}));var o=n(0);var i=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var i=105===e.charCodeAt(1)&&64===e.charCodeAt(0);o.insertRule(e,i?0:o.cssRules.length)}catch(e){0}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}();var a=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=n(e,t[s],r).trim();break;default:var c=s=0;for(t=[];s<i;++s)for(var l=0;l<a;++l)t[c++]=n(e[l]+" ",o[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(v,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,i){var a=e+";",s=2*t+3*n+4*i;if(944===s){e=a.indexOf(":",9)+1;var c=a.substring(e,a.length-1).trim();return c=a.substring(0,e).trim()+c+";",1===P||2===P&&o(c,1)?"-webkit-"+c+c:c}if(0===P||2===P&&!o(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(C,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(c=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+c+a;case 1005:return f.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(c=a.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=a.replace(b,"tb");break;case 232:c=a.replace(b,"tb-rl");break;case 220:c=a.replace(b,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+c+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(c=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:a=a.replace(c,"-webkit-"+c)+";"+a;break;case 207:case 102:a=a.replace(c,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(c,"-webkit-"+c)+";"+a.replace(c,"-ms-"+c+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return c=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+c+"-ms-flex-"+c+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(x,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(x,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===O.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,i).replace(":fill-available",":stretch"):a.replace(c,"-webkit-"+c)+a.replace(c,"-moz-"+c.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+i&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(d,"$1-webkit-$2")+a}return a}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),N(2!==t?r:r.replace(E,"$1"),n,t)}function i(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function a(e,t,n,r,o,i,a,s,l,u){for(var p,f=0,d=t;f<I;++f)switch(p=j[f].call(c,e,d,n,r,o,i,a,s,l,u)){case void 0:case!1:case!0:case null:break;default:d=p}if(d!==t)return d}function s(e){return void 0!==(e=e.prefix)&&(N=null,e?"function"!=typeof e?P=1:(P=2,N=e):P=0),s}function c(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<I){var c=a(-1,n,s,s,A,T,0,0,0,0);void 0!==c&&"string"==typeof c&&(n=c)}var p=function e(n,s,c,p,f){for(var d,h,v,b,w,x=0,E=0,O=0,C=0,j=0,N=0,D=v=d=0,L=0,M=0,F=0,H=0,U=c.length,z=U-1,B="",V="",q="",G="";L<U;){if(h=c.charCodeAt(L),L===z&&0!==E+C+O+x&&(0!==E&&(h=47===E?10:47),C=O=x=0,U++,z++),0===E+C+O+x){if(L===z&&(0<M&&(B=B.replace(u,"")),0<B.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:B+=c.charAt(L)}h=59}switch(h){case 123:for(d=(B=B.trim()).charCodeAt(0),v=1,H=++L;L<U;){switch(h=c.charCodeAt(L)){case 123:v++;break;case 125:v--;break;case 47:switch(h=c.charCodeAt(L+1)){case 42:case 47:e:{for(D=L+1;D<z;++D)switch(c.charCodeAt(D)){case 47:if(42===h&&42===c.charCodeAt(D-1)&&L+2!==D){L=D+1;break e}break;case 10:if(47===h){L=D+1;break e}}L=D}}break;case 91:h++;case 40:h++;case 34:case 39:for(;L++<z&&c.charCodeAt(L)!==h;);}if(0===v)break;L++}switch(v=c.substring(H,L),0===d&&(d=(B=B.replace(l,"").trim()).charCodeAt(0)),d){case 64:switch(0<M&&(B=B.replace(u,"")),h=B.charCodeAt(1)){case 100:case 109:case 115:case 45:M=s;break;default:M=k}if(H=(v=e(s,M,v,h,f+1)).length,0<I&&(w=a(3,v,M=t(k,B,F),s,A,T,H,h,f,p),B=M.join(""),void 0!==w&&0===(H=(v=w.trim()).length)&&(h=0,v="")),0<H)switch(h){case 115:B=B.replace(_,i);case 100:case 109:case 45:v=B+"{"+v+"}";break;case 107:v=(B=B.replace(g,"$1 $2"))+"{"+v+"}",v=1===P||2===P&&o("@"+v,3)?"@-webkit-"+v+"@"+v:"@"+v;break;default:v=B+v,112===p&&(V+=v,v="")}else v="";break;default:v=e(s,t(s,B,F),v,p,f+1)}q+=v,v=F=M=D=d=0,B="",h=c.charCodeAt(++L);break;case 125:case 59:if(1<(H=(B=(0<M?B.replace(u,""):B).trim()).length))switch(0===D&&(d=B.charCodeAt(0),45===d||96<d&&123>d)&&(H=(B=B.replace(" ",":")).length),0<I&&void 0!==(w=a(1,B,s,n,A,T,V.length,p,f,p))&&0===(H=(B=w.trim()).length)&&(B="\0\0"),d=B.charCodeAt(0),h=B.charCodeAt(1),d){case 0:break;case 64:if(105===h||99===h){G+=B+c.charAt(L);break}default:58!==B.charCodeAt(H-1)&&(V+=r(B,d,h,B.charCodeAt(2)))}F=M=D=d=0,B="",h=c.charCodeAt(++L)}}switch(h){case 13:case 10:47===E?E=0:0===1+d&&107!==p&&0<B.length&&(M=1,B+="\0"),0<I*R&&a(0,B,s,n,A,T,V.length,p,f,p),T=1,A++;break;case 59:case 125:if(0===E+C+O+x){T++;break}default:switch(T++,b=c.charAt(L),h){case 9:case 32:if(0===C+x+E)switch(j){case 44:case 58:case 9:case 32:b="";break;default:32!==h&&(b=" ")}break;case 0:b="\\0";break;case 12:b="\\f";break;case 11:b="\\v";break;case 38:0===C+E+x&&(M=F=1,b="\f"+b);break;case 108:if(0===C+E+x+S&&0<D)switch(L-D){case 2:112===j&&58===c.charCodeAt(L-3)&&(S=j);case 8:111===N&&(S=N)}break;case 58:0===C+E+x&&(D=L);break;case 44:0===E+O+C+x&&(M=1,b+="\r");break;case 34:case 39:0===E&&(C=C===h?0:0===C?h:C);break;case 91:0===C+E+O&&x++;break;case 93:0===C+E+O&&x--;break;case 41:0===C+E+x&&O--;break;case 40:if(0===C+E+x){if(0===d)switch(2*j+3*N){case 533:break;default:d=1}O++}break;case 64:0===E+O+C+x+D+v&&(v=1);break;case 42:case 47:if(!(0<C+x+O))switch(E){case 0:switch(2*h+3*c.charCodeAt(L+1)){case 235:E=47;break;case 220:H=L,E=42}break;case 42:47===h&&42===j&&H+2!==L&&(33===c.charCodeAt(H+2)&&(V+=c.substring(H,L+1)),b="",E=0)}}0===E&&(B+=b)}N=j,j=h,L++}if(0<(H=V.length)){if(M=s,0<I&&(void 0!==(w=a(2,V,M,n,A,T,H,p,f,p))&&0===(V=w).length))return G+V+q;if(V=M.join(",")+"{"+V+"}",0!=P*S){switch(2!==P||o(V,2)||(S=0),S){case 111:V=V.replace(y,":-moz-$1")+V;break;case 112:V=V.replace(m,"::-webkit-input-$1")+V.replace(m,"::-moz-$1")+V.replace(m,":-ms-input-$1")+V}S=0}}return G+V+q}(k,s,n,0,0);return 0<I&&(void 0!==(c=a(-2,p,s,s,A,T,p.length,0,0,0))&&(p=c)),"",S=0,T=A=1,p}var l=/^\0+/g,u=/[\0\r\f]/g,p=/: */g,f=/zoo|gra/,d=/([,: ])(transform)/g,h=/,\r+?/g,v=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,m=/::(place)/g,y=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,_=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,x=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,O=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,T=1,A=1,S=0,P=1,k=[],j=[],I=0,N=null,R=0;return c.use=function e(t){switch(t){case void 0:case null:I=j.length=0;break;default:if("function"==typeof t)j[I++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else R=0|!!t}return e},c.set=s,void 0!==e&&s(e),c};function s(e){e&&c.current.insert(e+"}")}var c={current:null},l=function(e,t,n,r,o,i,a,l,u,p){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return c.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===l)return t+"/*|*/";break;case 3:switch(l){case 102:case 112:return c.current.insert(n[0]+t),"";default:return t+(0===p?"/*|*/":"")}case-2:t.split("/*|*/}").forEach(s)}},u=function(e){void 0===e&&(e={});var t,n=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var r=new a(t);var o,s={};o=e.container||document.head;var u,p=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(p,(function(e){e.getAttribute("data-emotion-"+n).split(" ").forEach((function(e){s[e]=!0})),e.parentNode!==o&&o.appendChild(e)})),r.use(e.stylisPlugins)(l),u=function(e,t,n,o){var i=t.name;c.current=n,r(e,t.styles),o&&(f.inserted[i]=!0)};var f={key:n,sheet:new i({key:n,container:o,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:s,registered:{},insert:u};return f};n(197);function p(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]):r+=n+" "})),r}var f=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert("."+r,o,e.sheet,!0);o=o.next}while(void 0!==o)}};var d=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},h={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var v=/[A-Z]|^ms/g,g=/_EMO_([^_]+?)_([^]*?)_EMO_/g,m=function(e){return 45===e.charCodeAt(1)},y=function(e){return null!=e&&"boolean"!=typeof e},b=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return m(e)?e:e.replace(v,"-$&").toLowerCase()})),_=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(g,(function(e,t,n){return x={name:t,styles:n,next:x},t}))}return 1===h[e]||m(e)||"number"!=typeof t||0===t?t:t+"px"};function w(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return x={name:n.name,styles:n.styles,next:x},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)x={name:o.name,styles:o.styles,next:x},o=o.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=w(e,t,n[o],!1);else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":y(a)&&(r+=b(i)+":"+_(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=w(e,t,a,!1);switch(i){case"animation":case"animationName":r+=b(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var c=0;c<a.length;c++)y(a[c])&&(r+=b(i)+":"+_(i,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=x,a=n(e);return x=i,w(e,t,a,r)}break;case"string":}if(null==t)return n;var s=t[n];return void 0===s||r?n:s}var x,E=/label:\s*([^\s;\n{]+)\s*;/g;var O=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";x=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=w(n,t,i,!1)):o+=i[0];for(var a=1;a<e.length;a++)o+=w(n,t,e[a],46===o.charCodeAt(o.length-1)),r&&(o+=i[a]);E.lastIndex=0;for(var s,c="";null!==(s=E.exec(o));)c+="-"+s[1];return{name:d(o)+c,styles:o,next:x}},C=Object.prototype.hasOwnProperty,T=Object(o.createContext)("undefined"!=typeof HTMLElement?u():null),A=Object(o.createContext)({}),S=T.Provider,P=function(e){var t=function(t,n){return Object(o.createElement)(T.Consumer,null,(function(r){return e(t,r,n)}))};return Object(o.forwardRef)(t)},k="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",j=function(e,t){var n={};for(var r in t)C.call(t,r)&&(n[r]=t[r]);return n[k]=e,n},I=function(e,t,n,r){var i=null===n?t.css:t.css(n);"string"==typeof i&&void 0!==e.registered[i]&&(i=e.registered[i]);var a=t[k],s=[i],c="";"string"==typeof t.className?c=p(e.registered,s,t.className):null!=t.className&&(c=t.className+" ");var l=O(s);f(e,l,"string"==typeof a);c+=e.key+"-"+l.name;var u={};for(var d in t)C.call(t,d)&&"css"!==d&&d!==k&&(u[d]=t[d]);return u.ref=r,u.className=c,Object(o.createElement)(a,u)},N=P((function(e,t,n){return"function"==typeof e.css?Object(o.createElement)(A.Consumer,null,(function(r){return I(t,e,r,n)})):I(t,e,null,n)}));var R=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return O(t)},D=function(e,t){var n=arguments;if(null==t||!C.call(t,"css"))return o.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=N,i[1]=j(e,t);for(var a=2;a<r;a++)i[a]=n[a];return o.createElement.apply(null,i)},L=P((function(e,t){var n=e.styles;if("function"==typeof n)return Object(o.createElement)(A.Consumer,null,(function(e){var r=O([n(e)]);return Object(o.createElement)(M,{serialized:r,cache:t})}));var r=O([n]);return Object(o.createElement)(M,{serialized:r,cache:t})})),M=function(e){var t,n;function o(t,n,r){return e.call(this,t,n,r)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var a=o.prototype;return a.componentDidMount=function(){this.sheet=new i({key:this.props.cache.key+"-global",nonce:this.props.cache.sheet.nonce,container:this.props.cache.sheet.container});var e=document.querySelector("style[data-emotion-"+this.props.cache.key+'="'+this.props.serialized.name+'"]');null!==e&&this.sheet.tags.push(e),this.props.cache.sheet.tags.length&&(this.sheet.before=this.props.cache.sheet.tags[0]),this.insertStyles()},a.componentDidUpdate=function(e){e.serialized.name!==this.props.serialized.name&&this.insertStyles()},a.insertStyles=function(){if(void 0!==this.props.serialized.next&&f(this.props.cache,this.props.serialized.next,!0),this.sheet.tags.length){var e=this.sheet.tags[this.sheet.tags.length-1].nextElementSibling;this.sheet.before=e,this.sheet.flush()}this.props.cache.insert("",this.props.serialized,this.sheet,!1)},a.componentWillUnmount=function(){this.sheet.flush()},a.render=function(){return null},o}(o.Component),F=function(){var e=R.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},H=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var a=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var s in a="",i)i[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o};function U(e,t,n){var r=[],o=p(e,r,n);return r.length<2?n:o+t(r)}var z=P((function(e,t){return Object(o.createElement)(A.Consumer,null,(function(n){var r=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=O(n,t.registered);return f(t,o,!1),t.key+"-"+o.name},o={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return U(t.registered,r,H(n))},theme:n},i=e.children(o);return!0,i}))}))}])}));
8
+ */!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=i(),!!0){var a=window.Cookies,s=window.Cookies=i();s.noConflict=function(){return window.Cookies=a,s}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var l=t(s[0]);if(c=(r.read||r)(c,l)||t(c),n)try{c=JSON.parse(c)}catch(e){}if(o[l]=c,e===l)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t,n){"use strict";n.r(t),function(e,r){n.d(t,"Authentication",(function(){return Ht})),n.d(t,"Management",(function(){return Ut})),n.d(t,"WebAuth",(function(){return Lt})),n.d(t,"version",(function(){return se}));var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function i(e,t){return e(t={exports:{}},t.exports),t.exports}var a=i((function(e){var t,n;t=o,n=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<e.length;r++){var o=e[r];if("string"!=typeof o)throw new TypeError("Url must be a string. Received "+o);""!==o&&(r>0&&(o=o.replace(/^[\/]+/,"")),o=r<e.length-1?o.replace(/[\/]+$/,""):o.replace(/[\/]+$/,"/"),t.push(o))}var i=t.join("/"),a=(i=i.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a.shift()+(a.length>0?"?":"")+a.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=n():t.urljoin=n()})),s=Object.prototype.hasOwnProperty,c=Array.isArray,l=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},p={arrayToObject:u,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],i=o.obj[o.prop],a=Object.keys(i),s=0;s<a.length;++s){var l=a[s],u=i[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:i,prop:l}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(c(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n){if(0===e.length)return e;var r=e;if("symbol"==typeof e?r=Symbol.prototype.toString.call(e):"string"!=typeof e&&(r=String(e)),"iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",i=0;i<r.length;++i){var a=r.charCodeAt(i);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?o+=r.charAt(i):a<128?o+=l[a]:a<2048?o+=l[192|a>>6]+l[128|63&a]:a<55296||a>=57344?o+=l[224|a>>12]+l[128|a>>6&63]+l[128|63&a]:(i+=1,a=65536+((1023&a)<<10|1023&r.charCodeAt(i)),o+=l[240|a>>18]+l[128|a>>12&63]+l[128|a>>6&63]+l[128|63&a])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(c(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(c(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!s.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var o=t;return c(t)&&!c(n)&&(o=u(t,r)),c(t)&&c(n)?(n.forEach((function(n,o){if(s.call(t,o)){var i=t[o];i&&"object"==typeof i&&n&&"object"==typeof n?t[o]=e(i,n,r):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var i=n[o];return s.call(t,o)?t[o]=e(t[o],i,r):t[o]=i,t}),o)}},f=String.prototype.replace,d=/%20/g,h={RFC1738:"RFC1738",RFC3986:"RFC3986"},v=p.assign({default:h.RFC3986,formatters:{RFC1738:function(e){return f.call(e,d,"+")},RFC3986:function(e){return String(e)}}},h),g=Object.prototype.hasOwnProperty,m={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},y=Array.isArray,b=Array.prototype.push,_=function(e,t){b.apply(e,y(t)?t:[t])},w=Date.prototype.toISOString,x=v.default,E={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:p.encode,encodeValuesOnly:!1,format:x,formatter:v.formatters[x],indices:!1,serializeDate:function(e){return w.call(e)},skipNulls:!1,strictNullHandling:!1},O=function e(t,n,r,o,i,a,s,c,l,u,f,d,h){var v=t;if("function"==typeof s?v=s(n,v):v instanceof Date?v=u(v):"comma"===r&&y(v)&&(v=p.maybeMap(v,(function(e){return e instanceof Date?u(e):e})).join(",")),null===v){if(o)return a&&!d?a(n,E.encoder,h,"key"):n;v=""}if(function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(v)||p.isBuffer(v))return a?[f(d?n:a(n,E.encoder,h,"key"))+"="+f(a(v,E.encoder,h,"value"))]:[f(n)+"="+f(String(v))];var g,m=[];if(void 0===v)return m;if(y(s))g=s;else{var b=Object.keys(v);g=c?b.sort(c):b}for(var w=0;w<g.length;++w){var x=g[w],O=v[x];if(!i||null!==O){var C=y(v)?"function"==typeof r?r(n,x):n:n+(l?"."+x:"["+x+"]");_(m,e(O,C,r,o,i,a,s,c,l,u,f,d,h))}}return m},C=Object.prototype.hasOwnProperty,T=Array.isArray,A={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:p.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},S=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},P=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},k=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(o),s=a?o.slice(0,a.index):o,c=[];if(s){if(!n.plainObjects&&C.call(Object.prototype,s)&&!n.allowPrototypes)return;c.push(s)}for(var l=0;n.depth>0&&null!==(a=i.exec(o))&&l<n.depth;){if(l+=1,!n.plainObjects&&C.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+o.slice(a.index)+"]"),function(e,t,n,r){for(var o=r?t:P(t,n),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=o:a[c]=o:a={0:o}}o=a}return o}(c,t,n,r)}},j=function(e,t){var n,r=e,o=function(e){if(!e)return E;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||E.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=v.default;if(void 0!==e.format){if(!g.call(v.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=v.formatters[n],o=E.filter;return("function"==typeof e.filter||y(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:E.addQueryPrefix,allowDots:void 0===e.allowDots?E.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:E.charsetSentinel,delimiter:void 0===e.delimiter?E.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:E.encode,encoder:"function"==typeof e.encoder?e.encoder:E.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:E.encodeValuesOnly,filter:o,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:E.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:E.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:E.strictNullHandling}}(t);"function"==typeof o.filter?r=(0,o.filter)("",r):y(o.filter)&&(n=o.filter);var i,a=[];if("object"!=typeof r||null===r)return"";i=t&&t.arrayFormat in m?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=m[i];n||(n=Object.keys(r)),o.sort&&n.sort(o.sort);for(var c=0;c<n.length;++c){var l=n[c];o.skipNulls&&null===r[l]||_(a,O(r[l],l,s,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.formatter,o.encodeValuesOnly,o.charset))}var u=a.join(o.delimiter),p=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),u.length>0?p+u:""},I=i((function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}})),N=L;L.default=L,L.stable=F,L.stableStringify=F;var R=[],D=[];function L(e,t,n){var r;for(function e(t,n,r,o){var i;if("object"==typeof t&&null!==t){for(i=0;i<r.length;i++)if(r[i]===t){var a=Object.getOwnPropertyDescriptor(o,n);return void(void 0!==a.get?a.configurable?(Object.defineProperty(o,n,{value:"[Circular]"}),R.push([o,n,t,a])):D.push([t,n]):(o[n]="[Circular]",R.push([o,n,t])))}if(r.push(t),Array.isArray(t))for(i=0;i<t.length;i++)e(t[i],i,r,t);else{var s=Object.keys(t);for(i=0;i<s.length;i++){var c=s[i];e(t[c],c,r,t)}}r.pop()}}(e,"",[],void 0),r=0===D.length?JSON.stringify(e,t,n):JSON.stringify(e,H(t),n);0!==R.length;){var o=R.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return r}function M(e,t){return e<t?-1:e>t?1:0}function F(e,t,n){var r,o=function e(t,n,r,o){var i;if("object"==typeof t&&null!==t){for(i=0;i<r.length;i++)if(r[i]===t){var a=Object.getOwnPropertyDescriptor(o,n);return void(void 0!==a.get?a.configurable?(Object.defineProperty(o,n,{value:"[Circular]"}),R.push([o,n,t,a])):D.push([t,n]):(o[n]="[Circular]",R.push([o,n,t])))}if("function"==typeof t.toJSON)return;if(r.push(t),Array.isArray(t))for(i=0;i<t.length;i++)e(t[i],i,r,t);else{var s={},c=Object.keys(t).sort(M);for(i=0;i<c.length;i++){var l=c[i];e(t[l],l,r,t),s[l]=t[l]}if(void 0===o)return s;R.push([o,n,t]),o[n]=s}r.pop()}}(e,"",[],void 0)||e;for(r=0===D.length?JSON.stringify(o,t,n):JSON.stringify(o,H(t),n);0!==R.length;){var i=R.pop();4===i.length?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}return r}function H(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(D.length>0)for(var r=0;r<D.length;r++){var o=D[r];if(o[1]===t&&o[0]===n){n="[Circular]",D.splice(r,1);break}}return e.call(this,t,n)}}function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var z=function(e){return null!==e&&"object"===U(e)};function B(e){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var V=q;function q(e){if(e)return function(e){for(var t in q.prototype)Object.prototype.hasOwnProperty.call(q.prototype,t)&&(e[t]=q.prototype[t]);return e}(e)}q.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},q.prototype.parse=function(e){return this._parser=e,this},q.prototype.responseType=function(e){return this._responseType=e,this},q.prototype.serialize=function(e){return this._serializer=e,this},q.prototype.timeout=function(e){if(!e||"object"!==B(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},q.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var G=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];q.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!==t.status)return!0;if(e){if(e.code&&G.includes(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},q.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},q.prototype.then=function(e,t){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){r.on("abort",(function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)t(n.timedoutError);else{var e=new Error("Aborted");e.code="ABORTED",e.status=n.status,e.method=n.method,e.url=n.url,t(e)}})),r.end((function(n,r){n?t(n):e(r)}))}))}return this._fullfilledPromise.then(e,t)},q.prototype.catch=function(e){return this.then(void 0,e)},q.prototype.use=function(e){return e(this),this},q.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},q.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},q.prototype.get=function(e){return this._header[e.toLowerCase()]},q.prototype.getHeader=q.prototype.get,q.prototype.set=function(e,t){if(z(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},q.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},q.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(z(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.field(e,t[r]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),this._getFormData().append(e,t),this},q.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},q.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},q.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},q.prototype.redirects=function(e){return this._maxRedirects=e,this},q.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},q.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},q.prototype.send=function(e){var t=z(e),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&z(this._data))for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this._data[r]=e[r]);else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},q.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},q.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.slice(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,t)+"?"+n.join("&")}}},q.prototype._appendQueryString=function(){console.warn("Unsupported")},q.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error("".concat(e+t,"ms exceeded"));r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},q.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))};var W=Y;function Y(e){if(e)return function(e){for(var t in Y.prototype)Object.prototype.hasOwnProperty.call(Y.prototype,t)&&(e[t]=Y.prototype[t]);return e}(e)}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $(){this._defaults=[]}Y.prototype.get=function(e){return this.header[e.toLowerCase()]},Y.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=t.split(/ *; */).shift();var n=function(e){return e.split(/ *; */).reduce((function(e,t){var n=t.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(e[r]=o),e}),{})}(t);for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(this[r]=n[r]);this.links={};try{e.link&&(this.links=function(e){return e.split(/ *, */).reduce((function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e}),{})}(e.link))}catch(e){}},Y.prototype._setStatusProperties=function(e){var t=e/100|0;this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e},["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(e){$.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this._defaults.push({fn:e,args:n}),this}})),$.prototype._setDefaults=function(e){this._defaults.forEach((function(t){e[t.fn].apply(e,function(e){return function(e){if(Array.isArray(e))return X(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return X(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X(e,void 0):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.args))}))};for(var J=$,K=i((function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;function o(){}"undefined"!=typeof window?r=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),r=void 0):r=self,e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1===arguments.length?new t.Request("GET",e):new t.Request(e,n)};var i=t=e.exports;t.Request=f,i.getXHR=function(){if(r.XMLHttpRequest&&(!r.location||"file:"!==r.location.protocol||!r.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("Browser-only version of superagent could not find XHR")};var a="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function s(e){if(!z(e))return e;var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&c(t,n,e[n]);return t.join("&")}function c(e,t,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach((function(n){c(e,t,n)}));else if(z(n))for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&c(e,"".concat(t,"[").concat(r,"]"),n[r]);else e.push(encodeURI(t)+"="+encodeURIComponent(n));else e.push(encodeURI(t))}function l(e){for(var t,n,r={},o=e.split("&"),i=0,a=o.length;i<a;++i)-1===(n=(t=o[i]).indexOf("="))?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function u(e){return/[/+]json($|[^-\w])/.test(e)}function p(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){for(var t,n,r,o,i=e.split(/\r?\n/),s={},c=0,l=i.length;c<l;++c)-1!==(t=(n=i[c]).indexOf(":"))&&(r=n.slice(0,t).toLowerCase(),o=a(n.slice(t+1)),s[r]=o);return s}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function f(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,r=null;try{r=new p(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",r);try{n._isResponseOK(r)||(e=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=r,e.status=r.status,n.callback(e,r)):n.callback(null,r)}))}function d(e,t,n){var r=i("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}i.serializeObject=s,i.parseString=l,i.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},i.serialize={"application/x-www-form-urlencoded":s,"application/json":N},i.parse={"application/x-www-form-urlencoded":l,"application/json":JSON.parse},W(p.prototype),p.prototype._parseBody=function(e){var t=i.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&u(this.type)&&(t=i.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},p.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),o=new Error(r);return o.status=this.status,o.method=t,o.url=n,o},i.Response=p,I(f.prototype),V(f.prototype),f.prototype.type=function(e){return this.set("Content-Type",i.types[e]||e),this},f.prototype.accept=function(e){return this.set("Accept",i.types[e]||e),this},f.prototype.auth=function(e,t,r){1===arguments.length&&(t=""),"object"===n(t)&&null!==t&&(r=t,t=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var o=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,r,o)},f.prototype.query=function(e){return"string"!=typeof e&&(e=s(e)),e&&this._query.push(e),this},f.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},f.prototype._getFormData=function(){return this._formData||(this._formData=new r.FormData),this._formData},f.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},f.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},f.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},f.prototype.ca=f.prototype.agent,f.prototype.buffer=f.prototype.ca,f.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},f.prototype.pipe=f.prototype.write,f.prototype._isHost=function(e){return e&&"object"===n(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},f.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||o,this._finalizeQueryString(),this._end()},f.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},f.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=i.getXHR();var t=this.xhr,n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",r.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",r.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],a=this._serializer||i.serialize[o?o.split(";")[0]:""];!a&&u(o)&&(a=i.serialize["application/json"]),a&&(n=a(n))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&t.setRequestHeader(s,this.header[s]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},i.agent=function(){return new J},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){J.prototype[e.toLowerCase()]=function(t,n){var r=new i.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}})),J.prototype.del=J.prototype.delete,i.get=function(e,t,n){var r=i("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},i.head=function(e,t,n){var r=i("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},i.options=function(e,t,n){var r=i("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},i.del=d,i.delete=d,i.patch=function(e,t,n){var r=i("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},i.post=function(e,t,n){var r=i("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},i.put=function(e,t,n){var r=i("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}})),Q=(K.Request,[]),Z=[],ee=("undefined"!=typeof Uint8Array&&Uint8Array,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),te=0,ne=ee.length;te<ne;++te)Q[te]=ee[te],Z[ee.charCodeAt(te)]=te;function re(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&t,[n,n===t?0:4-n%4]}function oe(e,t,n){for(var r,o,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(Q[(o=r)>>18&63]+Q[o>>12&63]+Q[o>>6&63]+Q[63&o]);return i.join("")}Z["-".charCodeAt(0)]=62,Z["_".charCodeAt(0)]=63;var ie=function(e){for(var t,n=e.length,r=n%3,o=[],i=0,a=n-r;i<a;i+=16383)o.push(oe(e,i,i+16383>a?a:i+16383));return 1===r?(t=e[n-1],o.push(Q[t>>2]+Q[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(Q[t>>10]+Q[t>>4&63]+Q[t<<2&63]+"=")),o.join("")},ae=function(e){return ie(function(e){for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(e)).replace(/\+/g,"-").replace(/\//g,"_")},se={raw:"9.16.2"},ce=Object.prototype.toString;function le(e,t,n,r){if(n="array"===n?"object":n,e&&typeof e[t]!==n)throw new Error(r)}function ue(e,t,n){if(typeof e!==t)throw new Error(n)}function pe(e,t,n){if(-1===t.indexOf(e))throw new Error(n)}var fe={check:function(e,t,n){if(t.optional&&!e||ue(e,t.type,t.message),"object"===t.type&&n)for(var r=Object.keys(n),o=0;o<r.length;o++){var i=r[o];n[i].optional&&!e[i]||n[i].condition&&!n[i].condition(e)||(le(e,i,n[i].type,n[i].message),n[i].values&&pe(e[i],n[i].values,n[i].value_message))}},attribute:le,variable:ue,value:pe,isArray:function(e){return this.supportsIsArray()?Array.isArray(e):"[object Array]"===ce.call(e)},supportsIsArray:function(){return null!=Array.isArray}};function de(e){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o=Object.keys(Object(r)),i=0,a=o.length;i<a;i++){var s=o[i],c=Object.getOwnPropertyDescriptor(r,s);void 0!==c&&c.enumerable&&(t[s]=r[s])}}return t}var he=function(){return Object.assign?Object.assign:de};function ve(e,t){return t.reduce((function(t,n){return e[n]&&(t[n]=e[n]),t}),{})}function ge(e){var t=[];for(var n in e)t.push(e[n]);return t}function me(){var e=ge(arguments);return e.unshift({}),he().apply(void 0,e)}function ye(e){var t=e.match(/^(https?:|file:|chrome-extension:)\/\/(([^:/?#]*)(?::([0-9]+))?)([/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return t&&{href:e,protocol:t[1],host:t[2],hostname:t[3],port:t[4],pathname:t[5],search:t[6],hash:t[7]}}function be(e,t){var n=me(e);return e[t]&&(n[t]=e[t].trim()),n}var _e={toSnakeCase:function e(t,n){return"object"!=typeof t||fe.isArray(t)||null===t?t:(n=n||[],Object.keys(t).reduce((function(r,o){return r[-1===n.indexOf(o)?function(e){for(var t,n="",r=0,o=!0,i=!0;r<e.length;)t=e.charCodeAt(r),!i&&t>=65&&t<=90||!o&&t>=48&&t<=57?(n+="_",n+=e[r].toLowerCase()):n+=e[r].toLowerCase(),o=t>=48&&t<=57,i=t>=65&&t<=90,r++;return n}(o):o]=e(t[o]),r}),{}))},toCamelCase:function e(t,n,r){return"object"!=typeof t||fe.isArray(t)||null===t?t:(n=n||[],r=r||{},Object.keys(t).reduce((function(o,i){var a,s=-1===n.indexOf(i)?(a=i.split("_")).reduce((function(e,t){return e+t.charAt(0).toUpperCase()+t.slice(1)}),a.shift()):i;return o[s]=e(t[s]||t[i],[],r),r.keepOriginal&&(o[i]=e(t[i],[],r)),o}),{}))},blacklist:function(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})},merge:function(e,t){return{base:t?ve(e,t):e,with:function(e,t){return e=t?ve(e,t):e,me(this.base,e)}}},pick:ve,getKeysNotIn:function(e,t){var n=[];for(var r in e)-1===t.indexOf(r)&&n.push(r);return n},extend:me,getOriginFromUrl:function(e){if(e){var t=ye(e);if(!t)return null;var n=t.protocol+"//"+t.hostname;return t.port&&(n+=":"+t.port),n}},getLocationFromUrl:ye,trimUserDetails:function(e){return function(e,t){return["username","email","phoneNumber"].reduce(be,e)}(e)},updatePropertyOn:function e(t,n,r){"string"==typeof n&&(n=n.split("."));var o=n[0];t.hasOwnProperty(o)&&(1===n.length?t[o]=r:e(t[o],n.slice(1),r))}};function we(e){this.request=e,this.method=e.method,this.url=e.url,this.body=e._data,this.headers=e._header}function xe(e){this.request=e}function Ee(e){this._sendTelemetry=!1!==e._sendTelemetry||e._sendTelemetry,this._telemetryInfo=e._telemetryInfo||null,this._timesToRetryFailedRequests=e._timesToRetryFailedRequests,this.headers=e.headers||{},this._universalLoginPage=e.universalLoginPage}function Oe(){return window}we.prototype.abort=function(){this.request.abort()},we.prototype.getMethod=function(){return this.method},we.prototype.getBody=function(){return this.body},we.prototype.getUrl=function(){return this.url},we.prototype.getHeaders=function(){return this.headers},xe.prototype.set=function(e,t){return this.request=this.request.set(e,t),this},xe.prototype.send=function(e){return this.request=this.request.send(_e.trimUserDetails(e)),this},xe.prototype.withCredentials=function(){return this.request=this.request.withCredentials(),this},xe.prototype.end=function(e){return this.request.end(e),new we(this.request)},Ee.prototype.setCommonConfiguration=function(e,t){if(t=t||{},this._timesToRetryFailedRequests>0&&(e=e.retry(this._timesToRetryFailedRequests)),t.noHeaders)return e;var n=this.headers;e=e.set("Content-Type","application/json");for(var r=Object.keys(this.headers),o=0;o<r.length;o++)e=e.set(r[o],n[r[o]]);return this._sendTelemetry&&(e=e.set("Auth0-Client",this.getTelemetryData())),e},Ee.prototype.getTelemetryData=function(){var e=this._universalLoginPage?"auth0.js-ulp":"auth0.js",t={name:e,version:se.raw};this._telemetryInfo&&((t=_e.extend({},this._telemetryInfo)).env=_e.extend({},this._telemetryInfo.env),t.env[e]=se.raw);var n=JSON.stringify(t);return ae(n)},Ee.prototype.get=function(e,t){return new xe(this.setCommonConfiguration(K.get(e),t))},Ee.prototype.post=function(e,t){return new xe(this.setCommonConfiguration(K.post(e),t))},Ee.prototype.patch=function(e,t){return new xe(this.setCommonConfiguration(K.patch(e),t))};var Ce={redirect:function(e){Oe().location=e},getDocument:function(){return Oe().document},getWindow:Oe,getOrigin:function(){var e=Oe().location,t=e.origin;return t||(t=_e.getOriginFromUrl(e.href)),t}};function Te(){}Te.prototype.getItem=function(){return null},Te.prototype.removeItem=function(){},Te.prototype.setItem=function(){};var Ae=i((function(e,t){var n;n=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var l=t(s[0]);if(c=(r.read||r)(c,l)||t(c),n)try{c=JSON.parse(c)}catch(e){}if(o[l]=c,e===l)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))},e.exports=n()}));function Se(){}function Pe(e){this.disableWarnings=e.disableWarnings}function ke(e){if(this.warn=new Pe({}),this.storage=new Se,!0===e.__tryLocalStorageFirst)try{var t=Ce.getWindow().localStorage;t&&(this.storage=t)}catch(e){this.warn.warning(e),this.warn.warning("Can't use localStorage. Using CookieStorage instead.")}}function je(e){this.handler=new ke(e)}function Ie(e){this.storage=new je(e)}function Ne(e,t){return{error:e,errorDescription:t}}Se.prototype.getItem=function(e){return Ae.get(e)},Se.prototype.removeItem=function(e){Ae.remove(e)},Se.prototype.setItem=function(e,t,n){var r=_e.extend({expires:1},n);"https:"===Ce.getWindow().location.protocol&&(r.secure=!0),Ae.set(e,t,r)},Pe.prototype.warning=function(e){this.disableWarnings||console.warn(e)},ke.prototype.failover=function(){this.storage instanceof Te?this.warn.warning("DummyStorage: ignore failover"):this.storage instanceof Se?(this.warn.warning("CookieStorage: failing over DummyStorage"),this.storage=new Te):(this.warn.warning("LocalStorage: failing over CookieStorage"),this.storage=new Se)},ke.prototype.getItem=function(e){try{return this.storage.getItem(e)}catch(t){return this.warn.warning(t),this.failover(),this.getItem(e)}},ke.prototype.removeItem=function(e){try{return this.storage.removeItem(e)}catch(t){return this.warn.warning(t),this.failover(),this.removeItem(e)}},ke.prototype.setItem=function(e,t,n){try{return this.storage.setItem(e,t,n)}catch(r){return this.warn.warning(r),this.failover(),this.setItem(e,t,n)}},je.prototype.getItem=function(e){var t=this.handler.getItem(e);try{return JSON.parse(t)}catch(e){return t}},je.prototype.removeItem=function(e){return this.handler.removeItem(e)},je.prototype.setItem=function(e,t,n){var r=JSON.stringify(t);return this.handler.setItem(e,r,n)},Ie.prototype.set=function(e,t){var n={lastUsedConnection:e,lastUsedSub:t};this.storage.setItem("auth0.ssodata",JSON.stringify(n))},Ie.prototype.get=function(){var e=this.storage.getItem("auth0.ssodata");if(e)return JSON.parse(e)};var Re={buildResponse:Ne,invalidToken:function(e){return Ne("invalid_token",e)}};function De(e,t){return(t=t||{}).ignoreCasing=!!t.ignoreCasing&&t.ignoreCasing,function(n,r){var o;return n||r?(!n&&r.err&&(n=r.err,r=null),!n&&r.error&&(n=r,r=null),n?(o={original:n},_e.updatePropertyOn(o,"original.response.req._data.password","*****"),n.response&&n.response.statusCode&&(o.statusCode=n.response.statusCode),n.response&&n.response.statusText&&(o.statusText=n.response.statusText),n.response&&n.response.body&&(n=n.response.body),n.err&&(n=n.err),o.code=n.code||n.error||n.error_code||n.status||null,o.description=n.errorDescription||n.error_description||n.description||n.error||n.details||n.err||null,t.forceLegacyError&&(o.error=o.code,o.error_description=o.description),n.error_codes&&n.error_details&&(o.errorDetails={codes:n.error_codes,details:n.error_details}),n.name&&(o.name=n.name),n.policy&&(o.policy=n.policy),e(o)):!r.type||"text/html"!==r.type&&"text/plain"!==r.type?t.ignoreCasing?e(null,r.body||r):e(null,_e.toCamelCase(r.body||r,[],{keepOriginal:t.keepOriginalCasing})):e(null,r.text)):e(Re.buildResponse("generic_error","Something went wrong"))}}var Le=["realm","audience","otp","client_id","client_secret","redirect_uri","scope","code","grant_type","username","password","refresh_token","assertion","client_assertion","client_assertion_type","code_verifier"],Me=["connection","connection_scope","auth0Client","owp","device","realm","organization","invitation","protocol","_csrf","_intstate","login_ticket","client_id","response_type","response_mode","redirect_uri","audience","scope","state","nonce","display","prompt","screen_hint","max_age","ui_locales","claims_locales","id_token_hint","login_hint","acr_values","claims","registration","request","request_uri","code_challenge","code_challenge_method","access_type","display"],Fe=function(e,t){return _e.pick(t,Le)},He=function(e,t){var n=_e.getKeysNotIn(t,Me);return n.length>0&&e.warning("Following parameters are not allowed on the `/authorize` endpoint: ["+n.join(",")+"]"),t},Ue="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function ze(e){var t={exports:{}};return e(t,t.exports),t.exports}var Be=ze((function(e,t){e.exports=function(){function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,o=void 0,i=void 0,a=function(e,t){d[n]=e,d[n+1]=t,2===(n+=2)&&(i?i(h):b())},s="undefined"!=typeof window?window:void 0,c=s||{},l=c.MutationObserver||c.WebKitMutationObserver,u="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(h,1)}}var d=new Array(1e3);function h(){for(var e=0;e<n;e+=2)(0,d[e])(d[e+1]),d[e]=void 0,d[e+1]=void 0;n=0}var v,g,m,y,b=void 0;function _(e,t){var n=this,r=new this.constructor(E);void 0===r[x]&&R(r);var o=n._state;if(o){var i=arguments[o-1];a((function(){return I(o,r,i,n._result)}))}else k(n,r,e,t);return r}function w(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(E);return T(t,e),t}b=u?function(){return r.nextTick(h)}:l?(g=0,m=new l(h),y=document.createTextNode(""),m.observe(y,{characterData:!0}),function(){y.data=g=++g%2}):p?((v=new MessageChannel).port1.onmessage=h,function(){return v.port2.postMessage(0)}):void 0===s?function(){try{var e=Function("return this")().require("vertx");return void 0!==(o=e.runOnLoop||e.runOnContext)?function(){o(h)}:f()}catch(e){return f()}}():f();var x=Math.random().toString(36).substring(2);function E(){}var O=void 0;function C(t,n,r){n.constructor===t.constructor&&r===_&&n.constructor.resolve===w?function(e,t){1===t._state?S(e,t._result):2===t._state?P(e,t._result):k(t,void 0,(function(t){return T(e,t)}),(function(t){return P(e,t)}))}(t,n):void 0===r?S(t,n):e(r)?function(e,t,n){a((function(e){var r=!1,o=function(n,o,i,a){try{n.call(o,(function(n){r||(r=!0,t!==n?T(e,n):S(e,n))}),(function(t){r||(r=!0,P(e,t))}))}catch(e){return e}}(n,t);!r&&o&&(r=!0,P(e,o))}),e)}(t,n,r):S(t,n)}function T(e,t){if(e===t)P(e,new TypeError("You cannot resolve a promise with itself"));else if(o=typeof(r=t),null===r||"object"!==o&&"function"!==o)S(e,t);else{var n=void 0;try{n=t.then}catch(t){return void P(e,t)}C(e,t,n)}var r,o}function A(e){e._onerror&&e._onerror(e._result),j(e)}function S(e,t){e._state===O&&(e._result=t,e._state=1,0!==e._subscribers.length&&a(j,e))}function P(e,t){e._state===O&&(e._state=2,e._result=t,a(A,e))}function k(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=n,o[i+2]=r,0===i&&e._state&&a(j,e)}function j(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)o=t[a+n],(r=t[a])?I(n,r,o,i):o(i);e._subscribers.length=0}}function I(t,n,r,o){var i=e(r),a=void 0,s=void 0,c=!0;if(i){try{a=r(o)}catch(t){c=!1,s=t}if(n===a)return void P(n,new TypeError("A promises callback cannot return that same promise."))}else a=o;n._state!==O||(i&&c?T(n,a):!1===c?P(n,s):1===t?S(n,a):2===t&&P(n,a))}var N=0;function R(e){e[x]=N++,e._state=void 0,e._result=void 0,e._subscribers=[]}var D=function(){function e(e,n){this._instanceConstructor=e,this.promise=new e(E),this.promise[x]||R(this.promise),t(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&S(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===O&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===w){var o=void 0,i=void 0,a=!1;try{o=e.then}catch(e){a=!0,i=e}if(o===_&&e._state!==O)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===L){var s=new n(E);a?P(s,i):C(s,e,o),this._willSettleAt(s,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===O&&(this._remaining--,2===e?P(r,n):this._result[t]=n),0===this._remaining&&S(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;k(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},e}(),L=function(){function t(e){this[x]=N++,this._result=this._state=void 0,this._subscribers=[],E!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){T(e,t)}),(function(t){P(e,t)}))}catch(t){P(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var n=this,r=n.constructor;return e(t)?n.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):n.then(t,t)},t}();return L.prototype.then=_,L.all=function(e){return new D(this,e).promise},L.race=function(e){var n=this;return t(e)?new n((function(t,r){for(var o=e.length,i=0;i<o;i++)n.resolve(e[i]).then(t,r)})):new n((function(e,t){return t(new TypeError("You must pass an array to race."))}))},L.resolve=w,L.reject=function(e){var t=new this(E);return P(t,e),t},L._setScheduler=function(e){i=e},L._setAsap=function(e){a=e},L._asap=a,L.polyfill=function(){var e=void 0;if(void 0!==Ue)e=Ue;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=L},L.Promise=L,L}()})),Ve=ze((function(e,t){var n;e.exports=n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},o=r.lib={},i=o.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=o.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,o=e.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++)t[r+i>>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else for(i=0;i<o;i+=4)t[r+i>>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],o=function(t){t=t;var n=987654321,r=4294967295;return function(){var o=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return o/=4294967296,(o+=.5)*(e.random()>.5?1:-1)}},i=0;i<t;i+=4){var s=o(4294967296*(n||e.random()));n=987654071*s(),r.push(4294967296*s()|0)}return new a.init(r,t)}}),s=r.enc={},c=s.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},l=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++)r.push(String.fromCharCode(t[o>>>2]>>>24-o%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},u=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},p=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,s=o/(4*i),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,l=e.min(4*c,o);if(c){for(var u=0;u<c;u+=i)this._doProcessBlock(r,u);var p=r.splice(0,c);n.sigBytes-=l}return new a.init(p,l)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});o.Hasher=p.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new f.HMAC.init(e,n).finalize(t)}}});var f=r.algo={};return r}(Math)})),qe=ze((function(e,t){var n;e.exports=(n=Ve,function(e){var t=n,r=t.lib,o=r.WordArray,i=r.Hasher,a=t.algo,s=[],c=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,o=0;o<64;)t(r)&&(o<8&&(s[o]=n(e.pow(r,.5))),c[o]=n(e.pow(r,1/3)),o++),r++}();var l=[],u=a.SHA256=i.extend({_doReset:function(){this._hash=new o.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],u=n[5],p=n[6],f=n[7],d=0;d<64;d++){if(d<16)l[d]=0|e[t+d];else{var h=l[d-15],v=l[d-2];l[d]=((h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3)+l[d-7]+((v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10)+l[d-16]}var g=r&o^r&i^o&i,m=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&p)+c[d]+l[d];f=p,p=u,u=s,s=a+m|0,a=i,i=o,o=r,r=m+(((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+g)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+p|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=e.floor(r/4294967296),n[15+(o+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(u),t.HmacSHA256=i._createHmacHelper(u)}(Math),n.SHA256)})),Ge=ze((function(e,t){var n,r;e.exports=(r=(n=Ve).lib.WordArray,n.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var o=[],i=0;i<n;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<n;s++)o.push(r.charAt(a>>>6*(3-s)&63));var c=r.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,n=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<n.length;i++)o[n.charCodeAt(i)]=i}var a=n.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return function(e,t,n){for(var o=[],i=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2,c=n[e.charCodeAt(a)]>>>6-a%4*2;o[i>>>2]|=(s|c)<<24-i%4*8,i++}return r.create(o,i)}(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)})),We=ze((function(e,t){e.exports=Ve.enc.Hex})),Ye=ze((function(e,t){(function(){var t;function n(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):this.fromString(e,null==t&&"string"!=typeof e?256:t))}function r(){return new n(null)}var o="undefined"!=typeof navigator;o&&"Microsoft Internet Explorer"==navigator.appName?(n.prototype.am=function(e,t,n,r,o,i){for(var a=32767&t,s=t>>15;--i>=0;){var c=32767&this[e],l=this[e++]>>15,u=s*c+l*a;o=((c=a*c+((32767&u)<<15)+n[r]+(1073741823&o))>>>30)+(u>>>15)+s*l+(o>>>30),n[r++]=1073741823&c}return o},t=30):o&&"Netscape"!=navigator.appName?(n.prototype.am=function(e,t,n,r,o,i){for(;--i>=0;){var a=t*this[e++]+n[r]+o;o=Math.floor(a/67108864),n[r++]=67108863&a}return o},t=26):(n.prototype.am=function(e,t,n,r,o,i){for(var a=16383&t,s=t>>14;--i>=0;){var c=16383&this[e],l=this[e++]>>14,u=s*c+l*a;o=((c=a*c+((16383&u)<<14)+n[r]+o)>>28)+(u>>14)+s*l,n[r++]=268435455&c}return o},t=28),n.prototype.DB=t,n.prototype.DM=(1<<t)-1,n.prototype.DV=1<<t,n.prototype.FV=Math.pow(2,52),n.prototype.F1=52-t,n.prototype.F2=2*t-52;var i,a,s=new Array;for(i="0".charCodeAt(0),a=0;a<=9;++a)s[i++]=a;for(i="a".charCodeAt(0),a=10;a<36;++a)s[i++]=a;for(i="A".charCodeAt(0),a=10;a<36;++a)s[i++]=a;function c(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function l(e,t){var n=s[e.charCodeAt(t)];return null==n?-1:n}function u(e){var t=r();return t.fromInt(e),t}function p(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function f(e){this.m=e}function d(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function h(e,t){return e&t}function v(e,t){return e|t}function g(e,t){return e^t}function m(e,t){return e&~t}function y(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function b(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function _(){}function w(e){return e}function x(e){this.r2=r(),this.q3=r(),n.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}f.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},f.prototype.revert=function(e){return e},f.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},f.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},f.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},d.prototype.convert=function(e){var t=r();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(n.ZERO)>0&&this.m.subTo(t,t),t},d.prototype.revert=function(e){var t=r();return e.copyTo(t),this.reduce(t),t},d.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},d.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},d.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},n.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},n.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},n.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var o=e.length,i=!1,a=0;--o>=0;){var s=8==r?255&e[o]:l(e,o);s<0?"-"==e.charAt(o)&&(i=!0):(i=!1,0==a?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,(a+=r)>=this.DB&&(a-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),i&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},n.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},n.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},n.prototype.lShiftTo=function(e,t){var n,r=e%this.DB,o=this.DB-r,i=(1<<o)-1,a=Math.floor(e/this.DB),s=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)t[n+a+1]=this[n]>>o|s,s=(this[n]&i)<<r;for(n=a-1;n>=0;--n)t[n]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},n.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,o=this.DB-r,i=(1<<r)-1;t[0]=this[n]>>r;for(var a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&i)<<o,t[a-n]=this[a]>>r;r>0&&(t[this.t-n-1]|=(this.s&i)<<o),t.t=this.t-n,t.clamp()}},n.prototype.subTo=function(e,t){for(var n=0,r=0,o=Math.min(e.t,this.t);n<o;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},n.prototype.multiplyTo=function(e,t){var r=this.abs(),o=e.abs(),i=r.t;for(t.t=i+o.t;--i>=0;)t[i]=0;for(i=0;i<o.t;++i)t[i+r.t]=r.am(0,o[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&n.ZERO.subTo(t,t)},n.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},n.prototype.divRemTo=function(e,t,o){var i=e.abs();if(!(i.t<=0)){var a=this.abs();if(a.t<i.t)return null!=t&&t.fromInt(0),void(null!=o&&this.copyTo(o));null==o&&(o=r());var s=r(),c=this.s,l=e.s,u=this.DB-p(i[i.t-1]);u>0?(i.lShiftTo(u,s),a.lShiftTo(u,o)):(i.copyTo(s),a.copyTo(o));var f=s.t,d=s[f-1];if(0!=d){var h=d*(1<<this.F1)+(f>1?s[f-2]>>this.F2:0),v=this.FV/h,g=(1<<this.F1)/h,m=1<<this.F2,y=o.t,b=y-f,_=null==t?r():t;for(s.dlShiftTo(b,_),o.compareTo(_)>=0&&(o[o.t++]=1,o.subTo(_,o)),n.ONE.dlShiftTo(f,_),_.subTo(s,s);s.t<f;)s[s.t++]=0;for(;--b>=0;){var w=o[--y]==d?this.DM:Math.floor(o[y]*v+(o[y-1]+m)*g);if((o[y]+=s.am(0,w,o,b,0,f))<w)for(s.dlShiftTo(b,_),o.subTo(_,o);o[y]<--w;)o.subTo(_,o)}null!=t&&(o.drShiftTo(f,t),c!=l&&n.ZERO.subTo(t,t)),o.t=f,o.clamp(),u>0&&o.rShiftTo(u,o),c<0&&n.ZERO.subTo(o,o)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},n.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},n.prototype.exp=function(e,t){if(e>4294967295||e<1)return n.ONE;var o=r(),i=r(),a=t.convert(this),s=p(e)-1;for(a.copyTo(o);--s>=0;)if(t.sqrTo(o,i),(e&1<<s)>0)t.mulTo(i,a,o);else{var c=o;o=i,i=c}return t.revert(o)},n.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<<t)-1,o=!1,i="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(n=this[a]>>s)>0&&(o=!0,i=c(n));a>=0;)s<t?(n=(this[a]&(1<<s)-1)<<t-s,n|=this[--a]>>(s+=this.DB-t)):(n=this[a]>>(s-=t)&r,s<=0&&(s+=this.DB,--a)),n>0&&(o=!0),o&&(i+=c(n));return o?i:"0"},n.prototype.negate=function(){var e=r();return n.ZERO.subTo(this,e),e},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(e){var t=r();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(n.ZERO)>0&&e.subTo(t,t),t},n.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new f(t):new d(t),this.exp(e,n)},n.ZERO=u(0),n.ONE=u(1),_.prototype.convert=w,_.prototype.revert=w,_.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},_.prototype.sqrTo=function(e,t){e.squareTo(t)},x.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=r();return e.copyTo(t),this.reduce(t),t},x.prototype.revert=function(e){return e},x.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},x.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},x.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var E,O,C,T=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],A=(1<<26)/T[T.length-1];function S(){var e;e=(new Date).getTime(),O[C++]^=255&e,O[C++]^=e>>8&255,O[C++]^=e>>16&255,O[C++]^=e>>24&255,C>=D&&(C-=D)}if(n.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},n.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),o=u(n),i=r(),a=r(),s="";for(this.divRemTo(o,i,a);i.signum()>0;)s=(n+a.intValue()).toString(e).substr(1)+s,i.divRemTo(o,i,a);return a.intValue().toString(e)+s},n.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),o=Math.pow(t,r),i=!1,a=0,s=0,c=0;c<e.length;++c){var u=l(e,c);u<0?"-"==e.charAt(c)&&0==this.signum()&&(i=!0):(s=t*s+u,++a>=r&&(this.dMultiply(o),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(s,0)),i&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(n.ONE.shiftLeft(e-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(n.ONE.shiftLeft(e-1),this);else{var o=new Array,i=7&e;o.length=1+(e>>3),t.nextBytes(o),i>0?o[0]&=(1<<i)-1:o[0]=0,this.fromString(o,256)}},n.prototype.bitwiseTo=function(e,t,n){var r,o,i=Math.min(e.t,this.t);for(r=0;r<i;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(o=e.s&this.DM,r=i;r<this.t;++r)n[r]=t(this[r],o);n.t=this.t}else{for(o=this.s&this.DM,r=i;r<e.t;++r)n[r]=t(o,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},n.prototype.changeBit=function(e,t){var r=n.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},n.prototype.addTo=function(e,t){for(var n=0,r=0,o=Math.min(e.t,this.t);n<o;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},n.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},n.prototype.multiplyLowerTo=function(e,t,n){var r,o=Math.min(this.t+e.t,t);for(n.s=0,n.t=o;o>0;)n[--o]=0;for(r=n.t-this.t;o<r;++o)n[o+this.t]=this.am(0,e[o],n,o,0,this.t);for(r=Math.min(e.t,t);o<r;++o)this.am(0,e[o],n,o,0,t-o);n.clamp()},n.prototype.multiplyUpperTo=function(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},n.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},n.prototype.millerRabin=function(e){var t=this.subtract(n.ONE),o=t.getLowestSetBit();if(o<=0)return!1;var i=t.shiftRight(o);(e=e+1>>1)>T.length&&(e=T.length);for(var a=r(),s=0;s<e;++s){a.fromInt(T[Math.floor(Math.random()*T.length)]);var c=a.modPow(i,this);if(0!=c.compareTo(n.ONE)&&0!=c.compareTo(t)){for(var l=1;l++<o&&0!=c.compareTo(t);)if(0==(c=c.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=c.compareTo(t))return!1}}return!0},n.prototype.clone=function(){var e=r();return this.copyTo(e),e},n.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},n.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},n.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},n.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var n,r=this.DB-e*this.DB%8,o=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[o++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==o&&(128&this.s)!=(128&n)&&++o,(o>0||n!=this.s)&&(t[o++]=n);return t},n.prototype.equals=function(e){return 0==this.compareTo(e)},n.prototype.min=function(e){return this.compareTo(e)<0?this:e},n.prototype.max=function(e){return this.compareTo(e)>0?this:e},n.prototype.and=function(e){var t=r();return this.bitwiseTo(e,h,t),t},n.prototype.or=function(e){var t=r();return this.bitwiseTo(e,v,t),t},n.prototype.xor=function(e){var t=r();return this.bitwiseTo(e,g,t),t},n.prototype.andNot=function(e){var t=r();return this.bitwiseTo(e,m,t),t},n.prototype.not=function(){for(var e=r(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},n.prototype.shiftLeft=function(e){var t=r();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},n.prototype.shiftRight=function(e){var t=r();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},n.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+y(this[e]);return this.s<0?this.t*this.DB:-1},n.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=b(this[n]^t);return e},n.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},n.prototype.setBit=function(e){return this.changeBit(e,v)},n.prototype.clearBit=function(e){return this.changeBit(e,m)},n.prototype.flipBit=function(e){return this.changeBit(e,g)},n.prototype.add=function(e){var t=r();return this.addTo(e,t),t},n.prototype.subtract=function(e){var t=r();return this.subTo(e,t),t},n.prototype.multiply=function(e){var t=r();return this.multiplyTo(e,t),t},n.prototype.divide=function(e){var t=r();return this.divRemTo(e,t,null),t},n.prototype.remainder=function(e){var t=r();return this.divRemTo(e,null,t),t},n.prototype.divideAndRemainder=function(e){var t=r(),n=r();return this.divRemTo(e,t,n),new Array(t,n)},n.prototype.modPow=function(e,t){var n,o,i=e.bitLength(),a=u(1);if(i<=0)return a;n=i<18?1:i<48?3:i<144?4:i<768?5:6,o=i<8?new f(t):t.isEven()?new x(t):new d(t);var s=new Array,c=3,l=n-1,h=(1<<n)-1;if(s[1]=o.convert(this),n>1){var v=r();for(o.sqrTo(s[1],v);c<=h;)s[c]=r(),o.mulTo(v,s[c-2],s[c]),c+=2}var g,m,y=e.t-1,b=!0,_=r();for(i=p(e[y])-1;y>=0;){for(i>=l?g=e[y]>>i-l&h:(g=(e[y]&(1<<i+1)-1)<<l-i,y>0&&(g|=e[y-1]>>this.DB+i-l)),c=n;0==(1&g);)g>>=1,--c;if((i-=c)<0&&(i+=this.DB,--y),b)s[g].copyTo(a),b=!1;else{for(;c>1;)o.sqrTo(a,_),o.sqrTo(_,a),c-=2;c>0?o.sqrTo(a,_):(m=a,a=_,_=m),o.mulTo(_,s[g],a)}for(;y>=0&&0==(e[y]&1<<i);)o.sqrTo(a,_),m=a,a=_,_=m,--i<0&&(i=this.DB-1,--y)}return o.revert(a)},n.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return n.ZERO;for(var r=e.clone(),o=this.clone(),i=u(1),a=u(0),s=u(0),c=u(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(i.isEven()&&a.isEven()||(i.addTo(this,i),a.subTo(e,a)),i.rShiftTo(1,i)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;o.isEven();)o.rShiftTo(1,o),t?(s.isEven()&&c.isEven()||(s.addTo(this,s),c.subTo(e,c)),s.rShiftTo(1,s)):c.isEven()||c.subTo(e,c),c.rShiftTo(1,c);r.compareTo(o)>=0?(r.subTo(o,r),t&&i.subTo(s,i),a.subTo(c,a)):(o.subTo(r,o),t&&s.subTo(i,s),c.subTo(a,c))}return 0!=o.compareTo(n.ONE)?n.ZERO:c.compareTo(e)>=0?c.subtract(e):c.signum()<0?(c.addTo(e,c),c.signum()<0?c.add(e):c):c},n.prototype.pow=function(e){return this.exp(e,new _)},n.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var o=t.getLowestSetBit(),i=n.getLowestSetBit();if(i<0)return t;for(o<i&&(i=o),i>0&&(t.rShiftTo(i,t),n.rShiftTo(i,n));t.signum()>0;)(o=t.getLowestSetBit())>0&&t.rShiftTo(o,t),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return i>0&&n.lShiftTo(i,n),n},n.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=T[T.length-1]){for(t=0;t<T.length;++t)if(n[0]==T[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<T.length;){for(var r=T[t],o=t+1;o<T.length&&r<A;)r*=T[o++];for(r=n.modInt(r);t<o;)if(r%T[t++]==0)return!1}return n.millerRabin(e)},n.prototype.square=function(){var e=r();return this.squareTo(e),e},n.prototype.Barrett=x,null==O){var P;if(O=new Array,C=0,"undefined"!=typeof window&&window.crypto)if(window.crypto.getRandomValues){var k=new Uint8Array(32);for(window.crypto.getRandomValues(k),P=0;P<32;++P)O[C++]=k[P]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var j=window.crypto.random(32);for(P=0;P<j.length;++P)O[C++]=255&j.charCodeAt(P)}for(;C<D;)P=Math.floor(65536*Math.random()),O[C++]=P>>>8,O[C++]=255&P;C=0,S()}function I(){if(null==E){for(S(),(E=new R).init(O),C=0;C<O.length;++C)O[C]=0;C=0}return E.next()}function N(){}function R(){this.i=0,this.j=0,this.S=new Array}N.prototype.nextBytes=function(e){var t;for(t=0;t<e.length;++t)e[t]=I()},R.prototype.init=function(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)r=this.S[t],this.S[t]=this.S[n=n+this.S[t]+e[t%e.length]&255],this.S[n]=r;this.i=0,this.j=0},R.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]};var D=256;e.exports={default:n,BigInteger:n,SecureRandom:N}}).call(Ue)})),Xe={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},$e={sha256:qe};function Je(e,t){if(this.n=null,this.e=0,!(null!=e&&null!=t&&e.length>0&&t.length>0))throw new Error("Invalid key data");this.n=new Ye.BigInteger(e,16),this.e=parseInt(t,16)}Je.prototype.verify=function(e,t){t=t.replace(/[^0-9a-f]|[\s\n]]/gi,"");var n=new Ye.BigInteger(t,16);if(n.bitLength()>this.n.bitLength())throw new Error("Signature does not match with the key modulus.");var r=function(e){for(var t in Xe){var n=Xe[t],r=n.length;if(e.substring(0,r)===n)return{alg:t,hash:e.substring(r)}}return[]}(n.modPowInt(this.e,this.n).toString(16).replace(/^1f+00/,""));if(0===r.length)return!1;if(!$e.hasOwnProperty(r.alg))throw new Error("Hashing algorithm is not supported.");var o=$e[r.alg](e).toString();return r.hash===o};for(var Ke=[],Qe=[],Ze="undefined"!=typeof Uint8Array?Uint8Array:Array,et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tt=0,nt=et.length;tt<nt;++tt)Ke[tt]=et[tt],Qe[et.charCodeAt(tt)]=tt;Qe["-".charCodeAt(0)]=62,Qe["_".charCodeAt(0)]=63;var rt=function(e){var t,n,r=function(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}(e),o=r[0],i=r[1],a=new Ze(function(e,t,n){return 3*(t+n)/4-n}(0,o,i)),s=0,c=i>0?o-4:o;for(n=0;n<c;n+=4)t=Qe[e.charCodeAt(n)]<<18|Qe[e.charCodeAt(n+1)]<<12|Qe[e.charCodeAt(n+2)]<<6|Qe[e.charCodeAt(n+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;return 2===i&&(t=Qe[e.charCodeAt(n)]<<2|Qe[e.charCodeAt(n+1)]>>4,a[s++]=255&t),1===i&&(t=Qe[e.charCodeAt(n)]<<10|Qe[e.charCodeAt(n+1)]<<4|Qe[e.charCodeAt(n+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t),a};function ot(e){var t=e.length%4;return 0===t?e:e+new Array(4-t+1).join("=")}function it(e){return e=ot(e).replace(/\-/g,"+").replace(/_/g,"/"),decodeURIComponent(function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}(rt(e)).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}function at(e){return function(e){for(var t="",n=0;n<e.length;n++){var r=e[n].toString(16);t+=2===r.length?r:"0"+r}return t}(rt(ot(e)))}var st=ze((function(e){var t,n;t=Ue,n=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0]=e[0].match(/^file:\/\/\//)?e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<e.length;r++){var o=e[r];if("string"!=typeof o)throw new TypeError("Url must be a string. Received "+o);""!==o&&(r>0&&(o=o.replace(/^[\/]+/,"")),o=o.replace(/[\/]+$/,r<e.length-1?"":"/"),t.push(o))}var i=t.join("/"),a=(i=i.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a.shift()+(a.length>0?"?":"")+a.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=n():t.urljoin=n()}));function ct(e,t){return t=t||{},new Promise((function(n,r){var o=new XMLHttpRequest,i=[],a=[],s={},c=function(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(JSON.parse(o.responseText))},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:c,headers:{keys:function(){return i},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var l in o.open(t.method||"get",e,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){i.push(t=t.toLowerCase()),a.push([t,n]),s[t]=s[t]?s[t]+","+n:n})),n(c())},o.onerror=r,o.withCredentials="include"==t.credentials,t.headers)o.setRequestHeader(l,t.headers[l]);o.send(t.body||null)}))}function lt(e){if(e.ok)return e.json();var t=new Error(e.statusText);return t.response=e,Promise.reject(t)}function ut(e){this.name="ConfigurationError",this.message=e||""}function pt(e){this.name="TokenValidationError",this.message=e||""}ut.prototype=Error.prototype,pt.prototype=Error.prototype;var ft=function(){function e(){}var t=e.prototype;return t.get=function(){return null},t.has=function(){return null},t.set=function(){return null},e}();Be.polyfill();var dt=function(e){return"number"==typeof e},ht=function(){return new Date};function vt(e){var t=e||{};if(this.jwksCache=t.jwksCache||new ft,this.expectedAlg=t.expectedAlg||"RS256",this.issuer=t.issuer,this.audience=t.audience,this.leeway=0===t.leeway?0:t.leeway||60,this.jwksURI=t.jwksURI,this.maxAge=t.maxAge,this.__clock="function"==typeof t.__clock?t.__clock:ht,this.leeway<0||this.leeway>300)throw new ut("The leeway should be positive and lower than five minutes.");if("RS256"!==this.expectedAlg)throw new ut('Signature algorithm of "'+this.expectedAlg+'" is not supported. Expected the ID token to be signed with "RS256".')}function gt(e,t){this.plugins=t;for(var n=0;n<this.plugins.length;n++){if(this.plugins[n].version!==se.raw){var r="";throw this.plugins[n].constructor&&this.plugins[n].constructor.name&&(r=this.plugins[n].constructor.name),new Error("Plugin "+r+" version ("+this.plugins[n].version+") is not compatible with the SDK version ("+se.raw+")")}this.plugins[n].setWebAuth(e)}}vt.prototype.verify=function(e,t,n){if(!n&&t&&"function"==typeof t&&(n=t,t=void 0),!e)return n(new pt("ID token is required but missing"),null);var r=this.decode(e);if(r instanceof Error)return n(new pt("ID token could not be decoded"),null);var o=r.encoded.header+"."+r.encoded.payload,i=at(r.encoded.signature),a=r.header.alg,s=r.header.kid,c=r.payload.aud,l=r.payload.sub,u=r.payload.iss,p=r.payload.exp,f=r.payload.nbf,d=r.payload.iat,h=r.payload.azp,v=r.payload.auth_time,g=r.payload.nonce,m=this.__clock(),y=this;if(y.expectedAlg!==a)return n(new pt('Signature algorithm of "'+a+'" is not supported. Expected the ID token to be signed with "RS256".'),null);this.getRsaVerifier(u,s,(function(e,a){if(e)return n(e,null);if(!a.verify(o,i))return n(new pt("Invalid ID token signature."),null);if(!u||"string"!=typeof u)return n(new pt("Issuer (iss) claim must be a string present in the ID token"),null);if(y.issuer!==u)return n(new pt('Issuer (iss) claim mismatch in the ID token, expected "'+y.issuer+'", found "'+u+'"'),null);if(!l||"string"!=typeof l)return n(new pt("Subject (sub) claim must be a string present in the ID token"),null);if(!c||"string"!=typeof c&&!Array.isArray(c))return n(new pt("Audience (aud) claim must be a string or array of strings present in the ID token"),null);if(Array.isArray(c)&&!c.includes(y.audience))return n(new pt('Audience (aud) claim mismatch in the ID token; expected "'+y.audience+'" but was not one of "'+c.join(", ")+'"'),null);if("string"==typeof c&&y.audience!==c)return n(new pt('Audience (aud) claim mismatch in the ID token; expected "'+y.audience+'" but found "'+c+'"'),null);if(t){if(!g||"string"!=typeof g)return n(new pt("Nonce (nonce) claim must be a string present in the ID token"),null);if(g!==t)return n(new pt('Nonce (nonce) claim value mismatch in the ID token; expected "'+t+'", found "'+g+'"'),null)}if(Array.isArray(c)&&c.length>1){if(!h||"string"!=typeof h)return n(new pt("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values"),null);if(h!==y.audience)return n(new pt('Authorized Party (azp) claim mismatch in the ID token; expected "'+y.audience+'", found "'+h+'"'),null)}if(!p||!dt(p))return n(new pt("Expiration Time (exp) claim must be a number present in the ID token"),null);if(!d||!dt(d))return n(new pt("Issued At (iat) claim must be a number present in the ID token"),null);var s=p+y.leeway,b=new Date(0);if(b.setUTCSeconds(s),m>b)return n(new pt('Expiration Time (exp) claim error in the ID token; current time "'+m+'" is after expiration time "'+b+'"'),null);if(f&&dt(f)){var _=f-y.leeway,w=new Date(0);if(w.setUTCSeconds(_),m<w)return n(new pt('Not Before Time (nbf) claim error in the ID token; current time "'+m+'" is before the not before time "'+w+'"'),null)}if(y.maxAge){if(!v||!dt(v))return n(new pt("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified"),null);var x=v+y.maxAge+y.leeway,E=new Date(0);if(E.setUTCSeconds(x),m>E)return n(new pt('Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time "'+m+'" is after last auth time at "'+E+'"'),null)}return n(null,r.payload)}))},vt.prototype.getRsaVerifier=function(e,t,n){var r=this,o=e+t;Promise.resolve(this.jwksCache.has(o)).then((function(n){return n?r.jwksCache.get(o):(i={jwksURI:r.jwksURI,iss:e,kid:t},("undefined"==typeof fetch?ct:fetch)(i.jwksURI||st(i.iss,".well-known","jwks.json")).then(lt).then((function(e){var t,n,r,o=null;for(t=0;t<e.keys.length&&null===o;t++)(n=e.keys[t]).kid===i.kid&&(o=n);if(!o)throw new Error('Could not find a public key for Key ID (kid) "'+i.kid+'"');return{modulus:at((r=o).n),exp:at(r.e)}})).catch((function(e){throw e})));var i})).then((function(e){if(!e||!e.modulus||!e.exp)throw new Error("Empty keyInfo in response");return Promise.resolve(r.jwksCache.set(o,e)).then((function(){n&&n(null,new Je(e.modulus,e.exp))}))})).catch((function(e){n&&n(e)}))},vt.prototype.decode=function(e){var t,n,r=e.split(".");if(3!==r.length)return new pt("Cannot decode a malformed JWT");try{t=JSON.parse(it(r[0])),n=JSON.parse(it(r[1]))}catch(e){return new pt("Token header or payload is not valid JSON")}return{header:t,payload:n,encoded:{header:r[0],payload:r[1],signature:r[2]}}},vt.prototype.validateAccessToken=function(e,t,n,r){if(this.expectedAlg!==t)return r(new pt('Signature algorithm of "'+t+'" is not supported. Expected "'+this.expectedAlg+'"'));var o,i=qe(e),a=We.stringify(i),s=a.substring(0,a.length/2),c=We.parse(s),l=Ge.stringify(c);return r((o={"+":"-","/":"_","=":""},l.replace(/[+/=]/g,(function(e){return o[e]}))!==n?new pt("Invalid access_token"):null))},gt.prototype.get=function(e){for(var t=0;t<this.plugins.length;t++)if(this.plugins[t].supports(e))return this.plugins[t].init();return null};var mt=function(e){var t=new Uint8Array(e),n=[],r="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~",o=Ce.getWindow().crypto||Ce.getWindow().msCrypto;if(!o)return null;for(var i=o.getRandomValues(t),a=0;a<i.length;a++)n.push(r[i[a]%r.length]);return n.join("")};function yt(e){var t=e.transaction||{};this.namespace=t.namespace||"com.auth0.auth.",this.keyLength=t.keyLength||32,this.storage=new je(e),this.options=e}function bt(e){if(this.url=e.url,this.callback=e.callback,this.timeout=e.timeout||6e4,this.timeoutCallback=e.timeoutCallback||null,this.eventListenerType=e.eventListenerType||"message",this.iframe=null,this.timeoutHandle=null,this._destroyTimeout=null,this.transientMessageEventListener=null,this.proxyEventListener=null,this.eventValidator=e.eventValidator||{isValid:function(){return!0}},"function"!=typeof this.callback)throw new Error("options.callback must be a function")}function _t(e){this.webAuth=e,this.warn=new Pe(e.baseOptions)}function wt(e,t){this.webAuth=e,this.baseOptions=t,this.request=new Ee(t),this.webMessageHandler=new _t(e),this.storage=new je(t)}function xt(e,t){return["co/verifier",encodeURIComponent(e),encodeURIComponent(t)].join("/")}function Et(e,t){this.webAuth=e,this.baseOptions=t,this.crossOriginAuthentication=new wt(e,this.baseOptions),this.warn=new Pe({disableWarnings:!!t._disableDeprecationWarnings})}yt.prototype.process=function(e){if(!e.responseType)throw new Error("responseType is required");var t=e.realm||e.connection,n=-1!==e.responseType.indexOf("id_token"),r=this.generateTransaction(e.appState,e.state,e.nonce,t,n,e.organization);return e.state||(e.state=r.state),n&&!e.nonce&&(e.nonce=r.nonce),e},yt.prototype.generateTransaction=function(e,t,n,r,o,i){if(t=t||mt(this.keyLength),n=n||(o?mt(this.keyLength):null),Ce.getWindow().location.host!==this.options.domain){var a={nonce:n,appState:e,state:t,lastUsedConnection:r};i&&(a.organization=i),this.storage.setItem(this.namespace+t,a,{expires:1/48})}return{state:t,nonce:n}},yt.prototype.getStoredTransaction=function(e){var t;return t=this.storage.getItem(this.namespace+e),this.clearTransaction(e),t},yt.prototype.clearTransaction=function(e){this.storage.removeItem(this.namespace+e)},bt.prototype.init=function(){var e=this,t=Ce.getWindow();switch(this.iframe=t.document.createElement("iframe"),this.iframe.style.display="none",this.proxyEventListener=function(t){e.eventListener(t)},this.eventListenerType){case"message":this.eventSourceObject=t;break;case"load":this.eventSourceObject=this.iframe;break;default:throw new Error("Unsupported event listener type: "+this.eventListenerType)}this.eventSourceObject.addEventListener(this.eventListenerType,this.proxyEventListener,!1),t.document.body.appendChild(this.iframe),this.iframe.src=this.url,this.timeoutHandle=setTimeout((function(){e.timeoutHandler()}),this.timeout)},bt.prototype.eventListener=function(e){var t={event:e,sourceObject:this.eventSourceObject};this.eventValidator.isValid(t)&&(this.destroy(),this.callback(t))},bt.prototype.timeoutHandler=function(){this.destroy(),this.timeoutCallback&&this.timeoutCallback()},bt.prototype.destroy=function(){var e=this;clearTimeout(this.timeoutHandle),this._destroyTimeout=setTimeout((function(){e.eventSourceObject.removeEventListener(e.eventListenerType,e.proxyEventListener,!1),e.iframe.parentNode&&e.iframe.parentNode.removeChild(e.iframe)}),0)},_t.prototype.run=function(e,t){var n=this;e.responseMode="web_message",e.prompt="none";var r=Ce.getOrigin(),o=_e.getOriginFromUrl(e.redirectUri);if(o&&r!==o)return t({error:"origin_mismatch",error_description:"The redirectUri's origin ("+o+") should match the window's origin ("+r+")."});!function(e,t,n){new bt({url:e,eventListenerType:"message",callback:function(e){n(null,e)},timeout:t.timeout,eventValidator:{isValid:function(e){return"authorization_response"===e.event.data.type&&t.state===e.event.data.response.state}},timeoutCallback:function(){n({error:"timeout",error_description:"Timeout during executing web_message communication",state:t.state})}}).init()}(this.webAuth.client.buildAuthorizeUrl(e),e,(function(r,o){var i=r;if(!r&&o.event.data.response.error&&(i=o.event.data.response),!i){var a=o.event.data.response;return n.webAuth.validateAuthenticationResponse(e,a,t)}return"consent_required"===i.error&&"localhost"===Ce.getWindow().location.hostname&&n.warn.warning("Consent Required. Consent can't be skipped on localhost. Read more here: https://auth0.com/docs/api-auth/user-consent#skipping-consent-for-first-party-clients"),n.webAuth.transactionManager.clearTransaction(i.state),t(_e.pick(i,["error","error_description"]))}))},wt.prototype.login=function(e,t){var n=this,r=a(this.baseOptions.rootUrl,"/co/authenticate");e.username=e.username||e.email,delete e.email;var o={client_id:e.clientID||this.baseOptions.clientID,username:e.username};e.password&&(o.password=e.password),e.otp&&(o.otp=e.otp);var i=e.realm||this.baseOptions.realm;if(i){var s=e.credentialType||this.baseOptions.credentialType||"http://auth0.com/oauth/grant-type/password-realm";o.realm=i,o.credential_type=s}else o.credential_type="password";this.request.post(r).withCredentials().send(o).end((function(r,o){if(r){var i=r.response&&r.response.body||{error:"request_error",error_description:JSON.stringify(r)};return De(t,{forceLegacyError:!0})(i)}function a(){var r=!0===e.popup;e=_e.blacklist(e,["password","credentialType","otp","popup","onRedirecting"]);var i=_e.merge(e).with({loginTicket:o.body.login_ticket}),a=xt(n.baseOptions.rootUrl,o.body.co_id);n.storage.setItem(a,o.body.co_verifier,{expires:1/96}),r?n.webMessageHandler.run(i,De(t,{forceLegacyError:!0})):n.webAuth.authorize(i)}"function"==typeof e.onRedirecting?e.onRedirecting(a):a()}))},wt.prototype.callback=function(){var e=decodeURIComponent(function(e){var t=("&"+Ce.getWindow().location.hash.substring(1)).split("&origin=");if(2===t.length)return t.pop().split("&").shift()}()),t=Ce.getWindow(),n=this;t.addEventListener("message",(function(e){if("co_verifier_request"===e.data.type){var t=xt(e.origin,e.data.request.id),r=function(e,t){try{var n=e.getItem(t);return e.removeItem(t),n||""}catch(e){return""}}(n.storage,t);e.source.postMessage({type:"co_verifier_response",response:{verifier:r}},e.origin)}})),t.parent.postMessage({type:"ready"},e)},Et.prototype.loginWithCredentials=function(e,t){e.realm=e.realm||e.connection,delete e.connection,this.crossOriginAuthentication.login(e,t)},Et.prototype.signupAndLogin=function(e,t){var n=this;return this.webAuth.client.dbConnection.signup(e,(function(r){return r?t(r):(e.realm=e.realm||e.connection,delete e.connection,n.webAuth.login(e,t))}))};var Ot=i((function(e){var t=function(){function e(e,t,n){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener&&e.addEventListener(t,n,!1)}function t(e,t,n){e.detachEvent?e.detachEvent("on"+t,n):e.removeEventListener&&e.removeEventListener(t,n,!1)}function n(e){/^https?:\/\//.test(e)||(e=window.location.href);var t=/^(https?:\/\/[\-_a-zA-Z\.0-9:]+)/.exec(e);return t?t[1]:e}var r=function(){if("undefined"==typeof navigator)return!1;var e=-1,t=navigator.userAgent;return"Microsoft Internet Explorer"===navigator.appName?null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)):t.indexOf("Trident")>-1&&null!==new RegExp("rv:([0-9]{2,2}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)),e>=8}();return"undefined"!=typeof window&&window.JSON&&window.JSON.stringify&&window.JSON.parse&&window.postMessage?{open:function(o,i){if(!i)throw"missing required callback argument";var a,s;o.url||(a="missing required 'url' parameter"),o.relay_url||(a="missing required 'relay_url' parameter"),a&&setTimeout((function(){i(a)}),0),o.window_name||(o.window_name=null),o.window_features&&!function(){try{var e=navigator.userAgent;return-1!=e.indexOf("Fennec/")||-1!=e.indexOf("Firefox/")&&-1!=e.indexOf("Android")}catch(e){}return!1}()||(o.window_features=void 0);var c,l=o.origin||n(o.url);if(l!==n(o.relay_url))return setTimeout((function(){i("invalid arguments: origin of url and relay_url must match")}),0);r&&((s=document.createElement("iframe")).setAttribute("src",o.relay_url),s.style.display="none",s.setAttribute("name","__winchan_relay_frame"),document.body.appendChild(s),c=s.contentWindow);var u=o.popup||window.open(o.url,o.window_name,o.window_features);o.popup&&(u.location.href=o.url),c||(c=u);var p=setInterval((function(){u&&u.closed&&(d(),i&&(i("User closed the popup window"),i=null))}),500),f=JSON.stringify({a:"request",d:o.params});function d(){if(s&&document.body.removeChild(s),s=void 0,p&&(p=clearInterval(p)),t(window,"message",h),t(window,"unload",d),u)try{u.close()}catch(e){c.postMessage("die",l)}u=c=void 0}function h(e){if(e.origin===l){try{var t=JSON.parse(e.data)}catch(e){if(i)return i(e);throw e}"ready"===t.a?c.postMessage(f,l):"error"===t.a?(d(),i&&(i(t.d),i=null)):"response"===t.a&&(d(),i&&(i(null,t.d),i=null))}}return e(window,"unload",d),e(window,"message",h),{originalPopup:u,close:d,focus:function(){if(u)try{u.focus()}catch(e){}}}},onOpen:function(n){var o="*",i=r?function(){for(var e=window.opener.frames,t=e.length-1;t>=0;t--)try{if(e[t].location.protocol===window.location.protocol&&e[t].location.host===window.location.host&&"__winchan_relay_frame"===e[t].name)return e[t]}catch(e){}}():window.opener;if(!i)throw"can't find relay frame";function a(e){e=JSON.stringify(e),r?i.doPost(e,o):i.postMessage(e,o)}function s(e){if("die"===e.data)try{window.close()}catch(e){}}e(r?i:window,"message",(function e(r){var i;try{i=JSON.parse(r.data)}catch(e){}i&&"request"===i.a&&(t(window,"message",e),o=r.origin,n&&setTimeout((function(){n(o,i.d,(function(e){n=void 0,a({a:"response",d:e})}))}),0))})),e(r?i:window,"message",s);try{a({a:"ready"})}catch(t){e(i,"load",(function(e){a({a:"ready"})}))}var c=function(){try{t(r?i:window,"message",s)}catch(e){}n&&a({a:"error",d:"client closed window"}),n=void 0;try{window.close()}catch(e){}};return e(window,"unload",c),{detach:function(){t(window,"unload",c)}}}}:{open:function(e,t,n,r){setTimeout((function(){r("unsupported browser")}),0)},onOpen:function(e){setTimeout((function(){e("unsupported browser")}),0)}}}();e.exports&&(e.exports=t)})),Ct=function(e){/^https?:\/\//.test(e)||(e=window.location.href);var t=/^(https?:\/\/[-_a-zA-Z.0-9:]+)/.exec(e);return t?t[1]:e};function Tt(){this._current_popup=null}function At(e,t){this.baseOptions=t,this.baseOptions.popupOrigin=t.popupOrigin,this.client=e.client,this.webAuth=e,this.transactionManager=new yt(this.baseOptions),this.crossOriginAuthentication=new wt(e,this.baseOptions),this.warn=new Pe({disableWarnings:!!t._disableDeprecationWarnings})}function St(e){this.authenticationUrl=e.authenticationUrl,this.timeout=e.timeout||6e4,this.handler=null,this.postMessageDataType=e.postMessageDataType||!1,this.postMessageOrigin=e.postMessageOrigin||Ce.getWindow().location.origin||Ce.getWindow().location.protocol+"//"+Ce.getWindow().location.hostname+(Ce.getWindow().location.port?":"+Ce.getWindow().location.port:"")}function Pt(e){this.baseOptions=e,this.request=new Ee(e),this.transactionManager=new yt(this.baseOptions)}function kt(e,t){this.baseOptions=t,this.client=e,this.baseOptions.universalLoginPage=!0,this.request=new Ee(this.baseOptions),this.warn=new Pe({disableWarnings:!!t._disableDeprecationWarnings})}Tt.prototype.calculatePosition=function(e){var t=e.width||500,n=e.height||600,r=Ce.getWindow(),o=void 0!==r.screenX?r.screenX:r.screenLeft,i=void 0!==r.screenY?r.screenY:r.screenTop,a=void 0!==r.outerWidth?r.outerWidth:r.document.body.clientWidth,s=void 0!==r.outerHeight?r.outerHeight:r.document.body.clientHeight;return{width:t,height:n,left:e.left||o+(a-t)/2,top:e.top||i+(s-n)/2}},Tt.prototype.preload=function(e){var t=this,n=Ce.getWindow(),r=this.calculatePosition(e.popupOptions||{}),o=_e.merge(r).with(e.popupOptions),i=e.url||"about:blank",a=j(o,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed||(this._current_popup=n.open(i,"auth0_signup_popup",a),this._current_popup.kill=function(){this.close(),t._current_popup=null}),this._current_popup},Tt.prototype.load=function(e,t,n,r){var o=this,i=this.calculatePosition(n.popupOptions||{}),a=_e.merge(i).with(n.popupOptions),s=_e.merge({url:e,relay_url:t,window_features:j(a,{delimiter:",",encode:!1}),popup:this._current_popup}).with(n),c=Ot.open(s,(function(e,t){if(!e||"SyntaxError"!==e.name)return o._current_popup=null,r(e,t)}));return c.focus(),c},At.prototype.buildPopupHandler=function(){var e=this.baseOptions.plugins.get("popup.getPopupHandler");return e?e.getPopupHandler():new Tt},At.prototype.preload=function(e){e=e||{};var t=this.buildPopupHandler();return t.preload(e),t},At.prototype.getPopupHandler=function(e,t){return e.popupHandler?e.popupHandler:t?this.preload(e):this.buildPopupHandler()},At.prototype.callback=function(e){var t=this,n=Ce.getWindow(),r=(e=e||{}).popupOrigin||this.baseOptions.popupOrigin||Ce.getOrigin();n.opener?Ot.onOpen((function(n,o,i){if(n!==r)return i({error:"origin_mismatch",error_description:"The popup's origin ("+n+") should match the `popupOrigin` parameter ("+r+")."});t.webAuth.parseHash(e||{},(function(e,t){return i(e||t)}))})):n.doPost=function(e){n.parent&&n.parent.postMessage(e,r)}},At.prototype.authorize=function(e,t){var n,r,o={},i=this.baseOptions.plugins.get("popup.authorize"),s=_e.merge(this.baseOptions,["clientID","scope","domain","audience","tenant","responseType","redirectUri","_csrf","state","_intstate","nonce","organization","invitation"]).with(_e.blacklist(e,["popupHandler"]));return fe.check(s,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),r=a(this.baseOptions.rootUrl,"relay.html"),e.owp?s.owp=!0:(o.origin=Ct(s.redirectUri),r=s.redirectUri),e.popupOptions&&(o.popupOptions=_e.pick(e.popupOptions,["width","height","top","left"])),i&&(s=i.processParams(s)),(s=this.transactionManager.process(s)).scope=s.scope||"openid profile email",delete s.domain,n=this.client.buildAuthorizeUrl(s),this.getPopupHandler(e).load(n,r,o,De(t,{keepOriginalCasing:!0}))},At.prototype.loginWithCredentials=function(e,t){e.realm=e.realm||e.connection,e.popup=!0,e=_e.merge(this.baseOptions,["redirectUri","responseType","state","nonce"]).with(_e.blacklist(e,["popupHandler","connection"])),e=this.transactionManager.process(e),this.crossOriginAuthentication.login(e,t)},At.prototype.passwordlessVerify=function(e,t){var n=this;return this.client.passwordless.verify(_e.blacklist(e,["popupHandler"]),(function(r){if(r)return t(r);e.username=e.phoneNumber||e.email,e.password=e.verificationCode,delete e.email,delete e.phoneNumber,delete e.verificationCode,delete e.type,n.client.loginWithResourceOwner(e,t)}))},At.prototype.signupAndLogin=function(e,t){var n=this;return this.client.dbConnection.signup(e,(function(r){if(r)return t(r);n.loginWithCredentials(e,t)}))},St.create=function(e){return new St(e)},St.prototype.login=function(e,t){this.handler=new bt({auth0:this.auth0,url:this.authenticationUrl,eventListenerType:e?"message":"load",callback:this.getCallbackHandler(t,e),timeout:this.timeout,eventValidator:this.getEventValidator(),timeoutCallback:function(){t(null,"#error=timeout&error_description=Timeout+during+authentication+renew.")},usePostMessage:e||!1}),this.handler.init()},St.prototype.getEventValidator=function(){var e=this;return{isValid:function(t){switch(t.event.type){case"message":return t.event.origin===e.postMessageOrigin&&t.event.source===e.handler.iframe.contentWindow&&(!1===e.postMessageDataType||t.event.data.type&&t.event.data.type===e.postMessageDataType);case"load":if("about:"===t.sourceObject.contentWindow.location.protocol)return!1;default:return!0}}}},St.prototype.getCallbackHandler=function(e,t){return function(n){var r;r=t?"object"==typeof n.event.data&&n.event.data.hash?n.event.data.hash:n.event.data:n.sourceObject.contentWindow.location.hash,e(null,r)}},Pt.prototype.login=function(e,t){var n,r;return n=a(this.baseOptions.rootUrl,"usernamepassword","login"),e.username=e.username||e.email,e=_e.blacklist(e,["email","onRedirecting"]),r=_e.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience"]).with(e),r=this.transactionManager.process(r),r=_e.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(De(t))},Pt.prototype.callback=function(e){var t,n=Ce.getDocument();(t=n.createElement("div")).innerHTML=e,n.body.appendChild(t).children[0].submit()},kt.prototype.login=function(e,t){if(Ce.getWindow().location.host!==this.baseOptions.domain)throw new Error("This method is meant to be used only inside the Universal Login Page.");var n,r=_e.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience","_csrf","state","_intstate","nonce"]).with(e);return fe.check(r,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(n=new Pt(this.baseOptions)).login(r,(function(r,o){if(r)return t(r);function i(){n.callback(o)}if("function"==typeof e.onRedirecting)return e.onRedirecting((function(){i()}));i()}))},kt.prototype.signupAndLogin=function(e,t){var n=this;return n.client.client.dbConnection.signup(e,(function(r){return r?t(r):n.login(e,t)}))},kt.prototype.getSSOData=function(e,t){var n,r="";return"function"==typeof e&&(t=e,e=!1),fe.check(e,{type:"boolean",message:"withActiveDirectories parameter is not valid"}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),e&&(r="?"+j({ldaps:1,client_id:this.baseOptions.clientID})),n=a(this.baseOptions.rootUrl,"user","ssodata",r),this.request.get(n,{noHeaders:!0}).withCredentials().end(De(t))};var jt=function(){},It={lang:"en",templates:{auth0:function(e){var t="code"===e.type?"Enter the code shown above":"Solve the formula shown above";return'<div class="captcha-challenge">\n <img src="'+e.image+'" />\n <button type="button" class="captcha-reload">↺</button>\n</div>\n<input type="text" name="captcha"\n class="form-control captcha-control"\n placeholder="'+t+'" />'},recaptcha_v2:function(){return'<div class="recaptcha" ></div><input type="hidden" name="captcha" />'},recaptcha_enterprise:function(){return'<div class="recaptcha" ></div><input type="hidden" name="captcha" />'},error:function(){return'<div class="error" style="color: red;">Error getting the bot detection challenge. Please contact the system administrator.</div>'}}};function Nt(e){switch(e){case"recaptcha_v2":return window.grecaptcha;case"recaptcha_enterprise":return window.grecaptcha.enterprise;default:throw new Error("Unknown captcha provider")}}var Rt=function(e,t,n,r){function o(r){r=r||jt,e.getChallenge((function(e,i){return e?(t.innerHTML=n.templates.error(e),r(e)):i.required?(t.style.display="","auth0"===i.provider?function(e,t,n,r){e.innerHTML=t.templates[n.provider](n),e.querySelector(".captcha-reload").addEventListener("click",(function(e){e.preventDefault(),r()}))}(t,n,i,o):"recaptcha_v2"!==i.provider&&"recaptcha_enterprise"!==i.provider||function(e,t,n){var r=e.hasAttribute("data-wid")&&e.getAttribute("data-wid");function o(t){e.querySelector('input[name="captcha"]').value=t||""}if(r)return o(),void Nt(n.provider).reset(r);e.innerHTML=t.templates[n.provider](n);var i=e.querySelector(".recaptcha");!function(e,t,n){var r="recaptchaCallback_"+Math.floor(1000001*Math.random());window[r]=function(){delete window[r],n()};var o=window.document.createElement("script");o.src=function(e,t,n){switch(e){case"recaptcha_v2":return"https://www.recaptcha.net/recaptcha/api.js?hl="+t+"&onload="+n;case"recaptcha_enterprise":return"https://www.recaptcha.net/recaptcha/enterprise.js?render=explicit&hl="+t+"&onload="+n;default:throw new Error("Unknown captcha provider")}}(t.provider,t.lang,r),o.async=!0,window.document.body.appendChild(o)}(0,{lang:t.lang,provider:n.provider},(function(){var t=Nt(n.provider);r=t.render(i,{callback:o,"expired-callback":function(){o()},"error-callback":function(){o()},sitekey:n.siteKey}),e.setAttribute("data-wid",r)}))}(t,n,i),void r()):(t.style.display="none",void(t.innerHTML=""))}))}return n=_e.merge(It).with(n||{}),o(r),{reload:o,getValue:function(){var e=t.querySelector('input[name="captcha"]');if(e)return e.value}}};function Dt(){return new Date}function Lt(e){fe.check(e,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},popupOrigin:{optional:!0,type:"string",message:"popupOrigin is not valid"},leeway:{optional:!0,type:"number",message:"leeway is not valid"},plugins:{optional:!0,type:"array",message:"plugins is not valid"},maxAge:{optional:!0,type:"number",message:"maxAge is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"},_timesToRetryFailedRequests:{optional:!0,type:"number",message:"_timesToRetryFailedRequests option is not valid"}}),e.overrides&&fe.check(e.overrides,{type:"object",message:"overrides option is not valid"},{__tenant:{optional:!0,type:"string",message:"__tenant option is required"},__token_issuer:{optional:!0,type:"string",message:"__token_issuer option is required"},__jwks_uri:{optional:!0,type:"string",message:"__jwks_uri is required"}}),this.baseOptions=e,this.baseOptions.plugins=new gt(this,this.baseOptions.plugins||[]),this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions._timesToRetryFailedRequests=e._timesToRetryFailedRequests?parseInt(e._timesToRetryFailedRequests,0):0,this.baseOptions.tenant=this.baseOptions.overrides&&this.baseOptions.overrides.__tenant||this.baseOptions.domain.split(".")[0],this.baseOptions.token_issuer=this.baseOptions.overrides&&this.baseOptions.overrides.__token_issuer||"https://"+this.baseOptions.domain+"/",this.baseOptions.jwksURI=this.baseOptions.overrides&&this.baseOptions.overrides.__jwks_uri,this.transactionManager=new yt(this.baseOptions),this.client=new Ht(this.baseOptions),this.redirect=new Et(this,this.baseOptions),this.popup=new At(this,this.baseOptions),this.crossOriginAuthentication=new wt(this,this.baseOptions),this.webMessageHandler=new _t(this),this._universalLogin=new kt(this,this.baseOptions),this.ssodataStorage=new Ie(this.baseOptions)}function Mt(e,t){this.baseOptions=t,this.request=e}function Ft(e,t){this.baseOptions=t,this.request=e}function Ht(e,t){2===arguments.length?this.auth0=e:t=e,fe.check(t,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=t,this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions.rootUrl=this.baseOptions.domain&&0===this.baseOptions.domain.toLowerCase().indexOf("http")?this.baseOptions.domain:"https://"+this.baseOptions.domain,this.request=new Ee(this.baseOptions),this.passwordless=new Mt(this.request,this.baseOptions),this.dbConnection=new Ft(this.request,this.baseOptions),this.warn=new Pe({disableWarnings:!!t._disableDeprecationWarnings}),this.ssodataStorage=new Ie(this.baseOptions)}function Ut(e){fe.check(e,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},token:{type:"string",message:"token option is required"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=e,this.baseOptions.headers={Authorization:"Bearer "+this.baseOptions.token},this.request=new Ee(this.baseOptions),this.baseOptions.rootUrl=a("https://"+this.baseOptions.domain,"api","v2")}Lt.prototype.parseHash=function(e,t){var n,r;t||"function"!=typeof e?e=e||{}:(t=e,e={});var o=Ce.getWindow(),i=void 0===e.hash?o.location.hash:e.hash;if((n=function(e,t){var n=function(e){if(!e)return A;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?A.charset:e.charset;return{allowDots:void 0===e.allowDots?A.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:A.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:A.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:A.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:A.comma,decoder:"function"==typeof e.decoder?e.decoder:A.decoder,delimiter:"string"==typeof e.delimiter||p.isRegExp(e.delimiter)?e.delimiter:A.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:A.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:A.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:A.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:A.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:A.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof e?function(e,t){var n,r={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,a=o.split(t.delimiter,i),s=-1,c=t.charset;if(t.charsetSentinel)for(n=0;n<a.length;++n)0===a[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[n]?c="utf-8":"utf8=%26%2310003%3B"===a[n]&&(c="iso-8859-1"),s=n,n=a.length);for(n=0;n<a.length;++n)if(n!==s){var l,u,f=a[n],d=f.indexOf("]="),h=-1===d?f.indexOf("="):d+1;-1===h?(l=t.decoder(f,A.decoder,c,"key"),u=t.strictNullHandling?null:""):(l=t.decoder(f.slice(0,h),A.decoder,c,"key"),u=p.maybeMap(P(f.slice(h+1),t),(function(e){return t.decoder(e,A.decoder,c,"value")}))),u&&t.interpretNumericEntities&&"iso-8859-1"===c&&(u=S(u)),f.indexOf("[]=")>-1&&(u=T(u)?[u]:u),C.call(r,l)?r[l]=p.combine(r[l],u):r[l]=u}return r}(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),a=0;a<i.length;++a){var s=i[a],c=k(s,r[s],n,"string"==typeof e);o=p.merge(o,c,n)}return p.compact(o)}(i=i.replace(/^#?\/?/,""))).hasOwnProperty("error"))return r=Re.buildResponse(n.error,n.error_description),n.state&&(r.state=n.state),t(r);if(!n.hasOwnProperty("access_token")&&!n.hasOwnProperty("id_token")&&!n.hasOwnProperty("refresh_token"))return t(null,null);var a=(this.baseOptions.responseType||e.responseType||"").split(" ");return a.length>0&&-1!==a.indexOf("token")&&!n.hasOwnProperty("access_token")?t(Re.buildResponse("invalid_hash","response_type contains `token`, but the parsed hash does not contain an `access_token` property")):a.length>0&&-1!==a.indexOf("id_token")&&!n.hasOwnProperty("id_token")?t(Re.buildResponse("invalid_hash","response_type contains `id_token`, but the parsed hash does not contain an `id_token` property")):this.validateAuthenticationResponse(e,n,t)},Lt.prototype.validateAuthenticationResponse=function(e,t,n){var r=this;e.__enableIdPInitiatedLogin=e.__enableIdPInitiatedLogin||e.__enableImpersonation;var o=t.state,i=this.transactionManager.getStoredTransaction(o),a=e.state||i&&i.state||null,s=a===o;if((o||a||!e.__enableIdPInitiatedLogin)&&!s)return n({error:"invalid_token",errorDescription:"`state` does not match."});var c=e.nonce||i&&i.nonce||null,l=i&&i.organization,u=e.state||i&&i.appState||null,p=function(e,o){return e?n(e):(i&&i.lastUsedConnection&&(o&&(a=o.sub),r.ssodataStorage.set(i.lastUsedConnection,a)),n(null,function(e,t,n){return{accessToken:e.access_token||null,idToken:e.id_token||null,idTokenPayload:n||null,appState:t||null,refreshToken:e.refresh_token||null,state:e.state||null,expiresIn:e.expires_in?parseInt(e.expires_in,10):null,tokenType:e.token_type||null,scope:e.scope||null}}(t,u,o)));var a};return t.id_token?this.validateToken(t.id_token,c,(function(e,n){if(!e){if(l){if(!n.org_id)return p(Re.invalidToken("Organization Id (org_id) claim must be a string present in the ID token"));if(n.org_id!==l)return p(Re.invalidToken('Organization Id (org_id) claim value mismatch in the ID token; expected "'+l+'", found "'+n.org_id+'"'))}return t.access_token&&n.at_hash?(new vt).validateAccessToken(t.access_token,"RS256",n.at_hash,(function(e){return e?p(Re.invalidToken(e.message)):p(null,n)})):p(null,n)}if("invalid_token"!==e.error||e.errorDescription&&e.errorDescription.indexOf("Nonce (nonce) claim value mismatch in the ID token")>-1)return p(e);var o=(new vt).decode(t.id_token);return"HS256"!==o.header.alg?p(e):(o.payload.nonce||null)!==c?p({error:"invalid_token",errorDescription:'Nonce (nonce) claim value mismatch in the ID token; expected "'+c+'", found "'+o.payload.nonce+'"'}):t.access_token?r.client.userInfo(t.access_token,(function(e,t){return e?p(e):p(null,t)})):p({error:"invalid_token",description:"The id_token cannot be validated because it was signed with the HS256 algorithm and public clients (like a browser) can’t store secrets. Please read the associated doc for possible ways to fix this. Read more: https://auth0.com/docs/errors/libraries/auth0-js/invalid-token#parsing-an-hs256-signed-id-token-without-an-access-token"})})):p(null,null)},Lt.prototype.validateToken=function(e,t,n){new vt({issuer:this.baseOptions.token_issuer,jwksURI:this.baseOptions.jwksURI,audience:this.baseOptions.clientID,leeway:this.baseOptions.leeway||60,maxAge:this.baseOptions.maxAge,__clock:this.baseOptions.__clock||Dt}).verify(e,t,(function(e,t){if(e)return n(Re.invalidToken(e.message));n(null,t)}))},Lt.prototype.renewAuth=function(e,t){var n=!!e.usePostMessage,r=e.postMessageDataType||!1,o=e.postMessageOrigin||Ce.getWindow().origin,i=e.timeout,a=this,s=_e.merge(this.baseOptions,["clientID","redirectUri","responseType","scope","audience","_csrf","state","_intstate","nonce"]).with(e);s.responseType=s.responseType||"token",s.responseMode=s.responseMode||"fragment",s=this.transactionManager.process(s),fe.check(s,{type:"object",message:"options parameter is not valid"}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),s.prompt="none",s=_e.blacklist(s,["usePostMessage","tenant","postMessageDataType","postMessageOrigin"]),St.create({authenticationUrl:this.client.buildAuthorizeUrl(s),postMessageDataType:r,postMessageOrigin:o,timeout:i}).login(n,(function(e,n){if("object"==typeof n)return t(e,n);a.parseHash({hash:n},t)}))},Lt.prototype.checkSession=function(e,t){var n=_e.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(e);return"code"===n.responseType?t({error:"error",error_description:"responseType can't be `code`"}):(e.nonce||(n=this.transactionManager.process(n)),n.redirectUri?(fe.check(n,{type:"object",message:"options parameter is not valid"}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=_e.blacklist(n,["usePostMessage","tenant","postMessageDataType"]),void this.webMessageHandler.run(n,De(t,{forceLegacyError:!0,ignoreCasing:!0}))):t({error:"error",error_description:"redirectUri can't be empty"}))},Lt.prototype.changePassword=function(e,t){return this.client.dbConnection.changePassword(e,t)},Lt.prototype.passwordlessStart=function(e,t){var n=_e.merge(this.baseOptions,["responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(e.authParams);return e.authParams=this.transactionManager.process(n),this.client.passwordless.start(e,t)},Lt.prototype.signup=function(e,t){return this.client.dbConnection.signup(e,t)},Lt.prototype.authorize=function(e){var t=_e.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","organization","invitation"]).with(e);fe.check(t,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(t=this.transactionManager.process(t)).scope=t.scope||"openid profile email",Ce.redirect(this.client.buildAuthorizeUrl(t))},Lt.prototype.signupAndAuthorize=function(e,t){var n=this;return this.client.dbConnection.signup(_e.blacklist(e,["popupHandler"]),(function(r){if(r)return t(r);e.realm=e.connection,e.username||(e.username=e.email),n.client.login(e,t)}))},Lt.prototype.login=function(e,t){var n=_e.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting","organization","invitation"]).with(e);n=this.transactionManager.process(n),Ce.getWindow().location.host===this.baseOptions.domain?(n.connection=n.realm,delete n.realm,this._universalLogin.login(n,t)):this.crossOriginAuthentication.login(n,t)},Lt.prototype.passwordlessLogin=function(e,t){var n=_e.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(e);if(n=this.transactionManager.process(n),Ce.getWindow().location.host===this.baseOptions.domain)this.passwordlessVerify(n,t);else{var r=_e.extend({credentialType:"http://auth0.com/oauth/grant-type/passwordless/otp",realm:n.connection,username:n.email||n.phoneNumber,otp:n.verificationCode},_e.blacklist(n,["connection","email","phoneNumber","verificationCode"]));this.crossOriginAuthentication.login(r,t)}},Lt.prototype.crossOriginAuthenticationCallback=function(){this.crossOriginVerification()},Lt.prototype.crossOriginVerification=function(){this.crossOriginAuthentication.callback()},Lt.prototype.logout=function(e){Ce.redirect(this.client.buildLogoutUrl(e))},Lt.prototype.passwordlessVerify=function(e,t){var n=this,r=_e.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(e);return fe.check(r,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),r=this.transactionManager.process(r),this.client.passwordless.verify(r,(function(o){if(o)return t(o);function i(){Ce.redirect(n.client.passwordless.buildVerifyUrl(r))}if("function"==typeof e.onRedirecting)return e.onRedirecting((function(){i()}));i()}))},Lt.prototype.renderCaptcha=function(e,t,n){return Rt(this.client,e,t,n)},Mt.prototype.buildVerifyUrl=function(e){var t,n;return fe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(e){return!e.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(e){return!e.phoneNumber}}}),t=_e.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","protocol","nonce"]).with(e),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t=_e.toSnakeCase(t,["auth0Client"]),n=j(t),a(this.baseOptions.rootUrl,"passwordless","verify_redirect","?"+n)},Mt.prototype.start=function(e,t){var n,r;return fe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},send:{type:"string",message:"send option is required",values:["link","code"],value_message:"send is not valid ([link, code])"},phoneNumber:{optional:!0,type:"string",message:"phoneNumber option is required",condition:function(e){return"code"===e.send||!e.email}},email:{optional:!0,type:"string",message:"email option is required",condition:function(e){return"link"===e.send||!e.phoneNumber}},authParams:{optional:!0,type:"object",message:"authParams option is required"}}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"passwordless","start"),(r=_e.merge(this.baseOptions,["clientID","responseType","redirectUri","scope"]).with(e)).scope&&(r.authParams=r.authParams||{},r.authParams.scope=r.authParams.scope||r.scope),r.redirectUri&&(r.authParams=r.authParams||{},r.authParams.redirect_uri=r.authParams.redirectUri||r.redirectUri),r.responseType&&(r.authParams=r.authParams||{},r.authParams.response_type=r.authParams.responseType||r.responseType),delete r.redirectUri,delete r.responseType,delete r.scope,r=_e.toSnakeCase(r,["auth0Client","authParams"]),this.request.post(n).send(r).end(De(t))},Mt.prototype.verify=function(e,t){var n,r;return fe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(e){return!e.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(e){return!e.phoneNumber}}}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),r=_e.pick(e,["connection","verificationCode","phoneNumber","email","auth0Client"]),r=_e.toSnakeCase(r,["auth0Client"]),n=a(this.baseOptions.rootUrl,"passwordless","verify"),this.request.post(n).send(r).end(De(t))},Ft.prototype.signup=function(e,t){var n,r,o;return fe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"},password:{type:"string",message:"password option is required"}}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"dbconnections","signup"),o=(r=_e.merge(this.baseOptions,["clientID","state"]).with(e)).user_metadata||r.userMetadata,r=_e.blacklist(r,["scope","userMetadata","user_metadata"]),r=_e.toSnakeCase(r,["auth0Client"]),o&&(r.user_metadata=o),this.request.post(n).send(r).end(De(t))},Ft.prototype.changePassword=function(e,t){var n,r;return fe.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"}}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"dbconnections","change_password"),r=_e.merge(this.baseOptions,["clientID"]).with(e,["email","connection"]),r=_e.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(De(t))},Ht.prototype.buildAuthorizeUrl=function(e){var t,n;return fe.check(e,{type:"object",message:"options parameter is not valid"}),t=_e.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience"]).with(e),fe.check(t,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},redirectUri:{optional:!0,type:"string",message:"redirectUri option is required"},responseType:{type:"string",message:"responseType option is required"},nonce:{type:"string",message:"nonce option is required",condition:function(e){return-1===e.responseType.indexOf("code")&&-1!==e.responseType.indexOf("id_token")}},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t.connection_scope&&fe.isArray(t.connection_scope)&&(t.connection_scope=t.connection_scope.join(",")),t=_e.blacklist(t,["username","popupOptions","domain","tenant","timeout","appState"]),t=_e.toSnakeCase(t,["auth0Client"]),t=He(this.warn,t),n=j(t),a(this.baseOptions.rootUrl,"authorize","?"+n)},Ht.prototype.buildLogoutUrl=function(e){var t,n;return fe.check(e,{optional:!0,type:"object",message:"options parameter is not valid"}),t=_e.merge(this.baseOptions,["clientID"]).with(e||{}),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t=_e.toSnakeCase(t,["auth0Client","returnTo"]),n=j(_e.blacklist(t,["federated"])),e&&void 0!==e.federated&&!1!==e.federated&&"false"!==e.federated&&(n+="&federated"),a(this.baseOptions.rootUrl,"v2","logout","?"+n)},Ht.prototype.loginWithDefaultDirectory=function(e,t){return fe.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),e.grantType="password",this.oauthToken(e,t)},Ht.prototype.login=function(e,t){return fe.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},realm:{type:"string",message:"realm option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),e.grantType="http://auth0.com/oauth/grant-type/password-realm",this.oauthToken(e,t)},Ht.prototype.oauthToken=function(e,t){var n,r;return fe.check(e,{type:"object",message:"options parameter is not valid"}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"oauth","token"),r=_e.merge(this.baseOptions,["clientID","scope","audience"]).with(e),fe.check(r,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},grantType:{type:"string",message:"grantType option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),r=_e.toSnakeCase(r,["auth0Client"]),r=Fe(this.warn,r),this.request.post(n).send(r).end(De(t))},Ht.prototype.loginWithResourceOwner=function(e,t){var n,r;return fe.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},connection:{type:"string",message:"connection option is required"},scope:{optional:!0,type:"string",message:"scope option is required"}}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"oauth","ro"),r=_e.merge(this.baseOptions,["clientID","scope"]).with(e,["username","password","scope","connection","device"]),(r=_e.toSnakeCase(r,["auth0Client"])).grant_type=r.grant_type||"password",this.request.post(n).send(r).end(De(t))},Ht.prototype.getSSOData=function(e,t){if(this.auth0||(this.auth0=new Lt(this.baseOptions)),Ce.getWindow().location.host===this.baseOptions.domain)return this.auth0._universalLogin.getSSOData(e,t);"function"==typeof e&&(t=e),fe.check(t,{type:"function",message:"cb parameter is not valid"});var n=this.baseOptions.clientID,r=this.ssodataStorage.get()||{};this.auth0.checkSession({responseType:"token id_token",scope:"openid profile email",connection:r.lastUsedConnection,timeout:5e3},(function(e,o){return e?"login_required"===e.error?t(null,{sso:!1}):("consent_required"===e.error&&(e.error_description="Consent required. When using `getSSOData`, the user has to be authenticated with the following scope: `openid profile email`."),t(e,{sso:!1})):r.lastUsedSub&&r.lastUsedSub!==o.idTokenPayload.sub?t(e,{sso:!1}):t(null,{lastUsedConnection:{name:r.lastUsedConnection},lastUsedUserID:o.idTokenPayload.sub,lastUsedUsername:o.idTokenPayload.email||o.idTokenPayload.name,lastUsedClientID:n,sessionClients:[n],sso:!0})}))},Ht.prototype.userInfo=function(e,t){var n;return fe.check(e,{type:"string",message:"accessToken parameter is not valid"}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"userinfo"),this.request.get(n).set("Authorization","Bearer "+e).end(De(t,{ignoreCasing:!0}))},Ht.prototype.getChallenge=function(e){if(fe.check(e,{type:"function",message:"cb parameter is not valid"}),!this.baseOptions.state)return e();var t=a(this.baseOptions.rootUrl,"usernamepassword","challenge");return this.request.post(t).send({state:this.baseOptions.state}).end(De(e,{ignoreCasing:!0}))},Ht.prototype.delegation=function(e,t){var n,r;return fe.check(e,{type:"object",message:"options parameter is not valid"},{grant_type:{type:"string",message:"grant_type option is required"}}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"delegation"),r=_e.merge(this.baseOptions,["clientID"]).with(e),r=_e.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(De(t))},Ht.prototype.getUserCountry=function(e){var t;return fe.check(e,{type:"function",message:"cb parameter is not valid"}),t=a(this.baseOptions.rootUrl,"user","geoloc","country"),this.request.get(t).end(De(e))},Ut.prototype.getUser=function(e,t){var n;return fe.check(e,{type:"string",message:"userId parameter is not valid"}),fe.check(t,{type:"function",message:"cb parameter is not valid"}),n=a(this.baseOptions.rootUrl,"users",e),this.request.get(n).end(De(t,{ignoreCasing:!0}))},Ut.prototype.patchUserMetadata=function(e,t,n){var r;return fe.check(e,{type:"string",message:"userId parameter is not valid"}),fe.check(t,{type:"object",message:"userMetadata parameter is not valid"}),fe.check(n,{type:"function",message:"cb parameter is not valid"}),r=a(this.baseOptions.rootUrl,"users",e),this.request.patch(r).send({user_metadata:t}).end(De(n,{ignoreCasing:!0}))},Ut.prototype.patchUserAttributes=function(e,t,n){var r;return fe.check(e,{type:"string",message:"userId parameter is not valid"}),fe.check(t,{type:"object",message:"user parameter is not valid"}),fe.check(n,{type:"function",message:"cb parameter is not valid"}),r=a(this.baseOptions.rootUrl,"users",e),this.request.patch(r).send(t).end(De(n,{ignoreCasing:!0}))},Ut.prototype.linkUser=function(e,t,n){var r;return fe.check(e,{type:"string",message:"userId parameter is not valid"}),fe.check(t,{type:"string",message:"secondaryUserToken parameter is not valid"}),fe.check(n,{type:"function",message:"cb parameter is not valid"}),r=a(this.baseOptions.rootUrl,"users",e,"identities"),this.request.post(r).send({link_with:t}).end(De(n,{ignoreCasing:!0}))};var zt={Authentication:Ht,Management:Ut,WebAuth:Lt,version:se};t.default=zt}.call(this,n(53),n(194))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,l=[],u=!1,p=-1;function f(){u&&c&&(u=!1,c.length?l=c.concat(l):p=-1,l.length&&d())}function d(){if(!u){var e=s(f);u=!0;for(var t=l.length;t;){for(c=l,l=[];++p<t;)c&&c[p].run();p=-1,t=l.length}c=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||u||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(196),s=n(29),c=n(30),l=n(7),u=n(8),p=n(31),f=n(32),d=function(e){function t(n){var r=e.call(this,n)||this;return r.componentDidMount=function(){var e=r.props,t=e.auth0ClientId,n=e.auth0Hash,o=e.onAuthenticated;c.default.bindToClient(t),n?c.default.parseIdFromHash(n).then((function(e){s.default.getAccessData(e.idToken).then((function(t){r.props.login(e),r.props.cacheAccessData(t),s.default.buildFreshSession(e,t),o()})).catch((function(e){c.default.login()}))})).catch((function(e){c.default.login()})):c.default.login()},r.render=function(){return i.createElement("div",{className:"auth-gate"},i.createElement(a.default,{color:t.LOADER_COLOR}))},r}return o(t,e),t.LOADER_COLOR="#2d8ceb",t}(i.PureComponent);t.default=l.connect(null,(function(e){return u.bindActionCreators({login:p.login,cacheAccessData:f.cacheAccessData},e)}))(d)},function(e,t,n){"use strict";var r,o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var s,c,l=a(n(0)),u=n(367),p=n(199),f=u.keyframes(s||(s=o(["\n 0% {transform: scaley(1.0)}\n 50% {transform: scaley(0.4)}\n 100% {transform: scaley(1.0)}\n"],["\n 0% {transform: scaley(1.0)}\n 50% {transform: scaley(0.4)}\n 100% {transform: scaley(1.0)}\n"]))),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.style=function(e){var n=t.props,r=n.color,i=n.width,a=n.height,s=n.margin,l=n.radius,p=n.widthUnit,d=n.heightUnit,h=n.radiusUnit;return u.css(c||(c=o(["\n background-color: ",";\n width: ",";\n height: ",";\n margin: ",";\n border-radius: ",";\n display: inline-block;\n animation: "," 1s ","s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);\n animation-fill-mode: both;\n "],["\n background-color: ",";\n width: ",";\n height: ",";\n margin: ",";\n border-radius: ",";\n display: inline-block;\n animation: "," 1s ","s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);\n animation-fill-mode: both;\n "])),r,""+i+p,""+a+d,s,""+l+h,f,.1*e)},t}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.loading,n=e.css;return t?u.jsx("div",{css:[n]},u.jsx("div",{css:this.style(1)}),u.jsx("div",{css:this.style(2)}),u.jsx("div",{css:this.style(3)}),u.jsx("div",{css:this.style(4)}),u.jsx("div",{css:this.style(5)})):null},t.defaultProps=p.heightWidthRadiusDefaults(35,4,2),t}(l.PureComponent);t.default=d},function(e,t,n){var r=n(198);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(200)),r(n(201))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var o=((r={}).loading=!0,r.color="#000000",r.css={},r);t.sizeDefaults=function(e){return Object.assign({},o,function(e){var t;return(t={}).size=e,t.sizeUnit="px",t}(e))},t.sizeMarginDefaults=function(e){var n;return Object.assign({},t.sizeDefaults(e),((n={}).margin="2px",n))},t.heightWidthDefaults=function(e,t){return Object.assign({},o,function(e,t){var n;return(n={}).height=e,n.heightUnit="px",n.width=t,n.widthUnit="px",n}(e,t))},t.heightWidthRadiusDefaults=function(e,n,r){var o;return void 0===r&&(r=2),Object.assign({},t.heightWidthDefaults(e,n),((o={}).radius=r,o.radiusUnit="px",o.margin="2px",o))}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.maroon="#800000",e.red="#FF0000",e.orange="#FFA500",e.yellow="#FFFF00",e.olive="#808000",e.green="#008000",e.purple="#800080",e.fuchsia="#FF00FF",e.lime="#00FF00",e.teal="#008080",e.aqua="#00FFFF",e.blue="#0000FF",e.navy="#000080",e.black="#000000",e.gray="#808080",e.silver="#C0C0C0",e.white="#FFFFFF"}(r||(r={})),t.calculateRgba=function(e,t){if(Object.keys(r).includes(e)&&(e=r[e]),"#"===e[0]&&(e=e.slice(1)),3===e.length){var n="";e.split("").forEach((function(e){n+=e,n+=e})),e=n}return"rgba("+e.match(/.{2}/g).map((function(e){return parseInt(e,16)})).join(", ")+", "+t+")"}},function(e,t){e.exports=l},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var i,a=n(0),s=n(204),c=n(33),l=n(3),u=n(205),p=n(206),f=function(e){return a.createElement("div",{className:"ip-table-loader"},a.createElement(c.default,null))},d=function(e){return a.createElement("div",{className:"ip-table-empty"},a.createElement("span",{className:"empty-message"},l.ICON_EXCLAIMATION_TRIANGLE," ",e.copy||"No Data Found"))},h=function(e){[32,37,38,39,40].indexOf(e.keyCode)>-1&&e.preventDefault()};t.default=function(e){var t=a.useRef(null),n=a.useRef(null),c=o(a.useState(!1),2),v=c[0],g=c[1],m=o(a.useState([]),2),y=m[0],b=m[1],_=o(a.useState([]),2),w=_[0],x=_[1],E=Array.isArray(e.hiddenColumns)?e.hiddenColumns:[],O=Number.isInteger(e.currentPage)&&"function"==typeof e.onPage,C="function"==typeof e.onSort&&void 0!==e.sortBy,T="function"==typeof e.renderPivotComponent?e.renderPivotComponent:function(){return null},A="function"==typeof e.onRowDoubleClick,S={hiddenColumns:E,sortBy:C?e.sortBy:[],pageIndex:O?e.currentPage-1:void 0,pageSize:e.itemsPerPage,autoResetExpanded:!1},P=u.useTable({columns:w,data:y,manualSortBy:C,manualPagination:O,initialState:S,manualFilters:!0,disableMultiSorting:!0,autoResetExpanded:!1,disableSortRemove:C,pageCount:e.totalPages,pageSize:e.itemsPerPage},u.useFlexLayout,u.useFilters,u.useSortBy,u.useExpanded,u.usePagination,u.useResizeColumns),k=P.getTableProps,j=P.getTableBodyProps,I=P.headerGroups,N=P.page,R=P.rows,D=P.prepareRow,L=P.canPreviousPage,M=P.canNextPage,F=P.pageOptions,H=P.pageCount,U=P.gotoPage,z=P.nextPage,B=P.previousPage,V=P.setPageSize,q=P.setHiddenColumns,G=P.visibleColumns,W=P.totalColumnsWidth,Y=P.toggleAllRowsExpanded,X=P.state,$=X.pageIndex,J=X.pageSize,K=X.sortBy,Q=O?R:N,Z=e.hidePaginator?"hide-paginator":"",ee=t.current&&W>t.current.clientWidth?"horizontal-scroll":"";return a.useEffect((function(){return g(!0)}),[]),a.useEffect((function(){var t,n;x((t=e.columns,Array.isArray(t)?t:!Array.isArray(t)&&"object"==typeof t&&(n=Object.keys(t)).length>0?n.map((function(e){return r(r({},t[e]),{accessor:e})})):[]))}),[e.columns]),a.useEffect((function(){v&&Array.isArray(e.hiddenColumns)&&q(e.hiddenColumns)}),[e.hiddenColumns]),a.useEffect((function(){Array.isArray(e.data)&&b(e.data)}),[e.data]),a.useEffect((function(){v&&O&&Y(!1)}),[e.currentPage]),a.useEffect((function(){v&&C&&e.onSort(K)}),[K]),a.useEffect((function(){if(v&&n.current&&t.current){var e=t.current.children[0],r=n.current,o=e.scrollTop,i=o+e.clientHeight,a=r.offsetTop,s=a+r.clientHeight;a<o?e.scrollTop-=o-a+30:s>i&&(e.scrollTop+=s-i)}}),[e.highlightBy]),a.createElement("section",{ref:t,className:"ip-table-wrapper",tabIndex:e.disableKeyScroll?0:void 0,onKeyDown:e.disableKeyScroll?h:null},e.showInterstitial&&a.createElement(f,null),v&&!e.showInterstitial&&0===y.length&&a.createElement(d,{copy:e.noDataText}),a.createElement("table",r({},k(),{className:"ip-table "+ee+" "+Z}),a.createElement("thead",{className:"ip-table-head"},I.map((function(e){return a.createElement(a.Fragment,{key:"head-fragment"},a.createElement("tr",r({},e.getHeaderGroupProps(),{className:"ip-table-head-row"}),e.headers.map((function(e){var t=e.hasOwnProperty("Search"),n=e.getSortByToggleProps(),o=a.createElement("span",{className:"sort-status"},e.isSorted?e.isSortedDesc?l.ICON_CHEVRON_DOWN:l.ICON_CHEVRON_UP:null);return a.createElement("th",r({},e.getHeaderProps(),{className:"ip-table-header "+(e.canSort?"ip-sortable":"")}),!t&&a.createElement("div",r({},n,{className:"filterable-cell-wrapper"}),e.render("Header"),o),t&&a.createElement("div",{className:"filterable-cell-wrapper"},a.createElement("span",r({},n,{className:"searchable-sort-area"}),e.render("Header"),o),e.hasOwnProperty("Search")&&e.render("Search")),e.canResize&&a.createElement("div",r({},e.getResizerProps(),{className:"ip-table-resizer "+(e.isResizing?"resizing":"")})))}))),e.headers.some((function(e){return e.hasOwnProperty("Filter")}))&&a.createElement("tr",r({},e.getHeaderGroupProps({key:"filters-row"})),e.headers.map((function(e,t){return a.createElement("th",r({},e.getHeaderProps({key:"filter-"+t}),{key:"filter-col-"+t,className:"ip-table-filter"}),e.canFilter&&e.Filter?e.render("Filter"):null)}))))}))),a.createElement("tbody",r({},j(),{className:"ip-table-body"}),Q.map((function(t,o){var s,c="";e.highlightBy&&t.original.hasOwnProperty(e.highlightBy.key)&&t.original[e.highlightBy.key]===e.highlightBy.value&&(c="selected",s=n),D(t);var l=t.getRowProps();l.className="ip-table-row "+c,l.onClick=function(n){var r=function(){"function"==typeof e.onRowClick&&e.onRowClick(t)};A||r(),1===n.detail&&A&&(i=window.setTimeout(r,200))},l.onDoubleClick=function(n){clearTimeout(i),A&&e.onRowDoubleClick(t)};var u=t.cells.map((function(e){return a.createElement("td",r({},e.getCellProps(),{className:("ip-table-col "+(e.column.overflowVisible?"overflow-visible":"")).trim()}),e.render("Cell"))}));return a.createElement(a.Fragment,{key:"row-"+o},e.dnd&&a.createElement(p.default,{rowProps:l,rowRef:s,key:"row-"+o,row:t,dndType:e.dndType,dndName:e.dndName},u),!e.dnd&&a.createElement("tr",r({key:"row-"+o,ref:s},l),u),t.isExpanded&&a.createElement("tr",r({},t.getRowProps({key:"pivot-row"}),{className:"ip-pivot-row"}),a.createElement("td",{className:"ip-pivot-col "+c,colSpan:G.length},T(t))))})))),!e.hidePaginator&&a.createElement(s.default,r({},{totalItems:e.totalItems,pageIndex:e.currentPage?e.currentPage:$,manualPagination:O,pageSize:J,pageCount:H,pageOptions:F,canNextPage:O?e.currentPage+1<=e.totalPages:M,canPreviousPage:O?e.currentPage-1>=1:L,gotoPage:O?e.onPage:U,setPageSize:V,nextPage:O?function(){return e.onPage(e.currentPage+1,J)}:z,previousPage:O?function(){return e.onPage(e.currentPage-1,J)}:B})))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(0),i=n(5),a=n(3);t.default=function(e){e.manualPagination;var t=e.pageCount,n=e.pageIndex,s=e.pageSize,c=(e.pageOptions,e.totalItems),l=e.canPreviousPage,u=e.canNextPage,p=e.gotoPage,f=e.previousPage,d=e.nextPage;e.setPageSize;return o.createElement("section",{className:"ip-table-pagination"},o.createElement("span",null,o.createElement(i.default,{style:"subtle",size:"small",tooltip:"Go to first page",disabled:!l,onClick:function(){return p(1,s)}},a.ICON_ANGLE_DOUBLE_LEFT),o.createElement(i.default,{style:"subtle",size:"small",tooltip:"Go to previous page",disabled:!l,onClick:function(){return f()}},a.ICON_ANGLE_LEFT),o.createElement(i.default,{style:"subtle",size:"small",tooltip:"Go to next page",disabled:!u,onClick:function(){return d()}},a.ICON_ANGLE_RIGHT),o.createElement(i.default,{style:"subtle",size:"small",tooltip:"Go to last page",disabled:!u,onClick:function(){return p(t,s)}},a.ICON_ANGLE_DOUBLE_RIGHT),"  ",o.createElement("span",null,"Page  ",o.createElement("strong",null,n," of ",t),"  "),o.createElement("span",null,"Go to page   ",o.createElement("input",{className:"paginator-input",type:"number",placeholder:n,onChange:function(e){var n,o=e.target.value,i=Number(o);clearTimeout(r),!o||i<1||i>t||(i>=1&&i<=t&&(n=i),r=window.setTimeout((function(){return p(n,s)}),300))}})),"  "),o.createElement("span",{className:"total-assets"},"Total  ",o.createElement("strong",null,c||0)))}},function(e,t){e.exports=u},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(55),s=n(207);t.default=function(e){var t=e.dndType,n=e.dndName,c=e.row,l=o(a.useDrag({type:t,item:{name:n,rowData:c.original,type:t}}),2),u=(l[0],l[1]);return i.createElement("tr",r({},e.rowProps,{ref:s.default([u,e.rowRef])}),e.children)}},function(e,t,n){"use strict";n.r(t),t.default=function(e){return function(t){e.forEach((function(e){"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(5),s=n(34),c=n(3),l=function(e){function t(n){var r=e.call(this,n)||this;return r.render=function(){for(var e=r.props,n=e.page,o=e.totalPages,l=e.totalItems,u=Number.isInteger(o),p=Number.isInteger(o)&&o>1,f=!u||n-1==0,d=!u||n+1>o,h=Math.max(n-t.DEFAULT_STEP,1),v=Math.min(n+t.DEFAULT_STEP,o),g=[],m=h;m<=v;m++)g.push(m);return i.createElement("div",{className:"paginator"},i.createElement("div",{className:"pagination-controls"},i.createElement("span",{className:"paging-button-group"},i.createElement(a.default,{color:"secondary",size:"small",disabled:f,onClick:function(){return r.props.onPage(1)}},c.ICON_ANGLE_DOUBLE_LEFT),i.createElement(a.default,{color:"secondary",size:"small",disabled:f,onClick:function(){return r.props.onPage(n-1)}},c.ICON_ANGLE_LEFT)),i.createElement("div",{className:"jump-to-wrapper"},i.createElement(s.default,{label:"Page",value:n,disable:!p,options:g,onChange:function(e){return r.props.onPage(parseInt(e,10))}})),i.createElement("span",{className:"paging-button-group"},i.createElement(a.default,{color:"secondary",size:"small",disabled:d,onClick:function(){return r.props.onPage(n+1)}},c.ICON_ANGLE_RIGHT),i.createElement(a.default,{color:"secondary",size:"small",disabled:d,onClick:function(){return r.props.onPage(o)}},c.ICON_ANGLE_DOUBLE_RIGHT))),i.createElement("div",{className:"total-assets"},"Total: ",l||t.DEFAULT_TOTAL))},r}return o(t,e),t.DEFAULT_TOTAL=0,t.DEFAULT_STEP=25,t}(i.PureComponent);t.default=l},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(5),s=n(3),c=function(e){function t(t){var n=e.call(this,t)||this;return n.closeStyles={position:"absolute",right:"0px",top:"0px"},n.evtHandlers={onClose:function(e){return n.onClose(e)}},n}return o(t,e),t.prototype.onClose=function(e){(0,this.props.onRequestClose)(e)},t.prototype.render=function(){var e=this.props,t=e.isOpen,n=(e.children,e.style),r=e.wrapperStyle;return t?i.createElement("div",{className:"modal",style:r},i.createElement("div",{className:"modal-bg",onClick:this.evtHandlers.onClose}),i.createElement("div",{className:"modal-container",style:n},i.createElement("div",{className:"modal-content"},this.props.children),i.createElement(a.default,{onClick:this.evtHandlers.onClose,customStyles:this.closeStyles},s.ICON_TIMES))):null},t}(i.PureComponent);t.default=c},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(93),c=n(89),l=n(90),u=n(5),p=n(3),f=function(e){function t(t){var n=e.call(this,t)||this;return n.headerRef=a.createRef(),n.state={allowableTabsInView:0},n}return o(t,e),t.prototype.componentDidMount=function(){var e=Math.floor(this.allowableNumOfTabs());this.setState({allowableTabsInView:e})},t.prototype.componentDidUpdate=function(e){var t=Math.floor(this.allowableNumOfTabs());this.setState({allowableTabsInView:t})},t.prototype.allowableNumOfTabs=function(){var e=this.props,t=e.options,n=e.tabPadding,r=0,o=this.headerRef.current;if(o){for(var i=o.offsetWidth,a=0;a<t.length;a++){var s=t[a],c=s.canClose?20:0,l=document.createElement("div");if(l.className="tab-header-option",l.innerHTML=s.label,o.appendChild(l),r+=l.offsetWidth+c,o.removeChild(l),l=null,r>=i-n-25)return a}return t.length}},t.prototype.renderContent=function(){var e,t,n,r,o=this.props,s=o.options,c=o.activeTab,l=o.keepMounted,u=o.width,p=o.height;if(l){var f=[];try{for(var d=i(s),h=d.next();!h.done;h=d.next()){var v=(b=h.value).key===c,g=a.cloneElement(b.content,{active:v,width:u,height:p});f.push(g)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}return f.length>0?f:null}try{for(var m=i(s),y=m.next();!y.done;y=m.next()){var b;if((b=y.value).key===c||!c)return b.content}}catch(e){n={error:e}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}return null},t.prototype.renderHeader=function(){for(var e=this,t=this.props,n=t.options,r=t.activeTab,o=[],i=[],s=!1,f=function(t){var c=n[t],f=c.canClose,h=c.key,v=c.label,g=f?a.createElement(u.default,{style:"subtle",size:"small",onClick:function(t){t.preventDefault(),t.stopPropagation(),e.props.onClose(h)}},p.ICON_TIMES):null,m=h===r?"active":"";t<d.state.allowableTabsInView?o.push(a.createElement("div",{className:"tab-header-option "+m,onClick:function(){return e.props.onChange(h)},key:h},v,g)):(r!==h||s||(s=!0),i.push(a.createElement(l.default,{key:h,label:a.createElement("span",null,v,g),onClick:function(){return e.props.onChange(h)},active:r===h})))},d=this,h=0;h<n.length;h++)f(h);var v=a.createElement(u.default,{size:"large",style:"subtle",color:s?"primary":null},p.ICON_BARS);return a.createElement(a.Fragment,null,o,i.length>0?a.createElement("span",{className:"tab-header-menu"},a.createElement(c.default,{position:"left",items:i,button:v})):null)},t.prototype.render=function(){return a.createElement("div",{className:"tabs"},a.createElement("div",{ref:this.headerRef,className:"tab-header"},this.renderHeader()),a.createElement("div",{className:"tab-content"},this.renderContent()))},t}(a.PureComponent);t.default=s.withResizeDetector(f)},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),c=n(56),l=n(5),u=n(9),p=n(92),f=n(6),d=n(3),h=function(e){function t(t){var n=e.call(this,t)||this;return n.state={textInputValue:""},n.inputRef=s.createRef(),c.default.filter=function(e){return f.filterHotkeys(e)},n.submitHandler=function(){return n.submitOption()},n}return o(t,e),t.prototype.deleteOption=function(e){var t=a([],i(this.props.options));t.splice(e,1),this.props.onChange(t)},t.prototype.componentWillUnmount=function(){c.default.unbind("enter",this.submitHandler)},t.prototype.inputBlur=function(e){c.default.unbind("enter",this.submitHandler)},t.prototype.inputChanged=function(e){this.setState({textInputValue:e.target.value})},t.prototype.inputFocus=function(e){this.inputRef.current&&c.default("enter",this.submitHandler)},t.prototype.submitOption=function(){var e=this,t=this.state.textInputValue,n=this.props.onError;if(""!==t){var r=void 0;-1===(r=this.props.options?a([],i(this.props.options)):[]).indexOf(t)?(r.push(t),this.props.onChange(r),this.setState({textInputValue:""},(function(){var t=e.inputRef.current;t&&t.focus()}))):n&&this.props.onError('"'+t+'" already exists in the list.')}else n&&this.props.onError("Can not add an empty item to the list")},t.prototype.render=function(){var e=this,t=this.props,n=t.label,r=t.options,o=t.placeholder,i=t.disabled,a=t.width,c=t.tooltip,l=(t.tooltipAdd,t.info),f=t.labelPosition,d=this.state.textInputValue;return s.createElement(u.default,{customClass:"list-field",label:n,tooltip:c,buttons:this.renderButtons(),info:l,labelPosition:f,width:a},s.createElement("input",{type:"text",placeholder:o,value:d,ref:this.inputRef,disabled:i,onChange:function(t){return e.inputChanged(t)},onFocus:function(t){return e.inputFocus(t)},onBlur:function(t){return e.inputBlur(t)}}),s.createElement(p.default,{items:r,removable:!0,onRemove:function(t){return e.deleteOption(t)}}))},t.prototype.renderButtons=function(){var e=this,t=this.props,n=t.buttons,r=t.tooltipAdd,o=n?a([],i(n)):[];return o.push(s.createElement(l.default,{key:"btn-submit",style:"subtle",tooltip:r,color:"primary",onClick:function(){return e.submitOption()}},d.ICON_PLUS)),o},t}(s.PureComponent);t.default=h},function(e,t){e.exports=p},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(9),s=function(e){function t(t){var n=e.call(this,t)||this;return n.state={tempValue:null},n}return o(t,e),t.prototype.componentWillUnmount=function(){clearTimeout(this.updateTimeout)},t.prototype.updateValue=function(e){this.props.onChange(e)},t.prototype.rangeInputChange=function(e){var t=this,n=e.target.value,r=parseFloat(n);clearTimeout(this.updateTimeout),this.setState({tempValue:r},(function(){t.updateTimeout=setTimeout((function(){t.updateValue(r),t.setState({tempValue:null})}),100)}))},t.prototype.numberInputChange=function(e){var t=this.props,n=t.min,r=t.max,o=e.target.value;(o=""===o?0:parseFloat(o))>=n&&o<=r&&this.updateValue(o)},t.prototype.render=function(){var e=this,t=this.props,n=t.label,r=t.width,o=t.min,s=t.max,c=t.step,l=t.defaultValue,u=t.value,p=t.tooltip,f=t.info,d=t.labelPosition,h=this.state.tempValue,v=null!==h?h:null==u?l:u;return i.createElement(a.default,{customClass:"slider-field",label:n,tooltip:p,info:f,labelPosition:d,width:r},i.createElement("input",{onChange:function(t){return e.rangeInputChange(t)},type:"range",min:o,max:s,value:v,step:c}),i.createElement("input",{className:"val",onChange:function(t){return e.numberInputChange(t)},type:"number",value:v}))},t}(i.PureComponent);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=s(n(215)),o=s(n(59)),i=s(n(227)),a=s(n(228));function s(e){return e&&e.__esModule?e:{default:e}}var c=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,a.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,i.default)(t)?(0,o.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,r.default)(t)&&n.push(t)})),n};t.default=c},function(e,t,n){var r=n(16),o=n(10),i=n(14);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(23),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(219)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===n(i[c],c,i))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(16),o=n(14);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(16),o=n(62),i=n(14),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},function(e,t,n){var r=n(65),o=n(225),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(101)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(103);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t,n){var r=n(16),o=n(66),i=n(14),a=Function.prototype,s=Object.prototype,c=a.toString,l=s.hasOwnProperty,u=c.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==u}},function(e,t,n){var r=n(104),o=n(229),i=n(287),a=n(10);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){var r=n(230),o=n(274),i=n(103),a=n(10),s=n(284);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):s(e)}},function(e,t,n){var r=n(231),o=n(273),i=n(114);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(67),o=n(106);e.exports=function(e,t,n,i){var a=n.length,s=a,c=!i;if(null==e)return!s;for(e=Object(e);a--;){var l=n[a];if(c&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<s;){var u=(l=n[a])[0],p=e[u],f=l[1];if(c&&l[2]){if(void 0===p&&!(u in e))return!1}else{var d=new r;if(i)var h=i(p,f,u,e,t,d);if(!(void 0===h?o(f,p,3,i,d):h))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(38),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(38);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(38);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(38);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(37);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(37),o=n(69),i=n(70);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(102),o=n(243),i=n(19),a=n(105),s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,p=l.hasOwnProperty,f=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?f:s).test(a(e))}},function(e,t,n){var r,o=n(244),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(12)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(247),o=n(37),i=n(69);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(248),o=n(249),i=n(250),a=n(251),s=n(252);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},function(e,t,n){var r=n(39);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(39),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(39),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(39);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(40);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(40);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(40);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(40);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(67),o=n(107),i=n(264),a=n(267),s=n(41),c=n(10),l=n(60),u=n(100),p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,d,h,v){var g=c(e),m=c(t),y=g?"[object Array]":s(e),b=m?"[object Array]":s(t),_=(y="[object Arguments]"==y?p:y)==p,w=(b="[object Arguments]"==b?p:b)==p,x=y==b;if(x&&l(e)){if(!l(t))return!1;g=!0,_=!1}if(x&&!_)return v||(v=new r),g||u(e)?o(e,t,n,d,h,v):i(e,t,y,n,d,h,v);if(!(1&n)){var E=_&&f.call(e,"__wrapped__"),O=w&&f.call(t,"__wrapped__");if(E||O){var C=E?e.value():e,T=O?t.value():t;return v||(v=new r),h(C,T,n,d,v)}}return!!x&&(v||(v=new r),a(e,t,n,d,h,v))}},function(e,t,n){var r=n(70),o=n(260),i=n(261);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(23),o=n(108),i=n(68),a=n(107),s=n(265),c=n(266),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,p,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!p(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var h=1&r;if(d||(d=c),e.size!=t.size&&!h)return!1;var v=f.get(e);if(v)return v==t;r|=2,f.set(e,t);var g=a(d(e),d(t),r,l,p,f);return f.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(109),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,s){var c=1&n,l=r(e),u=l.length;if(u!=r(t).length&&!c)return!1;for(var p=u;p--;){var f=l[p];if(!(c?f in t:o.call(t,f)))return!1}var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var v=!0;s.set(e,t),s.set(t,e);for(var g=c;++p<u;){var m=e[f=l[p]],y=t[f];if(i)var b=c?i(y,m,f,t,e,s):i(m,y,f,e,t,s);if(!(void 0===b?m===y||a(m,y,n,i,s):b)){v=!1;break}g||(g="constructor"==f)}if(v&&!g){var _=e.constructor,w=t.constructor;_==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w||(v=!1)}return s.delete(e),s.delete(t),v}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},function(e,t,n){var r=n(17)(n(12),"DataView");e.exports=r},function(e,t,n){var r=n(17)(n(12),"Promise");e.exports=r},function(e,t,n){var r=n(17)(n(12),"Set");e.exports=r},function(e,t,n){var r=n(17)(n(12),"WeakMap");e.exports=r},function(e,t,n){var r=n(113),o=n(24);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},function(e,t,n){var r=n(106),o=n(275),i=n(281),a=n(72),s=n(113),c=n(114),l=n(42);e.exports=function(e,t){return a(e)&&s(t)?c(l(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},function(e,t,n){var r=n(115);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=n(277),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=a},function(e,t,n){var r=n(278);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(70);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},function(e,t,n){var r=n(280);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(23),o=n(104),i=n(10),a=n(73),s=r?r.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(282),o=n(283);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(116),o=n(98),i=n(10),a=n(99),s=n(62),c=n(42);e.exports=function(e,t,n){for(var l=-1,u=(t=r(t,e)).length,p=!1;++l<u;){var f=c(t[l]);if(!(p=null!=e&&n(e,f)))break;e=e[f]}return p||++l!=u?p:!!(u=null==e?0:e.length)&&s(u)&&a(f,u)&&(i(e)||o(e))}},function(e,t,n){var r=n(285),o=n(286),i=n(72),a=n(42);e.exports=function(e){return i(e)?r(a(e)):o(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(115);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(288),o=n(36);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}},function(e,t,n){var r=n(96),o=n(289)(r);e.exports=o},function(e,t,n){var r=n(36);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a<i)&&!1!==o(s[a],a,s););return n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var r=a(n(59)),o=a(n(291)),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function a(e){return e&&e.__esModule?e:{default:e}}var s=t.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map((function(t){var o=e[t];return o&&(0,r.default)(o,(function(e,t){n[t]||(n[t]={}),n[t]=i({},n[t],o[t])})),t})),n};t.default=s},function(e,t,n){var r=n(292);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(67),o=n(293),i=n(117),a=n(295),s=n(296),c=n(299),l=n(300),u=n(301),p=n(302),f=n(109),d=n(303),h=n(41),v=n(304),g=n(305),m=n(310),y=n(10),b=n(60),_=n(312),w=n(19),x=n(314),E=n(24),O=n(74),C={};C["[object Arguments]"]=C["[object Array]"]=C["[object ArrayBuffer]"]=C["[object DataView]"]=C["[object Boolean]"]=C["[object Date]"]=C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Map]"]=C["[object Number]"]=C["[object Object]"]=C["[object RegExp]"]=C["[object Set]"]=C["[object String]"]=C["[object Symbol]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C["[object Error]"]=C["[object Function]"]=C["[object WeakMap]"]=!1,e.exports=function e(t,n,T,A,S,P){var k,j=1&n,I=2&n,N=4&n;if(T&&(k=S?T(t,A,S,P):T(t)),void 0!==k)return k;if(!w(t))return t;var R=y(t);if(R){if(k=v(t),!j)return l(t,k)}else{var D=h(t),L="[object Function]"==D||"[object GeneratorFunction]"==D;if(b(t))return c(t,j);if("[object Object]"==D||"[object Arguments]"==D||L&&!S){if(k=I||L?{}:m(t),!j)return I?p(t,s(k,t)):u(t,a(k,t))}else{if(!C[D])return S?t:{};k=g(t,D,j)}}P||(P=new r);var M=P.get(t);if(M)return M;P.set(t,k),x(t)?t.forEach((function(r){k.add(e(r,n,T,r,t,P))})):_(t)&&t.forEach((function(r,o){k.set(o,e(r,n,T,o,t,P))}));var F=R?void 0:(N?I?d:f:I?O:E)(t);return o(F||t,(function(r,o){F&&(r=t[o=r]),i(k,o,e(r,n,T,o,t,P))})),k}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(17),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(43),o=n(24);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(43),o=n(74);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(19),o=n(65),i=n(298),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(12),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(61)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(43),o=n(71);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(43),o=n(119);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(110),o=n(119),i=n(74);e.exports=function(e){return r(e,i,o)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(75),o=n(306),i=n(307),a=n(308),s=n(309);e.exports=function(e,t,n){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return i(e);case"[object Set]":return new c;case"[object Symbol]":return a(e)}}},function(e,t,n){var r=n(75);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(23),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},function(e,t,n){var r=n(75);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(311),o=n(66),i=n(65);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},function(e,t,n){var r=n(19),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t,n){var r=n(313),o=n(63),i=n(64),a=i&&i.isMap,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(41),o=n(14);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(315),o=n(63),i=n(64),a=i&&i.isSet,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(41),o=n(14);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var r,o=n(59),i=(r=o)&&r.__esModule?r:{default:r},a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var s={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){var n=t[e];return n||{extend:e}}},c=t.autoprefix=function(e){var t={};return(0,i.default)(e,(function(e,n){var r={};(0,i.default)(e,(function(e,t){var n=s[t];n?r=a({},r,n(e)):r[t]=e})),t[n]=r})),t};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hover=void 0;var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0),a=(r=i)&&r.__esModule?r:{default:r};function s(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 l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=t.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,i,l;s(this,r);for(var u=arguments.length,p=Array(u),f=0;f<u;f++)p[f]=arguments[f];return i=l=c(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(p))),l.state={hover:!1},l.handleMouseOver=function(){return l.setState({hover:!0})},l.handleMouseOut=function(){return l.setState({hover:!1})},l.render=function(){return a.default.createElement(t,{onMouseOver:l.handleMouseOver,onMouseOut:l.handleMouseOut},a.default.createElement(e,o({},l.props,l.state)))},c(l,i)}return l(r,n),r}(a.default.Component)};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.active=void 0;var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0),a=(r=i)&&r.__esModule?r:{default:r};function s(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 l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=t.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,i,l;s(this,r);for(var u=arguments.length,p=Array(u),f=0;f<u;f++)p[f]=arguments[f];return i=l=c(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(p))),l.state={active:!1},l.handleMouseDown=function(){return l.setState({active:!0})},l.handleMouseUp=function(){return l.setState({active:!1})},l.render=function(){return a.default.createElement(t,{onMouseDown:l.handleMouseDown,onMouseUp:l.handleMouseUp},a.default.createElement(e,o({},l.props,l.state)))},c(l,i)}return l(r,n),r}(a.default.Component)};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){var n={},r=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";var r=n(321);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e){var t="string"==typeof e.className?e.className:"",n=e.isLoading?r.createElement("div",{className:"loading-bar"}):null,o=r.createElement("div",{className:"title"},e.title);return e.hasOwnProperty("tabs")&&Array.isArray(e.tabs)&&(o=e.tabs.map((function(t,n){return r.createElement("div",{key:n,className:"tab "+(e.activeTabName===t?"active":""),onClick:function(){return e.selectTab(t,n)}},t)}))),r.createElement("div",{className:"section "+t},r.createElement("div",{className:"section-header"},o,r.createElement("div",{className:"buttons"},e.buttons)),r.createElement("div",{className:"section-content"},e.children),n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(6),i=r.memo((function(e){return r.createElement(r.Fragment,null,o.formatDateDefault(e.cell.row.values.date_created))}));t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secondsToTime=void 0;var r=n(0),o=n(15),i=n(7),a=n(8);t.secondsToTime=function(e){var t=Math.floor(e/60),n=Math.floor(e-60*t);return n<10&&(n="0"+n),t+":"+n};t.default=i.connect((function(e){return{}}),(function(e){return a.bindActionCreators({updateAssetName:o.updateAssetName},e)}))((function(e){var n=e.cell.row.original,o=n.duration;n.id;return null!=o?r.createElement("div",{className:"asset-duration-cell"},t.secondsToTime(o)):null}))},function(e,t){e.exports=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ASSET_DND_TYPES=void 0,t.ASSET_DND_TYPES={ASSET_NAME:"asset_name"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(11),i=n(15),a=n(7),s=n(8);t.default=a.connect((function(e){return{}}),(function(e){return s.bindActionCreators({updateAssetName:i.updateAssetName},e)}))((function(e){var t=e.cell.row.original,n=t.name,i=t.id;return r.createElement("div",null,r.createElement(o.default,{controlled:!0,value:n,width:"100%",onSubmit:function(t){return e.updateAssetName(e.api,i,t)}}))}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(11),s=n(20),c=n(7),l=n(8),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.render=function(){var e=t.props.assetFilters;return i.createElement(a.default,{submittable:!0,submittableType:"search",value:e.name,doSubmit:function(e){return t.props.updateFilters({name:e})}})},t}return o(t,e),t}(i.PureComponent),p=c.connect((function(e){return{assetFilters:e.assetFilters}}),(function(e){return l.bindActionCreators({updateFilters:s.updateFilters},e)}))(i.memo(u));t.default=p},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(25),s=n(22),c=n(7),l=n(8),u=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=n.props,t=e.cell,r=e.selectedAssets,o=t.row.original.id,a=r.indexOf(o)>-1;return i.createElement("div",{className:"select-cell"},i.createElement(s.default,{label:"",width:"auto",value:a,onChange:function(e,t){return function(e,t){e?t.shiftKey&&r.length>0?n.props.selectMultipleAssets(o):n.props.selectAsset(o):n.props.deselectAsset(o)}(e,t)}}))},n}return o(t,e),t}(i.PureComponent),p=c.connect((function(e){return{selectedAssets:e.selectedAssets}}),(function(e){return l.bindActionCreators({selectAsset:a.selectAsset,deselectAsset:a.deselectAsset,selectMultipleAssets:a.selectMultipleAssets},e)}))(i.memo(u));t.default=p},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(22),s=n(25),c=n(7),l=n(8),u=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=0===n.props.selectedAssets.length,t=e?function(){return n.props.selectAll()}:function(){return n.props.resetSelection()};return i.createElement(a.default,{label:"",propagate:!1,value:!e,onChange:t})},n}return o(t,e),t}(i.PureComponent),p=c.connect((function(e){return{selectedAssets:e.selectedAssets}}),(function(e){return l.bindActionCreators({selectAll:s.selectAll,resetSelection:s.resetSelection},e)}))(i.memo(u));t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(5),i=r.memo((function(e){return r.createElement(o.default,{color:"secondary",style:"subtle",size:"small",onClick:e.onClick},e.cell.row.values.tags.length)}));t.default=i},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(20),s=n(11),c=n(7),l=n(8),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.render=function(){var e=t.props.assetFilters;return i.createElement(s.default,{submittable:!0,submittableType:"search",value:e.tags,doSubmit:function(e){return t.props.updateFilters({tags:e})}})},t}return o(t,e),t}(i.PureComponent),p=c.connect((function(e){return{assetFilters:e.assetFilters}}),(function(e){return l.bindActionCreators({updateFilters:a.updateFilters},e)}))(i.memo(u));t.default=p},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(13),s=n(44),c=n(11),l=n(15),u=n(7),p=n(8),f=n(5),d=n(3),h=function(e){function t(n){var r=e.call(this,n)||this;return r.addTags=function(e,t){t&&r.props.addAssetTag(r.props.api,e,t)},r.render=function(){var e=r.props,n=e.row.original,o=n.id,l=n.tags,u=e.assetTags,p=l.map((function(e){return i.createElement(s.default,{key:e,copy:e,colorize:t.COLORIZE_TAGS,removeHandler:function(){return r.props.deleteAssetTag(r.props.api,o,e)}})}));return i.createElement("div",{className:"tags-column"},i.createElement(i.Fragment,null,i.createElement(c.default,{submittable:!0,submittableType:"add",suggestions:u,label:a.assets.tags.add,width:t.ADD_TAG_INPUT_WIDTH,doSubmit:function(e){return r.addTags(o,e)}}),p,i.createElement(f.default,{customStyles:{position:"absolute",right:"1px",top:"9px"},style:"subtle",onClick:function(e){return r.props.onClose(e,r.props.row)}},d.ICON_TIMES)))},r}return o(t,e),t.ADD_TAG_INPUT_WIDTH="280px",t.COLORIZE_TAGS=!0,t}(i.PureComponent);t.default=u.connect((function(e){return{assetTags:e.assetTags}}),(function(e){return p.bindActionCreators({addAssetTag:l.addAssetTag,deleteAssetTag:l.deleteAssetTag},e)}))(h)},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(44),s=n(11),c=n(15),l=n(7),u=n(8),p=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=n.props,t=e.cell,r=e.assetTags,o=t.row.original.tags.map((function(e){return i.createElement(a.default,{key:e,copy:e,colorize:!0,removeHandler:function(){return n.removeTag(e)}})}));return i.createElement("div",{className:"tags-complex-column"},o,i.createElement("div",{className:"new-tag"},i.createElement(s.default,{submittable:!0,submittableType:"add",placeholder:"+",hideButtons:!0,suggestions:r,doSubmit:function(e){return n.onSubmit(e)},width:"150px",buttons:[],value:n.state.newTag})))},n.state={newTag:""},n.inputRef=i.createRef(),n}return o(t,e),t.prototype.onSubmit=function(e){var t=this.props.cell.row.original,n=t.id;-1===t.tags.indexOf(e)&&this.props.addAssetTag(this.props.api,n,e),this.setState({newTag:""})},t.prototype.removeTag=function(e){var t=this.props.cell.row.original.id;this.props.deleteAssetTag(this.props.api,t,e)},t}(i.Component),f=l.connect((function(e){return{assetTags:e.assetTags}}),(function(e){return u.bindActionCreators({addAssetTag:c.addAssetTag,deleteAssetTag:c.deleteAssetTag},e)}))(i.memo(p));t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(79),i=r.memo((function(e){return r.createElement("div",{className:"asset-type-cell"},r.createElement(o.default,{type:e.cell.row.values.type}))}));t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=r.memo((function(e){var t=e.cell.row.original.processing?"processing":"complete";return r.createElement("div",{className:"asset-status-cell"},r.createElement("div",{className:"status-indicator "+t}))}));t.default=o},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(79),s=n(5),c=n(51),l=n(20),u=n(7),p=n(8),f=n(26),d=function(e){function t(t){var n=e.call(this,t)||this;return n.handleFilterChange=function(e){var t=e!==f.ASSET_TYPES.ALL?e:"";n.props.updateFilters({type:t,page:1})},n.render=function(){var e=n.state.openMenu,t=n.props.assetFilters.type,r=[],o=function(e){if(f.ASSET_TYPES.hasOwnProperty(e)){var t=f.ASSET_TYPES[e];r.push(i.createElement("div",{key:t,className:"asset-filter",onClick:function(){return n.handleFilterChange(t)}},i.createElement(a.default,{type:t})))}};for(var l in f.ASSET_TYPES)o(l);return i.createElement("div",{className:"centered cell"},i.createElement(s.default,{tooltip:"Filter by Asset type",buttonRef:n.typeFilterRef,onClick:function(){return n.setState({openMenu:!e})}},i.createElement(a.default,{type:t||"filter"}),i.createElement(c.default,{fixed:!0,show:e,position:"bottomleft",toggleRef:n.typeFilterRef,onOutsideClick:function(){return n.setState({openMenu:!1})}},r)))},n.state={openMenu:!1},n.typeFilterRef=i.createRef(),n}return o(t,e),t}(i.PureComponent),h=u.connect((function(e){return{assetFilters:e.assetFilters}}),(function(e){return p.bindActionCreators({updateFilters:l.updateFilters},e)}))(i.memo(d));t.default=h},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(27),s=n(21),c=n(80),l=function(e){function t(t){var n=e.call(this,t)||this;return n.defaultSize=600,n}return o(t,e),t.prototype.getWrapperStyle=function(){var e=this.props,t=e.padding,n=e.width,r=e.height,o=void 0!==t?t:a.DEFAULT_PADDING;return s.getPlayerStyle(n,r,this.defaultSize,this.defaultSize,o,this.defaultSize,this.defaultSize)},t.prototype.render=function(){var e=this.props,t=e.active,n=e.asset,r=n.name,o=n.url,a=n.id,s=e.width,l=e.height,u=this.getWrapperStyle();return!1!==t?i.createElement("div",{className:"media-player"},i.createElement("div",{className:"inner-viewer",style:u},i.createElement(c.default,{options:{width:s,height:l,x:0,y:0,rotation:0,id:"xxx",name:"xxx",content:"ABCDEFGHIJKLM\nNOPQRSTUVWXYZ\nabcdefghijklm\nnopqrstuvwxyz\n1234567890",color:"#000000",background_color:"#ffffff",font_size:80,font_type:"custom",font:r,custom_font_url:o,custom_font_id:a,letter_spacing:null,word_spacing:null,line_height:null,horizontal_alignment:"center",vertical_alignment:"center",text_wrap:!0,text_fit:!0}}))):null},t}(i.PureComponent);t.default=l},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(13),s=n(22),c=n(120),l=n(46),u=n(8),p=n(7),f=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e,t=n.props.assetUploads,r=t.uploads,o=t.autoTag,l=t.assignToStory;return e=r.length>0?r.map((function(e){var t=e.filename,n=e.percent<100?i.createElement(c.default,{progress:e.percent}):i.createElement("span",null,a.assets.uploads.preparePhase);return i.createElement("div",{className:"ongoing-upload",key:t},i.createElement("span",{className:"upload-filename"},t),n)})):i.createElement("div",{className:"no-ongoing-uploads"},a.assets.uploads.noUploads),i.createElement("div",{className:"uploads-menu"},i.createElement("div",{className:"uploads-controls"},i.createElement(s.default,{width:"50%",label:a.assets.uploads.autoTagInput,value:o,onChange:function(){return n.props.toggleAutoTag(!o)}}),i.createElement(s.default,{width:"50%",label:a.assets.uploads.assignToStoryInput,info:a.assets.uploads.assignToStoryInfo,value:l,onChange:function(){return n.props.toggleAssignToStory(!l)}})),i.createElement("div",{className:"uploads-list"},e))},n}return o(t,e),t}(i.PureComponent);t.default=p.connect((function(e){return{assetUploads:e.assetUploads}}),(function(e){return u.bindActionCreators({toggleAutoTag:l.toggleAutoTag,toggleAssignToStory:l.toggleAssignToStory},e)}))(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewNotAvailable=void 0;var r=n(0),o=n(3),i=n(13);t.PreviewNotAvailable=function(e){return!0===e.active||void 0===e.active?r.createElement("div",{className:"preview-not-available"},r.createElement("div",{className:"cta"},r.createElement("div",{className:"icon"},o.ICON_BAN),r.createElement("p",null,i.assets.previewNotAvailable))):null}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(27),s=n(21),c=function(e){function t(t){var n=e.call(this,t)||this;return n.width=1280,n.height=720,n.audioNode=i.createRef(),n}return o(t,e),t.prototype.getImageStyle=function(){var e=this.props,t=e.padding,n=e.width,r=e.height,o=void 0!==t?t:a.DEFAULT_PADDING;return s.getPlayerStyle(n,r,this.width,this.height,o)},t.prototype.render=function(){var e=this.props,t=e.url;return!1!==e.active?i.createElement("div",{className:"media-player"},i.createElement("div",{className:"inner-viewer",style:this.getImageStyle()},i.createElement("audio",{controls:!0,src:t,ref:this.audioNode}))):null},t}(i.PureComponent);t.default=c},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(27),s=n(21),c=function(e){function t(t){var n=e.call(this,t)||this;return n.state={imageHeight:1080,imageWidth:1920},n.imgNode=i.createRef(),n}return o(t,e),t.prototype.getImageStyle=function(){var e=this.state,t=e.imageHeight,n=e.imageWidth,r=this.props,o=r.padding,i=r.width,c=r.height,l=void 0!==o?o:a.DEFAULT_PADDING;return t&&n?s.getPlayerStyle(i,c,n,t,l):{}},t.prototype.metadataLoaded=function(e){this.setState({imageWidth:e.target.naturalWidth,imageHeight:e.target.naturalHeight})},t.prototype.render=function(){var e=this.props;e.url;return!1!==e.active?i.createElement("div",{className:"mediap-player"},i.createElement("div",{className:"inner-viewer",style:this.getImageStyle()})):null},t}(i.PureComponent);t.default=c},function(e,t,n){var r,o,i;o=[t],void 0===(i="function"==typeof(r=function(e){"use strict";var t,n=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};!function(e){e[e.EOS=0]="EOS",e[e.Text=1]="Text",e[e.Incomplete=2]="Incomplete",e[e.ESC=3]="ESC",e[e.Unknown=4]="Unknown",e[e.SGR=5]="SGR",e[e.OSCURL=6]="OSCURL"}(t||(t={}));var r=function(){function e(){this.VERSION="4.0.4",this.setup_palettes(),this._use_classes=!1,this._escape_for_html=!0,this.bold=!1,this.fg=this.bg=null,this._buffer="",this._url_whitelist={http:1,https:1}}return Object.defineProperty(e.prototype,"use_classes",{get:function(){return this._use_classes},set:function(e){this._use_classes=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"escape_for_html",{get:function(){return this._escape_for_html},set:function(e){this._escape_for_html=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url_whitelist",{get:function(){return this._url_whitelist},set:function(e){this._url_whitelist=e},enumerable:!0,configurable:!0}),e.prototype.setup_palettes=function(){var e=this;this.ansi_colors=[[{rgb:[0,0,0],class_name:"ansi-black"},{rgb:[187,0,0],class_name:"ansi-red"},{rgb:[0,187,0],class_name:"ansi-green"},{rgb:[187,187,0],class_name:"ansi-yellow"},{rgb:[0,0,187],class_name:"ansi-blue"},{rgb:[187,0,187],class_name:"ansi-magenta"},{rgb:[0,187,187],class_name:"ansi-cyan"},{rgb:[255,255,255],class_name:"ansi-white"}],[{rgb:[85,85,85],class_name:"ansi-bright-black"},{rgb:[255,85,85],class_name:"ansi-bright-red"},{rgb:[0,255,0],class_name:"ansi-bright-green"},{rgb:[255,255,85],class_name:"ansi-bright-yellow"},{rgb:[85,85,255],class_name:"ansi-bright-blue"},{rgb:[255,85,255],class_name:"ansi-bright-magenta"},{rgb:[85,255,255],class_name:"ansi-bright-cyan"},{rgb:[255,255,255],class_name:"ansi-bright-white"}]],this.palette_256=[],this.ansi_colors.forEach((function(t){t.forEach((function(t){e.palette_256.push(t)}))}));for(var t=[0,95,135,175,215,255],n=0;n<6;++n)for(var r=0;r<6;++r)for(var o=0;o<6;++o){var i={rgb:[t[n],t[r],t[o]],class_name:"truecolor"};this.palette_256.push(i)}for(var a=8,s=0;s<24;++s,a+=10){var c={rgb:[a,a,a],class_name:"truecolor"};this.palette_256.push(c)}},e.prototype.escape_txt_for_html=function(e){return e.replace(/[&<>]/gm,(function(e){return"&"===e?"&amp;":"<"===e?"&lt;":">"===e?"&gt;":void 0}))},e.prototype.append_buffer=function(e){var t=this._buffer+e;this._buffer=t},e.prototype.get_next_packet=function(){var e={kind:t.EOS,text:"",url:""},r=this._buffer.length;if(0==r)return e;var i=this._buffer.indexOf("");if(-1==i)return e.kind=t.Text,e.text=this._buffer,this._buffer="",e;if(i>0)return e.kind=t.Text,e.text=this._buffer.slice(0,i),this._buffer=this._buffer.slice(i),e;if(0==i){if(1==r)return e.kind=t.Incomplete,e;var a=this._buffer.charAt(1);if("["!=a&&"]"!=a)return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;if("["==a){if(this._csi_regex||(this._csi_regex=o(n(["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n [ # CSI\n ([<-?]?) # private-mode char\n ([d;]*) # any digits or semicolons\n ([ -/]? # an intermediate modifier\n [@-~]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n [ # CSI\n [ -~]* # anything legal\n ([\0-:]) # anything illegal\n )\n "],["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \\x1b\\[ # CSI\n ([\\x3c-\\x3f]?) # private-mode char\n ([\\d;]*) # any digits or semicolons\n ([\\x20-\\x2f]? # an intermediate modifier\n [\\x40-\\x7e]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \\x1b\\[ # CSI\n [\\x20-\\x7e]* # anything legal\n ([\\x00-\\x1f:]) # anything illegal\n )\n "]))),null===(l=this._buffer.match(this._csi_regex)))return e.kind=t.Incomplete,e;if(l[4])return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;""!=l[1]||"m"!=l[3]?e.kind=t.Unknown:e.kind=t.SGR,e.text=l[2];var s=l[0].length;return this._buffer=this._buffer.slice(s),e}if("]"==a){if(r<4)return e.kind=t.Incomplete,e;if("8"!=this._buffer.charAt(2)||";"!=this._buffer.charAt(3))return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;this._osc_st||(this._osc_st=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=e.raw[0],o=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm,i=r.replace(o,"");return new RegExp(i,"g")}(n(["\n (?: # legal sequence\n (\\) # ESC | # alternate\n () # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\0-] # anything illegal\n | # alternate\n [\b-] # anything illegal\n | # alternate\n [-] # anything illegal\n )\n "],["\n (?: # legal sequence\n (\\x1b\\\\) # ESC \\\n | # alternate\n (\\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\\x00-\\x06] # anything illegal\n | # alternate\n [\\x08-\\x1a] # anything illegal\n | # alternate\n [\\x1c-\\x1f] # anything illegal\n )\n "]))),this._osc_st.lastIndex=0;var c=this._osc_st.exec(this._buffer);if(null===c)return e.kind=t.Incomplete,e;if(c[3])return e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e;var l,u=this._osc_st.exec(this._buffer);return null===u?(e.kind=t.Incomplete,e):u[3]?(e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e):(this._osc_regex||(this._osc_regex=o(n(["\n ^ # beginning of line\n #\n ]8; # OSC Hyperlink\n [ -:<-~]* # params (excluding ;)\n ; # end of params\n ([!-~]{0,512}) # URL capture\n (?: # ST\n (?:\\) # ESC | # alternate\n (?:) # BEL (what xterm did)\n )\n ([!-~]+) # TEXT capture\n ]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\) # ESC | # alternate\n (?:) # BEL (what xterm did)\n )\n "],["\n ^ # beginning of line\n #\n \\x1b\\]8; # OSC Hyperlink\n [\\x20-\\x3a\\x3c-\\x7e]* # params (excluding ;)\n ; # end of params\n ([\\x21-\\x7e]{0,512}) # URL capture\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n ([\\x21-\\x7e]+) # TEXT capture\n \\x1b\\]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n "]))),null===(l=this._buffer.match(this._osc_regex))?(e.kind=t.ESC,e.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),e):(e.kind=t.OSCURL,e.url=l[1],e.text=l[2],s=l[0].length,this._buffer=this._buffer.slice(s),e))}}},e.prototype.ansi_to_html=function(e){this.append_buffer(e);for(var n=[];;){var r=this.get_next_packet();if(r.kind==t.EOS||r.kind==t.Incomplete)break;r.kind!=t.ESC&&r.kind!=t.Unknown&&(r.kind==t.Text?n.push(this.transform_to_html(this.with_state(r))):r.kind==t.SGR?this.process_ansi(r):r.kind==t.OSCURL&&n.push(this.process_hyperlink(r)))}return n.join("")},e.prototype.with_state=function(e){return{bold:this.bold,fg:this.fg,bg:this.bg,text:e.text}},e.prototype.process_ansi=function(e){for(var t=e.text.split(";");t.length>0;){var n=t.shift(),r=parseInt(n,10);if(isNaN(r)||0===r)this.fg=this.bg=null,this.bold=!1;else if(1===r)this.bold=!0;else if(22===r)this.bold=!1;else if(39===r)this.fg=null;else if(49===r)this.bg=null;else if(r>=30&&r<38)this.fg=this.ansi_colors[0][r-30];else if(r>=40&&r<48)this.bg=this.ansi_colors[0][r-40];else if(r>=90&&r<98)this.fg=this.ansi_colors[1][r-90];else if(r>=100&&r<108)this.bg=this.ansi_colors[1][r-100];else if((38===r||48===r)&&t.length>0){var o=38===r,i=t.shift();if("5"===i&&t.length>0){var a=parseInt(t.shift(),10);a>=0&&a<=255&&(o?this.fg=this.palette_256[a]:this.bg=this.palette_256[a])}if("2"===i&&t.length>2){var s=parseInt(t.shift(),10),c=parseInt(t.shift(),10),l=parseInt(t.shift(),10);if(s>=0&&s<=255&&c>=0&&c<=255&&l>=0&&l<=255){var u={rgb:[s,c,l],class_name:"truecolor"};o?this.fg=u:this.bg=u}}}}},e.prototype.transform_to_html=function(e){var t=e.text;if(0===t.length)return t;if(this._escape_for_html&&(t=this.escape_txt_for_html(t)),!e.bold&&null===e.fg&&null===e.bg)return t;var n=[],r=[],o=e.fg,i=e.bg;e.bold&&n.push("font-weight:bold"),this._use_classes?(o&&("truecolor"!==o.class_name?r.push(o.class_name+"-fg"):n.push("color:rgb("+o.rgb.join(",")+")")),i&&("truecolor"!==i.class_name?r.push(i.class_name+"-bg"):n.push("background-color:rgb("+i.rgb.join(",")+")"))):(o&&n.push("color:rgb("+o.rgb.join(",")+")"),i&&n.push("background-color:rgb("+i.rgb+")"));var a="",s="";return r.length&&(a=' class="'+r.join(" ")+'"'),n.length&&(s=' style="'+n.join(";")+'"'),"<span"+s+a+">"+t+"</span>"},e.prototype.process_hyperlink=function(e){var t=e.url.split(":");return t.length<1?"":this._url_whitelist[t[0]]?'<a href="'+this.escape_txt_for_html(e.url)+'">'+this.escape_txt_for_html(e.text)+"</a>":""},e}();function o(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=e.raw[0],o=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm,i=r.replace(o,"");return new RegExp(i)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(125),c=n(345),l=n(11),u=n(5),p=n(33),f=n(35),d=n(34),h=n(57),v=n(9),g=n(45),m=n(21),y=n(123),b=n(346),_=n(93),w=n(13),x=n(6),E=n(126),O=n(124),C=function(e){function t(t){var n=e.call(this,t)||this,r=n.getInventoryDefaults(),o=n.getInventoryOptions();return n.state={inventory:r,inventoryOptions:o,experienceId:null,jobId:null,experience:null,timeElapsed:0,activeOutput:"",rendering:!1},n.timer=new E.default({interval:1e3,onUpdate:function(e){n.setState({timeElapsed:e})}}),n.evtHandlers={toggleOutput:function(e){return n.toggleActiveOutput(e)},createExp:function(){return n.createExperience()},gotExperience:null},n}return o(t,e),t.prototype.componentWillUnmount=function(){this.timer.stop(),this.evtHandlers.gotExperience=null},t.prototype.getInventoryOptions=function(){var e=this.props.variables,t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];r.defaultItem&&r.defaultItem.type&&r.defaultItem.type.toLowerCase()===s.VARIABLE_TYPES.ENUM&&(t[r.id]=r.defaultItem.options)}return t},t.prototype.getInventoryDefaults=function(){var e=this.props.variables,t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t[r.id]=this.getVariableValue(r.previewItem)}return t},t.prototype.checkInventoryDefaults=function(e){var t=this.props.variables,n=i({},this.state.inventory);for(var r in t)if(t.hasOwnProperty(r)){var o=t[r],a=e[r];if(a){var s=this.getVariableValue(a.previewItem),c=this.getVariableValue(o.previewItem);o.type===a.type&&s===c||(n[r]=c)}}return n},t.prototype.getVariableValue=function(e){if(e&&e.type){var t=e.type.toLowerCase();return t===s.VARIABLE_TYPES.IMAGE||t===s.VARIABLE_TYPES.VIDEO||t===s.VARIABLE_TYPES.AUDIO?e.url:e.src}},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.experienceId,r=t.jobId;n&&r&&this.setState({jobId:r},(function(){e.getExperience(n)}))},t.prototype.componentDidUpdate=function(e,t){if(e.storyId!==this.props.storyId&&(this.evtHandlers.gotExperience=null),e.variables!==this.props.variables){var n=void 0,r=this.getInventoryOptions();n=e.storyId===this.props.storyId?this.checkInventoryDefaults(e.variables):this.getInventoryDefaults(),this.setState({inventoryOptions:r,inventory:n})}},t.prototype.variableInputChanged=function(e,t){var n=i({},this.state.inventory);n[e]=t,this.setState({inventory:n})},t.prototype.getViewerOptions=function(){var e=[],t=this.state,n=t.experience.output,r=t.jobId,o=n.videos,i=n.images;if(o)for(var a in o)if(o.hasOwnProperty(a)){var s={label:"Video: "+a,value:c.OUTPUT_TYPES.VIDEO+"."+a};e.push(s)}if(i)for(var a in i)if(i.hasOwnProperty(a)){var l={label:"Image: "+a,value:c.OUTPUT_TYPES.IMAGE+"."+a};e.push(l)}return r&&e.push({label:w.previewer.btnLog,value:c.OUTPUT_TYPES.LOG+"."+r}),e},t.prototype.renderVariableFields=function(){var e=this,t=this.state,n=t.inventory,r=t.inventoryOptions,o=this.props.variables,i=[],c=function(t){if(o.hasOwnProperty(t)){var c=o[t];switch(c.type.toLowerCase()){case s.VARIABLE_TYPES.TEXT:i.push(a.createElement(l.default,{label:c.name,key:c.id,value:n[c.id],onChange:function(t){return e.variableInputChanged(c.id,t)}}));break;case s.VARIABLE_TYPES.NUMBER:i.push(a.createElement(f.default,{label:c.name,key:c.id,value:n[c.id],onChange:function(t){return e.variableInputChanged(c.id,t)}}));break;case s.VARIABLE_TYPES.ENUM:i.push(a.createElement(d.default,{label:c.name,key:c.id,value:n[c.id],options:r[c.id],onChange:function(t){return e.variableInputChanged(c.id,t)}}));break;case s.VARIABLE_TYPES.BOOLEAN:i.push(a.createElement(h.default,{label:c.name,key:c.id,value:n[c.id],options:s.BOOLEAN_DEFAULT_OPTIONS,onChange:function(t){return e.variableInputChanged(c.id,t)}}));break;case s.VARIABLE_TYPES.IMAGE:i.push(a.createElement(v.default,{label:c.name,key:c.id},a.createElement(b.default,{value:n[c.id],type:c.type,onChange:function(t){return e.variableInputChanged(c.id,t)}})));break;case s.VARIABLE_TYPES.VIDEO:case s.VARIABLE_TYPES.AUDIO:i.push(a.createElement(v.default,{label:c.name,key:c.id},a.createElement(b.default,{type:c.type,value:n[c.id],onChange:function(t){return e.variableInputChanged(c.id,t)}})))}}};for(var u in o)c(u);return i},t.prototype.getFirstOutput=function(e){var t=e.output.videos,n=e.output.images;if(t){for(var r in t)if(t.hasOwnProperty(r))return c.OUTPUT_TYPES.VIDEO+"."+r}else{if(!n)return null;for(var r in n)if(n.hasOwnProperty(r))return c.OUTPUT_TYPES.IMAGE+"."+r}},t.prototype.getExperience=function(e,t,n,r){var o=this;void 0===t&&(t=!1),this.timer.running||this.timer.start();var i=this.props,a=i.api,s=i.onError,c=i.onExperenceLoaded,l=i.onJobCreated;this.setState({rendering:!0},(function(){o.setState({experienceId:e},(function(){t?a.triggerEvent(e,n,r).then((function(t){o.setState({jobId:t.job_id},(function(){l&&l(e,t.job_id),o.evtHandlers.gotExperience=function(e){o.timer.stop(),c&&c(e),o.setState({rendering:!1,activeOutput:o.getFirstOutput(e),experience:e})};a.getExperience(e,!0).then((function(e){o.evtHandlers.gotExperience&&o.evtHandlers.gotExperience(e)})).catch((function(t){o.resetState(),s&&s(w.previewer.runExpError.replace("[expId]",e))}))}))})).catch((function(t){o.resetState(),s&&s(w.previewer.triggerExpError.replace("[expId]",e))})):(o.evtHandlers.gotExperience=function(e){o.timer.stop(),c&&c(e),o.setState({rendering:!1,activeOutput:o.getFirstOutput(e),experience:e})},a.getExperience(e,!0).then((function(e){o.evtHandlers.gotExperience&&o.evtHandlers.gotExperience(e)})).catch((function(t){o.resetState(),s&&s(w.previewer.runExpError.replace("[expId]",e))})))}))}))},t.prototype.createExperience=function(){var e=this,t=this.props,n=t.storyId,r=t.onNotification,o=t.onError,i=t.api,a=t.onExperienceCreated,s=t.compositionId,c=t.useWorkingCopy;this.resetState((function(){e.setState({rendering:!0},(function(){e.timer.start(),r&&r(w.previewer.runExpStart),i.createExperience(n,e.state.inventory,s,c).then((function(t){r&&r(w.previewer.expId.replace("[expId]",t.id)),a&&a(t),e.getExperience(t.id,!0,s,c)})).catch((function(t){e.resetState(),o&&o(w.previewer.createExpError)}))}))}))},t.prototype.resetState=function(e){this.timer.stop(),this.setState({rendering:!1,experienceId:null,experience:null,jobId:null,timeElapsed:0,activeOutput:null},(function(){e&&e()}))},t.prototype.renderViewerContent=function(){var e=this.state,t=e.rendering,n=e.experience,r=e.timeElapsed,o=e.activeOutput,i=this.props,s=i.api,l=i.onError;if(t)return a.createElement("div",{className:"running-prompt"},a.createElement(p.default,null),a.createElement("br",null),a.createElement("h1",null,"  ",w.previewer.expRunning),a.createElement("p",null,w.previewer.time," ",x.formattedTime(r)));if(n&&o){var u=void 0,f=void 0,d=o.split("."),h=d[0],v=d[1];if(h===c.OUTPUT_TYPES.IMAGE)f=n.output.images[v],u=a.createElement(y.default,{url:f,active:!0});else if(h===c.OUTPUT_TYPES.VIDEO){var g=n.output.videos[v],b=void 0!==g.width?parseInt(g.width,10):null,E=void 0!==g.height?parseInt(g.height,10):null;f=g.url,u=a.createElement(m.default,{url:f,active:!0,maxWidth:b,allowManualScale:!0,maxHeight:E})}else h===c.OUTPUT_TYPES.LOG&&(u=a.createElement("div",{className:"log"},a.createElement(O.default,{api:s,onError:l,jobId:v})));return a.createElement(_.default,{handleWidth:!0,handleHeight:!0},u)}return null},t.prototype.toggleActiveOutput=function(e){this.setState({activeOutput:e})},t.prototype.render=function(){var e,t,n=this.state,r=n.rendering,o=n.experience,i=n.activeOutput,s=o?w.previewer.btnReRender:w.previewer.btnRender,c=r?null:a.createElement(u.default,{size:"large",onClick:this.evtHandlers.createExp,color:"primary",style:"bold"},s);if(o){var p=this.getViewerOptions();e=a.createElement(d.default,{width:"130px",options:p,value:i,onChange:this.evtHandlers.toggleOutput}),t=a.createElement(l.default,{readOnly:!0,width:"360px",label:w.previewer.expIdField,showCopy:!0,value:o.id})}return a.createElement("div",{className:"story-viewer viewer"},a.createElement("div",{className:"variables"},a.createElement("h2",null,w.previewer.previewVars),a.createElement(g.default,null),this.renderVariableFields()),a.createElement("div",{className:"viewer-content"},a.createElement("div",{className:"content-header"},c,a.createElement("div",{className:"output"},e),a.createElement("div",{className:"right-interface"},t)),a.createElement("div",{className:"content-wrapper"},this.renderViewerContent())))},t}(a.PureComponent);t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OUTPUT_TYPES=void 0,t.OUTPUT_TYPES={LOG:"log",IMAGE:"image",VIDEO:"video"}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(33),s=n(125),c=n(78),l=n(5),u=n(3),p=function(e){function t(t){var n=e.call(this,t)||this;return n.input=i.createRef(),n.state={processing:!1,processedFile:null},n.evtHandlers={fileUpload:function(e){return n.fileUploaded(e)},fileDrop:function(e,t){return n.onFileDrop(e,t)},clearSelection:function(e){return n.clearSelection(e)},click:function(){return n.onClick()}},n}return o(t,e),t.prototype.clearSelection=function(e){e.preventDefault(),e.stopPropagation(),this.props.onChange(null)},t.prototype.fileUploaded=function(e){var t=e.target.files[0];t&&this.props.onChange(t)},t.prototype.componentDidUpdate=function(e){e.value!==this.props.value&&this.checkFile()},t.prototype.componentDidMount=function(){this.checkFile()},t.prototype.checkFile=function(){var e=this,t=this.props.value;t instanceof File&&this.setState({processing:!0,processedFile:null},(function(){var n=new FileReader;n.onload=function(){e.setState({processing:!1,processedFile:n.result})},n.readAsDataURL(t)}))},t.prototype.renderFields=function(){var e,t=this.state,n=t.processing,r=t.processedFile,o=this.props,c=o.type,l=o.value,u=l instanceof File;if(!l)return null;if(u){if(n)return i.createElement(a.default,null);e=r}else e=l;switch(c.toLowerCase()){case s.VARIABLE_TYPES.IMAGE:return i.createElement("img",{className:"default-preview",src:e});case s.VARIABLE_TYPES.VIDEO:return i.createElement("video",{className:"default-preview",src:e,controls:!0});case s.VARIABLE_TYPES.AUDIO:return i.createElement("audio",{className:"default-preview",src:e,controls:!0})}},t.prototype.getInputFilter=function(){var e=this.props,t=e.type;e.value;switch(t){case s.VARIABLE_TYPES.IMAGE:return"image/*";case s.VARIABLE_TYPES.VIDEO:return"video/*";case s.VARIABLE_TYPES.AUDIO:return"audio/*"}},t.prototype.onClick=function(){var e=this.input.current,t=this.state.processing;e&&!t&&e.click()},t.prototype.renderClearButton=function(){if(this.props.value)return i.createElement(l.default,{onClick:this.evtHandlers.clearSelection},u.ICON_TIMES)},t.prototype.onFileDrop=function(e,t){var n=t.getItem().files[0];n&&this.props.onChange(n)},t.prototype.render=function(){var e=this.state.processing,t=this.getInputFilter();return i.createElement(i.Fragment,null,i.createElement("input",{type:"file",accept:t,style:{display:"none"},ref:this.input,onChange:this.evtHandlers.fileUpload}),i.createElement(c.default,{onDrop:this.evtHandlers.fileDrop,disable:e},i.createElement("div",{className:"variable-default-upload",onClick:this.evtHandlers.click},this.renderFields(),i.createElement("div",{className:"btn-wrapper"},this.renderClearButton()))))},t}(i.PureComponent);t.default=p},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(348),s=n(127),c=n(47),l=function(e){function t(t){var n=e.call(this,t)||this;return n.state={selectedLayer:null},n.eventHandlers={updateSelectedLayer:function(e){return n.updateSelectedLayer(e)}},n}return o(t,e),t.prototype.updateSelectedLayer=function(e){this.setState({selectedLayer:e})},t.prototype.variablesToInventory=function(){var e=this.props.variables,t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],o=r.type,i=r.previewItem;i&&(o===c.VARIABLE_TYPES.IMAGE||o===c.VARIABLE_TYPES.VIDEO||o===c.VARIABLE_TYPES.AUDIO?t[n]=i.url:t[n]=i.src)}return t},t.prototype.render=function(){var e=this.state.selectedLayer,t=this.props,n=t.storyId,r=t.api,o=t.composition;return o?i.createElement("div",{className:"static-composition-editor"},i.createElement("div",{className:"composition-config"},i.createElement(a.default,{storyId:n,api:r,composition:o,onSelectLayer:this.eventHandlers.updateSelectedLayer,selectedLayer:e,onUpdate:this.props.onUpdate})),i.createElement("div",{className:"composition-preview"},i.createElement(s.default,{inventory:this.variablesToInventory(),composition:o,onSelectLayer:this.eventHandlers.updateSelectedLayer,selectedLayer:e,onUpdate:this.props.onUpdate}))):null},t}(i.PureComponent);t.default=l},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var c=n(0),l=n(13),u=n(35),p=n(58),f=n(9),d=n(5),h=n(47),v=n(3),g=n(349),m=function(e){function t(t){var n=e.call(this,t)||this;return n.eventHandlers={inputs:{width:function(e){return n.compValueChanged("width",e)},height:function(e){return n.compValueChanged("height",e)},name:function(e){return n.compValueChanged("name",e)},backgroundColor:function(e){return n.bgChanged(e)}},selectLayer:function(e){return n.props.onSelectLayer(e)}},n.addLayerMenu=c.createElement(d.default,{onClick:function(){return n.addLayer()},style:"subtle",size:"small",color:"primary"},v.ICON_PLUS),n}return o(t,e),t.prototype.addLayer=function(){var e=h.getNewCompositionLayer(),t=i({},this.props.composition),n=s([],a(t.layers));n.push(e),t.layers=n,this.props.onUpdate(t),this.props.onSelectLayer(e.id)},t.prototype.updateLayer=function(e,t){var n=i({},this.props.composition),r=s([],a(n.layers));r[e]=t,n.layers=r,this.props.onUpdate(n)},t.prototype.compValueChanged=function(e,t){var n=i({},this.props.composition);n[e]=t,this.props.onUpdate(n)},t.prototype.bgChanged=function(e){if("transparent"===e.hex)this.compValueChanged("background_color",null);else{var t=e.rgb;this.compValueChanged("background_color","rgba("+t.r+","+t.g+","+t.b+","+t.a+")")}},t.prototype.render=function(){var e=this,t=this.props,n=t.composition,r=t.selectedLayer,o=t.storyId,i=t.api,a=(n.background_color&&n.background_color,c.createElement("span",null,l.compositions.layers," ",this.addLayerMenu));return c.createElement(c.Fragment,null,c.createElement(u.default,{label:l.compositions.width,tooltip:l.compositions.tooltipWidth,value:n.width,width:"30%",labelPosition:"top",onChange:this.eventHandlers.inputs.width}),c.createElement(u.default,{label:l.compositions.height,tooltip:l.compositions.tooltipHeight,value:n.height,width:"30%",labelPosition:"top",onChange:this.eventHandlers.inputs.height}),c.createElement(p.default,{label:l.compositions.backgroundColor,tooltip:l.compositions.tooltipBackgroundColor,enableAlpha:!0,value:n.background_color,width:"40%",labelPosition:"top",pickerPosition:"right",onChange:this.eventHandlers.inputs.backgroundColor}),c.createElement(f.default,{label:a,width:"100%",labelPosition:"top"},n.layers.map((function(t,n){var a=t.id===r;return c.createElement(g.default,{storyId:o,api:i,key:t.id,selected:a,onSelectLayer:e.eventHandlers.selectLayer,onUpdate:function(t){return e.updateLayer(n,t)},options:t})}))))},t}(c.PureComponent);t.default=m},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.V_ALIGN_OPTIONS=t.H_ALIGN_OPTIONS=void 0;var a=n(0),s=n(47),c=n(26),l=n(94),u=n(57),p=n(11),f=n(34),d=n(91),h=n(121),v=n(13),g=n(58),m=n(22),y=n(35),b=n(3);t.H_ALIGN_OPTIONS=[{icon:b.ICON_ALIGN_LEFT,value:"left"},{icon:b.ICON_ALIGN_CENTER,value:"center"},{icon:b.ICON_ALIGN_RIGHT,value:"right"}],t.V_ALIGN_OPTIONS=[{icon:b.ICON_ARROW_UP,value:"flex-start"},{icon:b.ICON_ARROW_CENTER_V,value:"center"},{icon:b.ICON_ARROW_DOWN,value:"flex-end"}];var _=function(e){function n(t){var n=e.call(this,t)||this;return n.eventHandlers={inputs:{name:function(e){return n.optionValueChanged("name",e)},width:function(e){return n.optionValueChanged("width",e)},height:function(e){return n.optionValueChanged("height",e)},x:function(e){return n.optionValueChanged("x",e)},y:function(e){return n.optionValueChanged("y",e)},rotation:function(e){return n.optionValueChanged("rotation",e)},content:function(e){return n.optionValueChanged("content",e)},hAlign:function(e){return n.optionValueChanged("horizontal_alignment",e)},vAlign:function(e){return n.optionValueChanged("vertical_alignment",e)},textWrap:function(e){return n.optionValueChanged("text_wrap",e)},textFit:function(e){return n.optionValueChanged("text_fit",e)},fontSize:function(e){return n.optionValueChanged("font_size",e)},lineHeight:function(e){return n.optionValueChanged("line_height",e)},letterSpacing:function(e){return n.optionValueChanged("letter_spacing",e)},font:function(e){return n.optionValueChanged("font",e)},customFont:function(e){return n.customFontUpdated(e)},fontType:function(e){return n.fontTypeChanged(e)},wordSpacing:function(e){return n.optionValueChanged("word_spacing",e)},color:function(e){return n.optionValueChanged("color",n.formatColor(e))},backgroundColor:function(e){return n.optionValueChanged("background_color",n.formatColor(e))}},onCardOpen:function(e){return n.onCardOpen()},onCardClose:function(e){return n.onCardClose()}},n}return o(n,e),n.prototype.customFontUpdated=function(e){var t=i({},this.props.options);if(e){var n=e.name,r=e.url,o=e.id;t.font=n,t.custom_font_url=r,t.custom_font_id=o}else t.font=s.DEFAULT_FONT,t.custom_font_url=null,t.custom_font_id=null;this.props.onUpdate(t)},n.prototype.onCardOpen=function(){var e=this.props.options.id;this.props.onSelectLayer(e)},n.prototype.onCardClose=function(){this.props.onSelectLayer(null)},n.prototype.fontTypeChanged=function(e){var t=i({},this.props.options);e===s.FONT_TYPES.STANDARD?(t.font_type=s.FONT_TYPES.STANDARD,t.font=s.DEFAULT_FONT):e===s.FONT_TYPES.CUSTOM&&(t.fontType=s.FONT_TYPES.CUSTOM,t.font=s.DEFAULT_FONT,t.custom_font_id=null,t.custom_font_url=null),this.props.onUpdate(t)},n.prototype.formatColor=function(e){var t=e.rgb;return"rgba("+t.r+","+t.g+","+t.b+","+t.a+")"},n.prototype.optionValueChanged=function(e,t){var n=i({},this.props.options);n[e]=t,this.props.onUpdate(n)},n.prototype.renderFontField=function(){var e=this.props,t=e.options,n=t.font_type,r=t.custom_font_id,o=t.font,i=e.storyId,l=e.api;return n===s.FONT_TYPES.STANDARD?a.createElement(f.default,{label:v.compositions.font,labelPosition:"top",width:"50%",options:s.STADARD_FONTS,onChange:this.eventHandlers.inputs.font,value:o}):n===s.FONT_TYPES.CUSTOM?a.createElement(h.default,{api:l,storyId:i,label:v.compositions.font,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.customFont,accepts:c.ASSET_TYPES.FONT,assetId:r}):null},n.prototype.render=function(){var e=this.props,n=e.options,r=e.selected;return a.createElement(d.default,{open:r,onOpen:this.eventHandlers.onCardOpen,onClose:this.eventHandlers.onCardClose,collapsable:!0,title:n.name},a.createElement(p.default,{label:v.compositions.name,tooltip:v.compositions.tooltipName,value:n.name,width:"100%",labelPosition:"top",onChange:this.eventHandlers.inputs.name}),a.createElement(y.default,{label:v.compositions.x,tooltip:v.compositions.tooltipLayerX,value:n.x,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.x}),a.createElement(y.default,{label:v.compositions.y,tooltip:v.compositions.tooltipLayerY,value:n.y,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.y}),a.createElement(y.default,{label:v.compositions.width,tooltip:v.compositions.tooltipLayerWidth,value:n.width,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.width}),a.createElement(y.default,{label:v.compositions.height,tooltip:v.compositions.tooltipLayerHeight,value:n.height,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.height}),a.createElement(y.default,{value:n.rotation,label:v.compositions.rotation,tooltip:v.compositions.tooltipLayerRotation,width:"20%",labelPosition:"top",onChange:this.eventHandlers.inputs.rotation}),a.createElement(l.default,{label:v.compositions.textLayerContent,tooltip:v.compositions.tooltipTextLayerContent,value:n.content,width:"100%",labelPosition:"top",onChange:this.eventHandlers.inputs.content}),a.createElement(u.default,{options:t.H_ALIGN_OPTIONS,value:n.horizontal_alignment,width:"50%",onChange:this.eventHandlers.inputs.hAlign}),a.createElement(u.default,{options:t.V_ALIGN_OPTIONS,value:n.vertical_alignment,width:"50%",onChange:this.eventHandlers.inputs.vAlign}),a.createElement(f.default,{label:v.compositions.fontType,options:s.FONT_TYPE_OPTIONS,value:n.font_type,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.fontType}),this.renderFontField(),a.createElement(y.default,{label:v.compositions.fontSize,value:n.font_size,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.fontSize}),a.createElement(y.default,{label:v.compositions.lineHeight,value:n.line_height,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.lineHeight}),a.createElement(y.default,{label:v.compositions.letterSpacing,value:n.letter_spacing,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.letterSpacing}),a.createElement(y.default,{label:v.compositions.wordSpacing,value:n.word_spacing,width:"50%",labelPosition:"top",onChange:this.eventHandlers.inputs.wordSpacing}),a.createElement(g.default,{label:v.compositions.color,value:n.color,enableAlpha:!0,width:"50%",labelPosition:"top",pickerPosition:"left",onChange:this.eventHandlers.inputs.color}),a.createElement(g.default,{label:v.compositions.backgroundColor,value:n.background_color,enableAlpha:!0,width:"50%",labelPosition:"top",pickerPosition:"right",onChange:this.eventHandlers.inputs.backgroundColor}),a.createElement(m.default,{label:v.compositions.wrap,value:n.text_wrap,width:"25%",labelPosition:"top",onChange:this.eventHandlers.inputs.textWrap}),a.createElement(m.default,{label:v.compositions.fit,value:n.text_fit,width:"25%",labelPosition:"top",onChange:this.eventHandlers.inputs.textFit}))},n}(a.PureComponent);t.default=_},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(45);t.default=function(e){var t=e.shortcutCopyMap,n=e.heading,i=n?r.createElement(r.Fragment,null,r.createElement("h3",null,n),r.createElement(o.default,null)):null;return r.createElement("div",{className:"shortcuts-menu"},i,r.createElement("table",null,r.createElement("tbody",null,Object.keys(t).map((function(e){return r.createElement("tr",{className:"shortcut",key:e},r.createElement("td",{className:"hotkey-cell"},e),r.createElement("td",{className:"shortcut-desc"},t[e]))})))))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(88);t.default=function(e){var t=e.children,n=e.id,i=document.getElementById(n),a=document.createElement("div");return r.useEffect((function(){return i.appendChild(a),function(){i.removeChild(a)}}),[a,i]),o.createPortal(t,a)}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(11),s=n(9),c=n(44),l=n(45),u=n(6),p=n(7),f=n(13),d=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e=n.props,t=e.asset,r=e.columns,o=e.newAsset,c=e.assetTags;if(!t)return null;var p=o?f.assets.newDetails:f.assets.details,d=u.formatDateDefault(t.date_created),h=2===r,v=o?void 0:function(e){return n.props.onNameChange(e)},g=o?function(e){return n.props.onNameChange(e)}:void 0,m=i.createElement(a.default,{label:f.assets.name,controlled:!o,width:h?"50%":"100%",onSubmit:v,onChange:g,value:t.name}),y=i.createElement(a.default,{readOnly:!0,label:f.assets.date,width:h?"50%":"100%",value:d}),b=i.createElement(a.default,{submittable:!0,submittableType:"add",label:f.assets.addTag,suggestions:c,doSubmit:function(e){return n.props.onAddTag(e)},width:h?"50%":"100%",buttons:[],value:n.state.newTag}),_=i.createElement(s.default,{label:f.assets.assetTag,width:h?"50%":"100%"},n.renderTags());return i.createElement("div",{className:"asset-details"},i.createElement("h2",null,p),i.createElement("div",{className:"header-buttons"},n.props.headerButtons),i.createElement(l.default,null),m,y,b,_)},n.state={newTag:""},n}return o(t,e),t.prototype.renderTags=function(){var e=this;return this.props.asset.tags.map((function(t){return i.createElement(c.default,{key:t,copy:t,removeHandler:function(){return e.props.onRemoveTag(t)},colorize:!0})}))},t}(i.Component);t.default=p.connect((function(e){return{assetTags:e.assetTags}}),null)(d)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(31),i=n(30),a=null;try{var s=JSON.parse(localStorage.getItem(o.AUTH_CACHE_KEY));if(s){var c=s.idTokenPayload.exp;i.default.checkExpiry(c)&&(a=s)}}catch(e){console.warn("Cached credentials were malformed or missing, redirected to login.")}t.default=function(e,t){switch(void 0===e&&(e=a),t.type){case o.default.LOGIN:return r({},t.auth);case o.default.CLEAR:return null;default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(32),i=null;try{i=JSON.parse(localStorage.getItem(o.ACCESS_CACHE_KEY))}catch(e){console.warn("Cached access data was malformed or missing, redirected to login.")}t.default=function(e,t){switch(void 0===e&&(e=i),t.type){case o.default.SET:case o.default.STORY_ADDED:case o.default.STORY_NAME_MUTATION:case o.default.ORG_NAME_MUTATION:case o.default.STORY_DELETED:return r({},t.accessData);case o.default.CLEAR:return null;default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(20),i={page:1,order:"date_created",order_direction:"desc",name:"",type:"",tags:""};t.default=function(e,t){switch(void 0===e&&(e=i),t.type){case o.default.UPDATE:return r(r({},e),t.newFilters);case o.default.RESET:return r({},i);default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),s={loading:!1};t.default=function(e,t){void 0===e&&(e=s);var n,c=[];switch(t.type){case a.default.TOGGLE_LOADING:return r(r({},e),{loading:t.toggle});case a.default.GET:return r(r({},e),t.assetList);case a.default.ADD_TAG:for(var l=0,u=e.assets.length;l<u;l++)(n=e.assets[l]).id===t.id?c[l]=r(r({},n),{tags:i(i([],o(n.tags)),o(t.freshTags))}):c[l]=n;return r(r({},e),{assets:c});case a.default.DELETE_TAG:return r(r({},e),{assets:e.assets.map((function(e){return e.id===t.id?r(r({},e),{tags:e.tags.filter((function(e){return e!==t.tag}))}):e}))});case a.default.UPDATE_NAME:return r(r({},e),{assets:e.assets.map((function(e){return e.id===t.id?r(r({},e),{name:t.name}):e}))});case a.default.UPDATE_DATA:return r(r({},e),{assets:e.assets.map((function(e){return e.id===t.id?r(r({},e),{data:t.data}):e}))});default:return e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(77),o=[];t.default=function(e,t){switch(void 0===e&&(e=o),t.type){case r.default.GET:return t.assetTags;default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var a=n(46),s={autoTag:!0,assignToStory:!0,uploads:[]};t.default=function(e,t){switch(void 0===e&&(e=s),t.type){case a.default.TOGGLE_AUTO_TAG:return r(r({},e),{autoTag:t.toggle});case a.default.TOGGLE_ASSIGN_TO_STORY:return r(r({},e),{assignToStory:t.toggle});case a.default.ADD_UPLOAD:return r(r({},e),{uploads:i(i([],o(e.uploads)),[t.uploadMeta])});case a.default.UPDATE_PERCENT_UPLOADED:var n=e.uploads.map((function(e){return e.filename===t.filename?r(r({},e),{percent:t.percent}):e}));return r(r({},e),{uploads:n});case a.default.REMOVE_UPLOAD:return r(r({},e),{uploads:e.uploads.filter((function(e){return e.filename!==t.filename}))});default:return e}}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),a=[];t.default=function(e,t){switch(void 0===e&&(e=a),t.type){case i.default.SELECT_ALL:return o([],r(t.allIds));case i.default.SELECT_ASSET:return o(o([],r(e)),[t.id]);case i.default.SELECT_MULTIPLE:return o([],r(new Set(o(o([],r(e)),r(t.assets)))));case i.default.DESELECT_ASSET:return e.filter((function(e){return e!==t.id}));case i.default.RESET_SELECTION:return[];default:return e}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(52),i=n(6),a=n(362),s=function(){function e(e,t,n){var i=this;this.pollingInterval=1e3,this.cancelTokenCache={player:void 0,system:void 0},this.doRequest=function(e,t){return void 0===t&&(t=""),new Promise((function(n,r){i.http(e).then((function(e){t&&i.clearCache(t),n(e.data)})).catch((function(e){!o.default.isCancel(e)&&t&&i.clearCache(t),r(e)}))}))},this.cancelPrevious=function(e){var t=o.default.CancelToken.source();return i.cancelTokenCache[e]&&i.cancelTokenCache[e].cancel(),i.cancelTokenCache[e]=t,t.token},this.clearCache=function(e){i.cancelTokenCache[e]=void 0},this.doAWSRequest=function(e,t){return void 0===t&&(t=""),new Promise((function(t,n){i.awsHttp(e).then((function(e){t(e.data)})).catch((function(e){n(e)}))}))},this.saveStory=function(e,t){return i.doRequest({method:"PATCH",url:"/story/"+e,data:t})},this.newStory=function(e){return i.doRequest({method:"POST",url:"/story",data:e})},this.deleteStory=function(e){return i.doRequest({method:"DELETE",url:"/story/"+e})},this.getStoryStatus=function(e){return i.doRequest({method:"GET",url:"/story/"+e+"/version"})},this.getSignedUrl=function(e,t){return i.doRequest({method:"GET",url:"/story/"+e+"/upload-url",params:{filename:t.name,content_type:t.type}})},this.uploadToSignedUrl=function(e,t,n){return i.doAWSRequest({url:e,method:"PUT",data:t,onUploadProgress:n,headers:{"Content-Type":t.type}})},this.checkS3Bucket=function(e){var t="/bucket/"+e;return i.doRequest({method:"GET",url:t})},this.createS3Bucket=function(e,t,n,r){var o="/bucket/"+e,a={region:t,create_distribution:r?1:0,read_only:n?1:0};return i.doRequest({method:"POST",url:o,data:a})},this.processStoryFile=function(e,t,n){var r="/story/"+e+"/file",o={};return t?o.file_key=t:n&&(o.url=n),i.doRequest({method:"POST",url:r,data:o})},this.getAssets=function(e,t,n){void 0===n&&(n=!1);var r="/assets?items_per_page=50&optional_story_id="+t+"&unprocessed="+n,o=function(t){e.hasOwnProperty(t)&&(e[t]&&"tags"!==t&&(r+="&"+t+"="+encodeURIComponent(e[t])),e[t]&&"tags"===t&&e[t].split(",").forEach((function(e,n){r+="&"+t+"["+n+"]="+encodeURIComponent(e)})))};for(var a in e)o(a);return i.doRequest({method:"GET",url:r})},this.getAssetItem=function(e){return i.doRequest({method:"GET",url:"/assets/"+e})},this.duplicateAsset=function(e,t){return i.doRequest({method:"POST",url:"/assets/"+e+"/copy",data:{name:t}})},this.uploadAsset=function(e,t,n,r){var o=new FormData;return e&&o.append("story_id",e),o.append("tags",t),o.append("file",n),i.doRequest({method:"POST",url:"/assets",data:o,onUploadProgress:r})},this.createCompositionAsset=function(e,t,n){var r=new FormData;return r.append("story_id",e),r.append("data",t),r.append("type","video_composition"),r.append("name",n||"New Composition"),i.doRequest({method:"POST",url:"/assets",data:r})},this.createStaticCompositionAsset=function(e,t){var n=new FormData;return n.append("story_id",e),n.append("data",t),n.append("type","static_composition"),n.append("name","New Template"),i.doRequest({method:"POST",url:"/assets",data:n})},this.deleteAsset=function(e){return i.doRequest({method:"DELETE",url:"/assets/"+e})},this.deleteAssets=function(e){return i.doRequest({method:"DELETE",url:"/assets",data:{ids:e}})},this.copyAsset=function(e,t){return i.doRequest({method:"POST",url:"/assets/"+e+"/copy",data:t})},this.addAssetTag=function(e,t){return i.doRequest({method:"POST",url:"/assets/"+e+"/tag",data:{tag:t}})},this.deleteAssetTag=function(e,t){return i.doRequest({method:"DELETE",url:"/assets/"+e+"/tag",data:{tag:t}})},this.updateAsset=function(e,t){return i.doRequest({method:"PATCH",url:"/assets/"+e,data:t})},this.getAssetTags=function(e){return i.doRequest({method:"GET",url:"/assets/tags?story_id="+e})},this.getStory=function(e){return i.doRequest({method:"GET",url:"/story/"+e})},this.getExperiences=function(e,t){return i.doRequest({method:"GET",url:"/story/"+e+"/experiences",params:t})},this.exportExperiences=function(e,t){return i.doRequest({method:"GET",url:"/story/"+e+"/experiences/export",params:t})},this.blockByExperience=function(e){var t="/experience/"+e+"/block";return i.doRequest({method:"POST",url:t})},this.getBatches=function(e,t){return i.doRequest({method:"GET",url:"/story/"+e+"/batches",params:t})},this.getBatch=function(e,t){return i.doRequest({method:"GET",url:"/batch/"+e,params:{page:t}})},this.getBatchProgress=function(e){return i.doRequest({method:"GET",url:"/batch/"+e+"/progress"})},this.createFreshBatch=function(e,t){return i.doRequest({method:"POST",url:"/batch",data:{story_id:e,name:t}})},this.updateBatchName=function(e,t){return i.doRequest({method:"PATCH",url:"/batch/"+e+"/rename",data:{name:t}})},this.importBatchDataFromCsv=function(e,t){var n=new FormData;return n.append("file_key",t),i.doRequest({method:"POST",url:"/batch/"+e+"/data/from-csv",data:n})},this.updateBatchColumns=function(e,t){return i.doRequest({method:"PUT",url:"/batch/"+e+"/columns",data:t})},this.insertNewRow=function(e,t){return i.doRequest({method:"POST",url:"/batch/"+e+"/row/"+t})},this.updateCellValue=function(e,t,n,r){return i.doRequest({method:"PUT",url:"/batch/"+e+"/cell",data:{column_index:t,row_index:n,value:r}})},this.prepareBatchForRender=function(e){return i.doRequest({method:"POST",url:"/batch/"+e+"/prepare"})},this.checkBatchExportStatus=function(e){return i.doRequest({method:"GET",url:"/batch/"+e+"/export"})},this.invokeBatchExportJob=function(e){return i.doRequest({method:"POST",url:"/batch/"+e+"/export"})},this.downloadBatchExport=function(e,t){return i.doRequest({method:"GET",url:"/batch/"+e+"/export/"+t,responseType:"blob",params:{preserve:"true"}})},this.duplicateBatch=function(e){return i.doRequest({method:"POST",url:"/batch/"+e+"/duplicate"})},this.deleteBatch=function(e){return i.doRequest({method:"DELETE",url:"/batch/"+e})},this.updateModerationStatus=function(e,t,n){return i.doRequest({method:"POST",url:"/experience/"+e+"/status",data:{status:t,reason:n}})},this.addOrReplaceNote=function(e,t){return i.doRequest({method:"POST",url:"/experience/"+e+"/notes",data:{notes:t}})},this.getJob=function(e){return i.doRequest({method:"GET",url:"/job/"+e})},this.runCut=function(e,t,n,r){var o="/job/"+a.JOB_TYPES.RUN_CUT,s={story_id:e,act_id:t,scene_id:n,cut_id:r};return i.doRequest({method:"POST",url:o,data:s})},this.runReRenderCuts=function(e,t,n){var r="/job/"+a.JOB_TYPES.RE_RUN_CUTS,o={story_id:e,act_id:t,scene_id:n};return i.doRequest({method:"POST",url:r,data:o})},this.runProcessBaseVideo=function(e,t){var n="/job/"+a.JOB_TYPES.PROCESS_BASE_VIDEO,r={story_id:e,file_key:t};return i.doRequest({method:"POST",url:n,data:r})},this.runPublish=function(e,t){var n={story_id:e,message:t};return i.doRequest({method:"POST",url:"/job/publish",data:n})},this.cancelPublish=function(e){var t={story_id:e};return i.doRequest({method:"DELETE",url:"/job/publish",data:t})},this.pollJob=function(e){var t={method:"GET",url:"/job/"+e};return new Promise((function(e,n){i.poll(t,e,n)}))},this.getJobLogUrl=function(e){var t="/job/"+e+"/log-url";return i.doRequest({method:"GET",url:t})},this.getJobLog=function(e){return i.doAWSRequest({method:"GET",url:e})},this.createExperience=function(e,t,n,r){void 0===t&&(t={});var o=i.experienceFormData(e,t,n);r&&o.append("published","false");return i.doRequest({method:"POST",url:"/experience",data:o})},this.deleteExperience=function(e,t){void 0===t&&(t=!0);var n="/experience/"+e,r={erase_media:t};return i.doRequest({method:"DELETE",data:r,url:n})},this.triggerEvent=function(e,t,n){var r="/experience/"+e+"/trigger-event";if(t){var o=new FormData;return o.append("composition_id",t),n&&o.append("published","false"),i.doRequest({method:"POST",url:r,data:o})}return i.doRequest({method:"POST",url:r})},this.getExperience=function(e,t){void 0===t&&(t=!1);var n={method:"GET",url:"/experience/"+e};return t?new Promise((function(e,t){i.poll(n,e,t,!1)})):i.doRequest(n)},this.experienceFormData=function(e,t,n){var o=r({},t),i=new FormData;for(var a in i.append("story_id",e),n&&i.append("composition_id",n),o)if(o[a]){var s=o[a];if(s&&"file"===s.type){var c=s.files;c.length>0?(o[a]="",i.append(a,c[0])):o[a]=""}else s&&s instanceof File&&(o[a]="",i.append(a,s,s.name));i.append("inventory["+a+"]",o[a])}return i},this.getAccssCredentials=function(){return i.doRequest({method:"GET",url:"/api-key"})},this.createAccessCredentials=function(e){var t={name:e};return i.doRequest({method:"POST",data:t,url:"/api-key"})},this.deleteAccessCrednetials=function(e){var t={access_key_id:e};return i.doRequest({method:"DELETE",data:t,url:"/api-key"})},this.invokeBatchRenderJob=function(e){return i.doRequest({method:"POST",url:"/job/render-batch",data:{batch_id:e}})},this.cancelBatchRenderJob=function(e){return i.doRequest({method:"POST",url:"/batch/"+e+"/cancel"})},this.getUsers=function(e,t,n){return i.doRequest({url:"/account/"+e+"/users?page="+t+"&items_per_page="+n,method:"GET"})},this.addUser=function(e,t,n){return i.doRequest({url:"/account/"+e+"/grant",method:"POST",data:{email:t,role_id:n}})},this.resendInvite=function(e,t){return i.doRequest({url:"/account/"+e+"/resend",method:"POST",data:{email:t}})},this.revokeInvite=function(e,t){return i.doRequest({url:"/account/"+e+"/revoke",method:"POST",data:{email:t}})},this.updateInviteRole=function(e,t,n){return i.doRequest({url:"/account/"+e+"/grant",method:"PATCH",data:{email:t,role_id:n}})},this.updateRole=function(e,t,n){return i.doRequest({url:"/account/"+e+"/user",method:"PATCH",data:{user_id:t,role_id:n}})},this.deleteUser=function(e,t){return i.doRequest({url:"/account/"+e+"/user",method:"DELETE",data:{user_id:t}})},this.getPlayerMetrics=function(e,t,n,r){void 0===r&&(r="player");var o={method:"GET",url:"/metrics/player/"+e,params:{start:t,end:n},cancelToken:i.cancelPrevious(r)};return i.doRequest(o,r)},this.getSystemMetrics=function(e,t,n,r,o){void 0===o&&(o="system");var a={method:"GET",url:"/metrics/system/"+e,params:{start:t,end:n,step:r},cancelToken:i.cancelPrevious(o)};return i.doRequest(a,o)},this.getOrganizations=function(e,t){return i.doRequest({url:"/account",method:"GET",params:{page:e,items_per_page:t}})},this.addOrganization=function(e,t){return i.doRequest({url:"/account",method:"POST",data:{name:e,initial_story:t}})},this.updateOrgName=function(e,t){return i.doRequest({url:"/account/"+e,method:"PATCH",data:{name:t}})},this.deleteOrg=function(e){},this.changeOrgPlan=function(e,t){return i.doRequest({url:"/account/"+e,method:"PATCH",data:{tier:t}})},this.getAccountInfo=function(e){return i.doRequest({url:"/account/"+e,method:"GET"})},this.cancelOrgPlan=function(e){return i.doRequest({url:"/account/"+e,method:"PATCH",data:{cancel:!0}})},this.getNextBillingPeriod=function(e){return i.doRequest({url:"/account/"+e+"/next-payment",method:"GET"})},this.getRedirectToBillingPortal=function(e){return i.doRequest({url:"/account/"+e+"/billing-portal",method:"GET"})},this.getRedirectToRenew=function(e,t){return i.doRequest({url:"/account/"+e+"/renew?tier="+t,method:"GET"})},this.getAPIUsageOverview=function(e,t){var n=e&&t?"?start="+e+"&end="+t:"";return i.doRequest({url:"/usage"+n,method:"GET"})},this.getUsageGraph=function(e,t,n){var r=t&&n?"?start="+t+"&end="+n:"";return i.doRequest({url:"/usage/daily/"+e+r,method:"GET"})},this.getBillingPeriods=function(){return i.doRequest({url:"/usage/billing-periods",method:"GET"})},this.http=n?o.default.create({baseURL:e,headers:{Authorization:"Bearer "+t,"X-Imposium-API-Version":"2.0.0","X-Imposium-Account-Id":n||""}}):o.default.create({baseURL:e,headers:{"X-Imposium-Access-Key":""+t,"X-Imposium-API-Version":"2.0.0"}}),this.awsHttp=o.default.create()}return e.prototype.poll=function(e,t,n,r){var o=this;void 0===r&&(r=!0),this.http(e).then((function(a){"failed"===a.data.status?n(a):void 0!==a.data.output?r?t(a.data):i.isObjEmpty(a.data.output)?setTimeout((function(){o.poll(e,t,n,r)}),o.pollingInterval):t(a.data):setTimeout((function(){o.poll(e,t,n,r)}),o.pollingInterval)})).catch((function(e){n(e)}))},e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JOB_TYPES=void 0,t.JOB_TYPES={RUN_CUT:"make-cut",PROCESS_BASE_VIDEO:"process-base-video",RE_RUN_CUTS:"recut-scene"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(52),o=function(e){var t=this;this.doRequest=function(e){return new Promise((function(n,r){t.http(e).then((function(e){n(e.data)})).catch((function(e){r(e)}))}))},this.updateModerationStatus=function(e,n,r){return t.doRequest({method:"POST",url:"/",data:{task:"update-experience-status",experience_id:e,status:n,reason:r}})},this.addOrReplaceNote=function(e,n){return t.doRequest({method:"POST",url:"/",data:{task:"update-experience-notes",experience_id:e,notes:n}})},this.http=r.default.create({baseURL:e+"/1.1"})};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(365),o=function(){function e(){}return e.setItem=function(e,t){return new Promise((function(n,o){r.setItem(e,t).then((function(){return n(null)})).catch((function(e){console.error("Failed to store key value pair:",e),o(e)}))}))},e.getItem=function(e){return new Promise((function(t,n){r.getItem(e).then((function(e){t(e)})).catch((function(e){console.error("Failed to look up value for key:",e),n(e)}))}))},e}();t.default=o},function(e,t){e.exports=h},function(e,t,n){"use strict";n.r(t),n.d(t,"AlphaPicker",(function(){return Wn})),n.d(t,"BlockPicker",(function(){return lo})),n.d(t,"CirclePicker",(function(){return Io})),n.d(t,"default",(function(){return Bo})),n.d(t,"ChromePicker",(function(){return Bo})),n.d(t,"CompactPicker",(function(){return Wo})),n.d(t,"GithubPicker",(function(){return $o})),n.d(t,"HuePicker",(function(){return Zo})),n.d(t,"MaterialPicker",(function(){return ei})),n.d(t,"PhotoshopPicker",(function(){return ci})),n.d(t,"SketchPicker",(function(){return vi})),n.d(t,"SliderPicker",(function(){return _i})),n.d(t,"SwatchesPicker",(function(){return Ti})),n.d(t,"TwitterPicker",(function(){return Si})),n.d(t,"GooglePicker",(function(){return Di})),n.d(t,"CustomPicker",(function(){return Dn}));var r=n(0),o=n.n(r),i=n(2),a=n.n(i),s=function(e,t,n,r,o){var i=o.clientWidth,a=o.clientHeight,s="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,c="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=s-(o.getBoundingClientRect().left+window.pageXOffset),u=c-(o.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var p=void 0;if(p=u<0?0:u>a?1:Math.round(100*u/a)/100,t.a!==p)return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}else{var f=void 0;if(r!==(f=l<0?0:l>i?1:Math.round(100*l/i)/100))return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}return null},c={},l=function(e,t,n,r){var o=e+"-"+t+"-"+n+(r?"-server":"");if(c[o])return c[o];var i=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var i=o.getContext("2d");return i?(i.fillStyle=e,i.fillRect(0,0,o.width,o.height),i.fillStyle=t,i.fillRect(0,0,n,n),i.translate(n,n),i.fillRect(0,0,n,n),o.toDataURL()):null}(e,t,n,r);return c[o]=i,i},u=Object.assign||function(e){for(var t=1;t<arguments.length;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.white,n=e.grey,i=e.size,s=e.renderers,c=e.borderRadius,p=e.boxShadow,f=e.children,d=a()({default:{grid:{borderRadius:c,boxShadow:p,absolute:"0px 0px 0px 0px",background:"url("+l(t,n,i,s.canvas)+") center left"}}});return Object(r.isValidElement)(f)?o.a.cloneElement(f,u({},f.props,{style:u({},f.props.style,d.grid)})):o.a.createElement("div",{style:d.grid})};p.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var f=p,d=Object.assign||function(e){for(var t=1;t<arguments.length;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;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(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}var m=function(e){function t(){var e,n,r;v(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=g(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.handleChange=function(e){var t=s(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},g(r,n)}return 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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),h(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=a()({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:d({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return o.a.createElement("div",{style:n.alpha},o.a.createElement("div",{style:n.checkboard},o.a.createElement(f,{renderers:this.props.renderers})),o.a.createElement("div",{style:n.gradient}),o.a.createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},o.a.createElement("div",{style:n.pointer},this.props.pointer?o.a.createElement(this.props.pointer,this.props):o.a.createElement("div",{style:n.slider}))))}}]),t}(r.PureComponent||r.Component),y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var b=[38,40],_=1,w=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(e){n.setUpdatedValue(e.target.value,e)},n.handleKeyDown=function(e){var t,r=function(e){return Number(String(e).replace(/%/g,""))}(e.target.value);if(!isNaN(r)&&(t=e.keyCode,b.indexOf(t)>-1)){var o=n.getArrowOffset(),i=38===e.keyCode?r+o:r-o;n.setUpdatedValue(i,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+_++,n}return 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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),y(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=a()({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return o.a.createElement("div",{style:t.wrap},o.a.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?o.a.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(r.PureComponent||r.Component),x=function(e,t,n,r){var o=r.clientWidth,i=r.clientHeight,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,c=a-(r.getBoundingClientRect().left+window.pageXOffset),l=s-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var u=void 0;if(l<0)u=359;else if(l>i)u=0;else{u=360*(-100*l/i+100)/100}if(n.h!==u)return{h:u,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var p=void 0;if(c<0)p=0;else if(c>o)p=359;else{p=360*(100*c/o)/100}if(n.h!==p)return{h:p,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},E=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function O(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}var T=function(e){function t(){var e,n,r;O(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=C(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.handleChange=function(e){var t=x(e,r.props.direction,r.props.hsl,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},C(r,n)}return 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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),E(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,r=a()({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return o.a.createElement("div",{style:r.hue},o.a.createElement("div",{className:"hue-"+n,style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},o.a.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),o.a.createElement("div",{style:r.pointer},this.props.pointer?o.a.createElement(this.props.pointer,this.props):o.a.createElement("div",{style:r.slider}))))}}]),t}(r.PureComponent||r.Component),A=n(1),S=n.n(A);var P=function(){this.__data__=[],this.size=0};var k=function(e,t){return e===t||e!=e&&t!=t};var j=function(e,t){for(var n=e.length;n--;)if(k(e[n][0],t))return n;return-1},I=Array.prototype.splice;var N=function(e){var t=this.__data__,n=j(t,e);return!(n<0)&&(n==t.length-1?t.pop():I.call(t,n,1),--this.size,!0)};var R=function(e){var t=this.__data__,n=j(t,e);return n<0?void 0:t[n][1]};var D=function(e){return j(this.__data__,e)>-1};var L=function(e,t){var n=this.__data__,r=j(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function M(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}M.prototype.clear=P,M.prototype.delete=N,M.prototype.get=R,M.prototype.has=D,M.prototype.set=L;var F=M;var H=function(){this.__data__=new F,this.size=0};var U=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var z=function(e){return this.__data__.get(e)};var B=function(e){return this.__data__.has(e)},V=n(4),q=V.a.Symbol,G=Object.prototype,W=G.hasOwnProperty,Y=G.toString,X=q?q.toStringTag:void 0;var $=function(e){var t=W.call(e,X),n=e[X];try{e[X]=void 0;var r=!0}catch(e){}var o=Y.call(e);return r&&(t?e[X]=n:delete e[X]),o},J=Object.prototype.toString;var K=function(e){return J.call(e)},Q=q?q.toStringTag:void 0;var Z=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Q&&Q in Object(e)?$(e):K(e)};var ee=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var te,ne=function(e){if(!ee(e))return!1;var t=Z(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},re=V.a["__core-js_shared__"],oe=(te=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||""))?"Symbol(src)_1."+te:"";var ie=function(e){return!!oe&&oe in e},ae=Function.prototype.toString;var se=function(e){if(null!=e){try{return ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""},ce=/^\[object .+?Constructor\]$/,le=Function.prototype,ue=Object.prototype,pe=le.toString,fe=ue.hasOwnProperty,de=RegExp("^"+pe.call(fe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var he=function(e){return!(!ee(e)||ie(e))&&(ne(e)?de:ce).test(se(e))};var ve=function(e,t){return null==e?void 0:e[t]};var ge=function(e,t){var n=ve(e,t);return he(n)?n:void 0},me=ge(V.a,"Map"),ye=ge(Object,"create");var be=function(){this.__data__=ye?ye(null):{},this.size=0};var _e=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},we=Object.prototype.hasOwnProperty;var xe=function(e){var t=this.__data__;if(ye){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return we.call(t,e)?t[e]:void 0},Ee=Object.prototype.hasOwnProperty;var Oe=function(e){var t=this.__data__;return ye?void 0!==t[e]:Ee.call(t,e)};var Ce=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ye&&void 0===t?"__lodash_hash_undefined__":t,this};function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Te.prototype.clear=be,Te.prototype.delete=_e,Te.prototype.get=xe,Te.prototype.has=Oe,Te.prototype.set=Ce;var Ae=Te;var Se=function(){this.size=0,this.__data__={hash:new Ae,map:new(me||F),string:new Ae}};var Pe=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var ke=function(e,t){var n=e.__data__;return Pe(t)?n["string"==typeof t?"string":"hash"]:n.map};var je=function(e){var t=ke(this,e).delete(e);return this.size-=t?1:0,t};var Ie=function(e){return ke(this,e).get(e)};var Ne=function(e){return ke(this,e).has(e)};var Re=function(e,t){var n=ke(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function De(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}De.prototype.clear=Se,De.prototype.delete=je,De.prototype.get=Ie,De.prototype.has=Ne,De.prototype.set=Re;var Le=De;var Me=function(e,t){var n=this.__data__;if(n instanceof F){var r=n.__data__;if(!me||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Le(r)}return n.set(e,t),this.size=n.size,this};function Fe(e){var t=this.__data__=new F(e);this.size=t.size}Fe.prototype.clear=H,Fe.prototype.delete=U,Fe.prototype.get=z,Fe.prototype.has=B,Fe.prototype.set=Me;var He=Fe,Ue=function(){try{var e=ge(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var ze=function(e,t,n){"__proto__"==t&&Ue?Ue(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var Be=function(e,t,n){(void 0!==n&&!k(e[t],n)||void 0===n&&!(t in e))&&ze(e,t,n)};var Ve=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===n(i[c],c,i))break}return t}}(),qe=n(130),Ge=V.a.Uint8Array;var We=function(e){var t=new e.constructor(e.byteLength);return new Ge(t).set(new Ge(e)),t};var Ye=function(e,t){var n=t?We(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var Xe=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},$e=Object.create,Je=function(){function e(){}return function(t){if(!ee(t))return{};if($e)return $e(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Ke=function(e,t){return function(n){return e(t(n))}},Qe=Ke(Object.getPrototypeOf,Object),Ze=Object.prototype;var et=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ze)};var tt=function(e){return"function"!=typeof e.constructor||et(e)?{}:Je(Qe(e))};var nt=function(e){return null!=e&&"object"==typeof e};var rt=function(e){return nt(e)&&"[object Arguments]"==Z(e)},ot=Object.prototype,it=ot.hasOwnProperty,at=ot.propertyIsEnumerable,st=rt(function(){return arguments}())?rt:function(e){return nt(e)&&it.call(e,"callee")&&!at.call(e,"callee")},ct=Array.isArray;var lt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ut=function(e){return null!=e&&lt(e.length)&&!ne(e)};var pt=function(e){return nt(e)&&ut(e)},ft=n(18),dt=Function.prototype,ht=Object.prototype,vt=dt.toString,gt=ht.hasOwnProperty,mt=vt.call(Object);var yt=function(e){if(!nt(e)||"[object Object]"!=Z(e))return!1;var t=Qe(e);if(null===t)return!0;var n=gt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&vt.call(n)==mt},bt={};bt["[object Float32Array]"]=bt["[object Float64Array]"]=bt["[object Int8Array]"]=bt["[object Int16Array]"]=bt["[object Int32Array]"]=bt["[object Uint8Array]"]=bt["[object Uint8ClampedArray]"]=bt["[object Uint16Array]"]=bt["[object Uint32Array]"]=!0,bt["[object Arguments]"]=bt["[object Array]"]=bt["[object ArrayBuffer]"]=bt["[object Boolean]"]=bt["[object DataView]"]=bt["[object Date]"]=bt["[object Error]"]=bt["[object Function]"]=bt["[object Map]"]=bt["[object Number]"]=bt["[object Object]"]=bt["[object RegExp]"]=bt["[object Set]"]=bt["[object String]"]=bt["[object WeakMap]"]=!1;var _t=function(e){return nt(e)&&lt(e.length)&&!!bt[Z(e)]};var wt=function(e){return function(t){return e(t)}},xt=n(81),Et=xt.a&&xt.a.isTypedArray,Ot=Et?wt(Et):_t;var Ct=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Tt=Object.prototype.hasOwnProperty;var At=function(e,t,n){var r=e[t];Tt.call(e,t)&&k(r,n)&&(void 0!==n||t in e)||ze(e,t,n)};var St=function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],c=r?r(n[s],e[s],s,n,e):void 0;void 0===c&&(c=e[s]),o?ze(n,s,c):At(n,s,c)}return n};var Pt=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},kt=/^(?:0|[1-9]\d*)$/;var jt=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&kt.test(e))&&e>-1&&e%1==0&&e<t},It=Object.prototype.hasOwnProperty;var Nt=function(e,t){var n=ct(e),r=!n&&st(e),o=!n&&!r&&Object(ft.a)(e),i=!n&&!r&&!o&&Ot(e),a=n||r||o||i,s=a?Pt(e.length,String):[],c=s.length;for(var l in e)!t&&!It.call(e,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||jt(l,c))||s.push(l);return s};var Rt=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},Dt=Object.prototype.hasOwnProperty;var Lt=function(e){if(!ee(e))return Rt(e);var t=et(e),n=[];for(var r in e)("constructor"!=r||!t&&Dt.call(e,r))&&n.push(r);return n};var Mt=function(e){return ut(e)?Nt(e,!0):Lt(e)};var Ft=function(e){return St(e,Mt(e))};var Ht=function(e,t,n,r,o,i,a){var s=Ct(e,n),c=Ct(t,n),l=a.get(c);if(l)Be(e,n,l);else{var u=i?i(s,c,n+"",e,t,a):void 0,p=void 0===u;if(p){var f=ct(c),d=!f&&Object(ft.a)(c),h=!f&&!d&&Ot(c);u=c,f||d||h?ct(s)?u=s:pt(s)?u=Xe(s):d?(p=!1,u=Object(qe.a)(c,!0)):h?(p=!1,u=Ye(c,!0)):u=[]:yt(c)||st(c)?(u=s,st(s)?u=Ft(s):ee(s)&&!ne(s)||(u=tt(c))):p=!1}p&&(a.set(c,u),o(u,c,r,i,a),a.delete(c)),Be(e,n,u)}};var Ut=function e(t,n,r,o,i){t!==n&&Ve(n,(function(a,s){if(i||(i=new He),ee(a))Ht(t,n,s,r,e,o,i);else{var c=o?o(Ct(t,s),a,s+"",t,n,i):void 0;void 0===c&&(c=a),Be(t,s,c)}}),Mt)};var zt=function(e){return e};var Bt=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},Vt=Math.max;var qt=function(e,t,n){return t=Vt(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Vt(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),Bt(e,this,s)}};var Gt=function(e){return function(){return e}},Wt=Ue?function(e,t){return Ue(e,"toString",{configurable:!0,enumerable:!1,value:Gt(t),writable:!0})}:zt,Yt=Date.now;var Xt=function(e){var t=0,n=0;return function(){var r=Yt(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Wt);var $t=function(e,t){return Xt(qt(e,t,zt),e+"")};var Jt=function(e,t,n){if(!ee(n))return!1;var r=typeof t;return!!("number"==r?ut(n)&&jt(t,n.length):"string"==r&&t in n)&&k(n[t],e)};var Kt=function(e){return $t((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&Jt(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,i)}return t}))}((function(e,t,n){Ut(e,t,n)})),Qt=function(e){var t=e.zDepth,n=e.radius,r=e.background,i=e.children,s=e.styles,c=void 0===s?{}:s,l=a()(Kt({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:r}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},c),{"zDepth-1":1===t});return o.a.createElement("div",{style:l.wrap},o.a.createElement("div",{style:l.bg}),o.a.createElement("div",{style:l.content},i))};Qt.propTypes={background:S.a.string,zDepth:S.a.oneOf([0,1,2,3,4,5]),radius:S.a.number,styles:S.a.object},Qt.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var Zt=Qt,en=function(){return V.a.Date.now()},tn=/\s/;var nn=function(e){for(var t=e.length;t--&&tn.test(e.charAt(t)););return t},rn=/^\s+/;var on=function(e){return e?e.slice(0,nn(e)+1).replace(rn,""):e};var an=function(e){return"symbol"==typeof e||nt(e)&&"[object Symbol]"==Z(e)},sn=/^[-+]0x[0-9a-f]+$/i,cn=/^0b[01]+$/i,ln=/^0o[0-7]+$/i,un=parseInt;var pn=function(e){if("number"==typeof e)return e;if(an(e))return NaN;if(ee(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ee(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=on(e);var n=cn.test(e);return n||ln.test(e)?un(e.slice(2),n?2:8):sn.test(e)?NaN:+e},fn=Math.max,dn=Math.min;var hn=function(e,t,n){var r,o,i,a,s,c,l=0,u=!1,p=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function d(t){var n=r,i=o;return r=o=void 0,l=t,a=e.apply(i,n)}function h(e){return l=e,s=setTimeout(g,t),u?d(e):a}function v(e){var n=e-c;return void 0===c||n>=t||n<0||p&&e-l>=i}function g(){var e=en();if(v(e))return m(e);s=setTimeout(g,function(e){var n=t-(e-c);return p?dn(n,i-(e-l)):n}(e))}function m(e){return s=void 0,f&&r?d(e):(r=o=void 0,a)}function y(){var e=en(),n=v(e);if(r=arguments,o=this,c=e,n){if(void 0===s)return h(c);if(p)return clearTimeout(s),s=setTimeout(g,t),d(c)}return void 0===s&&(s=setTimeout(g,t)),a}return t=pn(t)||0,ee(n)&&(u=!!n.leading,i=(p="maxWait"in n)?fn(pn(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=c=o=s=void 0},y.flush=function(){return void 0===s?a:m(en())},y};var vn=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return ee(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),hn(e,t,{leading:r,maxWait:t,trailing:o})},gn=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var mn=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleChange=function(e){"function"==typeof n.props.onChange&&n.throttle(n.props.onChange,function(e,t,n){var r=n.getBoundingClientRect(),o=r.width,i=r.height,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,c=a-(n.getBoundingClientRect().left+window.pageXOffset),l=s-(n.getBoundingClientRect().top+window.pageYOffset);c<0?c=0:c>o&&(c=o),l<0?l=0:l>i&&(l=i);var u=c/o,p=1-l/i;return{h:t.h,s:u,v:p,a:t.a,source:"hsv"}}(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=vn((function(e,t,n){e(t,n)}),50),n}return 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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),gn(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,i=t.black,s=t.pointer,c=t.circle,l=a()({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:i,pointer:s,circle:c}},{custom:!!this.props.style});return o.a.createElement("div",{style:l.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},o.a.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),o.a.createElement("div",{style:l.white,className:"saturation-white"},o.a.createElement("div",{style:l.black,className:"saturation-black"}),o.a.createElement("div",{style:l.pointer},this.props.pointer?o.a.createElement(this.props.pointer,this.props):o.a.createElement("div",{style:l.circle}))))}}]),t}(r.PureComponent||r.Component);var yn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},bn=Ke(Object.keys,Object),_n=Object.prototype.hasOwnProperty;var wn=function(e){if(!et(e))return bn(e);var t=[];for(var n in Object(e))_n.call(e,n)&&"constructor"!=n&&t.push(n);return t};var xn=function(e){return ut(e)?Nt(e):wn(e)};var En=function(e,t){return function(n,r){if(null==n)return n;if(!ut(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}((function(e,t){return e&&Ve(e,t,xn)}));var On=function(e){return"function"==typeof e?e:zt};var Cn=function(e,t){return(ct(e)?yn:En)(e,On(t))},Tn=n(28),An=n.n(Tn),Sn=function(e){var t=0,n=0;return Cn(["r","g","b","a","h","s","l","v"],(function(r){if(e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(e[r])&&(n+=1)}})),t===n&&e},Pn=function(e,t){var n=e.hex?An()(e.hex):An()(e),r=n.toHsl(),o=n.toHsv(),i=n.toRgb(),a=n.toHex();return 0===r.s&&(r.h=t||0,o.h=t||0),{hsl:r,hex:"000000"===a&&0===i.a?"transparent":"#"+a,rgb:i,hsv:o,oldHue:e.h||t||r.h,source:e.source}},kn=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&An()(e).isValid()},jn=function(e){if(!e)return"#fff";var t=Pn(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},In=function(e,t){var n=e.replace("°","");return An()(t+" ("+n+")")._ok},Nn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rn=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var Dn=function(e){var t=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(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}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.handleChange=function(e,n){if(Sn(e)){var r=Pn(e,e.h||t.state.oldHue);t.setState(r),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,r,n),t.props.onChange&&t.props.onChange(r,n)}},t.handleSwatchHover=function(e,n){if(Sn(e)){var r=Pn(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(r,n)}},t.state=Nn({},Pn(e.color,0)),t.debounce=hn((function(e,t,n){e(t,n)}),100),t}return 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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),Rn(n,[{key:"render",value:function(){var t={};return this.props.onSwatchHover&&(t.onSwatchHover=this.handleSwatchHover),o.a.createElement(e,Nn({},this.props,this.state,{onChange:this.handleChange},t))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return Nn({},Pn(e.color,t.oldHue))}}]),n}(r.PureComponent||r.Component);return t.propTypes=Nn({},e.propTypes),t.defaultProps=Nn({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t},Ln=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mn=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function Fn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hn(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 Un(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var zn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;Fn(this,r);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return t=n=Hn(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(i))),n.state={focus:!1},n.handleFocus=function(){return n.setState({focus:!0})},n.handleBlur=function(){return n.setState({focus:!1})},Hn(n,t)}return Un(r,n),Mn(r,[{key:"render",value:function(){return o.a.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},o.a.createElement(e,Ln({},this.props,this.state)))}}]),r}(o.a.Component)}((function(e){var t=e.color,n=e.style,r=e.onClick,i=void 0===r?function(){}:r,s=e.onHover,c=e.title,l=void 0===c?t:c,u=e.children,p=e.focus,d=e.focusStyle,h=void 0===d?{}:d,v="transparent"===t,g=a()({default:{swatch:zn({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,p?h:{})}}),m={};return s&&(m.onMouseOver=function(e){return s(t,e)}),o.a.createElement("div",zn({style:g.swatch,onClick:function(e){return i(t,e)},title:l,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&i(t,e)}},m),u,v&&o.a.createElement(f,{borderRadius:g.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))})),Vn=function(e){var t=e.direction,n=a()({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return o.a.createElement("div",{style:n.picker})},qn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gn=function(e){var t=e.rgb,n=e.hsl,r=e.width,i=e.height,s=e.onChange,c=e.direction,l=e.style,u=e.renderers,p=e.pointer,f=e.className,d=void 0===f?"":f,h=a()({default:{picker:{position:"relative",width:r,height:i},alpha:{radius:"2px",style:l}}});return o.a.createElement("div",{style:h.picker,className:"alpha-picker "+d},o.a.createElement(m,qn({},h.alpha,{rgb:t,hsl:n,pointer:p,renderers:u,onChange:s,direction:c})))};Gn.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Vn};var Wn=Dn(Gn);var Yn=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o};var Xn=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var $n=function(e){return this.__data__.has(e)};function Jn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Le;++t<n;)this.add(e[t])}Jn.prototype.add=Jn.prototype.push=Xn,Jn.prototype.has=$n;var Kn=Jn;var Qn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var Zn=function(e,t){return e.has(t)};var er=function(e,t,n,r,o,i){var a=1&n,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var l=i.get(e),u=i.get(t);if(l&&u)return l==t&&u==e;var p=-1,f=!0,d=2&n?new Kn:void 0;for(i.set(e,t),i.set(t,e);++p<s;){var h=e[p],v=t[p];if(r)var g=a?r(v,h,p,t,e,i):r(h,v,p,e,t,i);if(void 0!==g){if(g)continue;f=!1;break}if(d){if(!Qn(t,(function(e,t){if(!Zn(d,t)&&(h===e||o(h,e,n,r,i)))return d.push(t)}))){f=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f};var tr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var nr=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},rr=q?q.prototype:void 0,or=rr?rr.valueOf:void 0;var ir=function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Ge(e),new Ge(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return k(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=tr;case"[object Set]":var c=1&r;if(s||(s=nr),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;r|=2,a.set(e,t);var u=er(s(e),s(t),r,o,i,a);return a.delete(e),u;case"[object Symbol]":if(or)return or.call(e)==or.call(t)}return!1};var ar=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e};var sr=function(e,t,n){var r=t(e);return ct(e)?r:ar(r,n(e))};var cr=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i};var lr=function(){return[]},ur=Object.prototype.propertyIsEnumerable,pr=Object.getOwnPropertySymbols,fr=pr?function(e){return null==e?[]:(e=Object(e),cr(pr(e),(function(t){return ur.call(e,t)})))}:lr;var dr=function(e){return sr(e,xn,fr)},hr=Object.prototype.hasOwnProperty;var vr=function(e,t,n,r,o,i){var a=1&n,s=dr(e),c=s.length;if(c!=dr(t).length&&!a)return!1;for(var l=c;l--;){var u=s[l];if(!(a?u in t:hr.call(t,u)))return!1}var p=i.get(e),f=i.get(t);if(p&&f)return p==t&&f==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++l<c;){var v=e[u=s[l]],g=t[u];if(r)var m=a?r(g,v,u,t,e,i):r(v,g,u,e,t,i);if(!(void 0===m?v===g||o(v,g,n,r,i):m)){d=!1;break}h||(h="constructor"==u)}if(d&&!h){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d},gr=ge(V.a,"DataView"),mr=ge(V.a,"Promise"),yr=ge(V.a,"Set"),br=ge(V.a,"WeakMap"),_r=se(gr),wr=se(me),xr=se(mr),Er=se(yr),Or=se(br),Cr=Z;(gr&&"[object DataView]"!=Cr(new gr(new ArrayBuffer(1)))||me&&"[object Map]"!=Cr(new me)||mr&&"[object Promise]"!=Cr(mr.resolve())||yr&&"[object Set]"!=Cr(new yr)||br&&"[object WeakMap]"!=Cr(new br))&&(Cr=function(e){var t=Z(e),n="[object Object]"==t?e.constructor:void 0,r=n?se(n):"";if(r)switch(r){case _r:return"[object DataView]";case wr:return"[object Map]";case xr:return"[object Promise]";case Er:return"[object Set]";case Or:return"[object WeakMap]"}return t});var Tr=Cr,Ar=Object.prototype.hasOwnProperty;var Sr=function(e,t,n,r,o,i){var a=ct(e),s=ct(t),c=a?"[object Array]":Tr(e),l=s?"[object Array]":Tr(t),u="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),p="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),f=c==l;if(f&&Object(ft.a)(e)){if(!Object(ft.a)(t))return!1;a=!0,u=!1}if(f&&!u)return i||(i=new He),a||Ot(e)?er(e,t,n,r,o,i):ir(e,t,c,n,r,o,i);if(!(1&n)){var d=u&&Ar.call(e,"__wrapped__"),h=p&&Ar.call(t,"__wrapped__");if(d||h){var v=d?e.value():e,g=h?t.value():t;return i||(i=new He),o(v,g,n,r,i)}}return!!f&&(i||(i=new He),vr(e,t,n,r,o,i))};var Pr=function e(t,n,r,o,i){return t===n||(null==t||null==n||!nt(t)&&!nt(n)?t!=t&&n!=n:Sr(t,n,r,o,e,i))};var kr=function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var c=(s=n[o])[0],l=e[c],u=s[1];if(a&&s[2]){if(void 0===l&&!(c in e))return!1}else{var p=new He;if(r)var f=r(l,u,c,e,t,p);if(!(void 0===f?Pr(u,l,3,r,p):f))return!1}}return!0};var jr=function(e){return e==e&&!ee(e)};var Ir=function(e){for(var t=xn(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,jr(o)]}return t};var Nr=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}};var Rr=function(e){var t=Ir(e);return 1==t.length&&t[0][2]?Nr(t[0][0],t[0][1]):function(n){return n===e||kr(n,e,t)}},Dr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lr=/^\w*$/;var Mr=function(e,t){if(ct(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!an(e))||(Lr.test(e)||!Dr.test(e)||null!=t&&e in Object(t))};function Fr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Fr.Cache||Le),n}Fr.Cache=Le;var Hr=Fr;var Ur=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zr=/\\(\\)?/g,Br=function(e){var t=Hr(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ur,(function(e,n,r,o){t.push(r?o.replace(zr,"$1"):n||e)})),t})),Vr=q?q.prototype:void 0,qr=Vr?Vr.toString:void 0;var Gr=function e(t){if("string"==typeof t)return t;if(ct(t))return Yn(t,e)+"";if(an(t))return qr?qr.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var Wr=function(e){return null==e?"":Gr(e)};var Yr=function(e,t){return ct(e)?e:Mr(e,t)?[e]:Br(Wr(e))};var Xr=function(e){if("string"==typeof e||an(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var $r=function(e,t){for(var n=0,r=(t=Yr(t,e)).length;null!=e&&n<r;)e=e[Xr(t[n++])];return n&&n==r?e:void 0};var Jr=function(e,t,n){var r=null==e?void 0:$r(e,t);return void 0===r?n:r};var Kr=function(e,t){return null!=e&&t in Object(e)};var Qr=function(e,t,n){for(var r=-1,o=(t=Yr(t,e)).length,i=!1;++r<o;){var a=Xr(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&lt(o)&&jt(a,o)&&(ct(e)||st(e))};var Zr=function(e,t){return null!=e&&Qr(e,t,Kr)};var eo=function(e,t){return Mr(e)&&jr(t)?Nr(Xr(e),t):function(n){var r=Jr(n,e);return void 0===r&&r===t?Zr(n,e):Pr(t,r,3)}};var to=function(e){return function(t){return null==t?void 0:t[e]}};var no=function(e){return function(t){return $r(t,e)}};var ro=function(e){return Mr(e)?to(Xr(e)):no(e)};var oo=function(e){return"function"==typeof e?e:null==e?zt:"object"==typeof e?ct(e)?eo(e[0],e[1]):Rr(e):ro(e)};var io=function(e,t){var n=-1,r=ut(e)?Array(e.length):[];return En(e,(function(e,o,i){r[++n]=t(e,o,i)})),r};var ao=function(e,t){return(ct(e)?Yn:io)(e,oo(t,3))},so=function(e){var t=e.colors,n=e.onClick,r=e.onSwatchHover,i=a()({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return o.a.createElement("div",{style:i.swatches},ao(t,(function(e){return o.a.createElement(Bn,{key:e,color:e,style:i.swatch,onClick:n,onHover:r,focusStyle:{boxShadow:"0 0 4px "+e}})})),o.a.createElement("div",{style:i.clear}))},co=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,i=e.colors,s=e.width,c=e.triangle,l=e.styles,u=void 0===l?{}:l,p=e.className,d=void 0===p?"":p,h="transparent"===r,v=function(e,n){kn(e)&&t({hex:e,source:"hex"},n)},g=a()(Kt({default:{card:{width:s,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:r,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:jn(r),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+r+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},u),{"hide-triangle":"hide"===c});return o.a.createElement("div",{style:g.card,className:"block-picker "+d},o.a.createElement("div",{style:g.triangle}),o.a.createElement("div",{style:g.head},h&&o.a.createElement(f,{borderRadius:"6px 6px 0 0"}),o.a.createElement("div",{style:g.label},r)),o.a.createElement("div",{style:g.body},o.a.createElement(so,{colors:i,onClick:v,onSwatchHover:n}),o.a.createElement(w,{style:{input:g.input},value:r,onChange:v})))};co.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),colors:S.a.arrayOf(S.a.string),triangle:S.a.oneOf(["top","hide"]),styles:S.a.object},co.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};var lo=Dn(co),uo={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},po={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},fo={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},ho={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},vo={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},go={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},mo={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},yo={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},bo={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},_o={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},wo={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},xo={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},Eo={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},Oo={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Co={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},To={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Ao={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},So={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},Po=function(e){var t=e.color,n=e.onClick,r=e.onSwatchHover,i=e.hover,s=e.active,c=e.circleSize,l=e.circleSpacing,u=a()({default:{swatch:{width:c,height:c,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(c/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:i,active:s});return o.a.createElement("div",{style:u.swatch},o.a.createElement(Bn,{style:u.Swatch,color:t,onClick:n,onHover:r,focusStyle:{boxShadow:u.Swatch.boxShadow+", 0 0 5px "+t}}))};Po.defaultProps={circleSize:28,circleSpacing:14};var ko=Object(i.handleHover)(Po),jo=function(e){var t=e.width,n=e.onChange,r=e.onSwatchHover,i=e.colors,s=e.hex,c=e.circleSize,l=e.styles,u=void 0===l?{}:l,p=e.circleSpacing,f=e.className,d=void 0===f?"":f,h=a()(Kt({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-p,marginBottom:-p}}},u)),v=function(e,t){return n({hex:e,source:"hex"},t)};return o.a.createElement("div",{style:h.card,className:"circle-picker "+d},ao(i,(function(e){return o.a.createElement(ko,{key:e,color:e,onClick:v,onSwatchHover:r,active:s===e.toLowerCase(),circleSize:c,circleSpacing:p})})))};jo.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),circleSize:S.a.number,circleSpacing:S.a.number,styles:S.a.object},jo.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[uo[500],po[500],fo[500],ho[500],vo[500],go[500],mo[500],yo[500],bo[500],_o[500],wo[500],xo[500],Eo[500],Oo[500],Co[500],To[500],Ao[500],So[500]],styles:{}};var Io=Dn(jo);var No=function(e){return void 0===e},Ro=n(131),Do=n.n(Ro),Lo=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var Mo=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.toggleViews=function(){"hex"===n.state.view?n.setState({view:"rgb"}):"rgb"===n.state.view?n.setState({view:"hsl"}):"hsl"===n.state.view&&(1===n.props.hsl.a?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(e,t){e.hex?kn(e.hex)&&n.props.onChange({hex:e.hex,source:"hex"},t):e.r||e.g||e.b?n.props.onChange({r:e.r||n.props.rgb.r,g:e.g||n.props.rgb.g,b:e.b||n.props.rgb.b,source:"rgb"},t):e.a?(e.a<0?e.a=0:e.a>1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),n.props.onChange({h:e.h||n.props.hsl.h,s:Number(No(e.s)?n.props.hsl.s:e.s),l:Number(No(e.l)?n.props.hsl.l:e.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return 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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Lo(t,[{key:"render",value:function(){var e=this,t=a()({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=o.a.createElement("div",{style:t.fields,className:"flexbox-fix"},o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=o.a.createElement("div",{style:t.fields,className:"flexbox-fix"},o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),o.a.createElement("div",{style:t.alpha},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=o.a.createElement("div",{style:t.fields,className:"flexbox-fix"},o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),o.a.createElement("div",{style:t.field},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),o.a.createElement("div",{style:t.alpha},o.a.createElement(w,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),o.a.createElement("div",{style:t.wrap,className:"flexbox-fix"},n,o.a.createElement("div",{style:t.toggle},o.a.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},o.a.createElement(Do.a,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(o.a.Component);Mo.defaultProps={view:"hex"};var Fo=Mo,Ho=function(){var e=a()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return o.a.createElement("div",{style:e.picker})},Uo=function(){var e=a()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return o.a.createElement("div",{style:e.picker})},zo=function(e){var t=e.width,n=e.onChange,r=e.disableAlpha,i=e.rgb,s=e.hsl,c=e.hsv,l=e.hex,u=e.renderers,p=e.styles,d=void 0===p?{}:p,h=e.className,v=void 0===h?"":h,g=e.defaultView,y=a()(Kt({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},d),{disableAlpha:r});return o.a.createElement("div",{style:y.picker,className:"chrome-picker "+v},o.a.createElement("div",{style:y.saturation},o.a.createElement(mn,{style:y.Saturation,hsl:s,hsv:c,pointer:Uo,onChange:n})),o.a.createElement("div",{style:y.body},o.a.createElement("div",{style:y.controls,className:"flexbox-fix"},o.a.createElement("div",{style:y.color},o.a.createElement("div",{style:y.swatch},o.a.createElement("div",{style:y.active}),o.a.createElement(f,{renderers:u}))),o.a.createElement("div",{style:y.toggles},o.a.createElement("div",{style:y.hue},o.a.createElement(T,{style:y.Hue,hsl:s,pointer:Ho,onChange:n})),o.a.createElement("div",{style:y.alpha},o.a.createElement(m,{style:y.Alpha,rgb:i,hsl:s,pointer:Ho,renderers:u,onChange:n})))),o.a.createElement(Fo,{rgb:i,hsl:s,hex:l,view:g,onChange:n,disableAlpha:r})))};zo.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),disableAlpha:S.a.bool,styles:S.a.object,defaultView:S.a.oneOf(["hex","rgb","hsl"])},zo.defaultProps={width:225,disableAlpha:!1,styles:{}};var Bo=Dn(zo),Vo=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,i=e.onSwatchHover,s=e.active,c=a()({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:jn(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:s,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return o.a.createElement(Bn,{style:c.color,color:t,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},o.a.createElement("div",{style:c.dot}))},qo=function(e){var t=e.hex,n=e.rgb,r=e.onChange,i=a()({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),s=function(e,t){e.r||e.g||e.b?r({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):r({hex:e.hex,source:"hex"},t)};return o.a.createElement("div",{style:i.fields,className:"flexbox-fix"},o.a.createElement("div",{style:i.active}),o.a.createElement(w,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:t,onChange:s}),o.a.createElement(w,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:n.r,onChange:s}),o.a.createElement(w,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:n.g,onChange:s}),o.a.createElement(w,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:n.b,onChange:s}))},Go=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.colors,i=e.hex,s=e.rgb,c=e.styles,l=void 0===c?{}:c,u=e.className,p=void 0===u?"":u,f=a()(Kt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),d=function(e,n){e.hex?kn(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return o.a.createElement(Zt,{style:f.Compact,styles:l},o.a.createElement("div",{style:f.compact,className:"compact-picker "+p},o.a.createElement("div",null,ao(r,(function(e){return o.a.createElement(Vo,{key:e,color:e,active:e.toLowerCase()===i,onClick:d,onSwatchHover:n})})),o.a.createElement("div",{style:f.clear})),o.a.createElement(qo,{hex:i,rgb:s,onChange:d})))};Go.propTypes={colors:S.a.arrayOf(S.a.string),styles:S.a.object},Go.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};var Wo=Dn(Go),Yo=Object(i.handleHover)((function(e){var t=e.hover,n=e.color,r=e.onClick,i=e.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},c=a()({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:t});return o.a.createElement("div",{style:c.swatch},o.a.createElement(Bn,{color:n,onClick:r,onHover:i,focusStyle:s}))})),Xo=function(e){var t=e.width,n=e.colors,r=e.onChange,i=e.onSwatchHover,s=e.triangle,c=e.styles,l=void 0===c?{}:c,u=e.className,p=void 0===u?"":u,f=a()(Kt({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":"hide"===s,"top-left-triangle":"top-left"===s,"top-right-triangle":"top-right"===s,"bottom-left-triangle":"bottom-left"===s,"bottom-right-triangle":"bottom-right"===s}),d=function(e,t){return r({hex:e,source:"hex"},t)};return o.a.createElement("div",{style:f.card,className:"github-picker "+p},o.a.createElement("div",{style:f.triangleShadow}),o.a.createElement("div",{style:f.triangle}),ao(n,(function(e){return o.a.createElement(Yo,{color:e,key:e,onClick:d,onSwatchHover:i})})))};Xo.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),colors:S.a.arrayOf(S.a.string),triangle:S.a.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:S.a.object},Xo.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};var $o=Dn(Xo),Jo=function(e){var t=e.direction,n=a()({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return o.a.createElement("div",{style:n.picker})},Ko=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qo=function(e){var t=e.width,n=e.height,r=e.onChange,i=e.hsl,s=e.direction,c=e.pointer,l=e.styles,u=void 0===l?{}:l,p=e.className,f=void 0===p?"":p,d=a()(Kt({default:{picker:{position:"relative",width:t,height:n},hue:{radius:"2px"}}},u));return o.a.createElement("div",{style:d.picker,className:"hue-picker "+f},o.a.createElement(T,Ko({},d.hue,{hsl:i,pointer:c,onChange:function(e){return r({a:1,h:e.h,l:.5,s:1})},direction:s})))};Qo.propTypes={styles:S.a.object},Qo.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Jo,styles:{}};var Zo=Dn(Qo),ei=Dn((function(e){var t=e.onChange,n=e.hex,r=e.rgb,i=e.styles,s=void 0===i?{}:i,c=e.className,l=void 0===c?"":c,u=a()(Kt({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},s)),p=function(e,n){e.hex?kn(e.hex)&&t({hex:e.hex,source:"hex"},n):(e.r||e.g||e.b)&&t({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},n)};return o.a.createElement(Zt,{styles:s},o.a.createElement("div",{style:u.material,className:"material-picker "+l},o.a.createElement(w,{style:{wrap:u.HEXwrap,input:u.HEXinput,label:u.HEXlabel},label:"hex",value:n,onChange:p}),o.a.createElement("div",{style:u.split,className:"flexbox-fix"},o.a.createElement("div",{style:u.third},o.a.createElement(w,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"r",value:r.r,onChange:p})),o.a.createElement("div",{style:u.third},o.a.createElement(w,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"g",value:r.g,onChange:p})),o.a.createElement("div",{style:u.third},o.a.createElement(w,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"b",value:r.b,onChange:p})))))})),ti=function(e){var t=e.onChange,n=e.rgb,r=e.hsv,i=e.hex,s=a()({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),c=function(e,o){e["#"]?kn(e["#"])&&t({hex:e["#"],source:"hex"},o):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},o):(e.h||e.s||e.v)&&t({h:e.h||r.h,s:e.s||r.s,v:e.v||r.v,source:"hsv"},o)};return o.a.createElement("div",{style:s.fields},o.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"h",value:Math.round(r.h),onChange:c}),o.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"s",value:Math.round(100*r.s),onChange:c}),o.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"v",value:Math.round(100*r.v),onChange:c}),o.a.createElement("div",{style:s.divider}),o.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:n.r,onChange:c}),o.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:n.g,onChange:c}),o.a.createElement(w,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:n.b,onChange:c}),o.a.createElement("div",{style:s.divider}),o.a.createElement(w,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"#",value:i.replace("#",""),onChange:c}),o.a.createElement("div",{style:s.fieldSymbols},o.a.createElement("div",{style:s.symbol},"°"),o.a.createElement("div",{style:s.symbol},"%"),o.a.createElement("div",{style:s.symbol},"%")))},ni=function(e){var t=e.hsl,n=a()({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return o.a.createElement("div",{style:n.picker})},ri=function(){var e=a()({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return o.a.createElement("div",{style:e.pointer},o.a.createElement("div",{style:e.left},o.a.createElement("div",{style:e.leftInside})),o.a.createElement("div",{style:e.right},o.a.createElement("div",{style:e.rightInside})))},oi=function(e){var t=e.onClick,n=e.label,r=e.children,i=e.active,s=a()({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return o.a.createElement("div",{style:s.button,onClick:t},n||r)},ii=function(e){var t=e.rgb,n=e.currentColor,r=a()({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return o.a.createElement("div",null,o.a.createElement("div",{style:r.label},"new"),o.a.createElement("div",{style:r.swatches},o.a.createElement("div",{style:r.new}),o.a.createElement("div",{style:r.current})),o.a.createElement("div",{style:r.label},"current"))},ai=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var si=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.state={currentColor:e.hex},n}return 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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),ai(t,[{key:"render",value:function(){var e=this.props,t=e.styles,n=void 0===t?{}:t,r=e.className,i=void 0===r?"":r,s=a()(Kt({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},n));return o.a.createElement("div",{style:s.picker,className:"photoshop-picker "+i},o.a.createElement("div",{style:s.head},this.props.header),o.a.createElement("div",{style:s.body,className:"flexbox-fix"},o.a.createElement("div",{style:s.saturation},o.a.createElement(mn,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:ni,onChange:this.props.onChange})),o.a.createElement("div",{style:s.hue},o.a.createElement(T,{direction:"vertical",hsl:this.props.hsl,pointer:ri,onChange:this.props.onChange})),o.a.createElement("div",{style:s.controls},o.a.createElement("div",{style:s.top,className:"flexbox-fix"},o.a.createElement("div",{style:s.previews},o.a.createElement(ii,{rgb:this.props.rgb,currentColor:this.state.currentColor})),o.a.createElement("div",{style:s.actions},o.a.createElement(oi,{label:"OK",onClick:this.props.onAccept,active:!0}),o.a.createElement(oi,{label:"Cancel",onClick:this.props.onCancel}),o.a.createElement(ti,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(o.a.Component);si.propTypes={header:S.a.string,styles:S.a.object},si.defaultProps={header:"Color Picker",styles:{}};var ci=Dn(si),li=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,i=e.hex,s=e.disableAlpha,c=a()({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:s}),l=function(e,o){e.hex?kn(e.hex)&&t({hex:e.hex,source:"hex"},o):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,a:n.a,source:"rgb"},o):e.a&&(e.a<0?e.a=0:e.a>100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},o))};return o.a.createElement("div",{style:c.fields,className:"flexbox-fix"},o.a.createElement("div",{style:c.double},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"hex",value:i.replace("#",""),onChange:l})),o.a.createElement("div",{style:c.single},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),o.a.createElement("div",{style:c.single},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),o.a.createElement("div",{style:c.single},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),o.a.createElement("div",{style:c.alpha},o.a.createElement(w,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:l,dragLabel:"true",dragMax:"100"})))},ui=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pi=function(e){var t=e.colors,n=e.onClick,r=void 0===n?function(){}:n,i=e.onSwatchHover,s=a()({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),c=function(e,t){r({hex:e,source:"hex"},t)};return o.a.createElement("div",{style:s.colors,className:"flexbox-fix"},t.map((function(e){var t="string"==typeof e?{color:e}:e,n=""+t.color+(t.title||"");return o.a.createElement("div",{key:n,style:s.swatchWrap},o.a.createElement(Bn,ui({},t,{style:s.swatch,onClick:c,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+t.color}})))})))};pi.propTypes={colors:S.a.arrayOf(S.a.oneOfType([S.a.string,S.a.shape({color:S.a.string,title:S.a.string})])).isRequired};var fi=pi,di=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hi=function(e){var t=e.width,n=e.rgb,r=e.hex,i=e.hsv,s=e.hsl,c=e.onChange,l=e.onSwatchHover,u=e.disableAlpha,p=e.presetColors,d=e.renderers,h=e.styles,v=void 0===h?{}:h,g=e.className,y=void 0===g?"":g,b=a()(Kt({default:di({picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},v),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},v),{disableAlpha:u});return o.a.createElement("div",{style:b.picker,className:"sketch-picker "+y},o.a.createElement("div",{style:b.saturation},o.a.createElement(mn,{style:b.Saturation,hsl:s,hsv:i,onChange:c})),o.a.createElement("div",{style:b.controls,className:"flexbox-fix"},o.a.createElement("div",{style:b.sliders},o.a.createElement("div",{style:b.hue},o.a.createElement(T,{style:b.Hue,hsl:s,onChange:c})),o.a.createElement("div",{style:b.alpha},o.a.createElement(m,{style:b.Alpha,rgb:n,hsl:s,renderers:d,onChange:c}))),o.a.createElement("div",{style:b.color},o.a.createElement(f,null),o.a.createElement("div",{style:b.activeColor}))),o.a.createElement(li,{rgb:n,hsl:s,hex:r,onChange:c,disableAlpha:u}),o.a.createElement(fi,{colors:p,onClick:c,onSwatchHover:l}))};hi.propTypes={disableAlpha:S.a.bool,width:S.a.oneOfType([S.a.string,S.a.number]),styles:S.a.object},hi.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};var vi=Dn(hi),gi=function(e){var t=e.hsl,n=e.offset,r=e.onClick,i=void 0===r?function(){}:r,s=e.active,c=e.first,l=e.last,u=a()({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+100*n+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:s,first:c,last:l});return o.a.createElement("div",{style:u.swatch,onClick:function(e){return i({h:t.h,s:.5,l:n,source:"hsl"},e)}})},mi=function(e){var t=e.onClick,n=e.hsl,r=a()({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}});return o.a.createElement("div",{style:r.swatches},o.a.createElement("div",{style:r.swatch},o.a.createElement(gi,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<.1&&Math.abs(n.s-.5)<.1,onClick:t,first:!0})),o.a.createElement("div",{style:r.swatch},o.a.createElement(gi,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),o.a.createElement("div",{style:r.swatch},o.a.createElement(gi,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),o.a.createElement("div",{style:r.swatch},o.a.createElement(gi,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),o.a.createElement("div",{style:r.swatch},o.a.createElement(gi,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<.1&&Math.abs(n.s-.5)<.1,onClick:t,last:!0})),o.a.createElement("div",{style:r.clear}))},yi=function(){var e=a()({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return o.a.createElement("div",{style:e.picker})},bi=function(e){var t=e.hsl,n=e.onChange,r=e.pointer,i=e.styles,s=void 0===i?{}:i,c=e.className,l=void 0===c?"":c,u=a()(Kt({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},s));return o.a.createElement("div",{style:u.wrap||{},className:"slider-picker "+l},o.a.createElement("div",{style:u.hue},o.a.createElement(T,{style:u.Hue,hsl:t,pointer:r,onChange:n})),o.a.createElement("div",{style:u.swatches},o.a.createElement(mi,{hsl:t,onClick:n})))};bi.propTypes={styles:S.a.object},bi.defaultProps={pointer:yi,styles:{}};var _i=Dn(bi),wi=n(132),xi=n.n(wi),Ei=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,i=e.onSwatchHover,s=e.first,c=e.last,l=e.active,u=a()({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:jn(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:s,last:c,active:l,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return o.a.createElement(Bn,{color:t,style:u.color,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},o.a.createElement("div",{style:u.check},o.a.createElement(xi.a,null)))},Oi=function(e){var t=e.onClick,n=e.onSwatchHover,r=e.group,i=e.active,s=a()({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return o.a.createElement("div",{style:s.group},ao(r,(function(e,a){return o.a.createElement(Ei,{key:e,color:e,active:e.toLowerCase()===i,first:0===a,last:a===r.length-1,onClick:t,onSwatchHover:n})})))},Ci=function(e){var t=e.width,n=e.height,r=e.onChange,i=e.onSwatchHover,s=e.colors,c=e.hex,l=e.styles,u=void 0===l?{}:l,p=e.className,f=void 0===p?"":p,d=a()(Kt({default:{picker:{width:t,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),h=function(e,t){return r({hex:e,source:"hex"},t)};return o.a.createElement("div",{style:d.picker,className:"swatches-picker "+f},o.a.createElement(Zt,null,o.a.createElement("div",{style:d.overflow},o.a.createElement("div",{style:d.body},ao(s,(function(e){return o.a.createElement(Oi,{key:e.toString(),group:e,active:c,onClick:h,onSwatchHover:i})})),o.a.createElement("div",{style:d.clear})))))};Ci.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),height:S.a.oneOfType([S.a.string,S.a.number]),colors:S.a.arrayOf(S.a.arrayOf(S.a.string)),styles:S.a.object},Ci.defaultProps={width:320,height:240,colors:[[uo[900],uo[700],uo[500],uo[300],uo[100]],[po[900],po[700],po[500],po[300],po[100]],[fo[900],fo[700],fo[500],fo[300],fo[100]],[ho[900],ho[700],ho[500],ho[300],ho[100]],[vo[900],vo[700],vo[500],vo[300],vo[100]],[go[900],go[700],go[500],go[300],go[100]],[mo[900],mo[700],mo[500],mo[300],mo[100]],[yo[900],yo[700],yo[500],yo[300],yo[100]],[bo[900],bo[700],bo[500],bo[300],bo[100]],["#194D33",_o[700],_o[500],_o[300],_o[100]],[wo[900],wo[700],wo[500],wo[300],wo[100]],[xo[900],xo[700],xo[500],xo[300],xo[100]],[Eo[900],Eo[700],Eo[500],Eo[300],Eo[100]],[Oo[900],Oo[700],Oo[500],Oo[300],Oo[100]],[Co[900],Co[700],Co[500],Co[300],Co[100]],[To[900],To[700],To[500],To[300],To[100]],[Ao[900],Ao[700],Ao[500],Ao[300],Ao[100]],[So[900],So[700],So[500],So[300],So[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};var Ti=Dn(Ci),Ai=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,i=e.colors,s=e.width,c=e.triangle,l=e.styles,u=void 0===l?{}:l,p=e.className,f=void 0===p?"":p,d=a()(Kt({default:{card:{width:s,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":"hide"===c,"top-left-triangle":"top-left"===c,"top-right-triangle":"top-right"===c}),h=function(e,n){kn(e)&&t({hex:e,source:"hex"},n)};return o.a.createElement("div",{style:d.card,className:"twitter-picker "+f},o.a.createElement("div",{style:d.triangleShadow}),o.a.createElement("div",{style:d.triangle}),o.a.createElement("div",{style:d.body},ao(i,(function(e,t){return o.a.createElement(Bn,{key:t,color:e,hex:e,style:d.swatch,onClick:h,onHover:n,focusStyle:{boxShadow:"0 0 4px "+e}})})),o.a.createElement("div",{style:d.hash},"#"),o.a.createElement(w,{label:null,style:{input:d.input},value:r.replace("#",""),onChange:h}),o.a.createElement("div",{style:d.clear})))};Ai.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),triangle:S.a.oneOf(["hide","top-left","top-right"]),colors:S.a.arrayOf(S.a.string),styles:S.a.object},Ai.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};var Si=Dn(Ai),Pi=function(e){var t=a()({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(100*e.hsl.s)+"%, "+Math.round(100*e.hsl.l)+"%)"}}});return o.a.createElement("div",{style:t.picker})};Pi.propTypes={hsl:S.a.shape({h:S.a.number,s:S.a.number,l:S.a.number,a:S.a.number})},Pi.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var ki=Pi,ji=function(e){var t=a()({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return o.a.createElement("div",{style:t.picker})};ji.propTypes={hsl:S.a.shape({h:S.a.number,s:S.a.number,l:S.a.number,a:S.a.number})},ji.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Ii=ji,Ni=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,i=e.hex,s=e.hsv,c=function(e,n){if(e.hex)kn(e.hex)&&t({hex:e.hex,source:"hex"},n);else if(e.rgb){var r=e.rgb.split(",");In(e.rgb,"rgb")&&t({r:r[0],g:r[1],b:r[2],a:1,source:"rgb"},n)}else if(e.hsv){var o=e.hsv.split(",");In(e.hsv,"hsv")&&(o[2]=o[2].replace("%",""),o[1]=o[1].replace("%",""),o[0]=o[0].replace("°",""),1==o[1]?o[1]=.01:1==o[2]&&(o[2]=.01),t({h:Number(o[0]),s:Number(o[1]),v:Number(o[2]),source:"hsv"},n))}else if(e.hsl){var i=e.hsl.split(",");In(e.hsl,"hsl")&&(i[2]=i[2].replace("%",""),i[1]=i[1].replace("%",""),i[0]=i[0].replace("°",""),1==f[1]?f[1]=.01:1==f[2]&&(f[2]=.01),t({h:Number(i[0]),s:Number(i[1]),v:Number(i[2]),source:"hsl"},n))}},l=a()({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=n.r+", "+n.g+", "+n.b,p=Math.round(r.h)+"°, "+Math.round(100*r.s)+"%, "+Math.round(100*r.l)+"%",f=Math.round(s.h)+"°, "+Math.round(100*s.s)+"%, "+Math.round(100*s.v)+"%";return o.a.createElement("div",{style:l.wrap,className:"flexbox-fix"},o.a.createElement("div",{style:l.fields},o.a.createElement("div",{style:l.double},o.a.createElement(w,{style:{input:l.input,label:l.label},label:"hex",value:i,onChange:c})),o.a.createElement("div",{style:l.column},o.a.createElement("div",{style:l.single},o.a.createElement(w,{style:{input:l.input2,label:l.label2},label:"rgb",value:u,onChange:c})),o.a.createElement("div",{style:l.single},o.a.createElement(w,{style:{input:l.input2,label:l.label2},label:"hsv",value:f,onChange:c})),o.a.createElement("div",{style:l.single},o.a.createElement(w,{style:{input:l.input2,label:l.label2},label:"hsl",value:p,onChange:c})))))},Ri=function(e){var t=e.width,n=e.onChange,r=e.rgb,i=e.hsl,s=e.hsv,c=e.hex,l=e.header,u=e.styles,p=void 0===u?{}:u,f=e.className,d=void 0===f?"":f,h=a()(Kt({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+r.r+", "+r.g+", "+r.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},p));return o.a.createElement("div",{style:h.picker,className:"google-picker "+d},o.a.createElement("div",{style:h.head},l),o.a.createElement("div",{style:h.swatch}),o.a.createElement("div",{style:h.saturation},o.a.createElement(mn,{hsl:i,hsv:s,pointer:ki,onChange:n})),o.a.createElement("div",{style:h.body},o.a.createElement("div",{style:h.controls,className:"flexbox-fix"},o.a.createElement("div",{style:h.hue},o.a.createElement(T,{style:h.Hue,hsl:i,radius:"4px",pointer:Ii,onChange:n}))),o.a.createElement(Ni,{rgb:r,hsl:i,hex:c,hsv:s,onChange:n})))};Ri.propTypes={width:S.a.oneOfType([S.a.string,S.a.number]),styles:S.a.object,header:S.a.string},Ri.defaultProps={width:652,styles:{},header:"Color picker"};var Di=Dn(Ri)},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.r(t),n.d(t,"CacheProvider",(function(){return S})),n.d(t,"ThemeContext",(function(){return A})),n.d(t,"withEmotionCache",(function(){return P})),n.d(t,"css",(function(){return R})),n.d(t,"ClassNames",(function(){return z})),n.d(t,"Global",(function(){return L})),n.d(t,"createElement",(function(){return D})),n.d(t,"jsx",(function(){return D})),n.d(t,"keyframes",(function(){return F}));var o=n(0);var i=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var i=105===e.charCodeAt(1)&&64===e.charCodeAt(0);o.insertRule(e,i?0:o.cssRules.length)}catch(e){0}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}();var a=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=n(e,t[s],r).trim();break;default:var c=s=0;for(t=[];s<i;++s)for(var l=0;l<a;++l)t[c++]=n(e[l]+" ",o[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(v,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,i){var a=e+";",s=2*t+3*n+4*i;if(944===s){e=a.indexOf(":",9)+1;var c=a.substring(e,a.length-1).trim();return c=a.substring(0,e).trim()+c+";",1===P||2===P&&o(c,1)?"-webkit-"+c+c:c}if(0===P||2===P&&!o(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(C,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(c=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+c+a;case 1005:return f.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(c=a.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=a.replace(b,"tb");break;case 232:c=a.replace(b,"tb-rl");break;case 220:c=a.replace(b,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+c+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(c=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:a=a.replace(c,"-webkit-"+c)+";"+a;break;case 207:case 102:a=a.replace(c,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(c,"-webkit-"+c)+";"+a.replace(c,"-ms-"+c+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return c=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+c+"-ms-flex-"+c+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(x,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(x,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===O.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,i).replace(":fill-available",":stretch"):a.replace(c,"-webkit-"+c)+a.replace(c,"-moz-"+c.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+i&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(d,"$1-webkit-$2")+a}return a}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),N(2!==t?r:r.replace(E,"$1"),n,t)}function i(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function a(e,t,n,r,o,i,a,s,l,u){for(var p,f=0,d=t;f<I;++f)switch(p=j[f].call(c,e,d,n,r,o,i,a,s,l,u)){case void 0:case!1:case!0:case null:break;default:d=p}if(d!==t)return d}function s(e){return void 0!==(e=e.prefix)&&(N=null,e?"function"!=typeof e?P=1:(P=2,N=e):P=0),s}function c(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<I){var c=a(-1,n,s,s,A,T,0,0,0,0);void 0!==c&&"string"==typeof c&&(n=c)}var p=function e(n,s,c,p,f){for(var d,h,v,b,w,x=0,E=0,O=0,C=0,j=0,N=0,D=v=d=0,L=0,M=0,F=0,H=0,U=c.length,z=U-1,B="",V="",q="",G="";L<U;){if(h=c.charCodeAt(L),L===z&&0!==E+C+O+x&&(0!==E&&(h=47===E?10:47),C=O=x=0,U++,z++),0===E+C+O+x){if(L===z&&(0<M&&(B=B.replace(u,"")),0<B.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:B+=c.charAt(L)}h=59}switch(h){case 123:for(d=(B=B.trim()).charCodeAt(0),v=1,H=++L;L<U;){switch(h=c.charCodeAt(L)){case 123:v++;break;case 125:v--;break;case 47:switch(h=c.charCodeAt(L+1)){case 42:case 47:e:{for(D=L+1;D<z;++D)switch(c.charCodeAt(D)){case 47:if(42===h&&42===c.charCodeAt(D-1)&&L+2!==D){L=D+1;break e}break;case 10:if(47===h){L=D+1;break e}}L=D}}break;case 91:h++;case 40:h++;case 34:case 39:for(;L++<z&&c.charCodeAt(L)!==h;);}if(0===v)break;L++}switch(v=c.substring(H,L),0===d&&(d=(B=B.replace(l,"").trim()).charCodeAt(0)),d){case 64:switch(0<M&&(B=B.replace(u,"")),h=B.charCodeAt(1)){case 100:case 109:case 115:case 45:M=s;break;default:M=k}if(H=(v=e(s,M,v,h,f+1)).length,0<I&&(w=a(3,v,M=t(k,B,F),s,A,T,H,h,f,p),B=M.join(""),void 0!==w&&0===(H=(v=w.trim()).length)&&(h=0,v="")),0<H)switch(h){case 115:B=B.replace(_,i);case 100:case 109:case 45:v=B+"{"+v+"}";break;case 107:v=(B=B.replace(g,"$1 $2"))+"{"+v+"}",v=1===P||2===P&&o("@"+v,3)?"@-webkit-"+v+"@"+v:"@"+v;break;default:v=B+v,112===p&&(V+=v,v="")}else v="";break;default:v=e(s,t(s,B,F),v,p,f+1)}q+=v,v=F=M=D=d=0,B="",h=c.charCodeAt(++L);break;case 125:case 59:if(1<(H=(B=(0<M?B.replace(u,""):B).trim()).length))switch(0===D&&(d=B.charCodeAt(0),45===d||96<d&&123>d)&&(H=(B=B.replace(" ",":")).length),0<I&&void 0!==(w=a(1,B,s,n,A,T,V.length,p,f,p))&&0===(H=(B=w.trim()).length)&&(B="\0\0"),d=B.charCodeAt(0),h=B.charCodeAt(1),d){case 0:break;case 64:if(105===h||99===h){G+=B+c.charAt(L);break}default:58!==B.charCodeAt(H-1)&&(V+=r(B,d,h,B.charCodeAt(2)))}F=M=D=d=0,B="",h=c.charCodeAt(++L)}}switch(h){case 13:case 10:47===E?E=0:0===1+d&&107!==p&&0<B.length&&(M=1,B+="\0"),0<I*R&&a(0,B,s,n,A,T,V.length,p,f,p),T=1,A++;break;case 59:case 125:if(0===E+C+O+x){T++;break}default:switch(T++,b=c.charAt(L),h){case 9:case 32:if(0===C+x+E)switch(j){case 44:case 58:case 9:case 32:b="";break;default:32!==h&&(b=" ")}break;case 0:b="\\0";break;case 12:b="\\f";break;case 11:b="\\v";break;case 38:0===C+E+x&&(M=F=1,b="\f"+b);break;case 108:if(0===C+E+x+S&&0<D)switch(L-D){case 2:112===j&&58===c.charCodeAt(L-3)&&(S=j);case 8:111===N&&(S=N)}break;case 58:0===C+E+x&&(D=L);break;case 44:0===E+O+C+x&&(M=1,b+="\r");break;case 34:case 39:0===E&&(C=C===h?0:0===C?h:C);break;case 91:0===C+E+O&&x++;break;case 93:0===C+E+O&&x--;break;case 41:0===C+E+x&&O--;break;case 40:if(0===C+E+x){if(0===d)switch(2*j+3*N){case 533:break;default:d=1}O++}break;case 64:0===E+O+C+x+D+v&&(v=1);break;case 42:case 47:if(!(0<C+x+O))switch(E){case 0:switch(2*h+3*c.charCodeAt(L+1)){case 235:E=47;break;case 220:H=L,E=42}break;case 42:47===h&&42===j&&H+2!==L&&(33===c.charCodeAt(H+2)&&(V+=c.substring(H,L+1)),b="",E=0)}}0===E&&(B+=b)}N=j,j=h,L++}if(0<(H=V.length)){if(M=s,0<I&&(void 0!==(w=a(2,V,M,n,A,T,H,p,f,p))&&0===(V=w).length))return G+V+q;if(V=M.join(",")+"{"+V+"}",0!=P*S){switch(2!==P||o(V,2)||(S=0),S){case 111:V=V.replace(y,":-moz-$1")+V;break;case 112:V=V.replace(m,"::-webkit-input-$1")+V.replace(m,"::-moz-$1")+V.replace(m,":-ms-input-$1")+V}S=0}}return G+V+q}(k,s,n,0,0);return 0<I&&(void 0!==(c=a(-2,p,s,s,A,T,p.length,0,0,0))&&(p=c)),"",S=0,T=A=1,p}var l=/^\0+/g,u=/[\0\r\f]/g,p=/: */g,f=/zoo|gra/,d=/([,: ])(transform)/g,h=/,\r+?/g,v=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,m=/::(place)/g,y=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,_=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,x=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,O=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,T=1,A=1,S=0,P=1,k=[],j=[],I=0,N=null,R=0;return c.use=function e(t){switch(t){case void 0:case null:I=j.length=0;break;default:if("function"==typeof t)j[I++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else R=0|!!t}return e},c.set=s,void 0!==e&&s(e),c};function s(e){e&&c.current.insert(e+"}")}var c={current:null},l=function(e,t,n,r,o,i,a,l,u,p){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return c.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===l)return t+"/*|*/";break;case 3:switch(l){case 102:case 112:return c.current.insert(n[0]+t),"";default:return t+(0===p?"/*|*/":"")}case-2:t.split("/*|*/}").forEach(s)}},u=function(e){void 0===e&&(e={});var t,n=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var r=new a(t);var o,s={};o=e.container||document.head;var u,p=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(p,(function(e){e.getAttribute("data-emotion-"+n).split(" ").forEach((function(e){s[e]=!0})),e.parentNode!==o&&o.appendChild(e)})),r.use(e.stylisPlugins)(l),u=function(e,t,n,o){var i=t.name;c.current=n,r(e,t.styles),o&&(f.inserted[i]=!0)};var f={key:n,sheet:new i({key:n,container:o,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:s,registered:{},insert:u};return f};n(197);function p(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]):r+=n+" "})),r}var f=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert("."+r,o,e.sheet,!0);o=o.next}while(void 0!==o)}};var d=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},h={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var v=/[A-Z]|^ms/g,g=/_EMO_([^_]+?)_([^]*?)_EMO_/g,m=function(e){return 45===e.charCodeAt(1)},y=function(e){return null!=e&&"boolean"!=typeof e},b=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return m(e)?e:e.replace(v,"-$&").toLowerCase()})),_=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(g,(function(e,t,n){return x={name:t,styles:n,next:x},t}))}return 1===h[e]||m(e)||"number"!=typeof t||0===t?t:t+"px"};function w(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return x={name:n.name,styles:n.styles,next:x},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)x={name:o.name,styles:o.styles,next:x},o=o.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=w(e,t,n[o],!1);else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":y(a)&&(r+=b(i)+":"+_(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=w(e,t,a,!1);switch(i){case"animation":case"animationName":r+=b(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var c=0;c<a.length;c++)y(a[c])&&(r+=b(i)+":"+_(i,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=x,a=n(e);return x=i,w(e,t,a,r)}break;case"string":}if(null==t)return n;var s=t[n];return void 0===s||r?n:s}var x,E=/label:\s*([^\s;\n{]+)\s*;/g;var O=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";x=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=w(n,t,i,!1)):o+=i[0];for(var a=1;a<e.length;a++)o+=w(n,t,e[a],46===o.charCodeAt(o.length-1)),r&&(o+=i[a]);E.lastIndex=0;for(var s,c="";null!==(s=E.exec(o));)c+="-"+s[1];return{name:d(o)+c,styles:o,next:x}},C=Object.prototype.hasOwnProperty,T=Object(o.createContext)("undefined"!=typeof HTMLElement?u():null),A=Object(o.createContext)({}),S=T.Provider,P=function(e){var t=function(t,n){return Object(o.createElement)(T.Consumer,null,(function(r){return e(t,r,n)}))};return Object(o.forwardRef)(t)},k="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",j=function(e,t){var n={};for(var r in t)C.call(t,r)&&(n[r]=t[r]);return n[k]=e,n},I=function(e,t,n,r){var i=null===n?t.css:t.css(n);"string"==typeof i&&void 0!==e.registered[i]&&(i=e.registered[i]);var a=t[k],s=[i],c="";"string"==typeof t.className?c=p(e.registered,s,t.className):null!=t.className&&(c=t.className+" ");var l=O(s);f(e,l,"string"==typeof a);c+=e.key+"-"+l.name;var u={};for(var d in t)C.call(t,d)&&"css"!==d&&d!==k&&(u[d]=t[d]);return u.ref=r,u.className=c,Object(o.createElement)(a,u)},N=P((function(e,t,n){return"function"==typeof e.css?Object(o.createElement)(A.Consumer,null,(function(r){return I(t,e,r,n)})):I(t,e,null,n)}));var R=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return O(t)},D=function(e,t){var n=arguments;if(null==t||!C.call(t,"css"))return o.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=N,i[1]=j(e,t);for(var a=2;a<r;a++)i[a]=n[a];return o.createElement.apply(null,i)},L=P((function(e,t){var n=e.styles;if("function"==typeof n)return Object(o.createElement)(A.Consumer,null,(function(e){var r=O([n(e)]);return Object(o.createElement)(M,{serialized:r,cache:t})}));var r=O([n]);return Object(o.createElement)(M,{serialized:r,cache:t})})),M=function(e){var t,n;function o(t,n,r){return e.call(this,t,n,r)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var a=o.prototype;return a.componentDidMount=function(){this.sheet=new i({key:this.props.cache.key+"-global",nonce:this.props.cache.sheet.nonce,container:this.props.cache.sheet.container});var e=document.querySelector("style[data-emotion-"+this.props.cache.key+'="'+this.props.serialized.name+'"]');null!==e&&this.sheet.tags.push(e),this.props.cache.sheet.tags.length&&(this.sheet.before=this.props.cache.sheet.tags[0]),this.insertStyles()},a.componentDidUpdate=function(e){e.serialized.name!==this.props.serialized.name&&this.insertStyles()},a.insertStyles=function(){if(void 0!==this.props.serialized.next&&f(this.props.cache,this.props.serialized.next,!0),this.sheet.tags.length){var e=this.sheet.tags[this.sheet.tags.length-1].nextElementSibling;this.sheet.before=e,this.sheet.flush()}this.props.cache.insert("",this.props.serialized,this.sheet,!1)},a.componentWillUnmount=function(){this.sheet.flush()},a.render=function(){return null},o}(o.Component),F=function(){var e=R.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},H=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var a=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var s in a="",i)i[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o};function U(e,t,n){var r=[],o=p(e,r,n);return r.length<2?n:o+t(r)}var z=P((function(e,t){return Object(o.createElement)(A.Consumer,null,(function(n){var r=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=O(n,t.registered);return f(t,o,!1),t.key+"-"+o.name},o={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return U(t.registered,r,H(n))},theme:n},i=e.children(o);return!0,i}))}))}])}));
9
9
  //# sourceMappingURL=components.js.map