pixel-react 1.16.0 → 1.16.1
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.
- package/lib/components/MachineInputField/MachineInputField.js +1 -0
- package/lib/components/MachineInputField/MachineInputField.js.map +1 -1
- package/lib/components/MediaViewerModal/type.d.ts +1 -1
- package/lib/components/SequentialConnectingBranch/types.d.ts +1 -1
- package/lib/components/StatusBadge/StatusBadge.d.ts +2 -1
- package/lib/components/StatusBadge/StatusBadge.js +3 -3
- package/lib/components/StatusBadge/StatusBadge.js.map +1 -1
- package/lib/index.d.ts +4 -3
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/styles.css +1 -1
- package/lib/styles.css.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import{jsx as e,Fragment as t,jsxs as n}from"react/jsx-runtime";import*as r from
|
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/function jh(){if(xh)return Ah;xh=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Ah=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,i){for(var o,a,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),s=1;s<arguments.length;s++){for(var c in o=Object(arguments[s]))t.call(o,c)&&(l[c]=o[c]);if(e){a=e(o);for(var d=0;d<a.length;d++)n.call(o,a[d])&&(l[a[d]]=o[a[d]])}}return l},Ah}function Rh(){if(kh)return Lh;kh=1;return Lh="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Bh(){return Sh?Hh:(Sh=1,Hh=Function.call.bind(Object.prototype.hasOwnProperty))}function Ph(){if(Vh)return _h;Vh=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Rh(),n={},r=Bh();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function i(i,o,a,l,s){if("production"!==process.env.NODE_ENV)for(var c in i)if(r(i,c)){var d;try{if("function"!=typeof i[c]){var u=Error((l||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=i[c](o,c,l,a,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((l||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=s?s():"";e("Failed "+a+" type: "+d.message+(null!=f?f:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},_h=i}function Fh(){if(zh)return Oh;zh=1;var e=Zh(),t=jh(),n=Rh(),r=Bh(),i=Ph(),o=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(o=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Oh=function(l,s){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:C("array"),bigint:C("bigint"),bool:C("boolean"),func:C("function"),number:C("number"),object:C("object"),string:C("string"),symbol:C("symbol"),any:p(a),arrayOf:function(e){return p(function(t,r,i,o,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new h("Invalid "+o+" `"+a+"` of type `"+v(l)+"` supplied to `"+i+"`, expected an array.");for(var s=0;s<l.length;s++){var c=e(l,s,i,o,a+"["+s+"]",n);if(c instanceof Error)return c}return null})},element:p(function(e,t,n,r,i){var o=e[t];return l(o)?null:new h("Invalid "+r+" `"+i+"` of type `"+v(o)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:p(function(t,n,r,i,o){var a=t[n];return e.isValidElementType(a)?null:new h("Invalid "+i+" `"+o+"` of type `"+v(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return p(function(t,n,r,i,o){if(!(t[n]instanceof e)){var a=e.name||d;return new h("Invalid "+i+" `"+o+"` of type `"+(((l=t[n]).constructor&&l.constructor.name?l.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+a+"`.")}var l;return null})},node:p(function(e,t,n,r,i){return g(e[t])?null:new h("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return p(function(t,i,o,a,l){if("function"!=typeof e)return new h("Property `"+l+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var s=t[i],c=v(s);if("object"!==c)return new h("Invalid "+a+" `"+l+"` of type `"+c+"` supplied to `"+o+"`, expected an object.");for(var d in s)if(r(s,d)){var u=e(s,d,o,a,l+"."+d,n);if(u instanceof Error)return u}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return p(function(t,n,r,i,o){for(var a=t[n],l=0;l<e.length;l++)if(f(a,e[l]))return null;var s=JSON.stringify(e,function(e,t){return"symbol"===y(t)?String(t):t});return new h("Invalid "+i+" `"+o+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+s+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var i=e[t];if("function"!=typeof i)return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+w(i)+" at index "+t+"."),a}return p(function(t,i,o,a,l){for(var s=[],c=0;c<e.length;c++){var d=(0,e[c])(t,i,o,a,l,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&s.push(d.data.expectedType)}return new h("Invalid "+a+" `"+l+"` supplied to `"+o+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")})},shape:function(e){return p(function(t,r,i,o,a){var l=t[r],s=v(l);if("object"!==s)return new h("Invalid "+o+" `"+a+"` of type `"+s+"` supplied to `"+i+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return m(i,o,a,c,y(d));var u=d(l,c,i,o,a+"."+c,n);if(u)return u}return null})},exact:function(e){return p(function(i,o,a,l,s){var c=i[o],d=v(c);if("object"!==d)return new h("Invalid "+l+" `"+s+"` of type `"+d+"` supplied to `"+a+"`, expected `object`.");var u=t({},i[o],e);for(var f in u){var p=e[f];if(r(e,f)&&"function"!=typeof p)return m(a,l,s,f,y(p));if(!p)return new h("Invalid "+l+" `"+s+"` key `"+f+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(i[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var C=p(c,f,a,l,s+"."+f,n);if(C)return C}return null})}};function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function p(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function i(i,a,l,c,u,f,p){if(c=c||d,f=f||l,p!==n){if(s){var C=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 C.name="Invariant Violation",C}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var m=c+":"+l;!t[m]&&r<3&&(o("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[m]=!0,r++)}}return null==a[l]?i?null===a[l]?new h("The "+u+" `"+f+"` is marked as required in `"+c+"`, but its value is `null`."):new h("The "+u+" `"+f+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,l,c,u,f)}var a=i.bind(null,!1);return a.isRequired=i.bind(null,!0),a}function C(e){return p(function(t,n,r,i,o,a){var l=t[n];return v(l)!==e?new h("Invalid "+i+" `"+o+"` of type `"+y(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function m(e,t,n,r,i){return new h((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function g(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(g);if(null===e||l(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!g(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!g(i[1]))return!1}return!0;default:return!1}}function v(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=v(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function w(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,u.checkPropTypes=i,u.resetWarningCache=i.resetWarningCache,u.PropTypes=u,u},Oh}function Uh(){if(Th)return Nh;Th=1;var e=Rh();function t(){}function n(){}return n.resetWarningCache=t,Nh=function(){function r(t,n,r,i,o,a){if(a!==e){var l=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 l.name="Invariant Violation",l}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}function qh(){if(Ih)return yh.exports;if(Ih=1,"production"!==process.env.NODE_ENV){var e=Zh();yh.exports=Fh()(e.isElement,true)}else yh.exports=Uh()();return yh.exports}var Wh=H(qh()),Qh=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Gh(){return Gh=Object.assign?Object.assign.bind():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},Gh.apply(this,arguments)}function Kh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yh(e,t){return Yh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yh(e,t)}var Xh,Jh,$h=function(e){var t,n;function i(){var t;return(t=e.call(this)||this).handleExpired=t.handleExpired.bind(Kh(t)),t.handleErrored=t.handleErrored.bind(Kh(t)),t.handleChange=t.handleChange.bind(Kh(t)),t.handleRecaptchaRef=t.handleRecaptchaRef.bind(Kh(t)),t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,Yh(t,n);var o=i.prototype;return o.getCaptchaFunction=function(e){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[e]:this.props.grecaptcha[e]:null},o.getValue=function(){var e=this.getCaptchaFunction("getResponse");return e&&void 0!==this._widgetId?e(this._widgetId):null},o.getWidgetId=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this._widgetId:null},o.execute=function(){var e=this.getCaptchaFunction("execute");if(e&&void 0!==this._widgetId)return e(this._widgetId);this._executeRequested=!0},o.executeAsync=function(){var e=this;return new Promise(function(t,n){e.executionResolve=t,e.executionReject=n,e.execute()})},o.reset=function(){var e=this.getCaptchaFunction("reset");e&&void 0!==this._widgetId&&e(this._widgetId)},o.forceReset=function(){var e=this.getCaptchaFunction("reset");e&&e()},o.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},o.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},o.handleChange=function(e){this.props.onChange&&this.props.onChange(e),this.executionResolve&&(this.executionResolve(e),delete this.executionReject,delete this.executionResolve)},o.explicitRender=function(){var e=this.getCaptchaFunction("render");if(e&&void 0===this._widgetId){var t=document.createElement("div");this._widgetId=e(t,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(t)}this._executeRequested&&this.props.grecaptcha&&void 0!==this._widgetId&&(this._executeRequested=!1,this.execute())},o.componentDidMount=function(){this.explicitRender()},o.componentDidUpdate=function(){this.explicitRender()},o.handleRecaptchaRef=function(e){this.captcha=e},o.render=function(){var e=this.props;e.sitekey,e.onChange,e.theme,e.type,e.tabindex,e.onExpired,e.onErrored,e.size,e.stoken,e.grecaptcha,e.badge,e.hl,e.isolated;var t=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,Qh);return r.createElement("div",Gh({},t,{ref:this.handleRecaptchaRef}))},i}(r.Component);$h.displayName="ReCAPTCHA",$h.propTypes={sitekey:Wh.string.isRequired,onChange:Wh.func,grecaptcha:Wh.object,theme:Wh.oneOf(["dark","light"]),type:Wh.oneOf(["image","audio"]),tabindex:Wh.number,onExpired:Wh.func,onErrored:Wh.func,size:Wh.oneOf(["compact","normal","invisible"]),stoken:Wh.string,hl:Wh.string,badge:Wh.oneOf(["bottomright","bottomleft","inline"]),isolated:Wh.bool},$h.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var ep=function(){if(Jh)return Xh;Jh=1;var e=Zh(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};function o(n){return e.isMemo(n)?r:i[n.$$typeof]||t}i[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i[e.Memo]=r;var a=Object.defineProperty,l=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,u=Object.prototype;return Xh=function e(t,r,i){if("string"!=typeof r){if(u){var f=d(r);f&&f!==u&&e(t,f,i)}var h=l(r);s&&(h=h.concat(s(r)));for(var p=o(t),C=o(r),m=0;m<h.length;++m){var g=h[m];if(!(n[g]||i&&i[g]||C&&C[g]||p&&p[g])){var v=c(r,g);try{a(t,g,v)}catch(e){}}}}return t},Xh}(),tp=H(ep);function np(){return np=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},np.apply(this,arguments)}var rp={},ip=0;var op="onloadcallback";function ap(){return"undefined"!=typeof window&&window.recaptchaOptions||{}}var lp=function(e,t){return t=t||{},function(n){var r=n.displayName||n.name||"Component",i=function(r){var i,o;function a(e,t){var n;return(n=r.call(this,e,t)||this).state={},n.__scriptURL="",n}o=r,(i=a).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var l=a.prototype;return l.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+ip++),this.__scriptLoaderID},l.setupScriptURL=function(){return this.__scriptURL="function"==typeof e?e():e,this.__scriptURL},l.asyncScriptLoaderHandleLoad=function(e){var t=this;this.setState(e,function(){return t.props.asyncScriptOnLoad&&t.props.asyncScriptOnLoad(t.state)})},l.asyncScriptLoaderTriggerOnScriptLoaded=function(){var e=rp[this.__scriptURL];if(!e||!e.loaded)throw new Error("Script is not loaded.");for(var n in e.observers)e.observers[n](e);delete window[t.callbackName]},l.componentDidMount=function(){var e=this,n=this.setupScriptURL(),r=this.asyncScriptLoaderGetScriptLoaderID(),i=t,o=i.globalName,a=i.callbackName,l=i.scriptId;if(o&&void 0!==window[o]&&(rp[n]={loaded:!0,observers:{}}),rp[n]){var s=rp[n];return s&&(s.loaded||s.errored)?void this.asyncScriptLoaderHandleLoad(s):void(s.observers[r]=function(t){return e.asyncScriptLoaderHandleLoad(t)})}var c={};c[r]=function(t){return e.asyncScriptLoaderHandleLoad(t)},rp[n]={loaded:!1,observers:c};var d=document.createElement("script");for(var u in d.src=n,d.async=!0,t.attributes)d.setAttribute(u,t.attributes[u]);l&&(d.id=l);var f=function(e){if(rp[n]){var t=rp[n].observers;for(var r in t)e(t[r])&&delete t[r]}};a&&"undefined"!=typeof window&&(window[a]=function(){return e.asyncScriptLoaderTriggerOnScriptLoaded()}),d.onload=function(){var e=rp[n];e&&(e.loaded=!0,f(function(t){return!a&&(t(e),!0)}))},d.onerror=function(){var e=rp[n];e&&(e.errored=!0,f(function(t){return t(e),!0}))},document.body.appendChild(d)},l.componentWillUnmount=function(){var e=this.__scriptURL;if(!0===t.removeOnUnmount)for(var n=document.getElementsByTagName("script"),r=0;r<n.length;r+=1)n[r].src.indexOf(e)>-1&&n[r].parentNode&&n[r].parentNode.removeChild(n[r]);var i=rp[e];i&&(delete i.observers[this.asyncScriptLoaderGetScriptLoaderID()],!0===t.removeOnUnmount&&delete rp[e])},l.render=function(){var e=t.globalName,r=this.props;r.asyncScriptOnLoad;var i=r.forwardedRef,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["asyncScriptOnLoad","forwardedRef"]);return e&&"undefined"!=typeof window&&(o[e]=void 0!==window[e]?window[e]:void 0),o.ref=i,C(n,o)},a}(E),a=o(function(e,t){return C(i,np({},e,{forwardedRef:t}))});return a.displayName="AsyncScriptLoader("+r+")",a.propTypes={asyncScriptOnLoad:Wh.func},tp(a,n)}}(function(){var e=ap(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+op+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+op+"&render=explicit"},{callbackName:op,globalName:"grecaptcha",attributes:ap().nonce?{nonce:ap().nonce}:{}})($h);const sp=lp,cp=o(({onVerify:t,className:r="",error:i,sitekey:o,...a},l)=>{const[s,d]=c(null),u=i||s;return n("div",{className:z("ff-recaptcha-wrapper",r),children:[e(sp,{ref:l,sitekey:o,onChange:e=>{e?(d(null),t(e)):d("Please complete the CAPTCHA")},...a}),u&&e("div",{className:"ff-recaptcha-error",children:e(F,{fontSize:12,children:u})})]})}),dp={margin:6,optionHeight:32,selectInputHeight:38,dropDownWrapperPadding:0},up=({onSelectBlur:r,onSelectOptionSelector:i,dropdownPosition:o,options:s=[],optionZIndex:u=100,inputRef:f,webServiceClick:h=()=>{},containerWidth:p,loadMoreOptions:C,chipRef:m,isWebservice:g=!0,dropDownMessage:v=""})=>{const[y,w]=c(null),[b,E]=c(""),M=d(W),A=M?.currentTheme,x=a(null),[L,k]=c(-1);Y(x,r,[f,m]);const{positionX:H,positionY:S,width:_,fromBottom:V}=o,{margin:O,optionHeight:N,selectInputHeight:T,dropDownWrapperPadding:I}=dp,D=e=>{let t="",n="";return"NLP"===e?(t="NLP",n="ff-nlp"):"STEP_GROUP"===e?(t="SG",n="ff-sg"):"PROGRAM_ELEMENTS"===e?(t="PE",n="ff-pe"):"WORKBENCH_REQUEST"===e?(t="WS",n="ff-ws"):(t="--",n="nlp-default"),{label:t,className:n}},Z=({platform:n,nlpType:r})=>"NLP"===r?e(P,"Web"===n?{name:"web_icon",height:10,width:10}:"Android"===n?{name:"android_icon",height:10,width:10}:"iOS"===n?{name:"ios_icon",height:10,width:10,color:"var(--dotted-border-color)"}:"Generic"===n?{name:"mobile_icon",height:10,width:10}:{name:"common_nlp",height:10,width:10}):"WORKBENCH_REQUEST"===r&&"Webservice"===n?e(P,{name:"web_service_icon",height:8,width:8}):e(t,{});se(["ff-nlp-dropdown-pagination"],{root:document.getElementById("ff-nlp-dropdown-options-wrapper"),rootMargin:"0px",threshold:.1,onIntersect:(e,t)=>{e.isIntersecting&&C&&C()}}),l(()=>{if(L>=0&&L<s.length){const e=s[L];w(e),E("show")}else L>=s.length&&(w(null),E(""),k(-1));const e=e=>{if(s.length)switch(e.key){case"ArrowDown":e.preventDefault(),k(e=>e<s.length-1?e+1:0);break;case"ArrowUp":e.preventDefault(),k(e=>e>0?e-1:s.length-1);break;case"Enter":L>=0&&s[L]&&i(s[L])}};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[s,L]),l(()=>{if(L<0)return;const e=document.getElementById(`ff-nlp-option-${L}`);e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})},[L]),l(()=>{if(!s?.length)return;const e=x.current;if(!e)return;const t=t=>{e.contains(t.target)||(t.stopPropagation(),t.preventDefault())};return document.body.addEventListener("wheel",t,{passive:!1}),document.body.addEventListener("touchmove",t,{passive:!1}),()=>{document.body.removeEventListener("wheel",t),document.body.removeEventListener("touchmove",t)}},[s]);const j=e=>e?.searchName||e?.displayName||e?.desc||e?.name||e?.nlpName||"---";return e("div",{className:"ff-nlp-dropdown-wrapper",children:n("div",{ref:x,style:{...(()=>{let e;return e=G(s)||s.length>0?5*N+2*I:s.length*N+2*I,V>e+O+80?{left:H,top:S,width:_,zIndex:u}:{zIndex:u,left:H,width:_,top:S-T-92-e-O}})(),width:p},className:z("ff-nlp-options-wrapper",A),onMouseLeave:()=>E("hide"),children:[n("div",{className:"ff-nlp-options-wrapper-main",children:[e("div",{className:"ff-nlp-options-primary-wrapper",id:"ff-nlp-dropdown-options-wrapper",children:G(s)?e(F,{textAlign:"center",lineHeight:"32px",as:"p",color:"var(--ff-nlp-text-color)",className:"ff-nlp-no-option",children:G(v)?"No Results Found":v}):n(t,{children:[s.map((t,r)=>e("div",{onMouseEnter:()=>{w(t),E("show")},id:`ff-nlp-option-${r}`,children:e("div",{onMouseEnter:()=>k(r),onClick:()=>i(t),onKeyDown:e=>{"Enter"===e.key&&i(t)},children:n(F,{as:"div",lineHeight:"30px",fontSize:12,className:z("ff-nlp-option",A,{"ff-nlp-option--selected":L===r}),children:[e(K,{title:t.platform,children:e("span",{children:e(F,{className:`nlp-categories ${D(t.nlpType).className}`,fontWeight:"regular",fontSize:8,lineHeight:"32px",children:D(t.nlpType).label})})}),e("span",{children:Z(t)}),j(t)]})})},`ff-nlp-option-${r}`)),e("div",{id:"ff-nlp-dropdown-pagination"})]})}),g&&e("div",{children:e("div",{className:"show"===b?"ff-nlp-web-service-div":"ff-nlp-primary-web-service-div",children:e(Xf,{iconName:"plus_user_icon",label:"Web Service",onClick:()=>{r(),h()}})})})]}),e("div",{className:"show"===b?"ff-nlp-data-show":"ff-nlp-data-hide",children:n("div",{className:"ff-nlp-data-side-menu",children:[y?.videoSrc&&n(F,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:10,children:["Video",e("div",{className:"nlp-details ",children:e("video",{src:y.videoSrc,controls:!0,className:"nlp-video-player",width:"100%",children:"Your browser does not support the video tag."})})]}),n(F,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["NLP Details",e(F,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:j(y)})]}),n(F,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Description",e(F,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:y?.description||"--"})]}),"STEP_GROUP"===y?.nlpType&&e(t,{children:n(F,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Path",e(F,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:y?.path?y?.path:"---"})]})}),e(F,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:"Inputs"}),y?.stepInputs?.length?y.stepInputs.map((t,r)=>{const i=t.type?t?.type?.split(".")?.pop():"--";return e("div",{children:n(F,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Input",r+1,n(F,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:["type: ",i]}),n(F,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:["name: ",t.name||"--"]})]})},r)}):e("div",{className:"nlp-details",children:"--"}),n(F,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Output",e(F,{className:"nlp-details ",fontWeight:"regular",fontSize:12,children:y?.returnType||"--"})]})]})})]})})},fp=o(({chipOptionList:t,selectedChips:r,optionZIndex:i=0,inputRef:o,ChipsAccordionWidth:s},d)=>{const[f,h]=c([]),[p,C]=c(!1),[m,g]=c({left:0,top:0}),[v,y]=c("down"),w=a(null);b(d,()=>w.current);const E=or(w,p);l(()=>{G(t)||h(t)},[t]);const M=a(null),x=()=>{M.current};l(()=>{x()},[f]),u(()=>{const e=()=>{if(!o?.current)return;const{positionX:e,positionY:t,width:n,fromBottom:r}=E(o);y(r<160?"up":"down"),g({left:e+n,top:t})};e();const t=new ResizeObserver(()=>e());return o?.current&&t.observe(o.current),window.addEventListener("scroll",e,!0),()=>{o?.current&&t.unobserve(o.current),t.disconnect(),window.removeEventListener("scroll",e,!0)}},[E,o]);return l(()=>{const e=()=>{x()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),A(n("div",{className:"ff-chips-accordion",style:{left:m.left,top:m.top,zIndex:i+100,transform:"up"===v?"translateY(calc(-100% + 33px))":"none",width:s,position:"absolute"},ref:w,children:[e("div",{ref:M,className:"ff-chips-row "+(p?"expanded":""),style:{maxHeight:p?"280px":"20px"},children:e("div",{className:"chips-container "+(p?"chips-container-scroll":""),children:f?.map(({name:t,isSelected:n},i)=>e("div",{className:"chip "+(n?"selected-chip":""),onClick:()=>(e=>{const t=f.map((t,n)=>n===e?{...t,isSelected:!t.isSelected}:t);if(h(t),r){const e=t.filter(e=>e.isSelected);r(e)}})(i),children:e(F,{as:"div",className:"chip-text",children:t,fontSize:10,lineHeight:"15px"})},i))})}),e("div",{className:"ff-arrow-icon-container",children:e("div",{className:"ff-icon-wrapper "+(p?"expanded":""),role:"button","aria-expanded":p,children:e(P,{name:"down"===v?"arrows_down_icon":"arrows_top_icon",height:8,width:8,onClick:()=>{C(e=>!e),p&&document.querySelector(".ff-chips-row")?.scrollTo({top:0})}})})})]}),document.body)}),hp=(e,t)=>{switch(t.type){case"FOCUS_INPUT":return{...e,isInputFocused:!0,isIconClick:!0,showOptions:!0};case"BLUR_INPUT":return{...e,isInputFocused:!1,option:t.payload.option,isIconClick:!1,showOptions:!1,dropdownPosition:{positionX:0,positionY:0,width:0,fromBottom:0}};case"UPDATE_DROPDOWN_POSITION":const{positionX:n,positionY:r,width:i,fromBottom:o}=t.payload||{};return{...e,dropdownPosition:{positionX:n,positionY:r,width:i,fromBottom:o}};case"UPDATE_OPTION":return{...e,option:t.payload};case"SHOW_ERROR":return{...e,isInputFocused:!0,isIconClick:!1,showOptions:!1,option:t.payload.option,dropdownPosition:{positionX:0,positionY:0,width:0,fromBottom:0}};default:return e}},pp=({label:t="",leftIcon:r,rightIcon:i,rightIconColor:o,showLabel:s=!0,onHelpIconClick:d=()=>{},aiIconClick:f=()=>{},webServiceClick:h=()=>{},containerWidth:p="",optionsList:C=[],selectedOption:m={displayName:"",projectId:"",nlpType:"",platform:""},onChange:g=()=>{},errorMsg:y="",className:w="",optionZIndex:b=100,disabled:E=!1,borderRadius:M=!0,showBorder:x=!0,required:L=!1,value:k="",onSelect:H=()=>{},chipOptionList:S,selectedChips:_,loadMoreOptions:V=()=>{},isWebservice:O=!0,closeInputOnOutsideClick:N=()=>{},tooltipText:T="Help",ChipsAccordionWidth:I="27.8%",dropDownMessage:D=""})=>{const Z={isInputFocused:!1,isIconClick:!1,showOptions:!1,option:G(m)&&"string"==typeof m?.displayName?m.displayName:"",dropdownPosition:{positionX:0,positionY:0,width:0,fromBottom:0}},[j,R]=v(hp,Z),[B,U]=c(m),[q,W]=c({}),Q=a(!1);l(()=>{const e="string"==typeof m.displayName?m.displayName:String(m.displayName??"");e!==B.displayName&&U({...m,displayName:e})},[m]),l(()=>{k&&ie("FOCUS_INPUT")},[k]);const K=a(null),Y=a(null),X=a(null),{isInputFocused:J,isIconClick:$,showOptions:ee,dropdownPosition:te,option:ne}=j,re=or(K,ee),ie=e=>{E||R("SHOW_ERROR"===e||"BLUR_INPUT"===e?{type:e,payload:{option:"string"==typeof m.displayName?m.displayName:String(m.displayName??"")}}:{type:e})},oe=()=>{if(!ee||!K?.current||E)return;const{positionX:e,positionY:t,width:n,fromBottom:r}=re(K);R({type:"UPDATE_DROPDOWN_POSITION",payload:{positionX:e,positionY:t,width:n,fromBottom:r}})},ae=e=>{const t=window.innerWidth-document.body.clientWidth;document.body.style.paddingRight=e?"":`${t}px`,document.body.style.overflow=e?"":"hidden"};u(()=>{if(E)return;ee&&ae(!ee),oe();const e=()=>oe();return window.addEventListener("resize",e),window.addEventListener("scroll",e),()=>{ae(!0),window.removeEventListener("resize",e),window.removeEventListener("scroll",e)}},[ee]),l(()=>{y&&ie("SHOW_ERROR")},[]),l(()=>{ie("FOCUS_INPUT")},[]);const le=!J&&Boolean(ne);return l(()=>{const e=Y.current;if(!e)return;let t=e.parentElement;for(;t&&t!==document.body;){const e=getComputedStyle(t);if(["scroll","auto"].includes(e.overflowY))break;t=t.parentElement}if(!t)return;const n=t.style.overflow,r=ee||S;return t.style.overflow=r?"hidden":n||"auto",()=>{t.style.overflow=n||"auto"}},[ee,S]),n("section",{className:"main-section",children:[n("div",{className:z(`ff-nlp-input-wrapper ${w}`),children:[n("div",{className:"ff-nlp-input",children:[e("input",{type:"text",className:z("ff-nlp-input-container",{"ff-nlp-input-container--default":!J,"ff-nlp-input-container--active":le,"ff-nlp-input-container--no-label":!s,"ff-nlp-input-container--error":y&&!J&&!Boolean(ne),"ff-nlp-input-container--border-radius":!M,"ff-nlp-input-container--disable":E,"ff-nlp-input-container--no-border":!x}),style:{zIndex:b,paddingLeft:"32px"},onFocus:()=>ie("FOCUS_INPUT"),onChange:e=>{E||g(e)},value:k,disabled:E,autoComplete:"off",spellCheck:"false",ref:Y,autoFocus:!0}),n("div",{className:"ff-nlp-icon-container",children:[e(P,{name:r||"ai_search",className:"ff-nlp-help_icon",width:16,height:16,onClick:f}),e(F,{className:"icon-label",fontSize:10,children:"Search With Ai"})]}),s&&n("div",{className:z("ff-nlp-input-label","ff-nlp-input-label--default",{"ff-nlp-input-label--active":k||Boolean(ne),"ff-nlp-input-label--error":y}),children:[L&&e(F,{color:"var(--$error-light)",className:"ff-nlp-input-label--required",children:"*"}),t]}),n("div",{className:"help-icon-container",onMouseDown:()=>Q.current=!0,style:{zIndex:b},children:[e("span",{className:z("ff-nlp-input-arrow",{"ff-nlp-input-arrow--down":!$,"ff-nlp-input-arrow--no-label":!s}),onMouseEnter:e=>{const t=e.target.getBoundingClientRect();W({top:t.top+window.scrollY-20+"px",left:`${t.left+window.scrollX+.5*t.width}px`,visibility:"visible",opacity:1,transitionDelay:"0s"})},onMouseLeave:()=>W(e=>({...e,visibility:"hidden",opacity:0})),children:e(P,{name:i||"",height:16,width:16,onClick:d,color:o})}),A(e(F,{className:"help-icon-label",fontSize:10,style:q,children:T}),document.body)]}),e("fieldset",{className:z("ff-nlp-input-fieldset",{"ff-nlp-input-fieldset--no-label":!s,"ff-nlp-input-fieldset--default":!J,"ff-nlp-input-fieldset--active":J,"ff-nlp-input-fieldset--option":le,"ff-nlp-input-fieldset--error":y,"ff-nlp-input-fieldset--border-radius":!M,"ff-nlp-input-fieldset--no-border":!x})})]}),y&&e(F,{className:"ff-nlp-input-wrapper-error-text",fontSize:8,color:"var(--error-light)",children:y}),e("div",{ref:K,children:ee&&A(e(up,{onSelectBlur:()=>{E||(Q.current?Q.current=!1:y?ie("SHOW_ERROR"):(ie("BLUR_INPUT"),N()))},onSelectOptionSelector:e=>{H(e)},dropdownPosition:te,options:C,optionZIndex:b,inputRef:Y,webServiceClick:h,containerWidth:p,loadMoreOptions:V,chipRef:X,isWebservice:O,dropDownMessage:D}),document.body)})]}),e("div",{className:"chips-accordion-content",children:S&&S.length>0&&e(fp,{chipOptionList:S,selectedChips:_,optionZIndex:b,ref:X,inputRef:Y,ChipsAccordionWidth:I})})]})},Cp=({items:t,onButtonClick:r,selectedValue:i=null,onChange:o,className:a=""})=>{const[s,d]=c(i);l(()=>{i!==s&&d(i)},[i,s]);return n("div",{className:z("ff-icon-radio-group",a),children:[t.map(t=>e("div",{className:z("ff-icon-radio-button",{selected:s===t.iconName,disabled:t.disabled}),onClick:()=>(e=>{if(e.disabled)return;const t=e.iconName;d(t),o&&o(t),r(e)})(t),children:e(K,{title:t.iconLabel,children:e("div",{className:z("icon-container",{selected:s===t.iconName}),children:e(P,{name:t.iconName,hoverEffect:!1,color:s===t.iconName?"var(--drawer-footer-bg)":"var(--brand-color)"})})})},t.iconName)),e("div",{className:"line-connector"})]})},mp=({width:t="100%",options:r=[],runCount:i=0,className:o="",contentReverse:a=!1,onClick:l=()=>{},modalId:s="",scriptType:c="",readOnly:d=!1})=>{const u={local:"local",browserstack:"browserstack_icon",saucelabs:"sause_lab_icon",lambdatest:"lambda_icon",fireflink:"fireflink_platform_logo",mac:"mac_icon",mac_icon:"mac_icon",android:"android_icon",linux:"linux","google chrome":"chrome_icon","mozilla firefox":"fire_fox","microsoft edge":"edge","internet explorer":"internet_explorer",safari:"safari_icon",opera:"opera",windows:"windows",edge:"edge",firefox:"fire_fox",chrome:"chrome_icon",explorer:"internet_explorer",ios:"mac_icon"},f="manual"===c.toLowerCase();return n("div",{id:s,style:{width:t},className:z("ff-machine-input-field-wrapper",o,{"cursor-event-none":1!==i&&"Automation"==c}),onClick:()=>{d||l()},children:[!f&&n(F,{as:"span",color:"var(--ff-machine-input-field-text-color)",fontSize:8,textAlign:"center",className:"ff-machine-input-label",children:["Run ",i]}),e("div",{className:z("ff-machine-input-field",{"ff-machine-input-field-reverse":a}),children:r.map(({label:t,type:r,version:i})=>n("div",{className:z("ff-machine-icon-text-wrapper",{"ff-machine-icon-text-wrapper-reverse":a}),children:[e(P,{name:u[r?.toLowerCase()]||"",className:"ff-machine-icon"}),e(K,{title:t,children:e(F,{className:z("ff-machine-text",{"ff-machine-text-reverse":a}),color:"var(--ff-machine-input-field-text-color)",children:oe(t,10)?ie(t,10):t})}),f&&!G(i)&&e(K,{title:i,children:n(F,{className:z("ff-machine-text",{"ff-machine-text-reverse":a}),color:"var(--ff-machine-input-field-text-color)",children:[" -"," ",oe(i??"",10)?ie(i??"",10):i]})})]},r))})]})};mp.displayName="MachineInputField";const gp=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>(0|("x"===e?16*Math.random():16*Math.random()&3|8)).toString(16)),vp=({datSetToolTip:{globalVariableSetName:r="",peVariableSetName:i="",testDataSetName:o=""}})=>{const a={"Project Environment Set":i,"Global Variable Set":r,"Test Data Set":o};return e(t,{children:Object.entries(a).map(([t,r],i)=>e("div",{className:"ff-dataSetList-container",children:n("div",{children:[e(F,{as:"div",fontSize:10,lineHeight:"15px",color:"var(--details-page-value-color)",className:"ff-dataSetList-items",children:t}),e(F,{as:"div",lineHeight:"18px",color:"var(--base-bg-color)",children:r})]})},i))})},yp=e=>"object"==typeof e&&0===Object.keys(e).length,wp=s(null),bp=({machineInstances:r,rowIndex:i,machineColumnCount:o,nextRowMachineInstance:a,previousRowMachineInstance:l,onAddBrowser:s,onDeleteBrowser:c,onAddRunBrowser:u,onUpdateDataSetList:f,onUpdateAddBrowserInstance:h,addInstanceLabel:p="",scriptType:C="",projectType:m="",readOnly:g,maxRunCount:v})=>{const y=i%2==0,w=G(r[o-1]),b=d(wp),{testDataSetMap:E={},globalVariableMap:M={},projectVariableMap:A={}}=b||{},x=(e,t)=>e&&t&&"machineInstanceId"in e&&"machineInstanceId"in t&&e.machineInstanceId===t.machineInstanceId?"dashed":"solid",L=e=>r.length-1!==e&&o>1,k=(e="",t)=>{const{executionEnv:n,browserName:r,browserVersion:i,machineInfo:{osVersion:o,iconName:a,osName:l,hostName:s},deviceInfo:c,fireCloudProjectName:d=""}=t,u=[{label:"FireFlink Device Farm"===n?d:n,type:((e="")=>"local"===e.toLowerCase()?"local":e.toLowerCase().includes("browserstack")?"Browserstack":e.toLowerCase().includes("lambdatest")?"LambdaTest":e.toLowerCase().includes("saucelabs")?"SauceLabs":e.toLowerCase().includes("fireflink device farm")?"fireflink":"")(n)}];"manual"===C.toLowerCase()&&u.push({label:s||"",type:"local"===n?.toLowerCase()?"local":""});const f=[{label:o,type:a||l},{label:i,type:r}],h=c?.reduce((e,t)=>(t&&e.push({label:t?.name,type:"manual"===C.toLowerCase()?"android":t?.platform,version:"manual"===C?.toLowerCase()?t?.version:""}),e),[]);switch(e.toLowerCase()){case"web":case"web service":return[...u,...f];case"web & mobile":case"ms dynamics":case"salesforce":return[...u,...f,...h];case"mobile":return[...u,...h];default:return[]}},H="manual"!==C.toLowerCase(),S=e=>!G(e)||(yp(e)||void 0!==a);return n("div",{className:z({"ff-connecting-branch-grid":y,"ff-connecting-branch-grid-reverse":!y}),style:{gridTemplateColumns:1===o?"24px minmax(min-content, auto) 24px":`24px minmax(min-content, auto) repeat(${o-1}, 40px minmax(min-content, auto)) 24px`},children:[n("div",{className:"ff-connecting-branch-start-wrapper",children:[e("div",{className:z({"ff-connecting-branch-arrow":y,"ff-connecting-branch-arrow-reverse":!y})}),e("div",{className:z({"ff-connecting-branch-container":y,"ff-connecting-branch-container-reverse":!y}),style:{border:`1px ${x(r[0],l)} var(--ff-connecting-branch-color)`,borderTop:"none",borderLeft:`${!y&&"none"}`,borderRight:`${y&&"none"}`}})]}),r?.map((i,o)=>{const{runCount:a=("runCount"in i?i.runCount:0),numberOfRuns:l=0,machineInstanceId:d="",peVariableSetId:w="",globalVariableSetId:b="",testDataSetId:_="",testDataSetName:V="",peVariableSetName:O="",globalVariableSetName:N=""}=i;return n(t,{children:[G(i)?!g&&e("div",{className:"ff-connecting-branch-browser-button",children:e(U,{id:`ff-sequential-branch-add-${d}`,variant:"secondary",label:p,onClick:()=>{g||s(`ff-sequential-branch-add-${d}`)}})}):n("div",{children:[n("div",{className:"ff-connecting-branch-input-point-wrapper",children:[S(r[o+1])&&e("div",{className:z({"ff-connecting-branch-point":y,"ff-connecting-branch-point-reverse":!y})}),e(mp,{runCount:a,options:k(m,i),contentReverse:!y,modalId:`${d}-runCount-${a-1}`,onClick:()=>1==a||"Automation"!==C?h(`${d}-runCount-0`,i):null,scriptType:C,readOnly:g},gp())]}),n("div",{className:z({"ff-connecting-branch-datalist":y,"ff-connecting-branch-datalist-reverse":!y}),children:[H&&n(t,{children:[e("div",{id:`ff-sequential-branch-dataset-${d}-${a}`,className:"ff-dataset-list-branch",onClick:()=>{g||f(`ff-sequential-branch-dataset-${d}-${a}`,{peVariableSetId:w,globalVariableSetId:b,testDataSetId:_,testDataSetName:V,globalVariableSetName:N,peVariableSetName:O},!0,l,d)},children:n(K,{placement:"bottom",title:e(t,{children:e(vp,{datSetToolTip:{peVariableSetName:A[w]||"",globalVariableSetName:M[b]||"",testDataSetName:E[_]||""}})}),style:{display:"flex",alignItems:"center"},children:[e(P,{name:"datalist_icon",className:"ff-connecting-icon",hoverEffect:!0}),e(F,{className:"ff-connecting-text",color:"var(--ff-connecting-branch-color)",children:"Data Set List"})]})}),!g&&e(t,{children:e(K,{placement:"bottom",title:l>=v?`Maximum ${v} runs are allowed.`:"",children:n("div",{className:"ff-environment-run-container",onClick:l>=v?void 0:()=>u(d),children:[e(P,{name:"plus_icon",className:"ff-connecting-run-icon",color:"var(--ff-connecting-branch-color)",hoverEffect:!0,disabled:l>=v}),e(F,{className:"ff-connecting-run-text",color:"var(--ff-connecting-branch-color)",style:{opacity:l>=v?.5:1},children:"Run"})]})})})]}),!g&&e(K,{title:"Delete",children:e(P,{name:"delete",className:"ff-connecting-delete-icon",onClick:()=>c(d,a),color:"var(--ff-connecting-branch-delete-color)",hoverEffect:!0})})]})]}),L(o)&&e("div",{className:"ff-connecting-branch-middle-arrow",style:{borderTop:`1px ${x(i,r[o+1])} var(--ff-connecting-branch-color)`},children:e("div",{className:z({"ff-connecting-branch-arrow":y,"ff-connecting-branch-arrow-reverse":!y})})})]},gp())}),(g?!w&&!G(a):!w)&&e("div",{className:z({"ff-connecting-branch-end-arrow":y,"ff-connecting-branch-end-arrow-reverse":!y}),style:{border:`1px ${x(r[o-1],a)} var(--ff-connecting-branch-color)`,borderBottom:"none",borderLeft:`${y&&"none"}`,borderRight:`${!y&&"none"}`}})]})},Ep=({machineBranchInstances:n,machineColumnCount:r,machineColumnWidth:i,onAddBrowser:o,onDeleteBrowser:a,onAddRunBrowser:s,onUpdateDataSetList:d,onUpdateAddBrowserInstance:u,addInstanceLabel:f="",scriptType:h="",projectType:p="Web",readOnly:C=!1,maxRunCount:m})=>{const[g,v]=c(n);l(()=>{v(n)},[n]);const y=((e,t)=>{const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n})(g,r);return e("div",{className:"ff-connecting-branch-grid-wrapper",children:y.map((n,l)=>e(t,{children:e(bp,{machineInstances:n,rowIndex:l,machineColumnCount:r,machineColumnWidth:i,onAddBrowser:o,onDeleteBrowser:a,onAddRunBrowser:s,nextRowMachineInstance:y[l+1]?.[0],previousRowMachineInstance:y[l-1]?.[r-1],onUpdateDataSetList:d,onUpdateAddBrowserInstance:u,addInstanceLabel:f,scriptType:h,projectType:p,readOnly:C,maxRunCount:m})},gp()))})},Mp=({machineInstances:r=[],machineColumnWidth:i=180,machineColumnCount:o=1,selectedMachine:s={},machineOptionsList:d=[],onHandleSelect:u=()=>{},onAddBrowserInstance:f=()=>{},onAddRunBrowserInstance:h=()=>{},onDeleteBrowserInstance:p=()=>{},onUpdateDataSetList:C=()=>{},onDeleteMachineInstance:m=()=>{},dataSetValues:g={testDataSetId:"",globalVariableSetId:"",peVariableSetId:"",globalVariableSetName:"",peVariableSetName:"",testDataSetName:""},onUpdateAddBrowserInstance:v=()=>{},addInstanceLabel:y="Add Environment",placeholder:w="Choose Machine",scriptType:b="Automation",projectType:E="Web",readOnly:M=!1,zIndex:A=99999,maxRunCount:x=35,environmentVariableMaps:L,isRequired:k=!1})=>{const[H,S]=c({}),_=a(null),V=Math.max(o,1),O=Math.max(i,180),[N,T]=c([]),I=G(r);let D=G(s.value?.clientId);"Manual"===b&&(D=G(s.value));l(()=>{S(s)},[s]),l(()=>{T(M?r:[...r,{}])},[r]);const Z="manual"!==b.toLowerCase(),j=(R=g,B="Id",Object.fromEntries(Object.entries(R).filter(([e])=>!e.includes(B))));var R,B;const q=M&&!I||!M&&I||!M&&!I;return e(wp.Provider,{value:L,children:n("div",{className:"ff-sequential-connecting-branch-wrapper",children:[n("div",{className:"ff-connecting-select-branch-wrapper",children:[n("div",{className:"ff-select-branch-wrapper",children:[e(ar,{onChange:u,optionsList:d,label:w,required:k,showLabel:!0,className:"ff-sequential-select-branch",width:"240px",selectedOption:H,valueAccessor:"name",optionsRequired:!M,disableInput:M,optionZIndex:A}),!D&&n("div",{className:z({"ff-select-branch-arrow":I,"ff-select-branch-arrow-down":!I}),children:[q&&e("div",{className:"ff-select-branch-point"}),n("div",{className:"ff-select-branch-arrow",children:[!M&&e("div",{className:"ff-branch-arrow-wrapper",children:I&&e("div",{className:"ff-branch-arrow"})}),I&&!M&&e(t,{children:e(U,{variant:"tertiary",label:"Manual"===b?"+ Machine":"+ Environment",size:"small",className:"branch-button",ref:_,onClick:()=>f("ff-sequential-branch-button"),id:"ff-sequential-branch-button"})})]})]})]}),!D&&n("div",{className:"ff-select-scope-datalist",children:[e("div",{className:"ff-scope-wrapper",children:e(F,{as:"span",color:((e="")=>e.toLowerCase().includes("inactive")?"var(--ff-machine-inactive-status-color)":e.toLowerCase().includes("running")?"var(--ff-machine-running-status-color)":e.toLowerCase().includes("active")?"var(--ff-machine-active-status-color)":"var(--ff-machine-active-status-color))")(s.value?.status),className:"ff-scope-text",children:s.value?.status})}),n("div",{className:"ff-datalist-wrapper",children:[Z&&e("div",{id:"ff-sequential-machine-datalist",onClick:()=>{M||C("ff-sequential-machine-datalist",g)},children:n(K,{placement:"bottom",title:e("div",{children:e(vp,{datSetToolTip:j})}),style:{display:"flex",alignItems:"center"},children:[e(P,{name:"datalist_icon",className:"ff-dataset-icon",hoverEffect:!0}),e(F,{as:"span",color:"var(--ff-connecting-branch-color)",className:"ff-datalist-text",children:"Data Set List"})]})}),!M&&e(K,{title:"Delete",placement:"bottom",children:e(P,{name:"delete",className:"ff-run-delete-icon",color:"var(--ff-connecting-branch-delete-color)",onClick:m,hoverEffect:!0})})]})]})]}),e("div",{className:"ff-sequential-branches-wrapper",children:!I&&e(Ep,{machineBranchInstances:N,machineColumnCount:V,machineColumnWidth:O,onAddBrowser:f,onDeleteBrowser:p,onAddRunBrowser:h,onUpdateDataSetList:C,onUpdateAddBrowserInstance:v,addInstanceLabel:y,scriptType:b,projectType:E,readOnly:M,maxRunCount:x})})]})})},Ap=({label:t,selectedFiles:r,onFilesChange:i,disabled:o=!1,buttonDisplayType:l="attachment",iconName:s="plus_icon",maxFileSizeMB:d,maxFiles:u,buttonLabel:f="Select Files",showSelectedFiles:h=!0,buttonVariant:p="primary",deleteButton:C=!0,multiple:m=!0,addAttachmentButton:g=!0,isInfoIconRequired:v=!0,onFileListClick:y,types:w=[],attachmentInfoTooltip:b="",selectedFileMessage:E="This file is already selected",required:M=!1,errorMessage:A,truncateMaxLimit:x=1/0,onClickAttachmentButton:L=()=>{}})=>{const k=a(null),[H,S]=c(""),_={image:["image/jpeg","image/png","image/svg+xml"],video:["video/mp4","video/mpeg","video/quicktime"],audio:["audio/mpeg","audio/wav","audio/ogg"],document:["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],archive:["application/zip","application/x-rar-compressed","application/x-7z-compressed"],spreadsheet:["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],excel:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]},V=w.flatMap(e=>_[e]||[]).join(","),O=()=>{L(),S(""),k.current?.click()};return n("div",{children:[v&&n("div",{className:"ff-label-icon",children:[e(F,{fontWeight:"semi-bold",lineHeight:"18px",as:"span",required:M,children:t}),e(K,{title:b||(()=>{if(0===w.length)return"Any files are allowed.";const t=w.flatMap(e=>_[e]||[]).map(e=>e.split("/")[1]),r=t.pop();return n("span",{children:[t.join(", ")," and ",r," files are allowed.",e("br",{}),"Max size: ",d," MB"]})})(),placement:"bottom-start",children:e(P,{name:"info",hoverEffect:!0})})]}),(!h||0===r.length)&&("attachment"===l?e(U,{variant:p,label:f,size:"medium",onClick:O,disabled:o}):"icon"===l?e(Xf,{label:f,iconName:s,onClick:O,isDisable:o}):null),e("input",{type:"file",ref:k,className:"ff-input-field",onChange:()=>{if(S(""),k.current?.files){const e=Array.from(k.current.files);if(e.length>5)return S("Maximum file(s) can be uploaded: 5"),void(k.current.value="");const t=e.filter(e=>!r.some(t=>t.name===e.name));if(0===t.length)return S(E),void(k.current.value="");if("number"==typeof u&&r.length+t.length>u)return S(`You can only select up to ${u} files.`),void(k.current.value="");if("number"==typeof d){const e=1024*d*1024;if(t.filter(t=>t.size>e).length>0)return S(`Maximum file(s) size allowed: ${d} MB.`),void(k.current.value="")}i([...r,...t],t,"ADD"),k.current.value=""}},multiple:m,accept:V,required:M}),H&&e(Yt,{isOpen:!!H,variant:"info",toastTitle:"Info",toastMessage:H,zIndex:1e7}),h&&r.map((t,o)=>n("div",{className:"ff-attachment-files",onClick:y,children:[e(F,{color:"var(--brand-color)",children:e(sn,{title:t.name,width:x})}),C&&e(K,{title:"Delete",children:e(P,{name:"delete",hoverEffect:!0,color:"var(--ff-delete-button-attachment)",variant:"danger",onClick:()=>(e=>{const t=[...r],n=t.splice(e,1);i(t,n,"DELETE")})(o)})}),o===r.length-1&&g&&e(K,{title:""+("number"==typeof u&&r.length>=u?`Maximum files can be uploaded: ${u}`:"Add File"),children:e(P,{name:"add_file",hoverEffect:!0,onClick:O,disabled:"number"==typeof u&&!(r.length<u)})})]},t.name)),M&&e(F,{children:A,fontSize:10,className:"error-text"})]})},xp=({selected:t="text",firstButton:r="File",secondButton:i="File",handleClick:o})=>n("div",{className:"toggle-container",children:[e("button",{className:"toggle-button "+(t===r?"active":""),onClick:()=>o(r),children:r}),e("button",{className:"toggle-button "+(t===i?"active":""),onClick:()=>o(i),children:i})]}),Lp=({variant:t="small",iconName:n,iconColor:r="var(--avatar-icon-color)",customAvatarSize:i,customIconSize:o,backgroundColor:a,label:l,labelFontSize:s})=>{const c=l?.slice(0,2);return e("div",{className:`ff-avatar ff-avatar--${t}`,style:{height:`${i}px`,width:`${i}px`,backgroundColor:a},children:l?e("span",{className:"ff-avatar-label",style:{fontSize:s||"14px",color:r},children:c}):e(P,{name:n,height:o,width:o,color:r})})},kp=({logo:t,overlay:r=!1})=>e("div",{className:`overlay-loader ${r&&"overlay"}`,children:n("div",{className:"loader-container ",children:[t&&e(t,{}),e("div",{className:"line_loader"})]})}),Hp=({contentHeader:t,data:r,maxHeight:i=""})=>{const o=`scrollable-${(e=>{const t=parseInt(e);if(isNaN(t))return"default";const n=100*Math.round(t/100);return Math.min(Math.max(100,n),1e3)})(i)}`;return n("div",{className:"ff-content-card-container",children:[e("div",{className:"ff-content-card-nav",children:e(F,{as:"div",fontWeight:"semi-bold",lineHeight:"35px",children:t})}),e("div",{className:`ff-content-card-body scrollable ${o}`,children:Object.entries(r).map(([t,r],i)=>n("div",{className:"ff-content-card-row",children:[n(F,{fontWeight:"semi-bold",children:[t,":"]}),e(F,{className:"ff-content-card-value",children:r})]},i+t))})]})},Sp=({label:t,placeholder:r,text:i,showText:o=!0,highlightText:s,customError:d,confirmIcon:u,customErrorCondition:f,cancelIcon:h,variant:p="textField",onInputChange:C,dropdownData:m=[],className:g,height:v,isOpen:y=!1,confirmAction:w,onClick:b,tooltip:E,onDoubleClick:M,disableEditing:A=!1})=>{const[x,L]=c(y??!1),[k,H]=c(i??""),[S,_]=c(m[0]?.value??""),[V,O]=c(""),[z,N]=c(!0),[T,I]=c(!1),D=!(!V||!x),Z=a(null),j=a(null),[R,B]=c(null),U=q("Escape");l(()=>()=>{R&&clearTimeout(R)},[R]);const W=()=>{let e="";0===k.length||0===k.trim().length?e="Please type any text.":k.length<3?e="Please enter at least 3 characters.":f&&(e=d??"Invalid input."),e?O(e):(L(!1),O(""),w&&w(k,S)),u?.onClick?.()},Q=()=>{H(i??""),_(m[0]?.value??""),L(!1),O(""),I(!1),h?.onClick?.()},G=e=>{const t=e.target.value;H(t),N(!1),0===t.length||0===t.trim().length?O("Input is required"):t.length<3?O("Input cannot be less than 3 characters"):t.length>250?O("Input cannot be more than 250 characters"):Ve.test(t)?O("Space is not allowed at starting and at the end"):O(f?d??"Invalid input.":""),I(t!==i),C&&C(t)},Y=e=>{if(Z.current&&!Z.current.contains(e.target)&&j.current!==e.target){const e=((e,t)=>e===t?"No changes were made.":e?e.length<3?"Please enter at least 3 characters.":"":"Text is required")(k,i??"");e&&x?O(e):(L(!1),O(""))}};return l(()=>(document.addEventListener("click",Y),()=>{document.removeEventListener("click",Y)}),[k]),U(Q),ce([{key:"Enter",action:()=>{W()}}],Z),n("div",{className:"ff-label-edit-text-field",ref:Z,children:[x?n("div",{className:"ff-label-text-field",children:["textFieldWithDropdown"===p?n("div",{className:"ff-label-text-field-with-dropdown "+(x?"open":""),style:{height:v},children:[e(nn,{name:"input",type:"text",label:t||"",disabled:!1,error:D,placeholder:r||"",value:k,onChange:G,className:`${g} \n \n ${T?"modified":""}`}),e(ar,{label:"",optionsList:m,selectedOption:{value:S,label:S},onChange:e=>_(e.value)})]}):e("div",{className:"ff-label-text-field-without-dropdown",children:e(nn,{name:"input",type:"text",label:t||"",disabled:!1,error:D,placeholder:r||"",value:k,onChange:G,className:`${g} \n \n ${T?"modified":""}`})}),n("div",{className:"ff-icon-container",children:[u&&e(K,{title:"Confirm",placement:"bottom",children:e(P,{color:"var(--label-edit-confirm-icon)",height:20,width:20,name:u.name,disabled:z,className:""+(z?"disabled-confirm-icon":"confirm-icon"),onClick:W})}),h&&e(K,{title:"Cancel",placement:"bottom",children:e(P,{color:"var(--label-edit-cancel-icon)",height:12,width:20,name:h.name,className:"cancel-icon",onClick:Q,ref:j})})]})]}):e(K,{title:E?.tooltipTitle?E?.tooltipTitle:"",placement:"bottom",children:o&&e("span",{className:"display-text",onDoubleClick:()=>{A||(R&&(clearTimeout(R),B(null)),M&&M(),L(!0),O(""))},role:"button",onClick:()=>{if(A)return;R&&(clearTimeout(R),B(null));const e=window.setTimeout(()=>{b&&b(),B(null)},1e3);B(e)},children:e(J,{text:k,highlight:s})})}),V&&x&&e(F,{as:"p",fontSize:8,className:"error-text",children:V})]})},_p=e=>e?e.charAt(0)?.toUpperCase()+e?.slice(1)?.toLowerCase():"",Vp=({label:t,text:r,highlightText:i,customError:o,customErrorCondition:l=!1,confirmIcon:s,cancelIcon:d,editIcon:u,dropdownData:f=[],isOpen:h=!1,confirmAction:p,onClick:C,nameTooltipTitle:m})=>{const[g,v]=c(h??!1),[y,w]=c(r),[b,E]=c(!0),[M,A]=c(f[0]?.value??""),[x,L]=c(""),[k,H]=c(!1),S=!(!x||!g),_=a(null),V=a(null),O=()=>{const e=((e,t,n,r)=>e===t?"No changes were made.":e?e.length<3?"Please enter at least 3 characters.":r?n??"":"":"Text is required")(y,r,o,l);e&&g?L(e):(v(!1),L(""),p&&p(y,M))},z=()=>{w(r),A(f[0]?.value??""),v(!1),L(""),H(!1)};function N(e){"Enter"===e&&O(),"Escape"===e&&z()}return ce([{key:"Enter",action:()=>N("Enter")},{key:"Escape",action:()=>N("Escape")}],_),n("div",{className:"ff-label-edit-text-field",ref:_,children:[n("div",g?{className:"ff-label-text-field",children:[e("div",{className:"ff-label-text-field-without-dropdown",children:e(nn,{name:"input",label:t||"",disabled:!1,error:S,placeholder:"Enter your name",value:y,onChange:e=>{w(e.target.value),H(!0),L(""),E(!1)},className:"\n \n "+(k?"modified":""),type:"text"})}),n("div",{className:"ff-icon-container",children:[s&&e(K,{title:"confirm",placement:"bottom",children:e(P,{color:s?.color??"var(--default-confirm-icon-color)",height:s?.height??20,disabled:b,width:s?.width??20,name:s?.name??"default-confirm-icon",className:`${s?.className??"default-confirm-class"} ${b?"disabled-confirm-icon":"confirm-icon"}`,onClick:O})}),d&&e(K,{title:"cancel",placement:"bottom",children:e(P,{color:d?.color??"var(--label-edit-cancel-icon)",height:d?.height??12,width:d?.width??20,name:d?.name??"default-cancel-icon",className:d?.className??"cancel-icon",onClick:z,ref:V})})]})]}:{className:"display-text-container",children:[m?e(K,{title:m,children:e("span",{className:"display-text",onClick:C,children:e(J,{text:y,highlight:i})})}):e("span",{className:"display-text",onClick:C,children:e(J,{text:y,highlight:i})}),e(K,{title:_p(u?.name??"Edit"),children:e(P,{color:u?.color??"var(--label-edit-cancel-icon)",height:u?.height??20,width:u?.width??20,name:u?.name??"edit",className:u?.className??"edit-icon",onClick:()=>{v(!0),L("")}})})]}),x&&g&&e(F,{as:"p",fontSize:8,className:"error-text",children:x})]})},Op="SET_DATA",zp="SET_CREATE_FORMULA_PARSER",Np="SELECT_ENTIRE_ROW",Tp="SELECT_ENTIRE_COLUMN",Ip="SELECT_ENTIRE_WORKSHEET",Dp="SET_SELECTION",Zp="SELECT",jp="ACTIVATE",Rp="SET_CELL_DATA",Bp="SET_CELL_DIMENSIONS",Pp="COPY",Fp="CUT",Up="PASTE",qp="EDIT",Wp="VIEW",Qp="BLUR",Gp="KEY_PRESS",Kp="KEY_DOWN",Yp="DRAG_START",Xp="DRAG_END",Jp="COMMIT",$p="BOLD",eC="ITALIC",tC="UNDERLINE_TYPE",nC="FONT_FAMILY",rC="FONT_SIZE",iC="TEXT_ALIGN",oC="BORDER_TYPE",aC="COLOR",lC="BACKGROUND_COLOR",sC="FORMATE_PAINTER",cC="ADD_ROW_TOP",dC="ADD_ROW_BOTTOM",uC="ADD_COLUMN_LEFT",fC="ADD_COLUMN_RIGHT",hC="DELETE_ROW",pC="DELETE_COLUMN",CC="SET_ROW_HEIGHT",mC="SET_COLUMN_POSITION",gC="SET_AUTO_FILL",vC="UPDATE_COLUMN_DIMENSIONS",yC="SET_EDITABLE",wC="ON_MOUSE_UP";function bC(e){return{type:wC,payload:{point:e}}}function EC(e){return{type:yC,payload:{editable:e}}}function MC(e,t){return{type:CC,payload:{row:e,height:t}}}function AC(e,t){return{type:mC,payload:{column:e,width:t}}}function xC(e){return{type:$p,payload:{data:e}}}function LC(e){return{type:eC,payload:{data:e}}}function kC(e,t,n){return{type:oC,payload:{data:e,value:t,color:n}}}function HC(e){return{type:tC,payload:{data:e}}}function SC(e,t){return{type:rC,payload:{data:e,value:t}}}function _C(e,t){return{type:nC,payload:{data:e,value:t}}}function VC(e,t){return{type:iC,payload:{data:e,value:t}}}function OC(e,t){return{type:aC,payload:{data:e,value:t}}}function zC(e,t){return{type:lC,payload:{data:e,value:t}}}function NC(e){return{type:sC,payload:{data:e}}}function TC(e){return{type:cC,row:e}}function IC(e){return{type:dC,row:e}}function DC(e,t){return{type:uC,columnWidth:e,column:t}}function ZC(e,t){return{type:fC,columnWidth:e,column:t}}function jC(e){return{type:hC,row:e}}function RC(e){return{type:pC,column:e}}function BC(e){return{type:Gp,payload:{event:e}}}function PC(e){return{type:Op,payload:{data:e}}}function FC(e){return{type:zp,payload:{createFormulaParser:e}}}function UC(e){return{type:Dp,payload:{selection:e}}}function qC(e){return{type:jp,payload:{point:e}}}function WC(e,t){return{type:Rp,payload:{active:e,data:t}}}function QC(e,t){return{type:Bp,payload:{point:e,dimensions:t}}}function GC(e){return{type:Up,payload:{data:e}}}function KC(e){return{type:Kp,payload:{event:e}}}function YC(){return{type:Yp}}function XC(){return{type:Xp}}function JC(){return{type:Pp}}function $C(){return{type:Fp}}function em(){return{type:Qp}}function tm(e,t){const n=t[e.row];if(void 0!==n)return n[e.column]}function nm(e,t,n){const r=[...n],i=[...n[0]??[]];i.length<=e.column&&(i.length=e.column+1),r[0]=i;const o=[...n[e.row]??[]];return o[e.column]=t,r[e.row]=o,r}function rm(e,t,n){let r=n[0];r||(r=[],n[0]=r);let i=n[e.row];i||(i=[],n[e.row]=i),r.length<=e.column&&(r.length=e.column+1),i[e.column]=t}const im={value:"",inputType:{type:"text"},readOnly:!1,style:{color:"#000000",backgroundColor:"#ffffff",borderColor:"#c9c9c9",textDecoration:"normal",borderRight:"1px solid var(--excel-header-border)",borderLeft:"1px solid var(--excel-header-border)",borderTop:"1px solid var(--excel-header-border)",borderBottom:"1px solid var(--excel-header-border)",fontSize:""+(om=9,1.33*om+"px"),fontWeight:"normal",fontStyle:"normal",fontFamily:"Poppins",textAlign:"left"}};var om;function am(e,t){if(!sm(e,t))return t;const n=[...t],r=t[e.row];if(r){const t=[...r];t[e.column]=im,n[e.row]=t}return n}function*lm(e){for(const[t,n]of e.entries())for(const[e,r]of n.entries()){const n={row:t,column:e};yield[n,r]}}function sm(e,t){const n=t[0];return!!n&&(e.row>=0&&e.column>=0&&Number.isInteger(e.row)&&Number.isInteger(e.column)&&e.column<n.length&&e.row<t.length)}function cm(e){return{columns:um(e),rows:dm(e)}}function dm(e){return e.length}function um(e){const t=e[0];return t?t.length:0}function fm(e){const t=cm(e);return{row:t.rows-1,column:t.columns-1}}class hm{start;end;constructor(e,t){this.start={row:Math.min(e.row,t.row),column:Math.min(e.column,t.column)},this.end={row:Math.max(e.row,t.row),column:Math.max(e.column,t.column)}}*[Symbol.iterator](){for(let e=this.start.row;e<=this.end.row;e++)for(let t=this.start.column;t<=this.end.column;t++)yield{row:e,column:t}}size(){return(this.end.row+1-this.start.row)*(this.end.column+1-this.start.column)}has(e){return e.row>=this.start.row&&e.column>=this.start.column&&e.row<=this.end.row&&e.column<=this.end.column}mask(e){return new hm({row:e.start.row>this.start.row?e.start.row:this.start.row,column:e.start.column>this.start.column?e.start.column:this.start.column},{row:e.end.row<this.end.row?e.end.row:this.end.row,column:e.end.column<this.end.column?e.end.column:this.end.column})}equals(e){return this.start.row===e.start.row&&this.start.column===e.start.column&&this.end.row===e.end.row&&this.end.column===e.end.column}}const pm={row:0,column:0};class Cm{}class mm extends Cm{toRange(e){return null}normalizeTo(e){return this}hasEntireRow(){return!1}hasEntireColumn(){return!1}size(){return 0}has(){return!1}equals(e){return e instanceof mm}}class gm extends Cm{range;constructor(e){super(),this.range=e}toRange(e){return this.range}normalizeTo(e){const t=Mm(e);return new gm(this.range.mask(t))}hasEntireRow(){return!1}hasEntireColumn(){return!1}size(e){const t=this.toRange(e);return t?t.size():0}has(e,t){const n=this.toRange(e);return null!==n&&n.has(t)}equals(e){return e instanceof gm&&this.range.equals(e.range)}}class vm extends Cm{}class ym extends vm{toRange(e){return Mm(e)}normalizeTo(){return this}hasEntireColumn(){return!0}hasEntireRow(){return!0}size(e){return um(e)*dm(e)}has(){return!0}equals(e){return e instanceof ym}}class wm extends vm{start;end;constructor(e,t){if(!Am(e))throw new xm("start");if(!Am(t))throw new xm("end");super(),this.start=Math.min(e,t),this.end=Math.max(e,t)}equals(e){return e instanceof wm&&this.constructor===e.constructor&&this.start===e.start&&this.end===e.end}}class bm extends wm{toRange(e){const t=fm(e);return new hm({row:this.start,column:0},{row:this.end,column:t.column})}normalizeTo(e){const t=dm(e);return new bm(Math.max(this.start,0),Math.min(this.end,t-1))}hasEntireRow(e){return e>=this.start&&e<=this.end}hasEntireColumn(){return!1}size(e){return(this.end-this.start+1)*um(e)}has(e,t){return t.row>=this.start&&t.row<=this.end}}class Em extends wm{toRange(e){const t=fm(e);return new hm({row:0,column:this.start},{row:t.row,column:this.end})}normalizeTo(e){const t=um(e);return new Em(Math.max(this.start,0),Math.min(this.end,t-1))}hasEntireRow(){return!1}hasEntireColumn(e){return e>=this.start&&e<=this.end}size(e){return(this.end-this.start+1)*dm(e)}has(e,t){return t.column>=this.start&&t.column<=this.end}}function Mm(e){const t=fm(e);return new hm(pm,t)}function Am(e){return Number.isInteger(e)&&e>=0}class xm extends Error{constructor(e){super(`${e} is not a valid index. It must be 0 or a positive integer`)}}const Lm="text/plain";function km(e,t=0,n=1){const r=[];if(-1===Math.sign(e-t)){for(let i=t;i>e;i-=n)r.push(i);return r}for(let i=t;i<e;i+=n)r.push(i);return r}function Hm(e,t){return Boolean(e&&(r=e,(n=t).column===r.column&&n.row===r.row));var n,r}function Sm(e){return{width:e.offsetWidth,height:e.offsetHeight,left:e.offsetLeft,top:e.offsetTop}}function _m(e){return Object.keys(e).map(e=>Number(e)).sort((e,t)=>e-t)}function Vm(e,t,n){const r={},i=_m(e);let o=0,a=!1;for(let l=0;l<i.length;l++){if(l===t){const e=r[l-1],t=e?e.left+e.width:0;r[l]={left:t,width:n},o=n,a=!0}const s=i[l];if(void 0===s)continue;const c=e[s];if(!c)continue;const d=a?l+1:l,u=a?c.left+o:c.left;r[d]={...c,left:u}}if(!a){const e=i.length>0?i[i.length-1]:void 0,o=void 0!==e?r[e]:void 0,a=o?o.left+o.width:0;r[t]={left:a,width:n}}return r}function Om(e,t,n){const r={},i=_m(e);let o=0,a=!1;for(let l=0;l<i.length;l++){if(l===t){const e=r[l-1],t=e?e.top+e.height:0;r[l]={top:t,height:n},o=n,a=!0}const s=i[l];if(void 0===s)continue;const c=e[s];if(!c)continue;const d=a?l+1:l,u=a?c.top+o:c.top;r[d]={...c,top:u}}if(!a){const e=i.length>0?i[i.length-1]:void 0,o=void 0!==e?r[e]:void 0,a=o?o.top+o.height:0;r[t]={top:a,height:n}}return r}function zm(e,t){const n={},r=_m(e);let i=0;for(let o=0,a=0;o<r.length;o++){if(r[o]===t)continue;const l=r[o];if(void 0===l)continue;const s=e[l];s&&(n[a]={top:0===i?s.top:i,height:s.height},"number"==typeof n[a]?.top&&(i=(n[a]?.top??0)+s.height),a++)}return n}function Nm(e,t){const n={},r=_m(e);let i=0;for(let o=0,a=0;o<r.length;o++){if(r[o]===t)continue;const l=r[o];if(void 0===l)continue;const s=e[l];s&&(n[a]={left:0===i?s.left:i,width:s.width},"number"==typeof n[a]?.left&&(i=(n[a]?.left??0)+s.width),a++)}return n}function Tm(e,t,n){const r=100;let i=32;for(let n=0;n<e.row;n++)i+=(t?.[n]?t?.[n]?.height:32)||32;const o=(t?.[e.row]?t?.[e.row]?.height:32)||32;let a=60;for(let t=0;t<e.column;t++)a+=(n?.[t]?n?.[t]?.width:r)||r;return{top:i,height:o,left:a,width:(n?.[e.column]?n?.[e.column]?.width:r)||r}}function Im(e,t,n){const r=Tm(n.start,e,t);let i=Tm(n.end,e,t);return void 0===i&&(i=function(e,t,n){const r=100;let i=4032;for(let n=0;n<e.row;n++)i+=(t?.[n]?t?.[n]?.height:32)||32;const o=(t?.[e.row]?t?.[e.row]?.height:32)||32;let a=60;for(let t=0;t<e.column;t++)a+=(n?.[t]?n?.[t]?.width:r)||r;return{top:i,height:o,left:a,width:(n?.[e.column]?n?.[e.column]?.width:r)||r}}(n.end,e,t)),r&&i&&{width:i.left+i.width-r.left,height:i.top+i.height-r.top,top:r.top+1,left:r.left+1}}function Dm(e,t,n,r){const i=r.toRange(n);return i?Im(e,t,i):void 0}function Zm(e){return function(e,t){const n=[];for(const[r,i]of lm(t))rm(r,e(i,r),n);return n}(e=>e?.value||"",e).map(e=>e.map(e=>{const t=String(e).replace(/"/g,'""');return Rt.test(t)?`"${t}"`:t}).join("\t")).join("\n")}function jm(e,t){return null!==e&&"view"===t&&Rm(e)}function Rm(e){return e.matches(":focus-within")}function Bm(e){return"string"==typeof e&&e.includes("\n")}const Pm=e=>`${1.33*e}px`,Fm=e=>parseFloat(e.replace("px",""))/1.33,Um={value:"",inputType:{type:"text"},readOnly:!1,style:{color:"#000000",backgroundColor:"#ffffff",borderColor:"#c9c9c9",textDecoration:"normal",borderRight:"1px solid var(--excel-header-border)",borderLeft:"1px solid var(--excel-header-border)",borderTop:"1px solid var(--excel-header-border)",borderBottom:"1px solid var(--excel-header-border)",fontSize:`${Pm(9)}`,fontWeight:"normal",fontStyle:"normal",fontFamily:"Poppins",textAlign:"left"}},qm=[{label:"Times New Roman",value:"Times New Roman"},{label:"Arial",value:"Arial"},{label:"fantasy",value:"fantasy"},{label:"cursive",value:"cursive"},{label:"Poppins",value:"Poppins"},{label:"Courier New",value:"Courier New"},{label:"Verdana",value:"Verdana"},{label:"Tahoma",value:"Tahoma"},{label:"Trebuchet MS",value:"Trebuchet MS"},{label:"Comic Sans MS",value:"Comic Sans MS"},{label:"Impact",value:"Impact"},{label:"Arial Black",value:"Arial Black"},{label:"Lucida Console",value:"Lucida Console"},{label:"Lucida Sans Unicode",value:"Lucida Sans Unicode"},{label:"Courier",value:"Courier"},{label:"Arial Rounded MT Bold",value:"Arial Rounded MT Bold"},{label:"Georgia",value:"Georgia"},{label:"sans-serif",value:"sans-serif"},{label:"serif",value:"serif"},{label:"monospace",value:"monospace"}],Wm=[5,6,8,9,10,12,14,16,18,20,22,24,26,28,32,36,40,48,56,72],Qm=e=>["dropDown","text"].includes(e?.inputType?.type??"text")&&!e?.readOnly;function Gm(e){return{rowCount:e?.length??0,columnCount:e?.[0]?.length??0}}function Km(e){return"string"==typeof e&&e.startsWith("=")&&e.length>1}function Ym(e){return e}function Xm(e){return`${e.row},${e.column}`}function Jm(e){const[t,n]=e.split(",");return{row:Number(t),column:Number(n)}}class $m{set;constructor(e){this.set=e}static from(e){const t=new Set;for(const n of e)t.add(Xm(n));return new $m(t)}has(e){return this.set.has(Xm(e))}get size(){return this.set.size}add(e){const t=new Set(this.set);return t.add(Xm(e)),new $m(t)}delete(e){const t=new Set(this.set);return t.delete(Xm(e))?new $m(t):this}difference(e){let t=this;for(const n of e)t=t.delete(n);return t}union(e){let t=this;for(const n of e)t=t.add(n);return t}*[Symbol.iterator](){for(const e of this.set)yield Jm(e)}}class eg{forwards;constructor(e=new Map){this.forwards=e}static from(e){const t=new Map;for(const[n,r]of e)t.set(Xm(n),r);return new eg(t)}set(e,t){const n=new eg(new Map(this.forwards));return 0===t.size?(n.forwards.delete(Xm(e)),n):(n.forwards.set(Xm(e),t),n)}get(e){return this.forwards.get(Xm(e))||$m.from([])}getBackwards(e){let t=$m.from([]);for(const[n,r]of this.forwards)r.has(e)&&(t=t.add(Jm(n)));return t}getBackwardsRecursive(e,t=$m.from([])){let n=this.getBackwards(e),r=t;for(const e of n)r.has(e)||(r=r.add(e),n=n.union(this.getBackwardsRecursive(e,r)));return n}hasCircularDependency(e){let t=$m.from([]);const n=[e];for(;n.length>0;){const e=n.pop();if(!e)continue;if(t.has(e))return!0;t=t.add(e);const r=this.get(e);if(r)for(const e of r)n.push(e)}return!1}*[Symbol.iterator](){const e=new Set;for(const[t,n]of this.forwards){const r=Jm(t);e.add(t),yield[r,n];for(const t of n){const n=Xm(t);e.has(n)||this.forwards.has(n)||(e.add(n),yield[t,$m.from([])])}}}*traverseBFSBackwards(){let e=$m.from([]);const t=[];for(const[n,r]of this)0===r.size&&(e=e.add(n),t.push(n));for(;t.length>0;){const n=t.shift();if(!n)continue;yield n;const r=this.getBackwards(n);if(0!==r.size)for(const n of r)e.has(n)||0!==this.get(n).difference(e).size||(t.push(n),e=e.add(n))}}}class tg{data;evaluatedData;referenceGraph;createFormulaParser;constructor(e,t,n,r){this.createFormulaParser=e,this.data=t,this.referenceGraph=n||function(){const e=[];return eg.from(e)}(),this.evaluatedData=r||function(e,t){let n=e;for(const r of t.traverseBFSBackwards()){const t=tm(r,e);if(t&&Km(t.value)){const e=rg();n=nm(r,{...t,value:e},n)}}return n}(t,this.referenceGraph)}}function ng(e,t,n){const r=nm(t,n,e.data),i=(Km(n.value),e.referenceGraph),o=function(e,t,n,r,i){if(n.hasCircularDependency(r)){let o=$m.from([r]),a=nm(r,{...i,value:"TODO"},e);for(const e of n.getBackwardsRecursive(r)){if(o.has(e))break;o=o.add(e);const n=tm(e,t);n&&(a=nm(e,{...n,value:"TODO"},a))}return a}let o=e;const a=Km(i.value)?"TODO":i.value,l={...i,value:a};o=nm(r,l,o);for(const e of n.getBackwardsRecursive(r)){const n=tm(e,t);if(!n)continue;const r=Km(n.value)?rg():n.value;o=nm(e,{...n,value:r},o)}return o}(e.evaluatedData,r,i,t,n);return new tg(e.createFormulaParser,r,i,o)}function rg(){return"TODO"}function ig(e){if(6!==e.length)return!1;for(let t=1;t<e.length;t++)if(!"0123456789ABCDEFabcdef".includes(e[t]))return!1;return!0}function og(e){return Eg(e)||!e.editable?e:{...e,mode:"edit"}}const ag=e=>(e=>e&&!e.readOnly)(e)&&"file"!==e?.inputType?.type?{...e,value:"",style:e?.style}:e,lg=e=>{if(e)return{...e,value:(e.value||"")+"\n",style:e.style}};function sg(e){if(!e.active)return e;const t=e.selected.toRange(e.model.data),n=[];let r=e.model.data;for(const i of t||[]){const t=tm(i,e.model.data),o=ag(t);n.push({prevCell:t||null,nextCell:o||null}),r=nm(i,o,r)}return{...e,model:new tg(Ym,r),...fg(n)}}function cg(e){if(!e.active)return e;const t=e.selected.toRange(e.model.data),n=[];let r=e.model.data;for(const i of t||[]){const t=tm(i,e.model.data),o=lg(t);n.push({prevCell:t||null,nextCell:o||null}),r=nm(i,o,r)}return{...e,mode:"edit",model:new tg(Ym,r),...fg(n)}}function dg(e){return{...e,active:null,copied:null,formattedStyle:{open:!1,style:void 0},selected:new mm}}function ug(e){return{...e,mode:"view"}}function fg(e){return{lastCommit:e}}const hg=(e,t)=>n=>{if(!n.active)return;const r=cm(n.model.data),i=n.active.column+t>=r.columns,o={row:n.active.row+e+(i?1:0),column:(n.active.column+t)%r.columns};return sm(o,n.model.data)?{...n,active:o,selected:new gm(new hm(o,o)),mode:"view"}:{...n,mode:"view"}},pg={ArrowUp:hg(-1,0),ArrowDown:hg(1,0),ArrowLeft:hg(0,-1),ArrowRight:hg(0,1),Tab:hg(0,1),Enter:og,Backspace:function(e){if(!e.active)return e;if("view"===e.mode){return sg(e)}{const t=[];let n=e.model.data;const r=tm(e.active,e.model.data),i=ag(r);return t.push({prevCell:r||null,nextCell:i||null}),n=nm(e.active,i,n),{...e,mode:"edit",model:new tg(Ym,n),...fg(t)}}},Delete:sg,Escape:dg},Cg={Escape:ug,Tab:pg.Tab,Enter:pg.ArrowDown,Delete:sg},mg={Tab:hg(0,-1)};var gg;!function(e){e.Left="Left",e.Right="Right",e.Top="Top",e.Bottom="Bottom"}(gg||(gg={}));const vg={ArrowUp:e=>({...e,selected:Mg(e.selected,e.active,e.model.data,gg.Top)}),ArrowDown:e=>({...e,selected:Mg(e.selected,e.active,e.model.data,gg.Bottom)}),ArrowLeft:e=>({...e,selected:Mg(e.selected,e.active,e.model.data,gg.Left)}),ArrowRight:e=>({...e,selected:Mg(e.selected,e.active,e.model.data,gg.Right)}),Tab:hg(0,-1)},yg={},wg={};function bg(e,t){const{key:n}=t;let r;if("edit"===e.mode)if(t.shiftKey&&"Enter"===n)r=pg;else{if(t.altKey&&"Enter"===n)return cg;r=t.shiftKey?mg:Cg}else r=t.shiftKey&&t.metaKey?yg:t.shiftKey?vg:t.metaKey?wg:pg;return r[n]}function Eg(e){const t=function(e){const t=e.active&&tm(e.active,e.model.data);return t||null}(e);return Boolean(t?.readOnly)}function Mg(e,t,n,r){if(!t)return e;if(e instanceof gm){const i=function(e,t,n,r){const i=r===gg.Left||r===gg.Right?"column":"row",o=r===gg.Left||r===gg.Top?"start":"end",a="start"===o?-1:1,l=e.range.has({...t,[i]:t[i]+-1*a}),s=l?"start"===o?"end":"start":o,c=new hm(e.range.start,e.range.end);c[s][i]+=a;const d=new gm(c).normalizeTo(n);return d}(e,t,n,r);return i}return e instanceof Em?function(e,t,n,r){if(r===gg.Top||r===gg.Bottom)return e;const i=r===gg.Left?-1:1,o=r===gg.Left?"start":"end",a="start"===o?"end":"start",l={...e};(r===gg.Left?e.end>t.row:e.start<t.row)?l[a]=e[a]+i:l[o]=e[o]+i;return new Em(Math.max(l.start,0),Math.max(l.end,0)).normalizeTo(n)}(e,t,n,r):e instanceof bm?function(e,t,n,r){if(r===gg.Left||r===gg.Right)return e;const i=r===gg.Top?-1:1,o=r===gg.Top?"start":"end",a="start"===o?"end":"start",l={...e};(r===gg.Top?e.end>t.row:e.start<t.row)?l[a]=e[a]+i:l[o]=e[o]+i;return new bm(Math.max(l.start,0),Math.max(l.end,0)).normalizeTo(n)}(e,t,n,r):e}const Ag=(e,t={},n)=>{const{selectedRow:r,selectedColumn:i,model:o,columnDimensions:a}=e,{column:l,columnWidth:s=100}=t,c=l??i;if(G(c))return e;const d="LEFT"===n?c:c+1,u=o.data.map(e=>{const t=[...e],n=e[c];return t.splice(d,0,(e=>{if("object"!=typeof e||null===e)return e;const{contextDisable:t,...n}=e;return{...n,value:"",readOnly:!1,style:{...e.style,borderBottom:"",borderLeft:"",borderRight:"",borderTop:""}}})(n)),t}),f=new tg(o.createFormulaParser,u),h=r??0;return{...e,model:f,selectedRow:h,selectedColumn:d,active:{row:h,column:d},selected:new Em(d,d),columnDimensions:Vm(a,d,s)}},xg=(e,t={},n)=>{const{selectedRow:r,selectedColumn:i,model:o,rowDimensions:a}=e,{row:l}=t,s=l??r;if(G(s))return e;const c="TOP"===n?s:s+1,d=[...o.data],u=((e,t)=>e?e?.map(e=>"object"==typeof e&&null!==e?{...e,value:"",readOnly:!1,contextDisable:void 0,style:{...e.style,borderBottom:"",borderLeft:"",borderRight:"",borderTop:""}}:e):Array(t||0).fill(Um))(o.data[s]||[],d[0]?.length);d.splice(c,0,u??[]);const f=new tg(o.createFormulaParser,d),h=i??0;return{...e,model:f,selectedRow:c,selectedColumn:h,active:{row:c,column:h},selected:new bm(c,c),rowDimensions:Om(a,c,32)}},Lg={active:null,mode:"view",rowDimensions:{},columnDimensions:{},lastChanged:null,hasPasted:!1,cut:!1,autoFill:{open:!1,cellValue:{value:"",style:{}}},dragging:!1,model:new tg(Ym,[]),selected:new mm,copied:null,lastCommit:null,selectedColumn:null,selectedRow:null,formattedStyle:{open:!1,style:void 0},editable:!1,ctrl:!0};function kg(e,t){switch(t.type){case vC:{const{minimumColumnWidth:n}=t.payload,r={...e.columnDimensions};return Object.keys(r).forEach(e=>{const t=parseInt(e);(r[t]?.width||0)!==n&&(r[t]={left:r[t]?.left||0,width:n})}),{...e,columnDimensions:r}}case yC:{const{editable:n}=t.payload;return{...e,editable:n}}case gC:{const{autofill:n}=t.payload,r=e.active;let i=Um;return r&&(i=tm({row:r.row,column:r.column},e.model.data)||i),{...e,autoFill:{open:n,cellValue:i}}}case cC:return xg(e,t,"TOP");case dC:return xg(e,t,"BOTTOM");case uC:return Ag(e,t,"LEFT");case fC:return Ag(e,t,"RIGHT");case hC:{let{selectedRow:n,selectedColumn:r,model:i,rowDimensions:o,copied:a}=e;const{row:l}=t;if(G(n))return e;const s=l??n;let c=[...i.data];c.splice(s,1);const d=new tg(i.createFormulaParser,c);let u=s>0?s-1:0;const f=null!==r?r:0,h=c.length>0?{row:u,column:f}:null,p=c.length>0?new bm(u,u):new mm;let C=a;return a&&a.start.row<=s&&a.end.row>=s&&(C=null),{...e,model:d,selectedRow:u,selectedColumn:f,selected:p,active:h,copied:C,rowDimensions:zm(o,s)}}case pC:{const{selectedRow:n,selectedColumn:r,model:i,columnDimensions:o,copied:a}=e,{column:l}=t;if(G(l??r))return e;const s=l??r,c=i.data.map(e=>e.filter((e,t)=>t!==s)),d=new tg(i.createFormulaParser,c),u=null!==n?n:0,f=s>0?s-1:0,h=c.length>0?{row:u,column:f}:null,p=c.length>0?new Em(f,f):new mm;let C=a;return a&&a.start.column<=s&&a.end.column>=s&&(C=null),{...e,model:d,selectedRow:u,selectedColumn:f,selected:p,active:h,copied:C,columnDimensions:Nm(o,s)}}case $p:{const t=e.selected.toRange(e.model.data),n=function(e,t,n){if(!t)return e;const{start:r,end:i}=t;let o=e,a=!1;for(let e=r.row;e<=i.row;e++){for(let t=r.column;t<=i.column;t++){const r=tm({row:e,column:t},o);if(r&&n&&!r.readOnly&&"bold"===r.style?.fontWeight){a=!0;break}}if(a)break}for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=tm({row:e,column:t},o);r&&n&&(r.readOnly||(o=nm({row:e,column:t},{...r,style:{...r.style,fontWeight:a?"normal":"bold"}},o)))}return o}(e.model.data,t,e.editable);return{...e,model:new tg(e.model.createFormulaParser,n)}}case eC:{const t=e.selected.toRange(e.model.data),n=function(e,t,n){if(!t)return e;const{start:r,end:i}=t;let o=e,a=!1;for(let e=r.row;e<=i.row;e++){for(let t=r.column;t<=i.column;t++){const r=tm({row:e,column:t},o);if(r&&n&&!r.readOnly&&"italic"===r.style?.fontStyle){a=!0;break}}if(a)break}for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=tm({row:e,column:t},o);r&&n&&(r.readOnly||(o=nm({row:e,column:t},{...r,style:{...r.style,fontStyle:a?"normal":"italic"}},o)))}return o}(e.model.data,t,e.editable);return{...e,model:new tg(e.model.createFormulaParser,n)}}case oC:{const{value:n,color:r}=t.payload,i=e.selected.toRange(e.model.data),o=function(e,t,n,r,i){if(!t)return e;let o=e;const{start:a,end:l}=t,s=(e,t)=>tm({row:e,column:t},o),c=(e,t,n)=>{o=nm({row:e,column:t},n,o)};for(let e=a.row;e<=l.row;e++)for(let t=a.column;t<=l.column;t++){const o=s(e,t);if(!o||!i||o.readOnly)continue;const a={...o,style:{...o.style}},l=s(e-1,t),d=s(e+1,t),u=s(e,t-1),f=s(e,t+1),h=`2px solid ${r}`,p="1px solid var(--excel-header-border)",C=e=>{switch(e){case"borderTop":l&&l.style?.borderBottom===h?a.style.borderTop="none":a.style.borderTop=h;break;case"borderBottom":d&&d.style?.borderTop===h?a.style.borderBottom="none":a.style.borderBottom=h;break;case"borderLeft":u&&u.style?.borderRight===h?a.style.borderLeft="none":a.style.borderLeft=h;break;case"borderRight":f&&f.style?.borderLeft===h?a.style.borderRight="none":a.style.borderRight=h}};switch(n){case"border-all-sides":C("borderTop"),C("borderBottom"),C("borderLeft"),C("borderRight");break;case"border-none":if(a.style={...a.style,borderRight:p,borderLeft:p,borderTop:p,borderBottom:p},l){const n={...l,style:{...l.style}};"none"===n.style.borderBottom&&(n.style.borderBottom=h,c(e-1,t,n))}if(d){const n={...d,style:{...d.style}};"none"===n.style.borderTop&&(n.style.borderTop=h,c(e+1,t,n))}if(u){const n={...u,style:{...u.style}};"none"===n.style.borderRight&&(n.style.borderRight=h,c(e,t-1,n))}if(f){const n={...f,style:{...f.style}};"none"===n.style.borderLeft&&(n.style.borderLeft=h,c(e,t+1,n))}break;case"border-right":C("borderRight");break;case"border-left":C("borderLeft");break;case"border-top":C("borderTop");break;case"border-bottom":C("borderBottom")}c(e,t,a)}return o}(e.model.data,i,n,r,e.editable);return{...e,model:new tg(e.model.createFormulaParser,o)}}case tC:{const t=e.selected.toRange(e.model.data),n=function(e,t,n){if(!t)return e;const{start:r,end:i}=t;let o=e,a=!1;for(let e=r.row;e<=i.row;e++){for(let t=r.column;t<=i.column;t++){const r=tm({row:e,column:t},o);if(r&&n&&!r.readOnly&&"underline"===r.style?.textDecoration){a=!0;break}}if(a)break}for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=tm({row:e,column:t},o);r&&n&&(r.readOnly||(o=nm({row:e,column:t},{...r,style:{...r.style,textDecoration:a?"none":"underline"}},o)))}return o}(e.model.data,t,e.editable);return{...e,model:new tg(e.model.createFormulaParser,n)}}case rC:{const{value:n}=t.payload,r=e.selected.toRange(e.model.data),i=function(e,t,n,r){if(!t)return e;const i=Number(n);if(isNaN(i))return e;const o=Pm(i),{start:a,end:l}=t;let s=e;for(let e=a.row;e<=l.row;e++)for(let t=a.column;t<=l.column;t++){const n=tm({row:e,column:t},s);n&&r&&(n.readOnly||(s=nm({row:e,column:t},{...n,style:{...n.style,fontSize:o}},s)))}return s}(e.model.data,r,n,e.editable),o=new tg(e.model.createFormulaParser,i);let a={...e.rowDimensions};if(("edit"!==e.mode||!e.active)&&r)for(let e=r?.start?.row??0;e<=r?.end?.row;e++){const t=i[e];if(!t)continue;let n=32;t.forEach((e,t)=>{if(e&&e.value){const t=e.style?.fontSize?parseInt(e.style.fontSize.toString().replace("px","")):9,r=Math.max(1.2*t,18);let i=0;["file","dropDown"].includes(e?.inputType?.type??"")||(i=String(e.value).split(" ").length),i+=String(e.value).split("\n").length-1;const o=r*i;n=Math.max(n,o)}}),a[e]={...a[e]||{top:0,height:32},height:n}}return{...e,model:o,rowDimensions:a}}case nC:{const{value:n}=t.payload,r=e.selected.toRange(e.model.data),i=function(e,t,n,r){if(!t)return e;const{start:i,end:o}=t;let a=e;for(let e=i.row;e<=o.row;e++)for(let t=i.column;t<=o.column;t++){const i=tm({row:e,column:t},a);i&&r&&(i.readOnly||(a=nm({row:e,column:t},{...i,style:{...i.style,fontFamily:n}},a)))}return a}(e.model.data,r,n,e.editable);return{...e,model:new tg(e.model.createFormulaParser,i)}}case iC:{const{value:n}=t.payload,r=e.selected.toRange(e.model.data),i=function(e,t,n,r){if(!t)return e;const{start:i,end:o}=t;let a=e;for(let e=i.row;e<=o.row;e++)for(let t=i.column;t<=o.column;t++){const i=tm({row:e,column:t},a);i&&r&&(i.readOnly||(a=nm({row:e,column:t},{...i,style:{...i.style,textAlign:n}},a)))}return a}(e.model.data,r,n,e.editable);return{...e,model:new tg(e.model.createFormulaParser,i)}}case aC:{const{value:n}=t.payload,r=e.selected.toRange(e.model.data),i=function(e,t,n,r){if(!t)return e;const{start:i,end:o}=t;let a=e;const l=ig(n)?`#${n}`:n;for(let e=i.row;e<=o.row;e++)for(let t=i.column;t<=o.column;t++){const n=tm({row:e,column:t},a);n&&r&&(n.readOnly||(a=nm({row:e,column:t},{...n,style:{...n.style,color:l}},a)))}return a}(e.model.data,r,n,e.editable);return{...e,model:new tg(e.model.createFormulaParser,i)}}case lC:{const{value:n}=t.payload,r=e.selected.toRange(e.model.data),i=function(e,t,n,r){if(!t)return e;if(t){const{start:i,end:o}=t;let a=e;const l=ig(n)?`#${n}`:n;for(let e=i.row;e<=o.row;e++)for(let t=i.column;t<=o.column;t++){const n=tm({row:e,column:t},a);n&&r&&(n.readOnly||(a=nm({row:e,column:t},{...n,style:{...n.style,backgroundColor:l}},a)))}return a}return e}(e.model.data,r,n,e.editable);return{...e,model:new tg(e.model.createFormulaParser,i)}}case sC:{if(!e.editable)return e;const t=function(e,t){if(!t)return;const{row:n,column:r}=t,i=tm({row:n,column:r},{...e});return i&&i.style?i.style:void 0}(e.model.data,e.active),n=e.selected.toRange(e.model.data);return e.formattedStyle.open?{...e,selected:new mm,active:e.copied?.start||null,copied:null,formattedStyle:{open:!1,style:void 0}}:{...e,selected:new mm,active:null,copied:n,formattedStyle:{open:!0,style:t}}}case Op:{const{data:n}=t.payload,r=e.active&&sm(e.active,n)?e.active:null,i=e.selected.normalizeTo(n);return{...e,model:new tg(e.model.createFormulaParser,n),active:r,selected:i}}case zp:{const{createFormulaParser:n}=t.payload;return{...e,model:new tg(n,e.model.data)}}case Np:{const{row:n,extend:r}=t.payload,{active:i}=e,o=new bm(r&&i?i.row:n,n),a=r&&i?i:{...pm,row:n};return{...e,selected:o,active:a,mode:"view",selectedColumn:null,selectedRow:n}}case Tp:{const{column:n,extend:r}=t.payload,{active:i}=e,o=new Em(r&&i?i.column:n,n),a=r&&i?i:{...pm,column:n};return{...e,selected:o,active:a,mode:"view",selectedColumn:n,selectedRow:null}}case Ip:return{...e,selected:new ym,active:pm,mode:"view"};case Dp:{const{selection:n}=t.payload,r=n.toRange(e.model.data),i=e.active&&n.has(e.model.data,e.active)?e.active:r?.start;return{...e,selected:n,active:i||null,mode:"view"}}case Zp:{const{point:n}=t.payload;return e.active&&!Hm(e.active,n)?{...e,selected:new gm(new hm(n,e.active)),mode:"view"}:e}case jp:{const{point:n}=t.payload;return{...e,selected:new gm(new hm(n,n)),active:n,mode:Hm(e.active,n)&&e.editable?"edit":"view"}}case Rp:{const{active:n,data:r}=t.payload;return Eg(e)||!e.editable?e:{...e,model:ng(e.model,n,r),lastChanged:n}}case Bp:{const{point:n,dimensions:r}=t.payload,i=e.rowDimensions[n.row],o=e.columnDimensions[n.column];return i&&o&&i.top===r.top&&i.height===r.height&&o.left===r.left&&o.width===r.width?e:{...e,rowDimensions:{...e.rowDimensions,[n.row]:{top:r.top,height:r.height}},columnDimensions:{...e.columnDimensions,[n.column]:{left:r.left,width:r.width}}}}case Pp:case Fp:{const n=e.selected.toRange(e.model.data);return{...e,copied:n,cut:t.type===Fp,hasPasted:!1}}case Up:{const{data:n}=t.payload,{active:r}=e;if(!r||!e.editable)return e;const i=function(e,t,n="\t",r=/\r\n|\n|\r/){return e.replace(/"([^"]*?)"/g,(e,t)=>t.replace(/\n/g,"\\n")).split(r).map(e=>e.split(n).map(e=>e.replace(/\\n/g,"\n")).map(t))}(n,e=>({value:e})),o=cm(i),a=e.selected.toRange(e.model.data);if(a&&1===o.rows&&1===o.columns){const t=tm({row:0,column:0},i);let n=e.cut&&e.copied?am(e.copied.start,e.model.data):e.model.data;const r=[];for(const i of a||[]){const o=tm(i,e.model.data)||null,a={...o,value:t?.value};r.push({prevCell:o||Um,nextCell:Um}),Qm(o)&&(n=nm(i,a,n))}return{...e,model:new tg(Ym,n),copied:null,cut:!1,hasPasted:!0,mode:"view",lastCommit:r}}const l={rows:r.row+o.rows,columns:r.column+o.columns},s=function(e,t){const{rows:n,columns:r}=cm(e);if(n>=t.rows&&r>=t.columns)return e;const i={rows:t.rows>n?t.rows:n,columns:t.columns>r?t.columns:r};let o=[...e];if(i.columns>r){const e=i.columns-r;o=o.map(t=>[...t,...Array(e).fill(im)])}if(i.rows>n){const e=i.rows-n,t=Array(i.columns).fill(im);o=[...o,...Array(e).fill(t)]}return o}(e.model.data,l);let c={data:s,commit:[]};for(const[t,n]of lm(i)){let i=c.commit||[];const o={row:t.row+r.row,column:t.column+r.column};let a=c.data;if(e.cut){if(e.copied){a=am({row:t.row+e.copied.start.row,column:t.column+e.copied.start.column},c.data)}i=[...i,{prevCell:n||null,nextCell:null}]}sm(o,s)||(c={data:a,commit:i});const l=tm(o,a)||null;i=[...i,{prevCell:l,nextCell:n||null}],Qm(l)&&(c.data=nm(o,{...l,value:n?.value??""},a),c.commit=i)}return{...e,model:new tg(Ym,c.data),selected:new gm(new hm(r,{row:r.row+o.rows-1,column:r.column+o.columns-1})),copied:null,cut:!1,hasPasted:!0,mode:"view",lastCommit:c.commit}}case qp:return og(e);case Wp:return ug(e);case"CLEAR":return sg(e);case Qp:return dg(e);case Gp:{const{event:n}=t.payload;if(Eg(e)||n.metaKey||!e.editable)return e;if("view"===e.mode&&e.active){const t=e.selected.toRange(e.model.data);return 1===t?.size()?og(sg(e)):og(e)}return e}case Kp:{const{event:n}=t.payload;if(n.ctrlKey)return{...e,ctrl:!e.ctrl};if(Eg(e)||n.metaKey||!e.editable)return e;const r=bg(e,n);return r?{...e,...r(e,n)}:e}case CC:{const{row:n,height:r}=t.payload,i=e.rowDimensions[n]||{top:0};return{...e,rowDimensions:{...e.rowDimensions,[n]:{top:i.top,height:r}}}}case mC:{const{column:n,width:r}=t.payload,i=e.columnDimensions[n]||{left:0};return{...e,columnDimensions:{...e.columnDimensions,[n]:{left:i.left,width:r}}}}case Yp:return{...e,dragging:!0};case wC:{const{point:n}=t.payload;let r=e.model.data;return!e.dragging&&e.formattedStyle.open&&(r=function(e,t,n){if(!n||!t.open)return e;let r=e;const i=tm(n,r);i&&!i.readOnly&&(r=nm(n,{...i,style:t.style},r));return r}(e.model.data,e.formattedStyle,e.active)),{...e,copied:null,model:new tg(e.model.createFormulaParser,r),formattedStyle:{open:!1,style:void 0},active:n}}case Xp:{const t=e.selected.toRange(e.model.data),n=e.active;let r=e.model.data;if(e.formattedStyle.open&&(r=function(e,t,n){if(!t||!n.open)return e;const{start:r,end:i}=t;let o=e;for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=tm({row:e,column:t},o);r&&(r.readOnly||(o=nm({row:e,column:t},{...r,style:n.style},o)))}return o}(e.model.data,t,e.formattedStyle)),e.autoFill.open&&e.editable&&t){r=function(e,t,n,r,i){if(!t)return e;const{start:o,end:a}=t,l=o.row-a.row,s=o.column-a.column;let c={row:0,column:0},d={row:0,column:0};Math.abs(l)>Math.abs(s)?(c={row:Math.min(o.row,a.row),column:r?.column??o.column},d={row:Math.max(o.row,a.row),column:r?.column??o.column}):(c={row:r?.row??o.row,column:Math.min(o.column,a.column)},d={row:r?.row??o.row,column:Math.max(o.column,a.column)});let u=e;const f=String(n.value??""),h=[...f.matchAll(/(-?\d+)/g)];for(let e=c.row;e<=d.row;e++)for(let t=c.column;t<=d.column;t++){const o=tm({row:e,column:t},u);if(!o||o.readOnly||["file","dropDown"].includes(o?.inputType?.type||""))continue;let a=f;if(!i&&h.length>0){let n=0;n=Math.abs(l)>Math.abs(s)?e-(r?.row??c.row):t-(r?.column??c.column);let i=0;a=a.replace(/(-?\d+)/g,()=>{const e=h[i++];return e?(parseInt(e?.[1]??"",10)+n).toString():""})}u=nm({row:e,column:t},{...o,style:n.style,value:a,inputType:n.inputType},u)}return u}(e.model.data,t,e.autoFill.cellValue,n,e.ctrl);let{start:i,end:o}=t;const a=i.row-o.row,l=i.column-o.column;let s={row:0,column:0},c={row:0,column:0};return Math.abs(a)>Math.abs(l)?(s={row:Math.min(i.row,o.row),column:n?.column??0},c={row:Math.max(i.row,o.row),column:n?.column??0}):(s={row:n?.row??0,column:Math.min(i.column,o.column)},c={row:n?.row??0,column:Math.max(i.column,o.column)}),{...e,dragging:!1,autoFill:{open:!1,cellValue:{value:"",style:{}}},formattedStyle:{open:!1,style:void 0},model:new tg(e.model.createFormulaParser,r),selected:new gm(new hm(s,c))}}return{...e,dragging:!1,autoFill:{open:!1,cellValue:{value:"",style:{}}},formattedStyle:{open:!1,style:void 0},model:new tg(e.model.createFormulaParser,r)}}case Jp:{const{changes:n}=t.payload;return{...e,...fg(n)}}default:throw new Error("Unknown action")}}var Hg,Sg={exports:{}},_g={};var Vg,Og,zg={};
|
|
19
|
+
*/function jh(){if(xh)return Ah;xh=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Ah=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,i){for(var o,a,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),s=1;s<arguments.length;s++){for(var c in o=Object(arguments[s]))t.call(o,c)&&(l[c]=o[c]);if(e){a=e(o);for(var d=0;d<a.length;d++)n.call(o,a[d])&&(l[a[d]]=o[a[d]])}}return l},Ah}function Rh(){if(kh)return Lh;kh=1;return Lh="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Bh(){return Sh?Hh:(Sh=1,Hh=Function.call.bind(Object.prototype.hasOwnProperty))}function Ph(){if(Vh)return _h;Vh=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Rh(),n={},r=Bh();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function i(i,o,a,l,s){if("production"!==process.env.NODE_ENV)for(var c in i)if(r(i,c)){var d;try{if("function"!=typeof i[c]){var u=Error((l||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=i[c](o,c,l,a,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((l||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=s?s():"";e("Failed "+a+" type: "+d.message+(null!=f?f:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},_h=i}function Fh(){if(zh)return Oh;zh=1;var e=Zh(),t=jh(),n=Rh(),r=Bh(),i=Ph(),o=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(o=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Oh=function(l,s){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:C("array"),bigint:C("bigint"),bool:C("boolean"),func:C("function"),number:C("number"),object:C("object"),string:C("string"),symbol:C("symbol"),any:p(a),arrayOf:function(e){return p(function(t,r,i,o,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new h("Invalid "+o+" `"+a+"` of type `"+v(l)+"` supplied to `"+i+"`, expected an array.");for(var s=0;s<l.length;s++){var c=e(l,s,i,o,a+"["+s+"]",n);if(c instanceof Error)return c}return null})},element:p(function(e,t,n,r,i){var o=e[t];return l(o)?null:new h("Invalid "+r+" `"+i+"` of type `"+v(o)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:p(function(t,n,r,i,o){var a=t[n];return e.isValidElementType(a)?null:new h("Invalid "+i+" `"+o+"` of type `"+v(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return p(function(t,n,r,i,o){if(!(t[n]instanceof e)){var a=e.name||d;return new h("Invalid "+i+" `"+o+"` of type `"+(((l=t[n]).constructor&&l.constructor.name?l.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+a+"`.")}var l;return null})},node:p(function(e,t,n,r,i){return g(e[t])?null:new h("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return p(function(t,i,o,a,l){if("function"!=typeof e)return new h("Property `"+l+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var s=t[i],c=v(s);if("object"!==c)return new h("Invalid "+a+" `"+l+"` of type `"+c+"` supplied to `"+o+"`, expected an object.");for(var d in s)if(r(s,d)){var u=e(s,d,o,a,l+"."+d,n);if(u instanceof Error)return u}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return p(function(t,n,r,i,o){for(var a=t[n],l=0;l<e.length;l++)if(f(a,e[l]))return null;var s=JSON.stringify(e,function(e,t){return"symbol"===y(t)?String(t):t});return new h("Invalid "+i+" `"+o+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+s+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var i=e[t];if("function"!=typeof i)return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+w(i)+" at index "+t+"."),a}return p(function(t,i,o,a,l){for(var s=[],c=0;c<e.length;c++){var d=(0,e[c])(t,i,o,a,l,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&s.push(d.data.expectedType)}return new h("Invalid "+a+" `"+l+"` supplied to `"+o+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")})},shape:function(e){return p(function(t,r,i,o,a){var l=t[r],s=v(l);if("object"!==s)return new h("Invalid "+o+" `"+a+"` of type `"+s+"` supplied to `"+i+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return m(i,o,a,c,y(d));var u=d(l,c,i,o,a+"."+c,n);if(u)return u}return null})},exact:function(e){return p(function(i,o,a,l,s){var c=i[o],d=v(c);if("object"!==d)return new h("Invalid "+l+" `"+s+"` of type `"+d+"` supplied to `"+a+"`, expected `object`.");var u=t({},i[o],e);for(var f in u){var p=e[f];if(r(e,f)&&"function"!=typeof p)return m(a,l,s,f,y(p));if(!p)return new h("Invalid "+l+" `"+s+"` key `"+f+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(i[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var C=p(c,f,a,l,s+"."+f,n);if(C)return C}return null})}};function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function p(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function i(i,a,l,c,u,f,p){if(c=c||d,f=f||l,p!==n){if(s){var C=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 C.name="Invariant Violation",C}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var m=c+":"+l;!t[m]&&r<3&&(o("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[m]=!0,r++)}}return null==a[l]?i?null===a[l]?new h("The "+u+" `"+f+"` is marked as required in `"+c+"`, but its value is `null`."):new h("The "+u+" `"+f+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,l,c,u,f)}var a=i.bind(null,!1);return a.isRequired=i.bind(null,!0),a}function C(e){return p(function(t,n,r,i,o,a){var l=t[n];return v(l)!==e?new h("Invalid "+i+" `"+o+"` of type `"+y(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function m(e,t,n,r,i){return new h((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function g(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(g);if(null===e||l(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!g(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!g(i[1]))return!1}return!0;default:return!1}}function v(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=v(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function w(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,u.checkPropTypes=i,u.resetWarningCache=i.resetWarningCache,u.PropTypes=u,u},Oh}function Uh(){if(Th)return Nh;Th=1;var e=Rh();function t(){}function n(){}return n.resetWarningCache=t,Nh=function(){function r(t,n,r,i,o,a){if(a!==e){var l=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 l.name="Invariant Violation",l}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}function qh(){if(Ih)return yh.exports;if(Ih=1,"production"!==process.env.NODE_ENV){var e=Zh();yh.exports=Fh()(e.isElement,true)}else yh.exports=Uh()();return yh.exports}var Wh=H(qh()),Qh=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Gh(){return Gh=Object.assign?Object.assign.bind():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},Gh.apply(this,arguments)}function Kh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yh(e,t){return Yh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yh(e,t)}var Xh,Jh,$h=function(e){var t,n;function i(){var t;return(t=e.call(this)||this).handleExpired=t.handleExpired.bind(Kh(t)),t.handleErrored=t.handleErrored.bind(Kh(t)),t.handleChange=t.handleChange.bind(Kh(t)),t.handleRecaptchaRef=t.handleRecaptchaRef.bind(Kh(t)),t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,Yh(t,n);var o=i.prototype;return o.getCaptchaFunction=function(e){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[e]:this.props.grecaptcha[e]:null},o.getValue=function(){var e=this.getCaptchaFunction("getResponse");return e&&void 0!==this._widgetId?e(this._widgetId):null},o.getWidgetId=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this._widgetId:null},o.execute=function(){var e=this.getCaptchaFunction("execute");if(e&&void 0!==this._widgetId)return e(this._widgetId);this._executeRequested=!0},o.executeAsync=function(){var e=this;return new Promise(function(t,n){e.executionResolve=t,e.executionReject=n,e.execute()})},o.reset=function(){var e=this.getCaptchaFunction("reset");e&&void 0!==this._widgetId&&e(this._widgetId)},o.forceReset=function(){var e=this.getCaptchaFunction("reset");e&&e()},o.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},o.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},o.handleChange=function(e){this.props.onChange&&this.props.onChange(e),this.executionResolve&&(this.executionResolve(e),delete this.executionReject,delete this.executionResolve)},o.explicitRender=function(){var e=this.getCaptchaFunction("render");if(e&&void 0===this._widgetId){var t=document.createElement("div");this._widgetId=e(t,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(t)}this._executeRequested&&this.props.grecaptcha&&void 0!==this._widgetId&&(this._executeRequested=!1,this.execute())},o.componentDidMount=function(){this.explicitRender()},o.componentDidUpdate=function(){this.explicitRender()},o.handleRecaptchaRef=function(e){this.captcha=e},o.render=function(){var e=this.props;e.sitekey,e.onChange,e.theme,e.type,e.tabindex,e.onExpired,e.onErrored,e.size,e.stoken,e.grecaptcha,e.badge,e.hl,e.isolated;var t=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,Qh);return r.createElement("div",Gh({},t,{ref:this.handleRecaptchaRef}))},i}(r.Component);$h.displayName="ReCAPTCHA",$h.propTypes={sitekey:Wh.string.isRequired,onChange:Wh.func,grecaptcha:Wh.object,theme:Wh.oneOf(["dark","light"]),type:Wh.oneOf(["image","audio"]),tabindex:Wh.number,onExpired:Wh.func,onErrored:Wh.func,size:Wh.oneOf(["compact","normal","invisible"]),stoken:Wh.string,hl:Wh.string,badge:Wh.oneOf(["bottomright","bottomleft","inline"]),isolated:Wh.bool},$h.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var ep=function(){if(Jh)return Xh;Jh=1;var e=Zh(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};function o(n){return e.isMemo(n)?r:i[n.$$typeof]||t}i[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i[e.Memo]=r;var a=Object.defineProperty,l=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,u=Object.prototype;return Xh=function e(t,r,i){if("string"!=typeof r){if(u){var f=d(r);f&&f!==u&&e(t,f,i)}var h=l(r);s&&(h=h.concat(s(r)));for(var p=o(t),C=o(r),m=0;m<h.length;++m){var g=h[m];if(!(n[g]||i&&i[g]||C&&C[g]||p&&p[g])){var v=c(r,g);try{a(t,g,v)}catch(e){}}}}return t},Xh}(),tp=H(ep);function np(){return np=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},np.apply(this,arguments)}var rp={},ip=0;var op="onloadcallback";function ap(){return"undefined"!=typeof window&&window.recaptchaOptions||{}}var lp=function(e,t){return t=t||{},function(n){var r=n.displayName||n.name||"Component",i=function(r){var i,o;function a(e,t){var n;return(n=r.call(this,e,t)||this).state={},n.__scriptURL="",n}o=r,(i=a).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var l=a.prototype;return l.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+ip++),this.__scriptLoaderID},l.setupScriptURL=function(){return this.__scriptURL="function"==typeof e?e():e,this.__scriptURL},l.asyncScriptLoaderHandleLoad=function(e){var t=this;this.setState(e,function(){return t.props.asyncScriptOnLoad&&t.props.asyncScriptOnLoad(t.state)})},l.asyncScriptLoaderTriggerOnScriptLoaded=function(){var e=rp[this.__scriptURL];if(!e||!e.loaded)throw new Error("Script is not loaded.");for(var n in e.observers)e.observers[n](e);delete window[t.callbackName]},l.componentDidMount=function(){var e=this,n=this.setupScriptURL(),r=this.asyncScriptLoaderGetScriptLoaderID(),i=t,o=i.globalName,a=i.callbackName,l=i.scriptId;if(o&&void 0!==window[o]&&(rp[n]={loaded:!0,observers:{}}),rp[n]){var s=rp[n];return s&&(s.loaded||s.errored)?void this.asyncScriptLoaderHandleLoad(s):void(s.observers[r]=function(t){return e.asyncScriptLoaderHandleLoad(t)})}var c={};c[r]=function(t){return e.asyncScriptLoaderHandleLoad(t)},rp[n]={loaded:!1,observers:c};var d=document.createElement("script");for(var u in d.src=n,d.async=!0,t.attributes)d.setAttribute(u,t.attributes[u]);l&&(d.id=l);var f=function(e){if(rp[n]){var t=rp[n].observers;for(var r in t)e(t[r])&&delete t[r]}};a&&"undefined"!=typeof window&&(window[a]=function(){return e.asyncScriptLoaderTriggerOnScriptLoaded()}),d.onload=function(){var e=rp[n];e&&(e.loaded=!0,f(function(t){return!a&&(t(e),!0)}))},d.onerror=function(){var e=rp[n];e&&(e.errored=!0,f(function(t){return t(e),!0}))},document.body.appendChild(d)},l.componentWillUnmount=function(){var e=this.__scriptURL;if(!0===t.removeOnUnmount)for(var n=document.getElementsByTagName("script"),r=0;r<n.length;r+=1)n[r].src.indexOf(e)>-1&&n[r].parentNode&&n[r].parentNode.removeChild(n[r]);var i=rp[e];i&&(delete i.observers[this.asyncScriptLoaderGetScriptLoaderID()],!0===t.removeOnUnmount&&delete rp[e])},l.render=function(){var e=t.globalName,r=this.props;r.asyncScriptOnLoad;var i=r.forwardedRef,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["asyncScriptOnLoad","forwardedRef"]);return e&&"undefined"!=typeof window&&(o[e]=void 0!==window[e]?window[e]:void 0),o.ref=i,C(n,o)},a}(E),a=o(function(e,t){return C(i,np({},e,{forwardedRef:t}))});return a.displayName="AsyncScriptLoader("+r+")",a.propTypes={asyncScriptOnLoad:Wh.func},tp(a,n)}}(function(){var e=ap(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+op+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+op+"&render=explicit"},{callbackName:op,globalName:"grecaptcha",attributes:ap().nonce?{nonce:ap().nonce}:{}})($h);const sp=lp,cp=o(({onVerify:t,className:r="",error:i,sitekey:o,...a},l)=>{const[s,d]=c(null),u=i||s;return n("div",{className:z("ff-recaptcha-wrapper",r),children:[e(sp,{ref:l,sitekey:o,onChange:e=>{e?(d(null),t(e)):d("Please complete the CAPTCHA")},...a}),u&&e("div",{className:"ff-recaptcha-error",children:e(F,{fontSize:12,children:u})})]})}),dp={margin:6,optionHeight:32,selectInputHeight:38,dropDownWrapperPadding:0},up=({onSelectBlur:r,onSelectOptionSelector:i,dropdownPosition:o,options:s=[],optionZIndex:u=100,inputRef:f,webServiceClick:h=()=>{},containerWidth:p,loadMoreOptions:C,chipRef:m,isWebservice:g=!0,dropDownMessage:v=""})=>{const[y,w]=c(null),[b,E]=c(""),M=d(W),A=M?.currentTheme,x=a(null),[L,k]=c(-1);Y(x,r,[f,m]);const{positionX:H,positionY:S,width:_,fromBottom:V}=o,{margin:O,optionHeight:N,selectInputHeight:T,dropDownWrapperPadding:I}=dp,D=e=>{let t="",n="";return"NLP"===e?(t="NLP",n="ff-nlp"):"STEP_GROUP"===e?(t="SG",n="ff-sg"):"PROGRAM_ELEMENTS"===e?(t="PE",n="ff-pe"):"WORKBENCH_REQUEST"===e?(t="WS",n="ff-ws"):(t="--",n="nlp-default"),{label:t,className:n}},Z=({platform:n,nlpType:r})=>"NLP"===r?e(P,"Web"===n?{name:"web_icon",height:10,width:10}:"Android"===n?{name:"android_icon",height:10,width:10}:"iOS"===n?{name:"ios_icon",height:10,width:10,color:"var(--dotted-border-color)"}:"Generic"===n?{name:"mobile_icon",height:10,width:10}:{name:"common_nlp",height:10,width:10}):"WORKBENCH_REQUEST"===r&&"Webservice"===n?e(P,{name:"web_service_icon",height:8,width:8}):e(t,{});se(["ff-nlp-dropdown-pagination"],{root:document.getElementById("ff-nlp-dropdown-options-wrapper"),rootMargin:"0px",threshold:.1,onIntersect:(e,t)=>{e.isIntersecting&&C&&C()}}),l(()=>{if(L>=0&&L<s.length){const e=s[L];w(e),E("show")}else L>=s.length&&(w(null),E(""),k(-1));const e=e=>{if(s.length)switch(e.key){case"ArrowDown":e.preventDefault(),k(e=>e<s.length-1?e+1:0);break;case"ArrowUp":e.preventDefault(),k(e=>e>0?e-1:s.length-1);break;case"Enter":L>=0&&s[L]&&i(s[L])}};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[s,L]),l(()=>{if(L<0)return;const e=document.getElementById(`ff-nlp-option-${L}`);e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})},[L]),l(()=>{if(!s?.length)return;const e=x.current;if(!e)return;const t=t=>{e.contains(t.target)||(t.stopPropagation(),t.preventDefault())};return document.body.addEventListener("wheel",t,{passive:!1}),document.body.addEventListener("touchmove",t,{passive:!1}),()=>{document.body.removeEventListener("wheel",t),document.body.removeEventListener("touchmove",t)}},[s]);const j=e=>e?.searchName||e?.displayName||e?.desc||e?.name||e?.nlpName||"---";return e("div",{className:"ff-nlp-dropdown-wrapper",children:n("div",{ref:x,style:{...(()=>{let e;return e=G(s)||s.length>0?5*N+2*I:s.length*N+2*I,V>e+O+80?{left:H,top:S,width:_,zIndex:u}:{zIndex:u,left:H,width:_,top:S-T-92-e-O}})(),width:p},className:z("ff-nlp-options-wrapper",A),onMouseLeave:()=>E("hide"),children:[n("div",{className:"ff-nlp-options-wrapper-main",children:[e("div",{className:"ff-nlp-options-primary-wrapper",id:"ff-nlp-dropdown-options-wrapper",children:G(s)?e(F,{textAlign:"center",lineHeight:"32px",as:"p",color:"var(--ff-nlp-text-color)",className:"ff-nlp-no-option",children:G(v)?"No Results Found":v}):n(t,{children:[s.map((t,r)=>e("div",{onMouseEnter:()=>{w(t),E("show")},id:`ff-nlp-option-${r}`,children:e("div",{onMouseEnter:()=>k(r),onClick:()=>i(t),onKeyDown:e=>{"Enter"===e.key&&i(t)},children:n(F,{as:"div",lineHeight:"30px",fontSize:12,className:z("ff-nlp-option",A,{"ff-nlp-option--selected":L===r}),children:[e(K,{title:t.platform,children:e("span",{children:e(F,{className:`nlp-categories ${D(t.nlpType).className}`,fontWeight:"regular",fontSize:8,lineHeight:"32px",children:D(t.nlpType).label})})}),e("span",{children:Z(t)}),j(t)]})})},`ff-nlp-option-${r}`)),e("div",{id:"ff-nlp-dropdown-pagination"})]})}),g&&e("div",{children:e("div",{className:"show"===b?"ff-nlp-web-service-div":"ff-nlp-primary-web-service-div",children:e(Xf,{iconName:"plus_user_icon",label:"Web Service",onClick:()=>{r(),h()}})})})]}),e("div",{className:"show"===b?"ff-nlp-data-show":"ff-nlp-data-hide",children:n("div",{className:"ff-nlp-data-side-menu",children:[y?.videoSrc&&n(F,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:10,children:["Video",e("div",{className:"nlp-details ",children:e("video",{src:y.videoSrc,controls:!0,className:"nlp-video-player",width:"100%",children:"Your browser does not support the video tag."})})]}),n(F,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["NLP Details",e(F,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:j(y)})]}),n(F,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Description",e(F,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:y?.description||"--"})]}),"STEP_GROUP"===y?.nlpType&&e(t,{children:n(F,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Path",e(F,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:y?.path?y?.path:"---"})]})}),e(F,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:"Inputs"}),y?.stepInputs?.length?y.stepInputs.map((t,r)=>{const i=t.type?t?.type?.split(".")?.pop():"--";return e("div",{children:n(F,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Input",r+1,n(F,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:["type: ",i]}),n(F,{className:"nlp-details",fontWeight:"regular",fontSize:12,children:["name: ",t.name||"--"]})]})},r)}):e("div",{className:"nlp-details",children:"--"}),n(F,{className:"nlp-details-header",fontWeight:"semi-bold",fontSize:12,children:["Output",e(F,{className:"nlp-details ",fontWeight:"regular",fontSize:12,children:y?.returnType||"--"})]})]})})]})})},fp=o(({chipOptionList:t,selectedChips:r,optionZIndex:i=0,inputRef:o,ChipsAccordionWidth:s},d)=>{const[f,h]=c([]),[p,C]=c(!1),[m,g]=c({left:0,top:0}),[v,y]=c("down"),w=a(null);b(d,()=>w.current);const E=or(w,p);l(()=>{G(t)||h(t)},[t]);const M=a(null),x=()=>{M.current};l(()=>{x()},[f]),u(()=>{const e=()=>{if(!o?.current)return;const{positionX:e,positionY:t,width:n,fromBottom:r}=E(o);y(r<160?"up":"down"),g({left:e+n,top:t})};e();const t=new ResizeObserver(()=>e());return o?.current&&t.observe(o.current),window.addEventListener("scroll",e,!0),()=>{o?.current&&t.unobserve(o.current),t.disconnect(),window.removeEventListener("scroll",e,!0)}},[E,o]);return l(()=>{const e=()=>{x()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),A(n("div",{className:"ff-chips-accordion",style:{left:m.left,top:m.top,zIndex:i+100,transform:"up"===v?"translateY(calc(-100% + 33px))":"none",width:s,position:"absolute"},ref:w,children:[e("div",{ref:M,className:"ff-chips-row "+(p?"expanded":""),style:{maxHeight:p?"280px":"20px"},children:e("div",{className:"chips-container "+(p?"chips-container-scroll":""),children:f?.map(({name:t,isSelected:n},i)=>e("div",{className:"chip "+(n?"selected-chip":""),onClick:()=>(e=>{const t=f.map((t,n)=>n===e?{...t,isSelected:!t.isSelected}:t);if(h(t),r){const e=t.filter(e=>e.isSelected);r(e)}})(i),children:e(F,{as:"div",className:"chip-text",children:t,fontSize:10,lineHeight:"15px"})},i))})}),e("div",{className:"ff-arrow-icon-container",children:e("div",{className:"ff-icon-wrapper "+(p?"expanded":""),role:"button","aria-expanded":p,children:e(P,{name:"down"===v?"arrows_down_icon":"arrows_top_icon",height:8,width:8,onClick:()=>{C(e=>!e),p&&document.querySelector(".ff-chips-row")?.scrollTo({top:0})}})})})]}),document.body)}),hp=(e,t)=>{switch(t.type){case"FOCUS_INPUT":return{...e,isInputFocused:!0,isIconClick:!0,showOptions:!0};case"BLUR_INPUT":return{...e,isInputFocused:!1,option:t.payload.option,isIconClick:!1,showOptions:!1,dropdownPosition:{positionX:0,positionY:0,width:0,fromBottom:0}};case"UPDATE_DROPDOWN_POSITION":const{positionX:n,positionY:r,width:i,fromBottom:o}=t.payload||{};return{...e,dropdownPosition:{positionX:n,positionY:r,width:i,fromBottom:o}};case"UPDATE_OPTION":return{...e,option:t.payload};case"SHOW_ERROR":return{...e,isInputFocused:!0,isIconClick:!1,showOptions:!1,option:t.payload.option,dropdownPosition:{positionX:0,positionY:0,width:0,fromBottom:0}};default:return e}},pp=({label:t="",leftIcon:r,rightIcon:i,rightIconColor:o,showLabel:s=!0,onHelpIconClick:d=()=>{},aiIconClick:f=()=>{},webServiceClick:h=()=>{},containerWidth:p="",optionsList:C=[],selectedOption:m={displayName:"",projectId:"",nlpType:"",platform:""},onChange:g=()=>{},errorMsg:y="",className:w="",optionZIndex:b=100,disabled:E=!1,borderRadius:M=!0,showBorder:x=!0,required:L=!1,value:k="",onSelect:H=()=>{},chipOptionList:S,selectedChips:_,loadMoreOptions:V=()=>{},isWebservice:O=!0,closeInputOnOutsideClick:N=()=>{},tooltipText:T="Help",ChipsAccordionWidth:I="27.8%",dropDownMessage:D=""})=>{const Z={isInputFocused:!1,isIconClick:!1,showOptions:!1,option:G(m)&&"string"==typeof m?.displayName?m.displayName:"",dropdownPosition:{positionX:0,positionY:0,width:0,fromBottom:0}},[j,R]=v(hp,Z),[B,U]=c(m),[q,W]=c({}),Q=a(!1);l(()=>{const e="string"==typeof m.displayName?m.displayName:String(m.displayName??"");e!==B.displayName&&U({...m,displayName:e})},[m]),l(()=>{k&&ie("FOCUS_INPUT")},[k]);const K=a(null),Y=a(null),X=a(null),{isInputFocused:J,isIconClick:$,showOptions:ee,dropdownPosition:te,option:ne}=j,re=or(K,ee),ie=e=>{E||R("SHOW_ERROR"===e||"BLUR_INPUT"===e?{type:e,payload:{option:"string"==typeof m.displayName?m.displayName:String(m.displayName??"")}}:{type:e})},oe=()=>{if(!ee||!K?.current||E)return;const{positionX:e,positionY:t,width:n,fromBottom:r}=re(K);R({type:"UPDATE_DROPDOWN_POSITION",payload:{positionX:e,positionY:t,width:n,fromBottom:r}})},ae=e=>{const t=window.innerWidth-document.body.clientWidth;document.body.style.paddingRight=e?"":`${t}px`,document.body.style.overflow=e?"":"hidden"};u(()=>{if(E)return;ee&&ae(!ee),oe();const e=()=>oe();return window.addEventListener("resize",e),window.addEventListener("scroll",e),()=>{ae(!0),window.removeEventListener("resize",e),window.removeEventListener("scroll",e)}},[ee]),l(()=>{y&&ie("SHOW_ERROR")},[]),l(()=>{ie("FOCUS_INPUT")},[]);const le=!J&&Boolean(ne);return l(()=>{const e=Y.current;if(!e)return;let t=e.parentElement;for(;t&&t!==document.body;){const e=getComputedStyle(t);if(["scroll","auto"].includes(e.overflowY))break;t=t.parentElement}if(!t)return;const n=t.style.overflow,r=ee||S;return t.style.overflow=r?"hidden":n||"auto",()=>{t.style.overflow=n||"auto"}},[ee,S]),n("section",{className:"main-section",children:[n("div",{className:z(`ff-nlp-input-wrapper ${w}`),children:[n("div",{className:"ff-nlp-input",children:[e("input",{type:"text",className:z("ff-nlp-input-container",{"ff-nlp-input-container--default":!J,"ff-nlp-input-container--active":le,"ff-nlp-input-container--no-label":!s,"ff-nlp-input-container--error":y&&!J&&!Boolean(ne),"ff-nlp-input-container--border-radius":!M,"ff-nlp-input-container--disable":E,"ff-nlp-input-container--no-border":!x}),style:{zIndex:b,paddingLeft:"32px"},onFocus:()=>ie("FOCUS_INPUT"),onChange:e=>{E||g(e)},value:k,disabled:E,autoComplete:"off",spellCheck:"false",ref:Y,autoFocus:!0}),n("div",{className:"ff-nlp-icon-container",children:[e(P,{name:r||"ai_search",className:"ff-nlp-help_icon",width:16,height:16,onClick:f}),e(F,{className:"icon-label",fontSize:10,children:"Search With Ai"})]}),s&&n("div",{className:z("ff-nlp-input-label","ff-nlp-input-label--default",{"ff-nlp-input-label--active":k||Boolean(ne),"ff-nlp-input-label--error":y}),children:[L&&e(F,{color:"var(--$error-light)",className:"ff-nlp-input-label--required",children:"*"}),t]}),n("div",{className:"help-icon-container",onMouseDown:()=>Q.current=!0,style:{zIndex:b},children:[e("span",{className:z("ff-nlp-input-arrow",{"ff-nlp-input-arrow--down":!$,"ff-nlp-input-arrow--no-label":!s}),onMouseEnter:e=>{const t=e.target.getBoundingClientRect();W({top:t.top+window.scrollY-20+"px",left:`${t.left+window.scrollX+.5*t.width}px`,visibility:"visible",opacity:1,transitionDelay:"0s"})},onMouseLeave:()=>W(e=>({...e,visibility:"hidden",opacity:0})),children:e(P,{name:i||"",height:16,width:16,onClick:d,color:o})}),A(e(F,{className:"help-icon-label",fontSize:10,style:q,children:T}),document.body)]}),e("fieldset",{className:z("ff-nlp-input-fieldset",{"ff-nlp-input-fieldset--no-label":!s,"ff-nlp-input-fieldset--default":!J,"ff-nlp-input-fieldset--active":J,"ff-nlp-input-fieldset--option":le,"ff-nlp-input-fieldset--error":y,"ff-nlp-input-fieldset--border-radius":!M,"ff-nlp-input-fieldset--no-border":!x})})]}),y&&e(F,{className:"ff-nlp-input-wrapper-error-text",fontSize:8,color:"var(--error-light)",children:y}),e("div",{ref:K,children:ee&&A(e(up,{onSelectBlur:()=>{E||(Q.current?Q.current=!1:y?ie("SHOW_ERROR"):(ie("BLUR_INPUT"),N()))},onSelectOptionSelector:e=>{H(e)},dropdownPosition:te,options:C,optionZIndex:b,inputRef:Y,webServiceClick:h,containerWidth:p,loadMoreOptions:V,chipRef:X,isWebservice:O,dropDownMessage:D}),document.body)})]}),e("div",{className:"chips-accordion-content",children:S&&S.length>0&&e(fp,{chipOptionList:S,selectedChips:_,optionZIndex:b,ref:X,inputRef:Y,ChipsAccordionWidth:I})})]})},Cp=({items:t,onButtonClick:r,selectedValue:i=null,onChange:o,className:a=""})=>{const[s,d]=c(i);l(()=>{i!==s&&d(i)},[i,s]);return n("div",{className:z("ff-icon-radio-group",a),children:[t.map(t=>e("div",{className:z("ff-icon-radio-button",{selected:s===t.iconName,disabled:t.disabled}),onClick:()=>(e=>{if(e.disabled)return;const t=e.iconName;d(t),o&&o(t),r(e)})(t),children:e(K,{title:t.iconLabel,children:e("div",{className:z("icon-container",{selected:s===t.iconName}),children:e(P,{name:t.iconName,hoverEffect:!1,color:s===t.iconName?"var(--drawer-footer-bg)":"var(--brand-color)"})})})},t.iconName)),e("div",{className:"line-connector"})]})},mp=({width:t="100%",options:r=[],runCount:i=0,className:o="",contentReverse:a=!1,onClick:l=()=>{},modalId:s="",scriptType:c="",readOnly:d=!1})=>{const u={local:"local",browserstack:"browserstack_icon",saucelabs:"sause_lab_icon",lambdatest:"lambda_icon",fireflink:"fireflink_platform_logo",mac:"mac_icon",mac_icon:"mac_icon",android:"android_icon",linux:"linux","google chrome":"chrome_icon","mozilla firefox":"fire_fox","microsoft edge":"edge","internet explorer":"internet_explorer",safari:"safari_icon",opera:"opera",windows:"windows",edge:"edge",firefox:"fire_fox",chrome:"chrome_icon",explorer:"internet_explorer",ios:"mac_icon",comet:"comet_icon"},f="manual"===c.toLowerCase();return n("div",{id:s,style:{width:t},className:z("ff-machine-input-field-wrapper",o,{"cursor-event-none":1!==i&&"Automation"==c}),onClick:()=>{d||l()},children:[!f&&n(F,{as:"span",color:"var(--ff-machine-input-field-text-color)",fontSize:8,textAlign:"center",className:"ff-machine-input-label",children:["Run ",i]}),e("div",{className:z("ff-machine-input-field",{"ff-machine-input-field-reverse":a}),children:r.map(({label:t,type:r,version:i})=>n("div",{className:z("ff-machine-icon-text-wrapper",{"ff-machine-icon-text-wrapper-reverse":a}),children:[e(P,{name:u[r?.toLowerCase()]||"",className:"ff-machine-icon"}),e(K,{title:t,children:e(F,{className:z("ff-machine-text",{"ff-machine-text-reverse":a}),color:"var(--ff-machine-input-field-text-color)",children:oe(t,10)?ie(t,10):t})}),f&&!G(i)&&e(K,{title:i,children:n(F,{className:z("ff-machine-text",{"ff-machine-text-reverse":a}),color:"var(--ff-machine-input-field-text-color)",children:[" -"," ",oe(i??"",10)?ie(i??"",10):i]})})]},r))})]})};mp.displayName="MachineInputField";const gp=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>(0|("x"===e?16*Math.random():16*Math.random()&3|8)).toString(16)),vp=({datSetToolTip:{globalVariableSetName:r="",peVariableSetName:i="",testDataSetName:o=""}})=>{const a={"Project Environment Set":i,"Global Variable Set":r,"Test Data Set":o};return e(t,{children:Object.entries(a).map(([t,r],i)=>e("div",{className:"ff-dataSetList-container",children:n("div",{children:[e(F,{as:"div",fontSize:10,lineHeight:"15px",color:"var(--details-page-value-color)",className:"ff-dataSetList-items",children:t}),e(F,{as:"div",lineHeight:"18px",color:"var(--base-bg-color)",children:r})]})},i))})},yp=e=>"object"==typeof e&&0===Object.keys(e).length,wp=s(null),bp=({machineInstances:r,rowIndex:i,machineColumnCount:o,nextRowMachineInstance:a,previousRowMachineInstance:l,onAddBrowser:s,onDeleteBrowser:c,onAddRunBrowser:u,onUpdateDataSetList:f,onUpdateAddBrowserInstance:h,addInstanceLabel:p="",scriptType:C="",projectType:m="",readOnly:g,maxRunCount:v})=>{const y=i%2==0,w=G(r[o-1]),b=d(wp),{testDataSetMap:E={},globalVariableMap:M={},projectVariableMap:A={}}=b||{},x=(e,t)=>e&&t&&"machineInstanceId"in e&&"machineInstanceId"in t&&e.machineInstanceId===t.machineInstanceId?"dashed":"solid",L=e=>r.length-1!==e&&o>1,k=(e="",t)=>{const{executionEnv:n,browserName:r,browserVersion:i,machineInfo:{osVersion:o,iconName:a,osName:l,hostName:s},deviceInfo:c,fireCloudProjectName:d=""}=t,u=[{label:"FireFlink Device Farm"===n?d:n,type:((e="")=>"local"===e.toLowerCase()?"local":e.toLowerCase().includes("browserstack")?"Browserstack":e.toLowerCase().includes("lambdatest")?"LambdaTest":e.toLowerCase().includes("saucelabs")?"SauceLabs":e.toLowerCase().includes("fireflink device farm")?"fireflink":"")(n)}];"manual"===C.toLowerCase()&&u.push({label:s||"",type:"local"===n?.toLowerCase()?"local":""});const f=[{label:o,type:a||l},{label:i,type:r}],h=c?.reduce((e,t)=>(t&&e.push({label:t?.name,type:"manual"===C.toLowerCase()?"android":t?.platform,version:"manual"===C?.toLowerCase()?t?.version:""}),e),[]);switch(e.toLowerCase()){case"web":case"web service":return[...u,...f];case"web & mobile":case"ms dynamics":case"salesforce":return[...u,...f,...h];case"mobile":return[...u,...h];default:return[]}},H="manual"!==C.toLowerCase(),S=e=>!G(e)||(yp(e)||void 0!==a);return n("div",{className:z({"ff-connecting-branch-grid":y,"ff-connecting-branch-grid-reverse":!y}),style:{gridTemplateColumns:1===o?"24px minmax(min-content, auto) 24px":`24px minmax(min-content, auto) repeat(${o-1}, 40px minmax(min-content, auto)) 24px`},children:[n("div",{className:"ff-connecting-branch-start-wrapper",children:[e("div",{className:z({"ff-connecting-branch-arrow":y,"ff-connecting-branch-arrow-reverse":!y})}),e("div",{className:z({"ff-connecting-branch-container":y,"ff-connecting-branch-container-reverse":!y}),style:{border:`1px ${x(r[0],l)} var(--ff-connecting-branch-color)`,borderTop:"none",borderLeft:`${!y&&"none"}`,borderRight:`${y&&"none"}`}})]}),r?.map((i,o)=>{const{runCount:a=("runCount"in i?i.runCount:0),numberOfRuns:l=0,machineInstanceId:d="",peVariableSetId:w="",globalVariableSetId:b="",testDataSetId:_="",testDataSetName:V="",peVariableSetName:O="",globalVariableSetName:N=""}=i;return n(t,{children:[G(i)?!g&&e("div",{className:"ff-connecting-branch-browser-button",children:e(U,{id:`ff-sequential-branch-add-${d}`,variant:"secondary",label:p,onClick:()=>{g||s(`ff-sequential-branch-add-${d}`)}})}):n("div",{children:[n("div",{className:"ff-connecting-branch-input-point-wrapper",children:[S(r[o+1])&&e("div",{className:z({"ff-connecting-branch-point":y,"ff-connecting-branch-point-reverse":!y})}),e(mp,{runCount:a,options:k(m,i),contentReverse:!y,modalId:`${d}-runCount-${a-1}`,onClick:()=>1==a||"Automation"!==C?h(`${d}-runCount-0`,i):null,scriptType:C,readOnly:g},gp())]}),n("div",{className:z({"ff-connecting-branch-datalist":y,"ff-connecting-branch-datalist-reverse":!y}),children:[H&&n(t,{children:[e("div",{id:`ff-sequential-branch-dataset-${d}-${a}`,className:"ff-dataset-list-branch",onClick:()=>{g||f(`ff-sequential-branch-dataset-${d}-${a}`,{peVariableSetId:w,globalVariableSetId:b,testDataSetId:_,testDataSetName:V,globalVariableSetName:N,peVariableSetName:O},!0,l,d)},children:n(K,{placement:"bottom",title:e(t,{children:e(vp,{datSetToolTip:{peVariableSetName:A[w]||"",globalVariableSetName:M[b]||"",testDataSetName:E[_]||""}})}),style:{display:"flex",alignItems:"center"},children:[e(P,{name:"datalist_icon",className:"ff-connecting-icon",hoverEffect:!0}),e(F,{className:"ff-connecting-text",color:"var(--ff-connecting-branch-color)",children:"Data Set List"})]})}),!g&&e(t,{children:e(K,{placement:"bottom",title:l>=v?`Maximum ${v} runs are allowed.`:"",children:n("div",{className:"ff-environment-run-container",onClick:l>=v?void 0:()=>u(d),children:[e(P,{name:"plus_icon",className:"ff-connecting-run-icon",color:"var(--ff-connecting-branch-color)",hoverEffect:!0,disabled:l>=v}),e(F,{className:"ff-connecting-run-text",color:"var(--ff-connecting-branch-color)",style:{opacity:l>=v?.5:1},children:"Run"})]})})})]}),!g&&e(K,{title:"Delete",children:e(P,{name:"delete",className:"ff-connecting-delete-icon",onClick:()=>c(d,a),color:"var(--ff-connecting-branch-delete-color)",hoverEffect:!0})})]})]}),L(o)&&e("div",{className:"ff-connecting-branch-middle-arrow",style:{borderTop:`1px ${x(i,r[o+1])} var(--ff-connecting-branch-color)`},children:e("div",{className:z({"ff-connecting-branch-arrow":y,"ff-connecting-branch-arrow-reverse":!y})})})]},gp())}),(g?!w&&!G(a):!w)&&e("div",{className:z({"ff-connecting-branch-end-arrow":y,"ff-connecting-branch-end-arrow-reverse":!y}),style:{border:`1px ${x(r[o-1],a)} var(--ff-connecting-branch-color)`,borderBottom:"none",borderLeft:`${y&&"none"}`,borderRight:`${!y&&"none"}`}})]})},Ep=({machineBranchInstances:n,machineColumnCount:r,machineColumnWidth:i,onAddBrowser:o,onDeleteBrowser:a,onAddRunBrowser:s,onUpdateDataSetList:d,onUpdateAddBrowserInstance:u,addInstanceLabel:f="",scriptType:h="",projectType:p="Web",readOnly:C=!1,maxRunCount:m})=>{const[g,v]=c(n);l(()=>{v(n)},[n]);const y=((e,t)=>{const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n})(g,r);return e("div",{className:"ff-connecting-branch-grid-wrapper",children:y.map((n,l)=>e(t,{children:e(bp,{machineInstances:n,rowIndex:l,machineColumnCount:r,machineColumnWidth:i,onAddBrowser:o,onDeleteBrowser:a,onAddRunBrowser:s,nextRowMachineInstance:y[l+1]?.[0],previousRowMachineInstance:y[l-1]?.[r-1],onUpdateDataSetList:d,onUpdateAddBrowserInstance:u,addInstanceLabel:f,scriptType:h,projectType:p,readOnly:C,maxRunCount:m})},gp()))})},Mp=({machineInstances:r=[],machineColumnWidth:i=180,machineColumnCount:o=1,selectedMachine:s={},machineOptionsList:d=[],onHandleSelect:u=()=>{},onAddBrowserInstance:f=()=>{},onAddRunBrowserInstance:h=()=>{},onDeleteBrowserInstance:p=()=>{},onUpdateDataSetList:C=()=>{},onDeleteMachineInstance:m=()=>{},dataSetValues:g={testDataSetId:"",globalVariableSetId:"",peVariableSetId:"",globalVariableSetName:"",peVariableSetName:"",testDataSetName:""},onUpdateAddBrowserInstance:v=()=>{},addInstanceLabel:y="Add Environment",placeholder:w="Choose Machine",scriptType:b="Automation",projectType:E="Web",readOnly:M=!1,zIndex:A=99999,maxRunCount:x=35,environmentVariableMaps:L,isRequired:k=!1})=>{const[H,S]=c({}),_=a(null),V=Math.max(o,1),O=Math.max(i,180),[N,T]=c([]),I=G(r);let D=G(s.value?.clientId);"Manual"===b&&(D=G(s.value));l(()=>{S(s)},[s]),l(()=>{T(M?r:[...r,{}])},[r]);const Z="manual"!==b.toLowerCase(),j=(R=g,B="Id",Object.fromEntries(Object.entries(R).filter(([e])=>!e.includes(B))));var R,B;const q=M&&!I||!M&&I||!M&&!I;return e(wp.Provider,{value:L,children:n("div",{className:"ff-sequential-connecting-branch-wrapper",children:[n("div",{className:"ff-connecting-select-branch-wrapper",children:[n("div",{className:"ff-select-branch-wrapper",children:[e(ar,{onChange:u,optionsList:d,label:w,required:k,showLabel:!0,className:"ff-sequential-select-branch",width:"240px",selectedOption:H,valueAccessor:"name",optionsRequired:!M,disableInput:M,optionZIndex:A}),!D&&n("div",{className:z({"ff-select-branch-arrow":I,"ff-select-branch-arrow-down":!I}),children:[q&&e("div",{className:"ff-select-branch-point"}),n("div",{className:"ff-select-branch-arrow",children:[!M&&e("div",{className:"ff-branch-arrow-wrapper",children:I&&e("div",{className:"ff-branch-arrow"})}),I&&!M&&e(t,{children:e(U,{variant:"tertiary",label:"Manual"===b?"+ Machine":"+ Environment",size:"small",className:"branch-button",ref:_,onClick:()=>f("ff-sequential-branch-button"),id:"ff-sequential-branch-button"})})]})]})]}),!D&&n("div",{className:"ff-select-scope-datalist",children:[e("div",{className:"ff-scope-wrapper",children:e(F,{as:"span",color:((e="")=>e.toLowerCase().includes("inactive")?"var(--ff-machine-inactive-status-color)":e.toLowerCase().includes("running")?"var(--ff-machine-running-status-color)":e.toLowerCase().includes("active")?"var(--ff-machine-active-status-color)":"var(--ff-machine-active-status-color))")(s.value?.status),className:"ff-scope-text",children:s.value?.status})}),n("div",{className:"ff-datalist-wrapper",children:[Z&&e("div",{id:"ff-sequential-machine-datalist",onClick:()=>{M||C("ff-sequential-machine-datalist",g)},children:n(K,{placement:"bottom",title:e("div",{children:e(vp,{datSetToolTip:j})}),style:{display:"flex",alignItems:"center"},children:[e(P,{name:"datalist_icon",className:"ff-dataset-icon",hoverEffect:!0}),e(F,{as:"span",color:"var(--ff-connecting-branch-color)",className:"ff-datalist-text",children:"Data Set List"})]})}),!M&&e(K,{title:"Delete",placement:"bottom",children:e(P,{name:"delete",className:"ff-run-delete-icon",color:"var(--ff-connecting-branch-delete-color)",onClick:m,hoverEffect:!0})})]})]})]}),e("div",{className:"ff-sequential-branches-wrapper",children:!I&&e(Ep,{machineBranchInstances:N,machineColumnCount:V,machineColumnWidth:O,onAddBrowser:f,onDeleteBrowser:p,onAddRunBrowser:h,onUpdateDataSetList:C,onUpdateAddBrowserInstance:v,addInstanceLabel:y,scriptType:b,projectType:E,readOnly:M,maxRunCount:x})})]})})},Ap=({label:t,selectedFiles:r,onFilesChange:i,disabled:o=!1,buttonDisplayType:l="attachment",iconName:s="plus_icon",maxFileSizeMB:d,maxFiles:u,buttonLabel:f="Select Files",showSelectedFiles:h=!0,buttonVariant:p="primary",deleteButton:C=!0,multiple:m=!0,addAttachmentButton:g=!0,isInfoIconRequired:v=!0,onFileListClick:y,types:w=[],attachmentInfoTooltip:b="",selectedFileMessage:E="This file is already selected",required:M=!1,errorMessage:A,truncateMaxLimit:x=1/0,onClickAttachmentButton:L=()=>{}})=>{const k=a(null),[H,S]=c(""),_={image:["image/jpeg","image/png","image/svg+xml"],video:["video/mp4","video/mpeg","video/quicktime"],audio:["audio/mpeg","audio/wav","audio/ogg"],document:["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],archive:["application/zip","application/x-rar-compressed","application/x-7z-compressed"],spreadsheet:["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],excel:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]},V=w.flatMap(e=>_[e]||[]).join(","),O=()=>{L(),S(""),k.current?.click()};return n("div",{children:[v&&n("div",{className:"ff-label-icon",children:[e(F,{fontWeight:"semi-bold",lineHeight:"18px",as:"span",required:M,children:t}),e(K,{title:b||(()=>{if(0===w.length)return"Any files are allowed.";const t=w.flatMap(e=>_[e]||[]).map(e=>e.split("/")[1]),r=t.pop();return n("span",{children:[t.join(", ")," and ",r," files are allowed.",e("br",{}),"Max size: ",d," MB"]})})(),placement:"bottom-start",children:e(P,{name:"info",hoverEffect:!0})})]}),(!h||0===r.length)&&("attachment"===l?e(U,{variant:p,label:f,size:"medium",onClick:O,disabled:o}):"icon"===l?e(Xf,{label:f,iconName:s,onClick:O,isDisable:o}):null),e("input",{type:"file",ref:k,className:"ff-input-field",onChange:()=>{if(S(""),k.current?.files){const e=Array.from(k.current.files);if(e.length>5)return S("Maximum file(s) can be uploaded: 5"),void(k.current.value="");const t=e.filter(e=>!r.some(t=>t.name===e.name));if(0===t.length)return S(E),void(k.current.value="");if("number"==typeof u&&r.length+t.length>u)return S(`You can only select up to ${u} files.`),void(k.current.value="");if("number"==typeof d){const e=1024*d*1024;if(t.filter(t=>t.size>e).length>0)return S(`Maximum file(s) size allowed: ${d} MB.`),void(k.current.value="")}i([...r,...t],t,"ADD"),k.current.value=""}},multiple:m,accept:V,required:M}),H&&e(Yt,{isOpen:!!H,variant:"info",toastTitle:"Info",toastMessage:H,zIndex:1e7}),h&&r.map((t,o)=>n("div",{className:"ff-attachment-files",onClick:y,children:[e(F,{color:"var(--brand-color)",children:e(sn,{title:t.name,width:x})}),C&&e(K,{title:"Delete",children:e(P,{name:"delete",hoverEffect:!0,color:"var(--ff-delete-button-attachment)",variant:"danger",onClick:()=>(e=>{const t=[...r],n=t.splice(e,1);i(t,n,"DELETE")})(o)})}),o===r.length-1&&g&&e(K,{title:""+("number"==typeof u&&r.length>=u?`Maximum files can be uploaded: ${u}`:"Add File"),children:e(P,{name:"add_file",hoverEffect:!0,onClick:O,disabled:"number"==typeof u&&!(r.length<u)})})]},t.name)),M&&e(F,{children:A,fontSize:10,className:"error-text"})]})},xp=({selected:t="text",firstButton:r="File",secondButton:i="File",handleClick:o})=>n("div",{className:"toggle-container",children:[e("button",{className:"toggle-button "+(t===r?"active":""),onClick:()=>o(r),children:r}),e("button",{className:"toggle-button "+(t===i?"active":""),onClick:()=>o(i),children:i})]}),Lp=({variant:t="small",iconName:n,iconColor:r="var(--avatar-icon-color)",customAvatarSize:i,customIconSize:o,backgroundColor:a,label:l,labelFontSize:s})=>{const c=l?.slice(0,2);return e("div",{className:`ff-avatar ff-avatar--${t}`,style:{height:`${i}px`,width:`${i}px`,backgroundColor:a},children:l?e("span",{className:"ff-avatar-label",style:{fontSize:s||"14px",color:r},children:c}):e(P,{name:n,height:o,width:o,color:r})})},kp=({logo:t,overlay:r=!1})=>e("div",{className:`overlay-loader ${r&&"overlay"}`,children:n("div",{className:"loader-container ",children:[t&&e(t,{}),e("div",{className:"line_loader"})]})}),Hp=({contentHeader:t,data:r,maxHeight:i=""})=>{const o=`scrollable-${(e=>{const t=parseInt(e);if(isNaN(t))return"default";const n=100*Math.round(t/100);return Math.min(Math.max(100,n),1e3)})(i)}`;return n("div",{className:"ff-content-card-container",children:[e("div",{className:"ff-content-card-nav",children:e(F,{as:"div",fontWeight:"semi-bold",lineHeight:"35px",children:t})}),e("div",{className:`ff-content-card-body scrollable ${o}`,children:Object.entries(r).map(([t,r],i)=>n("div",{className:"ff-content-card-row",children:[n(F,{fontWeight:"semi-bold",children:[t,":"]}),e(F,{className:"ff-content-card-value",children:r})]},i+t))})]})},Sp=({label:t,placeholder:r,text:i,showText:o=!0,highlightText:s,customError:d,confirmIcon:u,customErrorCondition:f,cancelIcon:h,variant:p="textField",onInputChange:C,dropdownData:m=[],className:g,height:v,isOpen:y=!1,confirmAction:w,onClick:b,tooltip:E,onDoubleClick:M,disableEditing:A=!1})=>{const[x,L]=c(y??!1),[k,H]=c(i??""),[S,_]=c(m[0]?.value??""),[V,O]=c(""),[z,N]=c(!0),[T,I]=c(!1),D=!(!V||!x),Z=a(null),j=a(null),[R,B]=c(null),U=q("Escape");l(()=>()=>{R&&clearTimeout(R)},[R]);const W=()=>{let e="";0===k.length||0===k.trim().length?e="Please type any text.":k.length<3?e="Please enter at least 3 characters.":f&&(e=d??"Invalid input."),e?O(e):(L(!1),O(""),w&&w(k,S)),u?.onClick?.()},Q=()=>{H(i??""),_(m[0]?.value??""),L(!1),O(""),I(!1),h?.onClick?.()},G=e=>{const t=e.target.value;H(t),N(!1),0===t.length||0===t.trim().length?O("Input is required"):t.length<3?O("Input cannot be less than 3 characters"):t.length>250?O("Input cannot be more than 250 characters"):Ve.test(t)?O("Space is not allowed at starting and at the end"):O(f?d??"Invalid input.":""),I(t!==i),C&&C(t)},Y=e=>{if(Z.current&&!Z.current.contains(e.target)&&j.current!==e.target){const e=((e,t)=>e===t?"No changes were made.":e?e.length<3?"Please enter at least 3 characters.":"":"Text is required")(k,i??"");e&&x?O(e):(L(!1),O(""))}};return l(()=>(document.addEventListener("click",Y),()=>{document.removeEventListener("click",Y)}),[k]),U(Q),ce([{key:"Enter",action:()=>{W()}}],Z),n("div",{className:"ff-label-edit-text-field",ref:Z,children:[x?n("div",{className:"ff-label-text-field",children:["textFieldWithDropdown"===p?n("div",{className:"ff-label-text-field-with-dropdown "+(x?"open":""),style:{height:v},children:[e(nn,{name:"input",type:"text",label:t||"",disabled:!1,error:D,placeholder:r||"",value:k,onChange:G,className:`${g} \n \n ${T?"modified":""}`}),e(ar,{label:"",optionsList:m,selectedOption:{value:S,label:S},onChange:e=>_(e.value)})]}):e("div",{className:"ff-label-text-field-without-dropdown",children:e(nn,{name:"input",type:"text",label:t||"",disabled:!1,error:D,placeholder:r||"",value:k,onChange:G,className:`${g} \n \n ${T?"modified":""}`})}),n("div",{className:"ff-icon-container",children:[u&&e(K,{title:"Confirm",placement:"bottom",children:e(P,{color:"var(--label-edit-confirm-icon)",height:20,width:20,name:u.name,disabled:z,className:""+(z?"disabled-confirm-icon":"confirm-icon"),onClick:W})}),h&&e(K,{title:"Cancel",placement:"bottom",children:e(P,{color:"var(--label-edit-cancel-icon)",height:12,width:20,name:h.name,className:"cancel-icon",onClick:Q,ref:j})})]})]}):e(K,{title:E?.tooltipTitle?E?.tooltipTitle:"",placement:"bottom",children:o&&e("span",{className:"display-text",onDoubleClick:()=>{A||(R&&(clearTimeout(R),B(null)),M&&M(),L(!0),O(""))},role:"button",onClick:()=>{if(A)return;R&&(clearTimeout(R),B(null));const e=window.setTimeout(()=>{b&&b(),B(null)},1e3);B(e)},children:e(J,{text:k,highlight:s})})}),V&&x&&e(F,{as:"p",fontSize:8,className:"error-text",children:V})]})},_p=e=>e?e.charAt(0)?.toUpperCase()+e?.slice(1)?.toLowerCase():"",Vp=({label:t,text:r,highlightText:i,customError:o,customErrorCondition:l=!1,confirmIcon:s,cancelIcon:d,editIcon:u,dropdownData:f=[],isOpen:h=!1,confirmAction:p,onClick:C,nameTooltipTitle:m})=>{const[g,v]=c(h??!1),[y,w]=c(r),[b,E]=c(!0),[M,A]=c(f[0]?.value??""),[x,L]=c(""),[k,H]=c(!1),S=!(!x||!g),_=a(null),V=a(null),O=()=>{const e=((e,t,n,r)=>e===t?"No changes were made.":e?e.length<3?"Please enter at least 3 characters.":r?n??"":"":"Text is required")(y,r,o,l);e&&g?L(e):(v(!1),L(""),p&&p(y,M))},z=()=>{w(r),A(f[0]?.value??""),v(!1),L(""),H(!1)};function N(e){"Enter"===e&&O(),"Escape"===e&&z()}return ce([{key:"Enter",action:()=>N("Enter")},{key:"Escape",action:()=>N("Escape")}],_),n("div",{className:"ff-label-edit-text-field",ref:_,children:[n("div",g?{className:"ff-label-text-field",children:[e("div",{className:"ff-label-text-field-without-dropdown",children:e(nn,{name:"input",label:t||"",disabled:!1,error:S,placeholder:"Enter your name",value:y,onChange:e=>{w(e.target.value),H(!0),L(""),E(!1)},className:"\n \n "+(k?"modified":""),type:"text"})}),n("div",{className:"ff-icon-container",children:[s&&e(K,{title:"confirm",placement:"bottom",children:e(P,{color:s?.color??"var(--default-confirm-icon-color)",height:s?.height??20,disabled:b,width:s?.width??20,name:s?.name??"default-confirm-icon",className:`${s?.className??"default-confirm-class"} ${b?"disabled-confirm-icon":"confirm-icon"}`,onClick:O})}),d&&e(K,{title:"cancel",placement:"bottom",children:e(P,{color:d?.color??"var(--label-edit-cancel-icon)",height:d?.height??12,width:d?.width??20,name:d?.name??"default-cancel-icon",className:d?.className??"cancel-icon",onClick:z,ref:V})})]})]}:{className:"display-text-container",children:[m?e(K,{title:m,children:e("span",{className:"display-text",onClick:C,children:e(J,{text:y,highlight:i})})}):e("span",{className:"display-text",onClick:C,children:e(J,{text:y,highlight:i})}),e(K,{title:_p(u?.name??"Edit"),children:e(P,{color:u?.color??"var(--label-edit-cancel-icon)",height:u?.height??20,width:u?.width??20,name:u?.name??"edit",className:u?.className??"edit-icon",onClick:()=>{v(!0),L("")}})})]}),x&&g&&e(F,{as:"p",fontSize:8,className:"error-text",children:x})]})},Op="SET_DATA",zp="SET_CREATE_FORMULA_PARSER",Np="SELECT_ENTIRE_ROW",Tp="SELECT_ENTIRE_COLUMN",Ip="SELECT_ENTIRE_WORKSHEET",Dp="SET_SELECTION",Zp="SELECT",jp="ACTIVATE",Rp="SET_CELL_DATA",Bp="SET_CELL_DIMENSIONS",Pp="COPY",Fp="CUT",Up="PASTE",qp="EDIT",Wp="VIEW",Qp="BLUR",Gp="KEY_PRESS",Kp="KEY_DOWN",Yp="DRAG_START",Xp="DRAG_END",Jp="COMMIT",$p="BOLD",eC="ITALIC",tC="UNDERLINE_TYPE",nC="FONT_FAMILY",rC="FONT_SIZE",iC="TEXT_ALIGN",oC="BORDER_TYPE",aC="COLOR",lC="BACKGROUND_COLOR",sC="FORMATE_PAINTER",cC="ADD_ROW_TOP",dC="ADD_ROW_BOTTOM",uC="ADD_COLUMN_LEFT",fC="ADD_COLUMN_RIGHT",hC="DELETE_ROW",pC="DELETE_COLUMN",CC="SET_ROW_HEIGHT",mC="SET_COLUMN_POSITION",gC="SET_AUTO_FILL",vC="UPDATE_COLUMN_DIMENSIONS",yC="SET_EDITABLE",wC="ON_MOUSE_UP";function bC(e){return{type:wC,payload:{point:e}}}function EC(e){return{type:yC,payload:{editable:e}}}function MC(e,t){return{type:CC,payload:{row:e,height:t}}}function AC(e,t){return{type:mC,payload:{column:e,width:t}}}function xC(e){return{type:$p,payload:{data:e}}}function LC(e){return{type:eC,payload:{data:e}}}function kC(e,t,n){return{type:oC,payload:{data:e,value:t,color:n}}}function HC(e){return{type:tC,payload:{data:e}}}function SC(e,t){return{type:rC,payload:{data:e,value:t}}}function _C(e,t){return{type:nC,payload:{data:e,value:t}}}function VC(e,t){return{type:iC,payload:{data:e,value:t}}}function OC(e,t){return{type:aC,payload:{data:e,value:t}}}function zC(e,t){return{type:lC,payload:{data:e,value:t}}}function NC(e){return{type:sC,payload:{data:e}}}function TC(e){return{type:cC,row:e}}function IC(e){return{type:dC,row:e}}function DC(e,t){return{type:uC,columnWidth:e,column:t}}function ZC(e,t){return{type:fC,columnWidth:e,column:t}}function jC(e){return{type:hC,row:e}}function RC(e){return{type:pC,column:e}}function BC(e){return{type:Gp,payload:{event:e}}}function PC(e){return{type:Op,payload:{data:e}}}function FC(e){return{type:zp,payload:{createFormulaParser:e}}}function UC(e){return{type:Dp,payload:{selection:e}}}function qC(e){return{type:jp,payload:{point:e}}}function WC(e,t){return{type:Rp,payload:{active:e,data:t}}}function QC(e,t){return{type:Bp,payload:{point:e,dimensions:t}}}function GC(e){return{type:Up,payload:{data:e}}}function KC(e){return{type:Kp,payload:{event:e}}}function YC(){return{type:Yp}}function XC(){return{type:Xp}}function JC(){return{type:Pp}}function $C(){return{type:Fp}}function em(){return{type:Qp}}function tm(e,t){const n=t[e.row];if(void 0!==n)return n[e.column]}function nm(e,t,n){const r=[...n],i=[...n[0]??[]];i.length<=e.column&&(i.length=e.column+1),r[0]=i;const o=[...n[e.row]??[]];return o[e.column]=t,r[e.row]=o,r}function rm(e,t,n){let r=n[0];r||(r=[],n[0]=r);let i=n[e.row];i||(i=[],n[e.row]=i),r.length<=e.column&&(r.length=e.column+1),i[e.column]=t}const im={value:"",inputType:{type:"text"},readOnly:!1,style:{color:"#000000",backgroundColor:"#ffffff",borderColor:"#c9c9c9",textDecoration:"normal",borderRight:"1px solid var(--excel-header-border)",borderLeft:"1px solid var(--excel-header-border)",borderTop:"1px solid var(--excel-header-border)",borderBottom:"1px solid var(--excel-header-border)",fontSize:""+(om=9,1.33*om+"px"),fontWeight:"normal",fontStyle:"normal",fontFamily:"Poppins",textAlign:"left"}};var om;function am(e,t){if(!sm(e,t))return t;const n=[...t],r=t[e.row];if(r){const t=[...r];t[e.column]=im,n[e.row]=t}return n}function*lm(e){for(const[t,n]of e.entries())for(const[e,r]of n.entries()){const n={row:t,column:e};yield[n,r]}}function sm(e,t){const n=t[0];return!!n&&(e.row>=0&&e.column>=0&&Number.isInteger(e.row)&&Number.isInteger(e.column)&&e.column<n.length&&e.row<t.length)}function cm(e){return{columns:um(e),rows:dm(e)}}function dm(e){return e.length}function um(e){const t=e[0];return t?t.length:0}function fm(e){const t=cm(e);return{row:t.rows-1,column:t.columns-1}}class hm{start;end;constructor(e,t){this.start={row:Math.min(e.row,t.row),column:Math.min(e.column,t.column)},this.end={row:Math.max(e.row,t.row),column:Math.max(e.column,t.column)}}*[Symbol.iterator](){for(let e=this.start.row;e<=this.end.row;e++)for(let t=this.start.column;t<=this.end.column;t++)yield{row:e,column:t}}size(){return(this.end.row+1-this.start.row)*(this.end.column+1-this.start.column)}has(e){return e.row>=this.start.row&&e.column>=this.start.column&&e.row<=this.end.row&&e.column<=this.end.column}mask(e){return new hm({row:e.start.row>this.start.row?e.start.row:this.start.row,column:e.start.column>this.start.column?e.start.column:this.start.column},{row:e.end.row<this.end.row?e.end.row:this.end.row,column:e.end.column<this.end.column?e.end.column:this.end.column})}equals(e){return this.start.row===e.start.row&&this.start.column===e.start.column&&this.end.row===e.end.row&&this.end.column===e.end.column}}const pm={row:0,column:0};class Cm{}class mm extends Cm{toRange(e){return null}normalizeTo(e){return this}hasEntireRow(){return!1}hasEntireColumn(){return!1}size(){return 0}has(){return!1}equals(e){return e instanceof mm}}class gm extends Cm{range;constructor(e){super(),this.range=e}toRange(e){return this.range}normalizeTo(e){const t=Mm(e);return new gm(this.range.mask(t))}hasEntireRow(){return!1}hasEntireColumn(){return!1}size(e){const t=this.toRange(e);return t?t.size():0}has(e,t){const n=this.toRange(e);return null!==n&&n.has(t)}equals(e){return e instanceof gm&&this.range.equals(e.range)}}class vm extends Cm{}class ym extends vm{toRange(e){return Mm(e)}normalizeTo(){return this}hasEntireColumn(){return!0}hasEntireRow(){return!0}size(e){return um(e)*dm(e)}has(){return!0}equals(e){return e instanceof ym}}class wm extends vm{start;end;constructor(e,t){if(!Am(e))throw new xm("start");if(!Am(t))throw new xm("end");super(),this.start=Math.min(e,t),this.end=Math.max(e,t)}equals(e){return e instanceof wm&&this.constructor===e.constructor&&this.start===e.start&&this.end===e.end}}class bm extends wm{toRange(e){const t=fm(e);return new hm({row:this.start,column:0},{row:this.end,column:t.column})}normalizeTo(e){const t=dm(e);return new bm(Math.max(this.start,0),Math.min(this.end,t-1))}hasEntireRow(e){return e>=this.start&&e<=this.end}hasEntireColumn(){return!1}size(e){return(this.end-this.start+1)*um(e)}has(e,t){return t.row>=this.start&&t.row<=this.end}}class Em extends wm{toRange(e){const t=fm(e);return new hm({row:0,column:this.start},{row:t.row,column:this.end})}normalizeTo(e){const t=um(e);return new Em(Math.max(this.start,0),Math.min(this.end,t-1))}hasEntireRow(){return!1}hasEntireColumn(e){return e>=this.start&&e<=this.end}size(e){return(this.end-this.start+1)*dm(e)}has(e,t){return t.column>=this.start&&t.column<=this.end}}function Mm(e){const t=fm(e);return new hm(pm,t)}function Am(e){return Number.isInteger(e)&&e>=0}class xm extends Error{constructor(e){super(`${e} is not a valid index. It must be 0 or a positive integer`)}}const Lm="text/plain";function km(e,t=0,n=1){const r=[];if(-1===Math.sign(e-t)){for(let i=t;i>e;i-=n)r.push(i);return r}for(let i=t;i<e;i+=n)r.push(i);return r}function Hm(e,t){return Boolean(e&&(r=e,(n=t).column===r.column&&n.row===r.row));var n,r}function Sm(e){return{width:e.offsetWidth,height:e.offsetHeight,left:e.offsetLeft,top:e.offsetTop}}function _m(e){return Object.keys(e).map(e=>Number(e)).sort((e,t)=>e-t)}function Vm(e,t,n){const r={},i=_m(e);let o=0,a=!1;for(let l=0;l<i.length;l++){if(l===t){const e=r[l-1],t=e?e.left+e.width:0;r[l]={left:t,width:n},o=n,a=!0}const s=i[l];if(void 0===s)continue;const c=e[s];if(!c)continue;const d=a?l+1:l,u=a?c.left+o:c.left;r[d]={...c,left:u}}if(!a){const e=i.length>0?i[i.length-1]:void 0,o=void 0!==e?r[e]:void 0,a=o?o.left+o.width:0;r[t]={left:a,width:n}}return r}function Om(e,t,n){const r={},i=_m(e);let o=0,a=!1;for(let l=0;l<i.length;l++){if(l===t){const e=r[l-1],t=e?e.top+e.height:0;r[l]={top:t,height:n},o=n,a=!0}const s=i[l];if(void 0===s)continue;const c=e[s];if(!c)continue;const d=a?l+1:l,u=a?c.top+o:c.top;r[d]={...c,top:u}}if(!a){const e=i.length>0?i[i.length-1]:void 0,o=void 0!==e?r[e]:void 0,a=o?o.top+o.height:0;r[t]={top:a,height:n}}return r}function zm(e,t){const n={},r=_m(e);let i=0;for(let o=0,a=0;o<r.length;o++){if(r[o]===t)continue;const l=r[o];if(void 0===l)continue;const s=e[l];s&&(n[a]={top:0===i?s.top:i,height:s.height},"number"==typeof n[a]?.top&&(i=(n[a]?.top??0)+s.height),a++)}return n}function Nm(e,t){const n={},r=_m(e);let i=0;for(let o=0,a=0;o<r.length;o++){if(r[o]===t)continue;const l=r[o];if(void 0===l)continue;const s=e[l];s&&(n[a]={left:0===i?s.left:i,width:s.width},"number"==typeof n[a]?.left&&(i=(n[a]?.left??0)+s.width),a++)}return n}function Tm(e,t,n){const r=100;let i=32;for(let n=0;n<e.row;n++)i+=(t?.[n]?t?.[n]?.height:32)||32;const o=(t?.[e.row]?t?.[e.row]?.height:32)||32;let a=60;for(let t=0;t<e.column;t++)a+=(n?.[t]?n?.[t]?.width:r)||r;return{top:i,height:o,left:a,width:(n?.[e.column]?n?.[e.column]?.width:r)||r}}function Im(e,t,n){const r=Tm(n.start,e,t);let i=Tm(n.end,e,t);return void 0===i&&(i=function(e,t,n){const r=100;let i=4032;for(let n=0;n<e.row;n++)i+=(t?.[n]?t?.[n]?.height:32)||32;const o=(t?.[e.row]?t?.[e.row]?.height:32)||32;let a=60;for(let t=0;t<e.column;t++)a+=(n?.[t]?n?.[t]?.width:r)||r;return{top:i,height:o,left:a,width:(n?.[e.column]?n?.[e.column]?.width:r)||r}}(n.end,e,t)),r&&i&&{width:i.left+i.width-r.left,height:i.top+i.height-r.top,top:r.top+1,left:r.left+1}}function Dm(e,t,n,r){const i=r.toRange(n);return i?Im(e,t,i):void 0}function Zm(e){return function(e,t){const n=[];for(const[r,i]of lm(t))rm(r,e(i,r),n);return n}(e=>e?.value||"",e).map(e=>e.map(e=>{const t=String(e).replace(/"/g,'""');return Rt.test(t)?`"${t}"`:t}).join("\t")).join("\n")}function jm(e,t){return null!==e&&"view"===t&&Rm(e)}function Rm(e){return e.matches(":focus-within")}function Bm(e){return"string"==typeof e&&e.includes("\n")}const Pm=e=>`${1.33*e}px`,Fm=e=>parseFloat(e.replace("px",""))/1.33,Um={value:"",inputType:{type:"text"},readOnly:!1,style:{color:"#000000",backgroundColor:"#ffffff",borderColor:"#c9c9c9",textDecoration:"normal",borderRight:"1px solid var(--excel-header-border)",borderLeft:"1px solid var(--excel-header-border)",borderTop:"1px solid var(--excel-header-border)",borderBottom:"1px solid var(--excel-header-border)",fontSize:`${Pm(9)}`,fontWeight:"normal",fontStyle:"normal",fontFamily:"Poppins",textAlign:"left"}},qm=[{label:"Times New Roman",value:"Times New Roman"},{label:"Arial",value:"Arial"},{label:"fantasy",value:"fantasy"},{label:"cursive",value:"cursive"},{label:"Poppins",value:"Poppins"},{label:"Courier New",value:"Courier New"},{label:"Verdana",value:"Verdana"},{label:"Tahoma",value:"Tahoma"},{label:"Trebuchet MS",value:"Trebuchet MS"},{label:"Comic Sans MS",value:"Comic Sans MS"},{label:"Impact",value:"Impact"},{label:"Arial Black",value:"Arial Black"},{label:"Lucida Console",value:"Lucida Console"},{label:"Lucida Sans Unicode",value:"Lucida Sans Unicode"},{label:"Courier",value:"Courier"},{label:"Arial Rounded MT Bold",value:"Arial Rounded MT Bold"},{label:"Georgia",value:"Georgia"},{label:"sans-serif",value:"sans-serif"},{label:"serif",value:"serif"},{label:"monospace",value:"monospace"}],Wm=[5,6,8,9,10,12,14,16,18,20,22,24,26,28,32,36,40,48,56,72],Qm=e=>["dropDown","text"].includes(e?.inputType?.type??"text")&&!e?.readOnly;function Gm(e){return{rowCount:e?.length??0,columnCount:e?.[0]?.length??0}}function Km(e){return"string"==typeof e&&e.startsWith("=")&&e.length>1}function Ym(e){return e}function Xm(e){return`${e.row},${e.column}`}function Jm(e){const[t,n]=e.split(",");return{row:Number(t),column:Number(n)}}class $m{set;constructor(e){this.set=e}static from(e){const t=new Set;for(const n of e)t.add(Xm(n));return new $m(t)}has(e){return this.set.has(Xm(e))}get size(){return this.set.size}add(e){const t=new Set(this.set);return t.add(Xm(e)),new $m(t)}delete(e){const t=new Set(this.set);return t.delete(Xm(e))?new $m(t):this}difference(e){let t=this;for(const n of e)t=t.delete(n);return t}union(e){let t=this;for(const n of e)t=t.add(n);return t}*[Symbol.iterator](){for(const e of this.set)yield Jm(e)}}class eg{forwards;constructor(e=new Map){this.forwards=e}static from(e){const t=new Map;for(const[n,r]of e)t.set(Xm(n),r);return new eg(t)}set(e,t){const n=new eg(new Map(this.forwards));return 0===t.size?(n.forwards.delete(Xm(e)),n):(n.forwards.set(Xm(e),t),n)}get(e){return this.forwards.get(Xm(e))||$m.from([])}getBackwards(e){let t=$m.from([]);for(const[n,r]of this.forwards)r.has(e)&&(t=t.add(Jm(n)));return t}getBackwardsRecursive(e,t=$m.from([])){let n=this.getBackwards(e),r=t;for(const e of n)r.has(e)||(r=r.add(e),n=n.union(this.getBackwardsRecursive(e,r)));return n}hasCircularDependency(e){let t=$m.from([]);const n=[e];for(;n.length>0;){const e=n.pop();if(!e)continue;if(t.has(e))return!0;t=t.add(e);const r=this.get(e);if(r)for(const e of r)n.push(e)}return!1}*[Symbol.iterator](){const e=new Set;for(const[t,n]of this.forwards){const r=Jm(t);e.add(t),yield[r,n];for(const t of n){const n=Xm(t);e.has(n)||this.forwards.has(n)||(e.add(n),yield[t,$m.from([])])}}}*traverseBFSBackwards(){let e=$m.from([]);const t=[];for(const[n,r]of this)0===r.size&&(e=e.add(n),t.push(n));for(;t.length>0;){const n=t.shift();if(!n)continue;yield n;const r=this.getBackwards(n);if(0!==r.size)for(const n of r)e.has(n)||0!==this.get(n).difference(e).size||(t.push(n),e=e.add(n))}}}class tg{data;evaluatedData;referenceGraph;createFormulaParser;constructor(e,t,n,r){this.createFormulaParser=e,this.data=t,this.referenceGraph=n||function(){const e=[];return eg.from(e)}(),this.evaluatedData=r||function(e,t){let n=e;for(const r of t.traverseBFSBackwards()){const t=tm(r,e);if(t&&Km(t.value)){const e=rg();n=nm(r,{...t,value:e},n)}}return n}(t,this.referenceGraph)}}function ng(e,t,n){const r=nm(t,n,e.data),i=(Km(n.value),e.referenceGraph),o=function(e,t,n,r,i){if(n.hasCircularDependency(r)){let o=$m.from([r]),a=nm(r,{...i,value:"TODO"},e);for(const e of n.getBackwardsRecursive(r)){if(o.has(e))break;o=o.add(e);const n=tm(e,t);n&&(a=nm(e,{...n,value:"TODO"},a))}return a}let o=e;const a=Km(i.value)?"TODO":i.value,l={...i,value:a};o=nm(r,l,o);for(const e of n.getBackwardsRecursive(r)){const n=tm(e,t);if(!n)continue;const r=Km(n.value)?rg():n.value;o=nm(e,{...n,value:r},o)}return o}(e.evaluatedData,r,i,t,n);return new tg(e.createFormulaParser,r,i,o)}function rg(){return"TODO"}function ig(e){if(6!==e.length)return!1;for(let t=1;t<e.length;t++)if(!"0123456789ABCDEFabcdef".includes(e[t]))return!1;return!0}function og(e){return Eg(e)||!e.editable?e:{...e,mode:"edit"}}const ag=e=>(e=>e&&!e.readOnly)(e)&&"file"!==e?.inputType?.type?{...e,value:"",style:e?.style}:e,lg=e=>{if(e)return{...e,value:(e.value||"")+"\n",style:e.style}};function sg(e){if(!e.active)return e;const t=e.selected.toRange(e.model.data),n=[];let r=e.model.data;for(const i of t||[]){const t=tm(i,e.model.data),o=ag(t);n.push({prevCell:t||null,nextCell:o||null}),r=nm(i,o,r)}return{...e,model:new tg(Ym,r),...fg(n)}}function cg(e){if(!e.active)return e;const t=e.selected.toRange(e.model.data),n=[];let r=e.model.data;for(const i of t||[]){const t=tm(i,e.model.data),o=lg(t);n.push({prevCell:t||null,nextCell:o||null}),r=nm(i,o,r)}return{...e,mode:"edit",model:new tg(Ym,r),...fg(n)}}function dg(e){return{...e,active:null,copied:null,formattedStyle:{open:!1,style:void 0},selected:new mm}}function ug(e){return{...e,mode:"view"}}function fg(e){return{lastCommit:e}}const hg=(e,t)=>n=>{if(!n.active)return;const r=cm(n.model.data),i=n.active.column+t>=r.columns,o={row:n.active.row+e+(i?1:0),column:(n.active.column+t)%r.columns};return sm(o,n.model.data)?{...n,active:o,selected:new gm(new hm(o,o)),mode:"view"}:{...n,mode:"view"}},pg={ArrowUp:hg(-1,0),ArrowDown:hg(1,0),ArrowLeft:hg(0,-1),ArrowRight:hg(0,1),Tab:hg(0,1),Enter:og,Backspace:function(e){if(!e.active)return e;if("view"===e.mode){return sg(e)}{const t=[];let n=e.model.data;const r=tm(e.active,e.model.data),i=ag(r);return t.push({prevCell:r||null,nextCell:i||null}),n=nm(e.active,i,n),{...e,mode:"edit",model:new tg(Ym,n),...fg(t)}}},Delete:sg,Escape:dg},Cg={Escape:ug,Tab:pg.Tab,Enter:pg.ArrowDown,Delete:sg},mg={Tab:hg(0,-1)};var gg;!function(e){e.Left="Left",e.Right="Right",e.Top="Top",e.Bottom="Bottom"}(gg||(gg={}));const vg={ArrowUp:e=>({...e,selected:Mg(e.selected,e.active,e.model.data,gg.Top)}),ArrowDown:e=>({...e,selected:Mg(e.selected,e.active,e.model.data,gg.Bottom)}),ArrowLeft:e=>({...e,selected:Mg(e.selected,e.active,e.model.data,gg.Left)}),ArrowRight:e=>({...e,selected:Mg(e.selected,e.active,e.model.data,gg.Right)}),Tab:hg(0,-1)},yg={},wg={};function bg(e,t){const{key:n}=t;let r;if("edit"===e.mode)if(t.shiftKey&&"Enter"===n)r=pg;else{if(t.altKey&&"Enter"===n)return cg;r=t.shiftKey?mg:Cg}else r=t.shiftKey&&t.metaKey?yg:t.shiftKey?vg:t.metaKey?wg:pg;return r[n]}function Eg(e){const t=function(e){const t=e.active&&tm(e.active,e.model.data);return t||null}(e);return Boolean(t?.readOnly)}function Mg(e,t,n,r){if(!t)return e;if(e instanceof gm){const i=function(e,t,n,r){const i=r===gg.Left||r===gg.Right?"column":"row",o=r===gg.Left||r===gg.Top?"start":"end",a="start"===o?-1:1,l=e.range.has({...t,[i]:t[i]+-1*a}),s=l?"start"===o?"end":"start":o,c=new hm(e.range.start,e.range.end);c[s][i]+=a;const d=new gm(c).normalizeTo(n);return d}(e,t,n,r);return i}return e instanceof Em?function(e,t,n,r){if(r===gg.Top||r===gg.Bottom)return e;const i=r===gg.Left?-1:1,o=r===gg.Left?"start":"end",a="start"===o?"end":"start",l={...e};(r===gg.Left?e.end>t.row:e.start<t.row)?l[a]=e[a]+i:l[o]=e[o]+i;return new Em(Math.max(l.start,0),Math.max(l.end,0)).normalizeTo(n)}(e,t,n,r):e instanceof bm?function(e,t,n,r){if(r===gg.Left||r===gg.Right)return e;const i=r===gg.Top?-1:1,o=r===gg.Top?"start":"end",a="start"===o?"end":"start",l={...e};(r===gg.Top?e.end>t.row:e.start<t.row)?l[a]=e[a]+i:l[o]=e[o]+i;return new bm(Math.max(l.start,0),Math.max(l.end,0)).normalizeTo(n)}(e,t,n,r):e}const Ag=(e,t={},n)=>{const{selectedRow:r,selectedColumn:i,model:o,columnDimensions:a}=e,{column:l,columnWidth:s=100}=t,c=l??i;if(G(c))return e;const d="LEFT"===n?c:c+1,u=o.data.map(e=>{const t=[...e],n=e[c];return t.splice(d,0,(e=>{if("object"!=typeof e||null===e)return e;const{contextDisable:t,...n}=e;return{...n,value:"",readOnly:!1,style:{...e.style,borderBottom:"",borderLeft:"",borderRight:"",borderTop:""}}})(n)),t}),f=new tg(o.createFormulaParser,u),h=r??0;return{...e,model:f,selectedRow:h,selectedColumn:d,active:{row:h,column:d},selected:new Em(d,d),columnDimensions:Vm(a,d,s)}},xg=(e,t={},n)=>{const{selectedRow:r,selectedColumn:i,model:o,rowDimensions:a}=e,{row:l}=t,s=l??r;if(G(s))return e;const c="TOP"===n?s:s+1,d=[...o.data],u=((e,t)=>e?e?.map(e=>"object"==typeof e&&null!==e?{...e,value:"",readOnly:!1,contextDisable:void 0,style:{...e.style,borderBottom:"",borderLeft:"",borderRight:"",borderTop:""}}:e):Array(t||0).fill(Um))(o.data[s]||[],d[0]?.length);d.splice(c,0,u??[]);const f=new tg(o.createFormulaParser,d),h=i??0;return{...e,model:f,selectedRow:c,selectedColumn:h,active:{row:c,column:h},selected:new bm(c,c),rowDimensions:Om(a,c,32)}},Lg={active:null,mode:"view",rowDimensions:{},columnDimensions:{},lastChanged:null,hasPasted:!1,cut:!1,autoFill:{open:!1,cellValue:{value:"",style:{}}},dragging:!1,model:new tg(Ym,[]),selected:new mm,copied:null,lastCommit:null,selectedColumn:null,selectedRow:null,formattedStyle:{open:!1,style:void 0},editable:!1,ctrl:!0};function kg(e,t){switch(t.type){case vC:{const{minimumColumnWidth:n}=t.payload,r={...e.columnDimensions};return Object.keys(r).forEach(e=>{const t=parseInt(e);(r[t]?.width||0)!==n&&(r[t]={left:r[t]?.left||0,width:n})}),{...e,columnDimensions:r}}case yC:{const{editable:n}=t.payload;return{...e,editable:n}}case gC:{const{autofill:n}=t.payload,r=e.active;let i=Um;return r&&(i=tm({row:r.row,column:r.column},e.model.data)||i),{...e,autoFill:{open:n,cellValue:i}}}case cC:return xg(e,t,"TOP");case dC:return xg(e,t,"BOTTOM");case uC:return Ag(e,t,"LEFT");case fC:return Ag(e,t,"RIGHT");case hC:{let{selectedRow:n,selectedColumn:r,model:i,rowDimensions:o,copied:a}=e;const{row:l}=t;if(G(n))return e;const s=l??n;let c=[...i.data];c.splice(s,1);const d=new tg(i.createFormulaParser,c);let u=s>0?s-1:0;const f=null!==r?r:0,h=c.length>0?{row:u,column:f}:null,p=c.length>0?new bm(u,u):new mm;let C=a;return a&&a.start.row<=s&&a.end.row>=s&&(C=null),{...e,model:d,selectedRow:u,selectedColumn:f,selected:p,active:h,copied:C,rowDimensions:zm(o,s)}}case pC:{const{selectedRow:n,selectedColumn:r,model:i,columnDimensions:o,copied:a}=e,{column:l}=t;if(G(l??r))return e;const s=l??r,c=i.data.map(e=>e.filter((e,t)=>t!==s)),d=new tg(i.createFormulaParser,c),u=null!==n?n:0,f=s>0?s-1:0,h=c.length>0?{row:u,column:f}:null,p=c.length>0?new Em(f,f):new mm;let C=a;return a&&a.start.column<=s&&a.end.column>=s&&(C=null),{...e,model:d,selectedRow:u,selectedColumn:f,selected:p,active:h,copied:C,columnDimensions:Nm(o,s)}}case $p:{const t=e.selected.toRange(e.model.data),n=function(e,t,n){if(!t)return e;const{start:r,end:i}=t;let o=e,a=!1;for(let e=r.row;e<=i.row;e++){for(let t=r.column;t<=i.column;t++){const r=tm({row:e,column:t},o);if(r&&n&&!r.readOnly&&"bold"===r.style?.fontWeight){a=!0;break}}if(a)break}for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=tm({row:e,column:t},o);r&&n&&(r.readOnly||(o=nm({row:e,column:t},{...r,style:{...r.style,fontWeight:a?"normal":"bold"}},o)))}return o}(e.model.data,t,e.editable);return{...e,model:new tg(e.model.createFormulaParser,n)}}case eC:{const t=e.selected.toRange(e.model.data),n=function(e,t,n){if(!t)return e;const{start:r,end:i}=t;let o=e,a=!1;for(let e=r.row;e<=i.row;e++){for(let t=r.column;t<=i.column;t++){const r=tm({row:e,column:t},o);if(r&&n&&!r.readOnly&&"italic"===r.style?.fontStyle){a=!0;break}}if(a)break}for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=tm({row:e,column:t},o);r&&n&&(r.readOnly||(o=nm({row:e,column:t},{...r,style:{...r.style,fontStyle:a?"normal":"italic"}},o)))}return o}(e.model.data,t,e.editable);return{...e,model:new tg(e.model.createFormulaParser,n)}}case oC:{const{value:n,color:r}=t.payload,i=e.selected.toRange(e.model.data),o=function(e,t,n,r,i){if(!t)return e;let o=e;const{start:a,end:l}=t,s=(e,t)=>tm({row:e,column:t},o),c=(e,t,n)=>{o=nm({row:e,column:t},n,o)};for(let e=a.row;e<=l.row;e++)for(let t=a.column;t<=l.column;t++){const o=s(e,t);if(!o||!i||o.readOnly)continue;const a={...o,style:{...o.style}},l=s(e-1,t),d=s(e+1,t),u=s(e,t-1),f=s(e,t+1),h=`2px solid ${r}`,p="1px solid var(--excel-header-border)",C=e=>{switch(e){case"borderTop":l&&l.style?.borderBottom===h?a.style.borderTop="none":a.style.borderTop=h;break;case"borderBottom":d&&d.style?.borderTop===h?a.style.borderBottom="none":a.style.borderBottom=h;break;case"borderLeft":u&&u.style?.borderRight===h?a.style.borderLeft="none":a.style.borderLeft=h;break;case"borderRight":f&&f.style?.borderLeft===h?a.style.borderRight="none":a.style.borderRight=h}};switch(n){case"border-all-sides":C("borderTop"),C("borderBottom"),C("borderLeft"),C("borderRight");break;case"border-none":if(a.style={...a.style,borderRight:p,borderLeft:p,borderTop:p,borderBottom:p},l){const n={...l,style:{...l.style}};"none"===n.style.borderBottom&&(n.style.borderBottom=h,c(e-1,t,n))}if(d){const n={...d,style:{...d.style}};"none"===n.style.borderTop&&(n.style.borderTop=h,c(e+1,t,n))}if(u){const n={...u,style:{...u.style}};"none"===n.style.borderRight&&(n.style.borderRight=h,c(e,t-1,n))}if(f){const n={...f,style:{...f.style}};"none"===n.style.borderLeft&&(n.style.borderLeft=h,c(e,t+1,n))}break;case"border-right":C("borderRight");break;case"border-left":C("borderLeft");break;case"border-top":C("borderTop");break;case"border-bottom":C("borderBottom")}c(e,t,a)}return o}(e.model.data,i,n,r,e.editable);return{...e,model:new tg(e.model.createFormulaParser,o)}}case tC:{const t=e.selected.toRange(e.model.data),n=function(e,t,n){if(!t)return e;const{start:r,end:i}=t;let o=e,a=!1;for(let e=r.row;e<=i.row;e++){for(let t=r.column;t<=i.column;t++){const r=tm({row:e,column:t},o);if(r&&n&&!r.readOnly&&"underline"===r.style?.textDecoration){a=!0;break}}if(a)break}for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=tm({row:e,column:t},o);r&&n&&(r.readOnly||(o=nm({row:e,column:t},{...r,style:{...r.style,textDecoration:a?"none":"underline"}},o)))}return o}(e.model.data,t,e.editable);return{...e,model:new tg(e.model.createFormulaParser,n)}}case rC:{const{value:n}=t.payload,r=e.selected.toRange(e.model.data),i=function(e,t,n,r){if(!t)return e;const i=Number(n);if(isNaN(i))return e;const o=Pm(i),{start:a,end:l}=t;let s=e;for(let e=a.row;e<=l.row;e++)for(let t=a.column;t<=l.column;t++){const n=tm({row:e,column:t},s);n&&r&&(n.readOnly||(s=nm({row:e,column:t},{...n,style:{...n.style,fontSize:o}},s)))}return s}(e.model.data,r,n,e.editable),o=new tg(e.model.createFormulaParser,i);let a={...e.rowDimensions};if(("edit"!==e.mode||!e.active)&&r)for(let e=r?.start?.row??0;e<=r?.end?.row;e++){const t=i[e];if(!t)continue;let n=32;t.forEach((e,t)=>{if(e&&e.value){const t=e.style?.fontSize?parseInt(e.style.fontSize.toString().replace("px","")):9,r=Math.max(1.2*t,18);let i=0;["file","dropDown"].includes(e?.inputType?.type??"")||(i=String(e.value).split(" ").length),i+=String(e.value).split("\n").length-1;const o=r*i;n=Math.max(n,o)}}),a[e]={...a[e]||{top:0,height:32},height:n}}return{...e,model:o,rowDimensions:a}}case nC:{const{value:n}=t.payload,r=e.selected.toRange(e.model.data),i=function(e,t,n,r){if(!t)return e;const{start:i,end:o}=t;let a=e;for(let e=i.row;e<=o.row;e++)for(let t=i.column;t<=o.column;t++){const i=tm({row:e,column:t},a);i&&r&&(i.readOnly||(a=nm({row:e,column:t},{...i,style:{...i.style,fontFamily:n}},a)))}return a}(e.model.data,r,n,e.editable);return{...e,model:new tg(e.model.createFormulaParser,i)}}case iC:{const{value:n}=t.payload,r=e.selected.toRange(e.model.data),i=function(e,t,n,r){if(!t)return e;const{start:i,end:o}=t;let a=e;for(let e=i.row;e<=o.row;e++)for(let t=i.column;t<=o.column;t++){const i=tm({row:e,column:t},a);i&&r&&(i.readOnly||(a=nm({row:e,column:t},{...i,style:{...i.style,textAlign:n}},a)))}return a}(e.model.data,r,n,e.editable);return{...e,model:new tg(e.model.createFormulaParser,i)}}case aC:{const{value:n}=t.payload,r=e.selected.toRange(e.model.data),i=function(e,t,n,r){if(!t)return e;const{start:i,end:o}=t;let a=e;const l=ig(n)?`#${n}`:n;for(let e=i.row;e<=o.row;e++)for(let t=i.column;t<=o.column;t++){const n=tm({row:e,column:t},a);n&&r&&(n.readOnly||(a=nm({row:e,column:t},{...n,style:{...n.style,color:l}},a)))}return a}(e.model.data,r,n,e.editable);return{...e,model:new tg(e.model.createFormulaParser,i)}}case lC:{const{value:n}=t.payload,r=e.selected.toRange(e.model.data),i=function(e,t,n,r){if(!t)return e;if(t){const{start:i,end:o}=t;let a=e;const l=ig(n)?`#${n}`:n;for(let e=i.row;e<=o.row;e++)for(let t=i.column;t<=o.column;t++){const n=tm({row:e,column:t},a);n&&r&&(n.readOnly||(a=nm({row:e,column:t},{...n,style:{...n.style,backgroundColor:l}},a)))}return a}return e}(e.model.data,r,n,e.editable);return{...e,model:new tg(e.model.createFormulaParser,i)}}case sC:{if(!e.editable)return e;const t=function(e,t){if(!t)return;const{row:n,column:r}=t,i=tm({row:n,column:r},{...e});return i&&i.style?i.style:void 0}(e.model.data,e.active),n=e.selected.toRange(e.model.data);return e.formattedStyle.open?{...e,selected:new mm,active:e.copied?.start||null,copied:null,formattedStyle:{open:!1,style:void 0}}:{...e,selected:new mm,active:null,copied:n,formattedStyle:{open:!0,style:t}}}case Op:{const{data:n}=t.payload,r=e.active&&sm(e.active,n)?e.active:null,i=e.selected.normalizeTo(n);return{...e,model:new tg(e.model.createFormulaParser,n),active:r,selected:i}}case zp:{const{createFormulaParser:n}=t.payload;return{...e,model:new tg(n,e.model.data)}}case Np:{const{row:n,extend:r}=t.payload,{active:i}=e,o=new bm(r&&i?i.row:n,n),a=r&&i?i:{...pm,row:n};return{...e,selected:o,active:a,mode:"view",selectedColumn:null,selectedRow:n}}case Tp:{const{column:n,extend:r}=t.payload,{active:i}=e,o=new Em(r&&i?i.column:n,n),a=r&&i?i:{...pm,column:n};return{...e,selected:o,active:a,mode:"view",selectedColumn:n,selectedRow:null}}case Ip:return{...e,selected:new ym,active:pm,mode:"view"};case Dp:{const{selection:n}=t.payload,r=n.toRange(e.model.data),i=e.active&&n.has(e.model.data,e.active)?e.active:r?.start;return{...e,selected:n,active:i||null,mode:"view"}}case Zp:{const{point:n}=t.payload;return e.active&&!Hm(e.active,n)?{...e,selected:new gm(new hm(n,e.active)),mode:"view"}:e}case jp:{const{point:n}=t.payload;return{...e,selected:new gm(new hm(n,n)),active:n,mode:Hm(e.active,n)&&e.editable?"edit":"view"}}case Rp:{const{active:n,data:r}=t.payload;return Eg(e)||!e.editable?e:{...e,model:ng(e.model,n,r),lastChanged:n}}case Bp:{const{point:n,dimensions:r}=t.payload,i=e.rowDimensions[n.row],o=e.columnDimensions[n.column];return i&&o&&i.top===r.top&&i.height===r.height&&o.left===r.left&&o.width===r.width?e:{...e,rowDimensions:{...e.rowDimensions,[n.row]:{top:r.top,height:r.height}},columnDimensions:{...e.columnDimensions,[n.column]:{left:r.left,width:r.width}}}}case Pp:case Fp:{const n=e.selected.toRange(e.model.data);return{...e,copied:n,cut:t.type===Fp,hasPasted:!1}}case Up:{const{data:n}=t.payload,{active:r}=e;if(!r||!e.editable)return e;const i=function(e,t,n="\t",r=/\r\n|\n|\r/){return e.replace(/"([^"]*?)"/g,(e,t)=>t.replace(/\n/g,"\\n")).split(r).map(e=>e.split(n).map(e=>e.replace(/\\n/g,"\n")).map(t))}(n,e=>({value:e})),o=cm(i),a=e.selected.toRange(e.model.data);if(a&&1===o.rows&&1===o.columns){const t=tm({row:0,column:0},i);let n=e.cut&&e.copied?am(e.copied.start,e.model.data):e.model.data;const r=[];for(const i of a||[]){const o=tm(i,e.model.data)||null,a={...o,value:t?.value};r.push({prevCell:o||Um,nextCell:Um}),Qm(o)&&(n=nm(i,a,n))}return{...e,model:new tg(Ym,n),copied:null,cut:!1,hasPasted:!0,mode:"view",lastCommit:r}}const l={rows:r.row+o.rows,columns:r.column+o.columns},s=function(e,t){const{rows:n,columns:r}=cm(e);if(n>=t.rows&&r>=t.columns)return e;const i={rows:t.rows>n?t.rows:n,columns:t.columns>r?t.columns:r};let o=[...e];if(i.columns>r){const e=i.columns-r;o=o.map(t=>[...t,...Array(e).fill(im)])}if(i.rows>n){const e=i.rows-n,t=Array(i.columns).fill(im);o=[...o,...Array(e).fill(t)]}return o}(e.model.data,l);let c={data:s,commit:[]};for(const[t,n]of lm(i)){let i=c.commit||[];const o={row:t.row+r.row,column:t.column+r.column};let a=c.data;if(e.cut){if(e.copied){a=am({row:t.row+e.copied.start.row,column:t.column+e.copied.start.column},c.data)}i=[...i,{prevCell:n||null,nextCell:null}]}sm(o,s)||(c={data:a,commit:i});const l=tm(o,a)||null;i=[...i,{prevCell:l,nextCell:n||null}],Qm(l)&&(c.data=nm(o,{...l,value:n?.value??""},a),c.commit=i)}return{...e,model:new tg(Ym,c.data),selected:new gm(new hm(r,{row:r.row+o.rows-1,column:r.column+o.columns-1})),copied:null,cut:!1,hasPasted:!0,mode:"view",lastCommit:c.commit}}case qp:return og(e);case Wp:return ug(e);case"CLEAR":return sg(e);case Qp:return dg(e);case Gp:{const{event:n}=t.payload;if(Eg(e)||n.metaKey||!e.editable)return e;if("view"===e.mode&&e.active){const t=e.selected.toRange(e.model.data);return 1===t?.size()?og(sg(e)):og(e)}return e}case Kp:{const{event:n}=t.payload;if(n.ctrlKey)return{...e,ctrl:!e.ctrl};if(Eg(e)||n.metaKey||!e.editable)return e;const r=bg(e,n);return r?{...e,...r(e,n)}:e}case CC:{const{row:n,height:r}=t.payload,i=e.rowDimensions[n]||{top:0};return{...e,rowDimensions:{...e.rowDimensions,[n]:{top:i.top,height:r}}}}case mC:{const{column:n,width:r}=t.payload,i=e.columnDimensions[n]||{left:0};return{...e,columnDimensions:{...e.columnDimensions,[n]:{left:i.left,width:r}}}}case Yp:return{...e,dragging:!0};case wC:{const{point:n}=t.payload;let r=e.model.data;return!e.dragging&&e.formattedStyle.open&&(r=function(e,t,n){if(!n||!t.open)return e;let r=e;const i=tm(n,r);i&&!i.readOnly&&(r=nm(n,{...i,style:t.style},r));return r}(e.model.data,e.formattedStyle,e.active)),{...e,copied:null,model:new tg(e.model.createFormulaParser,r),formattedStyle:{open:!1,style:void 0},active:n}}case Xp:{const t=e.selected.toRange(e.model.data),n=e.active;let r=e.model.data;if(e.formattedStyle.open&&(r=function(e,t,n){if(!t||!n.open)return e;const{start:r,end:i}=t;let o=e;for(let e=r.row;e<=i.row;e++)for(let t=r.column;t<=i.column;t++){const r=tm({row:e,column:t},o);r&&(r.readOnly||(o=nm({row:e,column:t},{...r,style:n.style},o)))}return o}(e.model.data,t,e.formattedStyle)),e.autoFill.open&&e.editable&&t){r=function(e,t,n,r,i){if(!t)return e;const{start:o,end:a}=t,l=o.row-a.row,s=o.column-a.column;let c={row:0,column:0},d={row:0,column:0};Math.abs(l)>Math.abs(s)?(c={row:Math.min(o.row,a.row),column:r?.column??o.column},d={row:Math.max(o.row,a.row),column:r?.column??o.column}):(c={row:r?.row??o.row,column:Math.min(o.column,a.column)},d={row:r?.row??o.row,column:Math.max(o.column,a.column)});let u=e;const f=String(n.value??""),h=[...f.matchAll(/(-?\d+)/g)];for(let e=c.row;e<=d.row;e++)for(let t=c.column;t<=d.column;t++){const o=tm({row:e,column:t},u);if(!o||o.readOnly||["file","dropDown"].includes(o?.inputType?.type||""))continue;let a=f;if(!i&&h.length>0){let n=0;n=Math.abs(l)>Math.abs(s)?e-(r?.row??c.row):t-(r?.column??c.column);let i=0;a=a.replace(/(-?\d+)/g,()=>{const e=h[i++];return e?(parseInt(e?.[1]??"",10)+n).toString():""})}u=nm({row:e,column:t},{...o,style:n.style,value:a,inputType:n.inputType},u)}return u}(e.model.data,t,e.autoFill.cellValue,n,e.ctrl);let{start:i,end:o}=t;const a=i.row-o.row,l=i.column-o.column;let s={row:0,column:0},c={row:0,column:0};return Math.abs(a)>Math.abs(l)?(s={row:Math.min(i.row,o.row),column:n?.column??0},c={row:Math.max(i.row,o.row),column:n?.column??0}):(s={row:n?.row??0,column:Math.min(i.column,o.column)},c={row:n?.row??0,column:Math.max(i.column,o.column)}),{...e,dragging:!1,autoFill:{open:!1,cellValue:{value:"",style:{}}},formattedStyle:{open:!1,style:void 0},model:new tg(e.model.createFormulaParser,r),selected:new gm(new hm(s,c))}}return{...e,dragging:!1,autoFill:{open:!1,cellValue:{value:"",style:{}}},formattedStyle:{open:!1,style:void 0},model:new tg(e.model.createFormulaParser,r)}}case Jp:{const{changes:n}=t.payload;return{...e,...fg(n)}}default:throw new Error("Unknown action")}}var Hg,Sg={exports:{}},_g={};var Vg,Og,zg={};
|
|
20
20
|
/**
|
|
21
21
|
* @license React
|
|
22
22
|
* scheduler.development.js
|
|
@@ -45,5 +45,5 @@ let r=n?.map(e=>({...e,stepId:gp()}));return e.map(e=>e.stepId===t&&["Group","PR
|
|
|
45
45
|
Copyright (c) 2017 Jed Watson.
|
|
46
46
|
Licensed under the MIT License (MIT), see
|
|
47
47
|
http://jedwatson.github.io/classnames
|
|
48
|
-
*/!function(){var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"==o||"number"==o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"==o)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,n){e.exports=t},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(3),o=n(5),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(0),i=n(1);function o(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getStartKey(),i=t.getEndKey(),o=n.getBlockMap();return o.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===i}).concat([[i,o.get(i)]])}function a(e){return o(e).toList()}function l(e){if(e)return a(e).get(0)}function s(e){if(e){var t=l(e),n=e.getCurrentContent().getBlockMap().toSeq().toList(),r=0;if(n.forEach(function(e,n){e.get("key")===t.get("key")&&(r=n-1)}),-1<r)return n.get(r)}}function c(e){return e?e.getCurrentContent().getBlockMap().toList():new i.List}function d(e){var t=a(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function u(e){var t=r.RichUtils.tryToRemoveBlockStyle(e);return t?r.EditorState.push(e,t,"change-block-type"):e}function f(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),i=n.getFocusOffset(),o=a(e);if(0<o.size){if(n.getIsBackward()){var l=r;r=i,i=l}for(var s=0;s<o.size;s+=1){var c=0===s?r:0,d=s===o.size-1?i:o.get(s).getText().length;t+=o.get(s).getText().slice(c,d)}}return t}function h(e){var t=e.getCurrentContent(),n=e.getSelection(),i=r.Modifier.removeRange(t,n,"forward"),o=i.getSelectionAfter(),a=i.getBlockForKey(o.getStartKey());return i=r.Modifier.insertText(i,o,"\n",a.getInlineStyleAt(o.getStartOffset()),null),r.EditorState.push(e,i,"insert-fragment")}function p(e){var t=r.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return u(r.EditorState.push(e,t,"split-block"))}function C(e){var t=e.getCurrentContent().getBlockMap().toList(),n=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),i=r.Modifier.removeRange(e.getCurrentContent(),n,"forward");return r.EditorState.push(e,i,"remove-range")}function m(e,t){var n=r.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return r.EditorState.push(e,n,"change-block-data")}function g(e){var t=new i.Map({}),n=a(e);if(n&&0<n.size)for(var r=function(e){var r=n.get(e).getData();if(!r||0===r.size)return t=t.clear(),"break";if(0===e)t=r;else if(t.forEach(function(e,n){r.get(n)&&r.get(n)===e||(t=t.delete(n))}),0===t.size)return t=t.clear(),"break"},o=0;o<n.size&&"break"!==r(o);o+=1);return t}var v=Object(i.Map)({code:{element:"pre"}}),y=r.DefaultDraftBlockRenderMap.merge(v);function w(e){if(e){var t=e.getType();return"unordered-list-item"===t||"ordered-list-item"===t}return!1}function b(e,t,n){var i,a=e.getSelection();i=a.getIsBackward()?a.getFocusKey():a.getAnchorKey();var l=e.getCurrentContent(),s=l.getBlockForKey(i),c=s.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return e;var d=l.getBlockBefore(i);if(!d)return e;if(d.getType()!==c)return e;var u=s.getDepth();if(1===t&&u===n)return e;var f,h,p,C,m,g,v,y=Math.min(d.getDepth()+1,n),w=(h=t,p=y,C=(f=e).getSelection(),g=(m=f.getCurrentContent()).getBlockMap(),v=o(f).map(function(e){var t=e.getDepth()+h;return t=Math.max(0,Math.min(t,p)),e.set("depth",t)}),g=g.merge(v),m.merge({blockMap:g,selectionBefore:C,selectionAfter:C}));return r.EditorState.push(e,w,"adjust-depth")}function E(e,t){var n;return 13===(n=t).which&&(n.getModifierState("Shift")||n.getModifierState("Alt")||n.getModifierState("Control"))?e.getSelection().isCollapsed()?r.RichUtils.insertSoftNewline(e):h(e):function(e){var t=e.getSelection();if(t.isCollapsed()){var n=e.getCurrentContent(),r=t.getStartKey(),i=n.getBlockForKey(r);if(!w(i)&&"unstyled"!==i.getType()&&i.getLength()===t.getStartOffset())return p(e);if(w(i)&&0===i.getLength()){var o=i.getDepth();if(0===o)return u(e);if(0<o)return b(e,-1,o)}}}(e)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){return(x="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)}function L(e){var t=e.getSelection();if(t.isCollapsed()){var n={},r=e.getCurrentInlineStyle().toList().toJS();if(r)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=0<=r.indexOf(e)}),n}var i=t.getStartOffset(),o=t.getEndOffset(),l=a(e);if(0<l.size){var s=function(){for(var e={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},t=0;t<l.size;t+=1){var n=0===t?i:0,r=t===l.size-1?o:l.get(t).getText().length;n===r&&0===n?(n=1,r=2):n===r&&--n;for(var a=function(n){var r=l.get(t).getInlineStyleAt(n);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(t){e[t]=e[t]&&r.get(t)===t})},s=n;s<r;s+=1)a(s)}return{v:e}}();if("object"===x(s))return s.v}return{}}function k(e){var t,n=e.getSelection(),r=n.getStartOffset(),i=n.getEndOffset();r===i&&0===r?i=1:r===i&&--r;for(var o=l(e),a=r;a<i;a+=1){var s=o.getEntityAt(a);if(!s){t=void 0;break}if(a===r)t=s;else if(t!==s){t=void 0;break}}return t}function H(e,t){var n,r=l(e);return r.findEntityRanges(function(e){return e.get("entity")===t},function(e,t){n={start:e,end:t,text:r.get("text").slice(e,t)}}),n}function S(e,t,n){V[e]["".concat(e.toLowerCase(),"-").concat(n)]=A({},"".concat(t),n)}function _(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},V.color,{},V.bgcolor,{},V.fontSize,{},V.fontFamily,{CODE:V.CODE,SUPERSCRIPT:V.SUPERSCRIPT,SUBSCRIPT:V.SUBSCRIPT})}var V={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function O(e,t,n){var i=e.getSelection(),o=Object.keys(V[t]).reduce(function(e,t){return r.Modifier.removeInlineStyle(e,i,t)},e.getCurrentContent()),a=r.EditorState.push(e,o,"changeinline-style"),l=e.getCurrentInlineStyle();if(i.isCollapsed()&&(a=l.reduce(function(e,t){return r.RichUtils.toggleInlineStyle(e,t)},a)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t)l.has(n)||(a=r.RichUtils.toggleInlineStyle(a,n));else{var s="bgcolor"===t?"backgroundColor":t;l.has("".concat(s,"-").concat(n))||(a=r.RichUtils.toggleInlineStyle(a,"".concat(t.toLowerCase(),"-").concat(n)),S(t,s,n))}return a}function z(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?S("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?S("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?S("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&S("fontFamily","fontFamily",e.substr(11))})}function N(e,t,n){var r=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(r&&0<r.size)return r.get(0)}function T(e,t){if(e&&t&&0<t.length){var n=function(){var n=e.getSelection(),r={};if(n.isCollapsed())return t.forEach(function(t){r[t]=function(e,t){var n=e.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(n&&0<n.size)return n.get(0)}(e,t)}),{v:r};var i=n.getStartOffset(),o=n.getEndOffset(),l=a(e);if(0<l.size){for(var s=function(e){var n=0===e?i:0,a=e===l.size-1?o:l.get(e).getText().length;n===a&&0===n?(n=1,a=2):n===a&&--n;for(var s=function(i){i===n?t.forEach(function(t){r[t]=N(l.get(e),t,i)}):t.forEach(function(t){r[t]&&r[t]!==N(l.get(e),t,i)&&(r[t]=void 0)})},c=n;c<a;c+=1)s(c)},c=0;c<l.size;c+=1)s(c);return{v:r}}}();if("object"===x(n))return n.v}return{}}function I(e){var t=e.getCurrentInlineStyle(),n=e.getCurrentContent();return t.forEach(function(t){n=r.Modifier.removeInlineStyle(n,e.getSelection(),t)}),r.EditorState.push(e,n,"change-inline-style")}n.d(t,"isListBlock",function(){return w}),n.d(t,"changeDepth",function(){return b}),n.d(t,"handleNewLine",function(){return E}),n.d(t,"getEntityRange",function(){return H}),n.d(t,"getCustomStyleMap",function(){return _}),n.d(t,"toggleCustomInlineStyle",function(){return O}),n.d(t,"getSelectionEntity",function(){return k}),n.d(t,"extractInlineStyle",function(){return z}),n.d(t,"removeAllInlineStyles",function(){return I}),n.d(t,"getSelectionInlineStyle",function(){return L}),n.d(t,"getSelectionCustomInlineStyle",function(){return T}),n.d(t,"getSelectedBlocksMap",function(){return o}),n.d(t,"getSelectedBlocksList",function(){return a}),n.d(t,"getSelectedBlock",function(){return l}),n.d(t,"getBlockBeforeSelectedBlock",function(){return s}),n.d(t,"getAllBlocks",function(){return c}),n.d(t,"getSelectedBlocksType",function(){return d}),n.d(t,"removeSelectedBlocksStyle",function(){return u}),n.d(t,"getSelectionText",function(){return f}),n.d(t,"addLineBreakRemovingSelection",function(){return h}),n.d(t,"insertNewUnstyledBlock",function(){return p}),n.d(t,"clearEditorContent",function(){return C}),n.d(t,"setBlockData",function(){return m}),n.d(t,"getSelectedBlocksMetadata",function(){return g}),n.d(t,"blockRenderMap",function(){return y})}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t){e.exports=n},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(5),o=n(3),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(1),i=n(0),o=function(e,t,n){var r,o=e.textContent;return""===o.trim()?{chunk:(r=n,{text:" ",inlines:[new i.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:o,inlines:Array(o.length).fill(t),entities:Array(o.length).fill(n),blocks:[]}}},a=function(){return{text:"\n",inlines:[new i.OrderedSet],entities:new Array(1),blocks:[]}},l=function(){return{text:"",inlines:[],entities:[],blocks:[]}},s=function(e,t){return{text:"",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new i.Map({})}]}},c=function(e,t,n){return{text:"\r",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new i.Map({})}]}},d=function(e){return{text:"\r ",inlines:[new i.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new i.Map({})}]}},u=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},f=new i.Map({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:"ul"},"ordered-list-item":{element:"li",wrapper:"ol"},blockquote:{element:"blockquote"},code:{element:"pre"},atomic:{element:"figure"},unstyled:{element:"p",aliasedElements:["div"]}}),h={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function p(e){return e.style.textAlign?new i.Map({"text-align":e.style.textAlign}):e.style.marginLeft?new i.Map({"margin-left":e.style.marginLeft}):void 0}var C=function(e){var t=void 0;if(e instanceof HTMLAnchorElement){var n={};t=e.dataset&&void 0!==e.dataset.mention?(n.url=e.href,n.text=e.innerHTML,n.value=e.dataset.value,r.Entity.__create("MENTION","IMMUTABLE",n)):(n.url=e.getAttribute&&e.getAttribute("href")||e.href,n.title=e.innerHTML,n.targetOption=e.target,r.Entity.__create("LINK","MUTABLE",n))}return t};n.d(t,"default",function(){return y});var m=" ",g=new RegExp(" ","g"),v=!0;function y(e,t){var n,y,w=(n=t,(y=function(e){var t,n=null;return document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}(e.trim().replace(g,m)))?(v=!0,{chunk:function e(t,n,i,m,g,y){var w=t.nodeName.toLowerCase();if(y){var b=y(w,t);if(b){var E=r.Entity.__create(b.type,b.mutability,b.data||{});return{chunk:d(E)}}}if("#text"===w&&"\n"!==t.textContent)return o(t,n,g);if("br"===w)return{chunk:a()};if("img"===w&&t instanceof HTMLImageElement){var M={};M.src=t.getAttribute&&t.getAttribute("src")||t.src,M.alt=t.alt,M.height=t.style.height,M.width=t.style.width,t.style.float&&(M.alignment=t.style.float);var A=r.Entity.__create("IMAGE","MUTABLE",M);return{chunk:d(A)}}if("video"===w&&t instanceof HTMLVideoElement){var x={};x.src=t.getAttribute&&t.getAttribute("src")||t.src,x.alt=t.alt,x.height=t.style.height,x.width=t.style.width,t.style.float&&(x.alignment=t.style.float);var L=r.Entity.__create("VIDEO","MUTABLE",x);return{chunk:d(L)}}if("iframe"===w&&t instanceof HTMLIFrameElement){var k={};k.src=t.getAttribute&&t.getAttribute("src")||t.src,k.height=t.height,k.width=t.width;var H=r.Entity.__create("EMBEDDED_LINK","MUTABLE",k);return{chunk:d(H)}}var S,_=function(e,t){var n=f.filter(function(n){return n.element===e&&(!n.wrapper||n.wrapper===t)||n.wrapper===e||n.aliasedElements&&-1<n.aliasedElements.indexOf(e)}).keySeq().toSet().toArray();if(1===n.length)return n[0]}(w,m);_&&("ul"===w||"ol"===w?(m=w,i+=1):("unordered-list-item"!==_&&"ordered-list-item"!==_&&(m="",i=-1),v?(S=s(_,p(t)),v=!1):S=c(_,i,p(t)))),S=S||l(),n=function(e,t,n){var r,i=h[e];if(i)r=n.add(i).toOrderedSet();else if(t instanceof HTMLElement){var o=t;r=(r=n).withMutations(function(e){var t=o.style.color,n=o.style.backgroundColor,r=o.style.fontSize,i=o.style.fontFamily.replace(/^"|"$/g,""),a=o.style.fontWeight,l=o.style.textDecoration,s=o.style.fontStyle;t&&e.add("color-".concat(t.replace(/ /g,""))),n&&e.add("bgcolor-".concat(n.replace(/ /g,""))),r&&e.add("fontsize-".concat(r.replace(/px$/g,""))),i&&e.add("fontfamily-".concat(i)),"bold"===a&&e.add(h.strong),"underline"===l&&e.add(h.ins),"italic"===s&&e.add(h.em)}).toOrderedSet()}return r}(w,t,n);for(var V=t.firstChild;V;){var O=e(V,n,i,m,C(V)||g,y).chunk;S=u(S,O),V=V.nextSibling}return{chunk:S}}(y,new i.OrderedSet,-1,"",void 0,n).chunk}):null);if(w){var b=w.chunk,E=new i.OrderedMap({});b.entities&&b.entities.forEach(function(e){e&&(E=E.set(e,r.Entity.__get(e)))});var M=0;return{contentBlocks:b.text.split("\r").map(function(e,t){var n=M+e.length,o=b&&b.inlines.slice(M,n),a=b&&b.entities.slice(M,n),l=new i.List(o.map(function(e,t){var n={style:e,entity:null};return a[t]&&(n.entity=a[t]),r.CharacterMetadata.create(n)}));return M=n,new r.ContentBlock({key:Object(r.genKey)(),type:b&&b.blocks[t]&&b.blocks[t].type||"unstyled",depth:b&&b.blocks[t]&&b.blocks[t].depth,data:b&&b.blocks[t]&&b.blocks[t].data||new i.Map({}),text:e,characterList:l})}),entityMap:E}}return null}}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t,n){function r(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function i(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===i(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var l={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},s={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?3<=t&&":"===e[t-3]||3<=t&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",d="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(){return function(e,t){t.normalize(e)}}function f(e){var t=e.re=n(21)(e.__opts__),r=e.__tlds__.slice();function l(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(c),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(l(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(l(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(l(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(l(t.tpl_host_fuzzy_test),"i");var s=[];function d(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){var n=e.__schemas__[t];if(null!==n){var r,a={validate:null,link:null};if(e.__compiled__[t]=a,"[object Object]"===i(n))return"[object RegExp]"===i(n.validate)?a.validate=(r=n.validate,function(e,t){var n=e.slice(t);return r.test(n)?n.match(r)[0].length:0}):o(n.validate)?a.validate=n.validate:d(t,n),void(o(n.normalize)?a.normalize=n.normalize:n.normalize?d(t,n):a.normalize=u());"[object String]"!==i(n)?d(t,n):s.push(t)}}),s.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:u()};var f,h=Object.keys(e.__compiled__).filter(function(t){return 0<t.length&&e.__compiled__[t]}).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),(f=e).__index__=-1,f.__text_cache__=""}function h(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function p(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function C(e,t){if(!(this instanceof C))return new C(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||l.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=r({},l,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},s,e),this.__compiled__={},this.__tlds__=d,this.__tlds_replaced__=!1,this.re={},f(this)}C.prototype.add=function(e,t){return this.__schemas__[e]=t,f(this),this},C.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},C.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,l,s;if(this.re.schema_test.test(e))for((l=this.re.schema_search).lastIndex=0;null!==(t=l.exec(e));)if(i=this.testSchemaAt(e,t[2],l.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(s=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||s<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&0<=e.indexOf("@")&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),0<=this.__index__},C.prototype.pretest=function(e){return this.re.pretest.test(e)},C.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},C.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(p(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(p(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},C.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),f(this),this},C.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},C.prototype.onCompile=function(){},e.exports=C},function(e,t,n){e.exports=n(40)},function(e,t,n){},function(e,t,n){var r=n(11);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var l=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 l.name="Invariant Violation",l}}function t(){return e}var n={array:e.isRequired=e,bigint: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:o,resetWarningCache:i};return n.PropTypes=n}},function(e,t,n){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports=function(e){var t={};t.src_Any=n(22).source,t.src_Cc=n(23).source,t.src_Z=n(24).source,t.src_P=n(25).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var r="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){n.r(t),n.d(t,"Editor",function(){return ni});var r=n(1),i=n.n(r),o=n(0),a=n.n(o),l=n(3),s=n(4),c=n(2),d=n.n(c);function u(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var f=u(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(e){t.callBacks.forEach(function(t){t(e)})},this.init=function(e){var n=document.getElementById(e);n&&n.addEventListener("click",function(){t.editorFlag=!0}),document&&(document.addEventListener("click",function(){t.editorFlag?t.editorFlag=!1:(t.closeAllModals(),t.suggestionCallback&&t.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&t.closeAllModals()}))},this.onEditorClick=function(){t.closeModals(),!t.suggestionFlag&&t.suggestionCallback?t.suggestionCallback():t.suggestionFlag=!1},this.closeModals=function(e){t.closeAllModals(e)},this.registerCallBack=function(e){t.callBacks.push(e)},this.deregisterCallBack=function(e){t.callBacks=t.callBacks.filter(function(t){return t!==e})},this.setSuggestionCallback=function(e){t.suggestionCallback=e},this.removeSuggestionCallback=function(){t.suggestionCallback=void 0},this.onSuggestionClick=function(){t.suggestionFlag=!0}});function h(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var p,C=h(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused||(t.editorFocused=!1)):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}),m=[],g={onKeyDown:function(e){m.forEach(function(t){t(e)})},registerCallBack:function(e){m.push(e)},deregisterCallBack:function(e){m=m.filter(function(t){return t!==e})}},v=function(){p=!0},y=function(){p=!1},w=function(){return p};function b(e){var t=e.getData()&&e.getData().get("text-align");return t?"rdw-".concat(t,"-aligned-block"):""}function E(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function M(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function A(e){e.stopPropagation()}function x(e){return e[e.options[0]].icon}function L(e,t){if(e&&void 0===t)return e;var n={};return E(e,function(e,r){var i;i=r,"[object Object]"===Object.prototype.toString.call(i)?n[e]=L(r,t[e]):n[e]=void 0!==t[e]?t[e]:r}),n}var k=n(6),H=n.n(k),S=n(5);function _(e){return(_="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)}function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(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)}}function z(e,t){return(z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var i=T(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(9);var I=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&z(e,t)}(o,r.Component);var e,t,n=N(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(){var t=e.props,n=t.disabled,r=t.onClick,i=t.value;n||r(i)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,o=t.activeClassName,a=t.active,l=t.disabled,s=t.title;return i.a.createElement("div",{className:d()("rdw-option-wrapper",r,(V(e={},"rdw-option-active ".concat(o),a),V(e,"rdw-option-disabled",l),e)),onClick:this.onClick,"aria-selected":a,title:s},n)}}])&&O(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function D(e){return(D="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)}function Z(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)}}function j(e,t){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}I.propTypes={onClick:a.a.func.isRequired,children:a.a.any,value:a.a.string,className:a.a.string,activeClassName:a.a.string,active:a.a.bool,disabled:a.a.bool,title:a.a.string},I.defaultProps={activeClassName:""},n(12);var P=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(o,r.Component);var e,t,n=R(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={highlighted:-1},e.onChange=function(t){var n=e.props.onChange;n&&n(t),e.toggleExpansion()},e.setHighlighted=function(t){e.setState({highlighted:t})},e.toggleExpansion=function(){var t=e.props,n=t.doExpand,r=t.doCollapse;t.expanded?r():n()},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&this.setState({highlighted:-1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.expanded,r=t.children,o=t.className,a=t.optionWrapperClassName,l=t.ariaLabel,s=t.onExpandEvent,c=t.title,u=this.state.highlighted,f=r.slice(1,r.length);return i.a.createElement("div",{className:d()("rdw-dropdown-wrapper",o),"aria-expanded":n,"aria-label":l||"rdw-dropdown"},i.a.createElement("a",{className:"rdw-dropdown-selectedtext",onClick:s,title:c},r[0],i.a.createElement("div",{className:d()({"rdw-dropdown-carettoclose":n,"rdw-dropdown-carettoopen":!n})})),n?i.a.createElement("ul",{className:d()("rdw-dropdown-optionwrapper",a),onClick:A},i.a.Children.map(f,function(t,n){return t&&i.a.cloneElement(t,{onSelect:e.onChange,highlighted:u===n,setHighlighted:e.setHighlighted,index:n})})):void 0)}}])&&Z(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function F(e){return(F="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)}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(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)}}function W(e,t){return(W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=G(e);if(t){var i=G(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function G(e){return(G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}P.propTypes={children:a.a.any,onChange:a.a.func,className:a.a.string,expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,optionWrapperClassName:a.a.string,ariaLabel:a.a.string,title:a.a.string},n(13);var K=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(o,r.Component);var e,t,n=Q(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(t){var n=e.props,r=n.onSelect,i=n.onClick,o=n.value;n.disabled||(r&&r(o),i&&(t.stopPropagation(),i(o)))},e.setHighlighted=function(){var t=e.props;(0,t.setHighlighted)(t.index)},e.resetHighlighted=function(){(0,e.props.setHighlighted)(-1)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,o=t.disabled,a=t.highlighted,l=t.className,s=t.activeClassName,c=t.disabledClassName,u=t.highlightedClassName,f=t.title;return i.a.createElement("li",{className:d()("rdw-dropdownoption-default",l,(U(e={},"rdw-dropdownoption-active ".concat(s),r),U(e,"rdw-dropdownoption-highlighted ".concat(u),a),U(e,"rdw-dropdownoption-disabled ".concat(c),o),e)),onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick,title:f},n)}}])&&q(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Y(e){return(Y="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)}function X(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)}}function J(e,t){return(J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ee(e);if(t){var i=ee(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}K.propTypes={children:a.a.any,value:a.a.any,onClick:a.a.func,onSelect:a.a.func,setHighlighted:a.a.func,index:a.a.number,disabled:a.a.bool,active:a.a.bool,highlighted:a.a.bool,className:a.a.string,activeClassName:a.a.string,disabledClassName:a.a.string,highlightedClassName:a.a.string,title:a.a.string},K.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""},n(14);var te=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(o,r.Component);var e,t,n=$(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState,r=e.onChange,o=e.translations;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",t.className),"aria-label":"rdw-inline-control"},t.options.map(function(e,a){return i.a.createElement(I,{key:a,value:e,onClick:r,className:d()(t[e].className),active:!0===n[e]||"MONOSPACE"===e&&n.CODE,title:t[e].title||o["components.controls.inline.".concat(e)]},i.a.createElement("img",{alt:"",src:t[e].icon}))}))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=e.onChange,c=e.translations,u=t.className,f=t.dropdownClassName,h=t.title;return i.a.createElement(P,{className:d()("rdw-inline-dropdown",u),optionWrapperClassName:d()(f),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-inline-control",title:h},i.a.createElement("img",{src:x(t),alt:""}),t.options.map(function(e,n){return i.a.createElement(K,{key:n,value:e,className:d()("rdw-inline-dropdownoption",t[e].className),active:!0===l[e]||"MONOSPACE"===e&&l.CODE,title:t[e].title||c["components.controls.inline.".concat(e)]},i.a.createElement("img",{src:t[e].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&X(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ne(e){return(ne="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)}function re(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)}}function ie(e,t){return(ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ae(e);if(t){var i=ae(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}te.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var le=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}(o,r.Component);var e,t,n=oe(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.toggleInlineStyle=function(e){var n="monospace"===e?"CODE":e.toUpperCase(),r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleInlineStyle(i,n);if("subscript"===e||"superscript"===e){var s="subscript"===e?"SUPERSCRIPT":"SUBSCRIPT",c=l.Modifier.removeInlineStyle(a.getCurrentContent(),a.getSelection(),s);a=l.EditorState.push(a,c,"change-inline-style")}a&&o(a)},t.changeKeys=function(e){if(e){var t={};return E(e,function(e,n){t["CODE"===e?"monospace":e.toLowerCase()]=n}),t}},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={currentStyles:i?t.changeKeys(Object(s.getSelectionInlineStyle)(i)):{}},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(s.getSelectionInlineStyle)(t))})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentStyles,l=t.component||te;return i.a.createElement(l,{config:t,translations:n,currentState:a,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle})}}])&&re(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function se(e){return(se="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)}function ce(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)}}function de(e,t){return(de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=fe(e);if(t){var i=fe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}le.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(15);var he=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(o,r.Component);var e,t,n=ue(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).getBlockTypes=function(e){return[{label:"Normal",displayName:e["components.controls.blocktype.normal"]},{label:"H1",displayName:e["components.controls.blocktype.h1"]},{label:"H2",displayName:e["components.controls.blocktype.h2"]},{label:"H3",displayName:e["components.controls.blocktype.h3"]},{label:"H4",displayName:e["components.controls.blocktype.h4"]},{label:"H5",displayName:e["components.controls.blocktype.h5"]},{label:"H6",displayName:e["components.controls.blocktype.h6"]},{label:"Blockquote",displayName:e["components.controls.blocktype.blockquote"]},{label:"Code",displayName:e["components.controls.blocktype.code"]}]},t.state={blockTypes:t.getBlockTypes(e.translations)},t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.translations;t!==e.translations&&this.setState({blockTypes:this.getBlockTypes(t)})}},{key:"renderFlat",value:function(e){var t=this.props,n=t.config.className,r=t.onChange,o=t.currentState.blockType;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",n)},e.map(function(e,t){return i.a.createElement(I,{key:t,value:e.label,active:o===e.label,onClick:r},e.displayName)}))}},{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.title,l=t.currentState.blockType,s=t.expanded,c=t.doExpand,u=t.onExpandEvent,f=t.doCollapse,h=t.onChange,p=t.translations,C=this.state.blockTypes.filter(function(e){return e.label===l}),m=C&&C[0]&&C[0].displayName;return i.a.createElement("div",{className:"rdw-block-wrapper","aria-label":"rdw-block-control"},i.a.createElement(P,{className:d()("rdw-block-dropdown",r),optionWrapperClassName:d()(o),onChange:h,expanded:s,doExpand:c,doCollapse:f,onExpandEvent:u,title:a||p["components.controls.blocktype.blocktype"]},i.a.createElement("span",null,m||p["components.controls.blocktype.blocktype"]),e.map(function(e,t){return i.a.createElement(K,{active:l===e.label,value:e.label,key:t},e.displayName)})))}},{key:"render",value:function(){var e=this.props.config,t=e.inDropdown,n=this.state.blockTypes.filter(function(t){var n=t.label;return-1<e.options.indexOf(n)});return t?this.renderInDropdown(n):this.renderFlat(n)}}])&&ce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();he.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var pe=he;function Ce(e){return(Ce="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)}function me(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)}}function ge(e,t){return(ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ye(e);if(t){var i=ye(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ye(e){return(ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var we=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ge(e,t)}(o,r.Component);var e,t,n=ve(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.blocksTypes=[{label:"Normal",style:"unstyled"},{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"},{label:"H5",style:"header-five"},{label:"H6",style:"header-six"},{label:"Blockquote",style:"blockquote"},{label:"Code",style:"code"}],t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.blocksTypes.find(function(t){return t.label===e}).style,r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleBlockType(i,n);a&&o(a)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:!1,currentBlockType:r?Object(s.getSelectedBlocksType)(r):"unstyled"},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(s.getSelectedBlocksType)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentBlockType,l=t.component||pe,s=this.blocksTypes.find(function(e){return e.style===a});return i.a.createElement(l,{config:t,translations:n,currentState:{blockType:s&&s.label},onChange:this.toggleBlockType,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();we.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var be=we;function Ee(e){return(Ee="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)}function Me(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)}}function Ae(e,t){return(Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Le(e);if(t){var i=Le(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Le(e){return(Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(16);var ke=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ae(e,t)}(o,r.Component);var e,t,n=xe(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontSize:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-size");t=t.substring(0,t.length-2),this.setState({defaultFontSize:t})}}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.dropdownClassName,a=t.options,l=t.title,s=e.onChange,c=e.expanded,u=e.doCollapse,f=e.onExpandEvent,h=e.doExpand,p=e.translations,C=this.props.currentState.fontSize,m=this.state.defaultFontSize;return m=Number(m),C=C||a&&0<=a.indexOf(m)&&m,i.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},i.a.createElement(P,{className:d()("rdw-fontsize-dropdown",r),optionWrapperClassName:d()(o),onChange:s,expanded:c,doExpand:h,doCollapse:u,onExpandEvent:f,title:l||p["components.controls.fontsize.fontsize"]},C?i.a.createElement("span",null,C):i.a.createElement("img",{src:n,alt:""}),a.map(function(e,t){return i.a.createElement(K,{className:"rdw-fontsize-option",active:C===e,value:e,key:t},e)})))}}])&&Me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function He(e){return(He="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)}function Se(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)}}function _e(e,t){return(_e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Oe(e);if(t){var i=Oe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===He(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ke.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var ze=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_e(e,t)}(o,r.Component);var e,t,n=Ve(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontSize=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontSize",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontSize:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTSIZE"]).FONTSIZE:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(s.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontSize,l=t.component||ke,s=a&&Number(a.substring(9));return i.a.createElement(l,{config:t,translations:n,currentState:{fontSize:s},onChange:this.toggleFontSize,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Ne(e){return(Ne="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)}function Te(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)}}function Ie(e,t){return(Ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function De(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ze(e);if(t){var i=Ze(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ze.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(17);var je=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ie(e,t)}(o,r.Component);var e,t,n=De(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontFamily:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-family");this.setState({defaultFontFamily:t})}}},{key:"render",value:function(){var e=this.state.defaultFontFamily,t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.options,l=n.title,s=t.translations,c=t.onChange,u=t.expanded,f=t.doCollapse,h=t.onExpandEvent,p=t.doExpand,C=this.props.currentState.fontFamily;return C=C||a&&e&&a.some(function(t){return t.toLowerCase()===e.toLowerCase()})&&e,i.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},i.a.createElement(P,{className:d()("rdw-fontfamily-dropdown",r),optionWrapperClassName:d()("rdw-fontfamily-optionwrapper",o),onChange:c,expanded:u,doExpand:p,doCollapse:f,onExpandEvent:h,title:l||s["components.controls.fontfamily.fontfamily"]},i.a.createElement("span",{className:"rdw-fontfamily-placeholder"},C||s["components.controls.fontfamily.fontfamily"]),a.map(function(e,t){return i.a.createElement(K,{active:C===e,value:e,key:t},e)})))}}])&&Te(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();je.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Re=je;function Be(e){return(Be="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)}function Pe(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)}}function Fe(e,t){return(Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=qe(e);if(t){var i=qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var We=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}(o,r.Component);var e,t,n=Ue(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontFamily=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontFamily",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontFamily:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTFAMILY"]).FONTFAMILY:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(s.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontFamily,l=t.component||Re,s=a&&a.substring(11);return i.a.createElement(l,{translations:n,config:t,currentState:{fontFamily:s},onChange:this.toggleFontFamily,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Pe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Qe(e){return(Qe="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)}function Ge(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)}}function Ke(e,t){return(Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Xe(e);if(t){var i=Xe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}We.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(18);var Je=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ke(e,t)}(o,r.Component);var e,t,n=Ye(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).options=["unordered","ordered","indent","outdent"],e.toggleBlockType=function(t){(0,e.props.onChange)(t)},e.indent=function(){(0,e.props.onChange)("indent")},e.outdent=function(){(0,e.props.onChange)("outdent")},e}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,r=e.translations,o=e.indentDisabled,a=e.outdentDisabled,l=t.options,s=t.unordered,c=t.ordered,u=t.indent,f=t.outdent,h=t.className;return i.a.createElement("div",{className:d()("rdw-list-wrapper",h),"aria-label":"rdw-list-control"},0<=l.indexOf("unordered")&&i.a.createElement(I,{value:"unordered",onClick:this.toggleBlockType,className:d()(s.className),active:"unordered"===n,title:s.title||r["components.controls.list.unordered"]},i.a.createElement("img",{src:s.icon,alt:""})),0<=l.indexOf("ordered")&&i.a.createElement(I,{value:"ordered",onClick:this.toggleBlockType,className:d()(c.className),active:"ordered"===n,title:c.title||r["components.controls.list.ordered"]},i.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("indent")&&i.a.createElement(I,{onClick:this.indent,disabled:o,className:d()(u.className),title:u.title||r["components.controls.list.indent"]},i.a.createElement("img",{src:u.icon,alt:""})),0<=l.indexOf("outdent")&&i.a.createElement(I,{onClick:this.outdent,disabled:a,className:d()(f.className),title:f.title||r["components.controls.list.outdent"]},i.a.createElement("img",{src:f.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this,t=this.props,n=t.config,r=t.expanded,o=t.doCollapse,a=t.doExpand,l=t.onExpandEvent,s=t.onChange,c=t.currentState.listType,u=t.translations,f=n.options,h=n.className,p=n.dropdownClassName,C=n.title;return i.a.createElement(P,{className:d()("rdw-list-dropdown",h),optionWrapperClassName:d()(p),onChange:s,expanded:r,doExpand:a,doCollapse:o,onExpandEvent:l,"aria-label":"rdw-list-control",title:C||u["components.controls.list.list"]},i.a.createElement("img",{src:x(n),alt:""}),this.options.filter(function(e){return 0<=f.indexOf(e)}).map(function(t,r){return i.a.createElement(K,{key:r,value:t,disabled:e.props["".concat(t,"Disabled")],className:d()("rdw-list-dropdownOption",n[t].className),active:c===t,title:n[t].title||u["components.controls.list.".concat(t)]},i.a.createElement("img",{src:n[t].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Ge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function $e(e){return($e="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)}function et(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)}}function tt(e,t){return(tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=rt(e);if(t){var i=rt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function rt(e){return(rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Je.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object,indentDisabled:a.a.bool,outdentDisabled:a.a.bool};var it=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tt(e,t)}(o,r.Component);var e,t,n=nt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){"unordered"===e?t.toggleBlockType("unordered-list-item"):"ordered"===e?t.toggleBlockType("ordered-list-item"):"indent"===e?t.adjustDepth(1):t.adjustDepth(-1)},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=l.RichUtils.toggleBlockType(i,e);o&&r(o)},t.adjustDepth=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=Object(s.changeDepth)(i,e,4);o&&r(o)},t.isIndentDisabled=function(){var e=t.props.editorState,n=t.state.currentBlock,r=Object(s.getBlockBeforeSelectedBlock)(e);return!r||!Object(s.isListBlock)(n)||r.get("type")!==n.get("type")||r.get("depth")<n.get("depth")},t.isOutdentDisabled=function(){var e=t.state.currentBlock;return!e||!Object(s.isListBlock)(e)||e.get("depth")<=0};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,currentBlock:i?Object(s.getSelectedBlock)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(s.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,o=this.state,a=o.expanded,l=o.currentBlock,s=n.component||Je;"unordered-list-item"===l.get("type")?e="unordered":"ordered-list-item"===l.get("type")&&(e="ordered");var c=this.isIndentDisabled(),d=this.isOutdentDisabled();return i.a.createElement(s,{config:n,translations:r,currentState:{listType:e},expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,indentDisabled:c,outdentDisabled:d})}}])&&et(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ot(e){return(ot="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)}function at(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)}}function lt(e,t){return(lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function st(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ct(e);if(t){var i=ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ct(e){return(ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}it.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(19);var dt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&<(e,t)}(o,r.Component);var e,t,n=st(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,a=t.right,l=t.justify,s=t.className,c=e.onChange,u=e.currentState.textAlignment,f=e.translations;return i.a.createElement("div",{className:d()("rdw-text-align-wrapper",s),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&i.a.createElement(I,{value:"left",className:d()(r.className),active:"left"===u,onClick:c,title:r.title||f["components.controls.textalign.left"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&i.a.createElement(I,{value:"center",className:d()(o.className),active:"center"===u,onClick:c,title:o.title||f["components.controls.textalign.center"]},i.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&i.a.createElement(I,{value:"right",className:d()(a.className),active:"right"===u,onClick:c,title:a.title||f["components.controls.textalign.right"]},i.a.createElement("img",{src:a.icon,alt:""})),0<=n.indexOf("justify")&&i.a.createElement(I,{value:"justify",className:d()(l.className),active:"justify"===u,onClick:c,title:l.title||f["components.controls.textalign.justify"]},i.a.createElement("img",{src:l.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState.textAlignment,s=e.onChange,c=e.translations,u=t.options,f=t.left,h=t.center,p=t.right,C=t.justify,m=t.className,g=t.dropdownClassName,v=t.title;return i.a.createElement(P,{className:d()("rdw-text-align-dropdown",m),optionWrapperClassName:d()(g),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:v||c["components.controls.textalign.textalign"]},i.a.createElement("img",{src:l&&t[l]&&t[l].icon||x(t),alt:""}),0<=u.indexOf("left")&&i.a.createElement(K,{value:"left",active:"left"===l,className:d()("rdw-text-align-dropdownOption",f.className),title:f.title||c["components.controls.textalign.left"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("center")&&i.a.createElement(K,{value:"center",active:"center"===l,className:d()("rdw-text-align-dropdownOption",h.className),title:h.title||c["components.controls.textalign.center"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=u.indexOf("right")&&i.a.createElement(K,{value:"right",active:"right"===l,className:d()("rdw-text-align-dropdownOption",p.className),title:p.title||c["components.controls.textalign.right"]},i.a.createElement("img",{src:p.icon,alt:""})),0<=u.indexOf("justify")&&i.a.createElement(K,{value:"justify",active:"justify"===l,className:d()("rdw-text-align-dropdownOption",C.className),title:C.title||c["components.controls.textalign.justify"]},i.a.createElement("img",{src:C.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&at(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ut(e){return(ut="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)}function ft(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)}}function ht(e,t){return(ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ct(e);if(t){var i=Ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ut(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ct(e){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}dt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var mt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ht(e,t)}(o,r.Component);var e,t,n=pt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.addBlockAlignmentData=function(e){var n=t.props,r=n.editorState;(0,n.onChange)(t.state.currentTextAlignment!==e?Object(s.setBlockData)(r,{"text-align":e}):Object(s.setBlockData)(r,{"text-align":void 0}))};var r=t.props.modalHandler;return t.state={currentTextAlignment:void 0},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(s.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentTextAlignment,l=t.component||dt;return i.a.createElement(l,{config:t,translations:n,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:a},onChange:this.addBlockAlignmentData})}}])&&ft(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function gt(e){return(gt="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)}function vt(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)}}function yt(e,t){return(yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=bt(e);if(t){var i=bt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function bt(e){return(bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}mt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(20);var Et=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yt(e,t)}(o,r.Component);var e,t,n=wt(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return(e=n.call.apply(n,[this].concat(r))).state={currentStyle:"color"},e.onChange=function(t){(0,e.props.onChange)(e.state.currentStyle,t)},e.setCurrentStyleColor=function(){e.setState({currentStyle:"color"})},e.setCurrentStyleBgcolor=function(){e.setState({currentStyle:"bgcolor"})},e.renderModal=function(){var t=e.props,n=t.config,r=n.popupClassName,o=n.colors,a=t.currentState,l=a.color,s=a.bgColor,c=t.translations,u=e.state.currentStyle,f="color"===u?l:s;return i.a.createElement("div",{className:d()("rdw-colorpicker-modal",r),onClick:A},i.a.createElement("span",{className:"rdw-colorpicker-modal-header"},i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"color"===u}),onClick:e.setCurrentStyleColor},c["components.controls.colorpicker.text"]),i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"bgcolor"===u}),onClick:e.setCurrentStyleBgcolor},c["components.controls.colorpicker.background"])),i.a.createElement("span",{className:"rdw-colorpicker-modal-options"},o.map(function(t,n){return i.a.createElement(I,{value:t,key:n,className:"rdw-colorpicker-option",activeClassName:"rdw-colorpicker-option-active",active:f===t,onClick:e.onChange},i.a.createElement("span",{style:{backgroundColor:t},className:"rdw-colorpicker-cube"}))})))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&this.setState({currentStyle:"color"})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-colorpicker-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-color-picker",title:o||s["components.controls.colorpicker.colorpicker"]},i.a.createElement(I,{onClick:l,className:d()(r)},i.a.createElement("img",{src:n,alt:""})),a?this.renderModal():void 0)}}])&&vt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Et.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Mt=Et;function At(e){return(At="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)}function xt(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)}}function Lt(e,t){return(Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ht(e);if(t){var i=Ht(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===At(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var St=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lt(e,t)}(o,r.Component);var e,t,n=kt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).state={expanded:!1,currentColor:void 0,currentBgColor:void 0},t.onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleColor=function(e,n){var r=t.props,i=r.editorState,o=r.onChange,a=Object(s.toggleCustomInlineStyle)(i,e,n);a&&o(a),t.doCollapse()};var r=e.editorState,i=e.modalHandler,a={expanded:!1,currentColor:void 0,currentBgColor:void 0};return r&&(a.currentColor=Object(s.getSelectionCustomInlineStyle)(r,["COLOR"]).COLOR,a.currentBgColor=Object(s.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR),t.state=a,i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentColor:Object(s.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR,currentBgColor:Object(s.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.currentColor,a=r.currentBgColor,l=r.expanded,s=t.component||Mt,c=o&&o.substring(6),d=a&&a.substring(8);return i.a.createElement(s,{config:t,translations:n,onChange:this.toggleColor,expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{color:c,bgColor:d}})}}])&&xt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();St.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var _t=St,Vt=n(7),Ot=n.n(Vt);function zt(e){return(zt="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)}function Nt(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)}}function Tt(e,t){return(Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function It(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Dt(e);if(t){var i=Dt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===zt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Dt(e){return(Dt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(26);var Zt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tt(e,t)}(o,r.Component);var e,t,n=It(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:e.props.config.defaultTargetOption},e.removeLink=function(){(0,e.props.onChange)("unlink")},e.addLink=function(){var t=e.props.onChange,n=e.state;t("link",n.linkTitle,n.linkTarget,n.linkTargetOption)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.updateTargetOption=function(t){e.setState({linkTargetOption:t.target.checked?"_blank":"_self"})},e.hideModal=function(){e.setState({showModal:!1})},e.signalExpandShowModal=function(){var t=e.props,n=t.onExpandEvent,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target||"",linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e.forceExpandAndShowModal=function(){var t=e.props,n=t.doExpand,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target,linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption})}},{key:"renderAddLinkModal",value:function(){var e=this.props,t=e.config.popupClassName,n=e.doCollapse,r=e.translations,o=this.state,a=o.linkTitle,l=o.linkTarget,s=o.linkTargetOption;return i.a.createElement("div",{className:d()("rdw-link-modal",t),onClick:A},i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTitle"},r["components.controls.link.linkTitle"]),i.a.createElement("input",{id:"linkTitle",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:a}),i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTarget"},r["components.controls.link.linkTarget"]),i.a.createElement("input",{id:"linkTarget",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:l}),i.a.createElement("label",{className:"rdw-link-modal-target-option",htmlFor:"openLinkInNewWindow"},i.a.createElement("input",{id:"openLinkInNewWindow",type:"checkbox",defaultChecked:"_blank"===s,value:"_blank",onChange:this.updateTargetOption}),i.a.createElement("span",null,r["components.controls.link.linkTargetOption"])),i.a.createElement("span",{className:"rdw-link-modal-buttonsection"},i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:this.addLink,disabled:!l||!a},r["generic.add"]),i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:n},r["generic.cancel"])))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.link,o=t.unlink,a=t.className,l=e.currentState,s=e.expanded,c=e.translations,u=this.state.showModal;return i.a.createElement("div",{className:d()("rdw-link-wrapper",a),"aria-label":"rdw-link-control"},0<=n.indexOf("link")&&i.a.createElement(I,{value:"unordered-list-item",className:d()(r.className),onClick:this.signalExpandShowModal,"aria-haspopup":"true","aria-expanded":u,title:r.title||c["components.controls.link.link"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("unlink")&&i.a.createElement(I,{disabled:!l.link,value:"ordered-list-item",className:d()(o.className),onClick:this.removeLink,title:o.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:o.icon,alt:""})),s&&u?this.renderAddLinkModal():void 0)}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.expanded,n=e.onExpandEvent,r=e.doCollapse,o=e.doExpand,a=e.onChange,l=e.config,s=e.currentState,c=e.translations,u=l.options,f=l.link,h=l.unlink,p=l.className,C=l.dropdownClassName,m=l.title,g=this.state.showModal;return i.a.createElement("div",{className:"rdw-link-wrapper","aria-haspopup":"true","aria-label":"rdw-link-control","aria-expanded":t,title:m},i.a.createElement(P,{className:d()("rdw-link-dropdown",p),optionWrapperClassName:d()(C),onChange:a,expanded:t&&!g,doExpand:o,doCollapse:r,onExpandEvent:n},i.a.createElement("img",{src:x(l),alt:""}),0<=u.indexOf("link")&&i.a.createElement(K,{onClick:this.forceExpandAndShowModal,className:d()("rdw-link-dropdownoption",f.className),title:f.title||c["components.controls.link.link"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("unlink")&&i.a.createElement(K,{onClick:this.removeLink,disabled:!s.link,className:d()("rdw-link-dropdownoption",h.className),title:h.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:h.icon,alt:""}))),t&&g?this.renderAddLinkModal():void 0)}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Nt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Zt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var jt=Zt;function Rt(e){return(Rt="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)}function Bt(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)}}function Pt(e,t){return(Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ut(e);if(t){var i=Ut(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Rt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ut(e){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(n),!0).forEach(function(t){Qt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gt(e){var t=Kt.match(e.target);return Wt(Wt({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var Kt=Ot()(),Yt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pt(e,t)}(o,r.Component);var e,t,n=Ft(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e,n,r,i){var o=t.props.config.linkCallback;if("link"===e){var a=(o||Gt)({title:n,target:r,targetOption:i});t.addLink(a.title,a.target,a.targetOption)}else t.removeLink()},t.getCurrentValues=function(){var e=t.props.editorState,n=t.state.currentEntity,r=e.getCurrentContent(),i={};if(n&&"LINK"===r.getEntity(n).get("type")){i.link={};var o=n&&Object(s.getEntityRange)(e,n);i.link.target=n&&r.getEntity(n).get("data").url,i.link.targetOption=n&&r.getEntity(n).get("data").targetOption,i.link.title=o&&o.text}return i.selectionText=Object(s.getSelectionText)(e),i},t.doExpand=function(){t.setState({expanded:!0})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doCollapse=function(){t.setState({expanded:!1})},t.removeLink=function(){var e=t.props,n=e.editorState,r=e.onChange,i=t.state.currentEntity,o=n.getSelection();if(i){var a=Object(s.getEntityRange)(n,i);o=o.getIsBackward()?o.merge({anchorOffset:a.end,focusOffset:a.start}):o.merge({anchorOffset:a.start,focusOffset:a.end}),r(l.RichUtils.toggleLink(n,o,null))}},t.addLink=function(e,n,r){var i=t.props,o=i.editorState,a=i.onChange,c=t.state.currentEntity,d=o.getSelection();if(c){var u=Object(s.getEntityRange)(o,c);d=d.getIsBackward()?d.merge({anchorOffset:u.end,focusOffset:u.start}):d.merge({anchorOffset:u.start,focusOffset:u.end})}var f=o.getCurrentContent().createEntity("LINK","MUTABLE",{url:n,targetOption:r}).getLastCreatedEntityKey(),h=l.Modifier.replaceText(o.getCurrentContent(),d,"".concat(e),o.getCurrentInlineStyle(),f),p=l.EditorState.push(o,h,"insert-characters");d=p.getSelection().merge({anchorOffset:d.get("anchorOffset")+e.length,focusOffset:d.get("anchorOffset")+e.length}),p=l.EditorState.acceptSelection(p,d),h=l.Modifier.insertText(p.getCurrentContent(),d," ",p.getCurrentInlineStyle(),void 0),a(l.EditorState.push(p,h,"insert-characters")),t.doCollapse()};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,link:void 0,selectionText:void 0,currentEntity:i?Object(s.getSelectionEntity)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(s.getSelectionEntity)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=this.getCurrentValues(),a=o.link,l=o.selectionText,s=t.component||jt;return i.a.createElement(s,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:a,selectionText:l},onChange:this.onChange})}}])&&Bt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Yt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Xt=Yt;function Jt(e){return(Jt="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)}function $t(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)}}function en(e,t){return(en=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=nn(e);if(t){var i=nn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Jt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function nn(e){return(nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(27);var rn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&en(e,t)}(o,r.Component);var e,t,n=tn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={embeddedLink:"",height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width},e.onChange=function(){var t=e.props.onChange,n=e.state;t(n.embeddedLink,n.height,n.width)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,r=t.config;if(!n&&e.expanded){var i=r.defaultSize,o=i.height,a=i.width;this.setState({embeddedLink:"",height:o,width:a})}}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,r=e.width,o=this.props,a=o.config.popupClassName,l=o.doCollapse,s=o.translations;return i.a.createElement("div",{className:d()("rdw-embedded-modal",a),onClick:A},i.a.createElement("div",{className:"rdw-embedded-modal-header"},i.a.createElement("span",{className:"rdw-embedded-modal-header-option"},s["components.controls.embedded.embeddedlink"],i.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),i.a.createElement("div",{className:"rdw-embedded-modal-link-section"},i.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},i.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:s["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("div",{className:"rdw-embedded-modal-size"},i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:r,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),i.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!r},s["generic.add"]),i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:l},s["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-embedded-control"},i.a.createElement(I,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.embedded.embedded"]},i.a.createElement("img",{src:n,alt:""})),a?this.rendeEmbeddedLinkModal():void 0)}}])&&$t(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();rn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,doCollapse:a.a.func};var on=rn;function an(e){return(an="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)}function ln(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)}}function sn(e,t){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=dn(e);if(t){var i=dn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===an(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var un=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sn(e,t)}(o,r.Component);var e,t,n=cn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmbeddedLink=function(t,n,r){var i=e.props,o=i.editorState,a=i.onChange,s=i.config.embedCallback,c=s?s(t):t,d=o.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:c,height:n,width:r}).getLastCreatedEntityKey();a(l.AtomicBlockUtils.insertAtomicBlock(o,d," ")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||on;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmbeddedLink,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&ln(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();un.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var fn=un;function hn(e){return(hn="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)}function pn(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)}}function Cn(e,t){return(Cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=gn(e);if(t){var i=gn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===hn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function gn(e){return(gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(28);var vn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cn(e,t)}(o,r.Component);var e,t,n=mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t.target.innerHTML)},e}return e=o,(t=[{key:"renderEmojiModal",value:function(){var e=this,t=this.props.config,n=t.popupClassName,r=t.emojis;return i.a.createElement("div",{className:d()("rdw-emoji-modal",n),onClick:A},r.map(function(t,n){return i.a.createElement("span",{key:n,className:"rdw-emoji-icon",alt:"",onClick:e.onChange},t)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":a,title:o||s["components.controls.emoji.emoji"]},i.a.createElement(I,{className:d()(r),value:"unordered-list-item",onClick:l},i.a.createElement("img",{src:n,alt:""})),a?this.renderEmojiModal():void 0)}}])&&pn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();vn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var yn=vn;function wn(e){return(wn="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)}function bn(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)}}function En(e,t){return(En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=An(e);if(t){var i=An(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function An(e){return(An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&En(e,t)}(o,r.Component);var e,t,n=Mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmoji=function(t){var n=e.props,r=n.editorState,i=n.onChange,o=l.Modifier.replaceText(r.getCurrentContent(),r.getSelection(),t,r.getCurrentInlineStyle());i(l.EditorState.push(r,o,"insert-characters")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||yn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmoji,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&bn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Ln(){return i.a.createElement("div",{className:"rdw-spinner"},i.a.createElement("div",{className:"rdw-bounce1"}),i.a.createElement("div",{className:"rdw-bounce2"}),i.a.createElement("div",{className:"rdw-bounce3"}))}function kn(e){return(kn="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)}function Hn(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)}}function Sn(e,t){return(Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Vn(e);if(t){var i=Vn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Vn(e){return(Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(29),n(30);var On=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sn(e,t)}(o,r.Component);var e,t,n=_n(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={imgSrc:"",dragEnter:!1,uploadHighlighted:e.props.config.uploadEnabled&&!!e.props.config.uploadCallback,showImageLoading:!1,height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width,alt:""},e.onDragEnter=function(t){e.stopPropagation(t),e.setState({dragEnter:!0})},e.onImageDrop=function(t){var n,r;t.preventDefault(),t.stopPropagation(),e.setState({dragEnter:!1}),r=t.dataTransfer.items?(n=t.dataTransfer.items,!0):(n=t.dataTransfer.files,!1);for(var i=0;i<n.length;i+=1)if((!r||"file"===n[i].kind)&&n[i].type.match("^image/")){var o=r?n[i].getAsFile():n[i];e.uploadImage(o)}},e.showImageUploadOption=function(){e.setState({uploadHighlighted:!0})},e.addImageFromState=function(){var t=e.state,n=t.imgSrc,r=t.alt,i=e.state,o=i.height,a=i.width,l=e.props.onChange;isNaN(o)||(o+="px"),isNaN(a)||(a+="px"),l(n,o,a,r)},e.showImageURLOption=function(){e.setState({uploadHighlighted:!1})},e.toggleShowImageLoading=function(){var t=!e.state.showImageLoading;e.setState({showImageLoading:t})},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.selectImage=function(t){t.target.files&&0<t.target.files.length&&e.uploadImage(t.target.files[0])},e.uploadImage=function(t){e.toggleShowImageLoading(),(0,e.props.config.uploadCallback)(t).then(function(t){var n=t.data;e.setState({showImageLoading:!1,dragEnter:!1,imgSrc:n.link||n.url}),e.fileUpload=!1}).catch(function(){e.setState({showImageLoading:!1,dragEnter:!1})})},e.fileUploadClick=function(t){e.fileUpload=!0,t.stopPropagation()},e.stopPropagation=function(t){e.fileUpload?e.fileUpload=!1:(t.preventDefault(),t.stopPropagation())},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"renderAddImageModal",value:function(){var e=this.state,t=e.imgSrc,n=e.uploadHighlighted,r=e.showImageLoading,o=e.dragEnter,a=e.height,l=e.width,s=e.alt,c=this.props,u=c.config,f=u.popupClassName,h=u.uploadCallback,p=u.uploadEnabled,C=u.urlEnabled,m=u.previewImage,g=u.inputAccept,v=u.alt,y=c.doCollapse,w=c.translations;return i.a.createElement("div",{className:d()("rdw-image-modal",f),onClick:this.stopPropagation},i.a.createElement("div",{className:"rdw-image-modal-header"},p&&h&&i.a.createElement("span",{onClick:this.showImageUploadOption,className:"rdw-image-modal-header-option"},w["components.controls.image.fileUpload"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":n})})),C&&i.a.createElement("span",{onClick:this.showImageURLOption,className:"rdw-image-modal-header-option"},w["components.controls.image.byURL"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":!n})}))),n?i.a.createElement("div",{onClick:this.fileUploadClick},i.a.createElement("div",{onDragEnter:this.onDragEnter,onDragOver:this.stopPropagation,onDrop:this.onImageDrop,className:d()("rdw-image-modal-upload-option",{"rdw-image-modal-upload-option-highlighted":o})},i.a.createElement("label",{htmlFor:"file",className:"rdw-image-modal-upload-option-label"},m&&t?i.a.createElement("img",{src:t,alt:t,className:"rdw-image-modal-upload-option-image-preview"}):t||w["components.controls.image.dropFileText"])),i.a.createElement("input",{type:"file",id:"file",accept:g,onChange:this.selectImage,className:"rdw-image-modal-upload-option-input"})):i.a.createElement("div",{className:"rdw-image-modal-url-section"},i.a.createElement("input",{className:"rdw-image-modal-url-input",placeholder:w["components.controls.image.enterlink"],name:"imgSrc",onChange:this.updateValue,onBlur:this.updateValue,value:t}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),v.present&&i.a.createElement("div",{className:"rdw-image-modal-size"},i.a.createElement("span",{className:"rdw-image-modal-alt-lbl"},"Alt Text"),i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:s,name:"alt",className:"rdw-image-modal-alt-input",placeholder:"alt"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},v.mandatory&&"*")),i.a.createElement("div",{className:"rdw-image-modal-size"},"↕ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:a,name:"height",className:"rdw-image-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")," ↔ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:l,name:"width",className:"rdw-image-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",{className:"rdw-image-modal-btn-section"},i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:this.addImageFromState,disabled:!t||!a||!l||v.mandatory&&!s},w["generic.add"]),i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:y},w["generic.cancel"])),r?i.a.createElement("div",{className:"rdw-image-modal-spinner"},i.a.createElement(Ln,null)):void 0)}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-image-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-image-control"},i.a.createElement(I,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.image.image"]},i.a.createElement("img",{src:n,alt:""})),a?this.renderAddImageModal():void 0)}}])&&Hn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();On.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var zn=On;function Nn(e){return(Nn="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)}function Tn(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)}}function In(e,t){return(In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Zn(e);if(t){var i=Zn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Nn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Zn(e){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&In(e,t)}(o,r.Component);var e,t,n=Dn(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.addImage=function(e,n,r,i){var o=t.props,a=o.editorState,s=o.onChange,c={src:e,height:n,width:r};o.config.alt.present&&(c.alt=i);var d=a.getCurrentContent().createEntity("IMAGE","MUTABLE",c).getLastCreatedEntityKey();s(l.AtomicBlockUtils.insertAtomicBlock(a,d," ")),t.doCollapse()};var r=t.props.modalHandler;return t.state={expanded:!1},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||zn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addImage,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Tn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Rn(e){var t=e.config,n=e.onChange,r=e.translations,o=t.icon,a=t.className,l=t.title;return i.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},i.a.createElement(I,{className:d()(a),onClick:n,title:l||r["components.controls.remove.remove"]},i.a.createElement("img",{src:o,alt:""})))}jn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Bn=jn;n(31),Rn.propTypes={onChange:a.a.func,config:a.a.object,translations:a.a.object};var Pn=Rn;function Fn(e){return(Fn="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)}function Un(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)}}function qn(e,t){return(qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Qn(e);if(t){var i=Qn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Fn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Qn(e){return(Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qn(e,t)}(o,r.Component);var e,t,n=Wn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.removeInlineStyles=function(){var t=e.props,n=t.editorState;(0,t.onChange)(e.removeAllInlineStyles(n))},e.removeAllInlineStyles=function(e){var t=e.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(n){t=l.Modifier.removeInlineStyle(t,e.getSelection(),n)}),E(Object(s.getSelectionCustomInlineStyle)(e,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(n,r){r&&(t=l.Modifier.removeInlineStyle(t,e.getSelection(),r))}),l.EditorState.push(e,t,"change-inline-style")},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||Pn;return i.a.createElement(o,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Un(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Kn(e){return(Kn="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)}function Yn(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)}}function Xn(e,t){return(Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=$n(e);if(t){var i=$n(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function $n(e){return($n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Gn.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,config:a.a.object,translations:a.a.object,modalHandler:a.a.object},n(32);var er=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xn(e,t)}(o,r.Component);var e,t,n=Jn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t)},e}return e=o,(t=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations,f=t.options,h=t.undo,p=t.redo,C=t.className,m=t.dropdownClassName,g=t.title;return i.a.createElement(P,{className:d()("rdw-history-dropdown",C),optionWrapperClassName:d()(m),expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-history-control",title:g||u["components.controls.history.history"]},i.a.createElement("img",{src:x(t),alt:""}),0<=f.indexOf("undo")&&i.a.createElement(K,{value:"undo",onClick:this.onChange,disabled:s,className:d()("rdw-history-dropdownoption",h.className),title:h.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=f.indexOf("redo")&&i.a.createElement(K,{value:"redo",onClick:this.onChange,disabled:c,className:d()("rdw-history-dropdownoption",p.className),title:p.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:p.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,a=t.className,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations;return i.a.createElement("div",{className:d()("rdw-history-wrapper",a),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&i.a.createElement(I,{value:"undo",onClick:this.onChange,className:d()(r.className),disabled:s,title:r.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&i.a.createElement(I,{value:"redo",onClick:this.onChange,className:d()(o.className),disabled:c,title:o.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Yn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function tr(e){return(tr="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)}function nr(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)}}function rr(e,t){return(rr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ir(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=or(e);if(t){var i=or(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===tr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function or(e){return(or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}er.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var ar=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rr(e,t)}(o,r.Component);var e,t,n=ir(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=l.EditorState[e](r);o&&i(o)},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r={expanded:!(t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},i=e.editorState,a=e.modalHandler;return i&&(r.undoDisabled=0===i.getUndoStack().size,r.redoDisabled=0===i.getRedoStack().size),t.state=r,a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.undoDisabled,a=r.redoDisabled,l=r.expanded,s=t.component||er;return i.a.createElement(s,{config:t,translations:n,currentState:{undoDisabled:o,redoDisabled:a},expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&nr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ar.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var lr={inline:le,blockType:be,fontSize:ze,fontFamily:We,list:it,textAlign:mt,colorPicker:_t,link:Xt,embedded:fn,emoji:xn,image:Bn,remove:Gn,history:ar},sr=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,cr=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function dr(e){return String(e).replace(sr,"").match(cr)?e:"#"}function ur(e){return(ur="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)}function fr(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)}}function hr(e,t){return(hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Cr(e);if(t){var i=Cr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Cr(e){return(Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mr(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)}function gr(e){var t,n=e.showOpenOptionOnHover;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hr(e,t)}(a,r.Component);var e,t,o=pr(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={showPopOver:!1},e.openLink=function(){var t=e.props,n=t.entityKey,r=t.contentState.getEntity(n).getData().url,i=window.open(dr(r),"blank");i&&i.focus()},e.toggleShowPopOver=function(){var t=!e.state.showPopOver;e.setState({showPopOver:t})},e}return e=a,(t=[{key:"render",value:function(){var e=this.props,t=e.children,r=e.entityKey,o=e.contentState.getEntity(r).getData(),a=o.url,l=o.targetOption,s=this.state.showPopOver;return i.a.createElement("span",{className:"rdw-link-decorator-wrapper",onMouseEnter:this.toggleShowPopOver,onMouseLeave:this.toggleShowPopOver},i.a.createElement("a",{href:dr(a),target:l},t),s&&n?i.a.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuMDcyIDBIOC45MTVhLjkyNS45MjUgMCAwIDAgMCAxLjg0OWgyLjkyNUw2Ljk2MSA2LjcyN2EuOTE4LjkxOCAwIDAgMC0uMjcuNjU0YzAgLjI0Ny4wOTUuNDguMjcuNjU0YS45MTguOTE4IDAgMCAwIC42NTQuMjcuOTE4LjkxOCAwIDAgMCAuNjUzLS4yN2w0Ljg4LTQuODh2Mi45MjZhLjkyNS45MjUgMCAwIDAgMS44NDggMFYuOTI0QS45MjUuOTI1IDAgMCAwIDE0LjA3MiAweiIvPjxwYXRoIGQ9Ik0xMC42MjMgMTMuNDExSDEuNTg1VjQuMzcyaDYuNzk4bDEuNTg0LTEuNTg0SC43OTJBLjc5Mi43OTIgMCAwIDAgMCAzLjU4djEwLjYyNGMwIC40MzcuMzU1Ljc5Mi43OTIuNzkyaDEwLjYyNGEuNzkyLjc5MiAwIDAgMCAuNzkyLS43OTJWNS4wMjlsLTEuNTg1IDEuNTg0djYuNzk4eiIvPjwvZz48L3N2Zz4=",alt:"",onClick:this.openLink,className:"rdw-link-decorator-icon"}):void 0)}}])&&fr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}()).propTypes={entityKey:a.a.string.isRequired,children:a.a.array,contentState:a.a.object},t}function vr(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}n(33),n(34);var yr=vr(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getMentionComponent=function(){function e(e){var n=e.entityKey,r=e.children,o=e.contentState.getEntity(n).getData(),a=o.url,l=o.value;return i.a.createElement("a",{href:a||l,className:d()("rdw-mention-link",t)},r)}var t=n.className;return e.propTypes={entityKey:a.a.number,children:a.a.array,contentState:a.a.object},e},this.getMentionDecorator=function(){return{strategy:n.findMentionEntities,component:n.getMentionComponent()}},this.className=t});yr.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"MENTION"===n.getEntity(t).getType()},t)};var wr=yr;function br(e){return(br="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)}function Er(e,t){return(Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ar(e);if(t){var i=Ar(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===br(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ar(e){return(Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xr(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)}}function Lr(e,t,n){return t&&xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n(35);var Hr=Lr(function e(t){var n=this;kr(this,e),this.findSuggestionEntities=function(e,t){if(n.config.getEditorState()){var r=n.config,i=r.separator,o=r.trigger,a=r.getSuggestions,l=(0,r.getEditorState)().getSelection();if(l.get("anchorKey")===e.get("key")&&l.get("anchorKey")===l.get("focusKey")){var s=e.getText(),c=(s=s.substr(0,l.get("focusOffset")===s.length-1?s.length:l.get("focusOffset")+1)).lastIndexOf(i+o),d=i+o;if((void 0===c||c<0)&&s[0]===o&&(c=0,d=o),0<=c){var u=s.substr(c+d.length,s.length);a().some(function(e){return!!e.value&&(n.config.caseSensitive?0<=e.value.indexOf(u):0<=e.value.toLowerCase().indexOf(u&&u.toLowerCase()))})&&t(0===c?0:c+1,s.length)}}}},this.getSuggestionComponent=function(){var e,t=this.config;return(e=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Er(e,t)}(n,r.Component);var e=Mr(n);function n(){var r;kr(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=e.call.apply(e,[this].concat(o))).state={style:{left:15},activeOption:-1,showSuggestions:!0},r.onEditorKeyDown=function(e){var t=r.state.activeOption,n={};"ArrowDown"===e.key?(e.preventDefault(),t===r.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=t+1):"ArrowUp"===e.key?n.activeOption=t<=0?r.filteredSuggestions.length-1:t-1:"Escape"===e.key?(n.showSuggestions=!1,y()):"Enter"===e.key&&r.addMention(),r.setState(n)},r.onOptionMouseEnter=function(e){var t=e.target.getAttribute("data-index");r.setState({activeOption:t})},r.onOptionMouseLeave=function(){r.setState({activeOption:-1})},r.setSuggestionReference=function(e){r.suggestion=e},r.setDropdownReference=function(e){r.dropdown=e},r.closeSuggestionDropdown=function(){r.setState({showSuggestions:!1})},r.filteredSuggestions=[],r.filterSuggestions=function(e){var n=e.children[0].props.text.substr(1),i=t.getSuggestions();r.filteredSuggestions=i&&i.filter(function(e){return!n||0===n.length||(t.caseSensitive?0<=e.value.indexOf(n):0<=e.value.toLowerCase().indexOf(n&&n.toLowerCase()))})},r.addMention=function(){var e=r.state.activeOption,n=t.getEditorState(),i=t.onChange,o=t.separator,a=t.trigger,c=r.filteredSuggestions[e];c&&function(e,t,n,r,i){var o=i.value,a=i.url,c=e.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(r).concat(o),value:o,url:a}).getLastCreatedEntityKey(),d=Object(s.getSelectedBlock)(e).getText(),u=e.getSelection().focusOffset,f=(d.lastIndexOf(n+r,u)||0)+1,h=!1;d.length===f+1&&(u=d.length)," "===d[u]&&(h=!0);var p=e.getSelection().merge({anchorOffset:f,focusOffset:u}),C=l.EditorState.acceptSelection(e,p),m=l.Modifier.replaceText(C.getCurrentContent(),p,"".concat(r).concat(o),C.getCurrentInlineStyle(),c);C=l.EditorState.push(C,m,"insert-characters"),h||(p=C.getSelection().merge({anchorOffset:f+o.length+r.length,focusOffset:f+o.length+r.length}),C=l.EditorState.acceptSelection(C,p),m=l.Modifier.insertText(C.getCurrentContent(),p," ",C.getCurrentInlineStyle(),void 0)),t(l.EditorState.push(C,m,"insert-characters"))}(n,i,o,a,c)},r}return Lr(n,[{key:"componentDidMount",value:function(){var e,n,r,i=t.getWrapperRef().getBoundingClientRect(),o=this.suggestion.getBoundingClientRect(),a=this.dropdown.getBoundingClientRect();i.width<o.left-i.left+a.width?n=15:e=15,i.bottom<a.bottom&&(r=0),this.setState({style:{left:e,right:n,bottom:r}}),g.registerCallBack(this.onEditorKeyDown),v(),t.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.filterSuggestions(this.props)}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.filterSuggestions(e),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){g.deregisterCallBack(this.onEditorKeyDown),y(),t.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this,n=this.props.children,r=this.state,o=r.activeOption,a=r.showSuggestions,l=t.dropdownClassName,s=t.optionClassName;return i.a.createElement("span",{className:"rdw-suggestion-wrapper",ref:this.setSuggestionReference,onClick:t.modalHandler.onSuggestionClick,"aria-haspopup":"true","aria-label":"rdw-suggestion-popup"},i.a.createElement("span",null,n),a&&i.a.createElement("span",{className:d()("rdw-suggestion-dropdown",l),contentEditable:"false",suppressContentEditableWarning:!0,style:this.state.style,ref:this.setDropdownReference},this.filteredSuggestions.map(function(t,n){return i.a.createElement("span",{key:n,spellCheck:!1,onClick:e.addMention,"data-index":n,onMouseEnter:e.onOptionMouseEnter,onMouseLeave:e.onOptionMouseLeave,className:d()("rdw-suggestion-option",s,{"rdw-suggestion-option-active":n===o})},t.text)})))}}]),n}()).propTypes={children:a.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:n.findSuggestionEntities,component:n.getSuggestionComponent()}};var o=t.separator,c=t.trigger,u=t.getSuggestions,f=t.onChange,h=t.getEditorState,p=t.getWrapperRef,C=t.caseSensitive,m=t.dropdownClassName,w=t.optionClassName,b=t.modalHandler;this.config={separator:o,trigger:c,getSuggestions:u,onChange:f,getEditorState:h,getWrapperRef:p,caseSensitive:C,dropdownClassName:m,optionClassName:w,modalHandler:b}}),Sr=function(e){return[new wr(e.mentionClassName).getMentionDecorator(),new Hr(e).getSuggestionDecorator()]};function _r(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function Vr(e){var t=e.block,n=e.contentState.getEntity(t.getEntityAt(0)).getData(),r=n.src,o=n.height,a=n.width;return i.a.createElement("iframe",{height:o,width:a,src:r,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}n(36);var Or=_r(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getHashtagComponent=function(){function e(e){var n=e.children,r=n[0].props.text;return i.a.createElement("a",{href:r,className:d()("rdw-hashtag-link",t)},n)}var t=n.className;return e.propTypes={children:a.a.object},e},this.findHashtagEntities=function(e,t){for(var r=e.getText(),i=0,o=0;0<r.length&&0<=i;)if(r[0]===n.hashCharacter?(o=i=0,r=r.substr(n.hashCharacter.length)):0<=(i=r.indexOf(n.separator+n.hashCharacter))&&(r=r.substr(i+(n.separator+n.hashCharacter).length),o+=i+n.separator.length),0<=i){var a=0<=r.indexOf(n.separator)?r.indexOf(n.separator):r.length,l=r.substr(0,a);l&&0<l.length&&(t(o,o+l.length+n.hashCharacter.length),o+=n.hashCharacter.length)}},this.getHashtagDecorator=function(){return{strategy:n.findHashtagEntities,component:n.getHashtagComponent()}},this.className=t.className,this.hashCharacter=t.hashCharacter||"#",this.separator=t.separator||" "}),zr=function(e){return new Or(e).getHashtagDecorator()};Vr.propTypes={block:a.a.object,contentState:a.a.object};var Nr=Vr;function Tr(e){return(Tr="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)}function Ir(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)}}function Dr(e,t){return(Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Zr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=jr(e);if(t){var i=jr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Tr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(37);var Rr=function(e){var t;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dr(e,t)}(a,r.Component);var t,n,o=Zr(a);function a(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=o.call.apply(o,[this].concat(r))).state={hovered:!1},t.setEntityAlignmentLeft=function(){t.setEntityAlignment("left")},t.setEntityAlignmentRight=function(){t.setEntityAlignment("right")},t.setEntityAlignmentCenter=function(){t.setEntityAlignment("none")},t.setEntityAlignment=function(n){var r=t.props,i=r.block,o=r.contentState,a=i.getEntityAt(0);o.mergeEntityData(a,{alignment:n}),e.onChange(l.EditorState.push(e.getEditorState(),o,"change-block-data")),t.setState({dummy:!0})},t.toggleHovered=function(){var e=!t.state.hovered;t.setState({hovered:e})},t}return t=a,(n=[{key:"renderAlignmentOptions",value:function(e){return i.a.createElement("div",{className:d()("rdw-image-alignment-options-popup",{"rdw-image-alignment-options-popup-right":"right"===e})},i.a.createElement(I,{onClick:this.setEntityAlignmentLeft,className:"rdw-image-alignment-option"},"L"),i.a.createElement(I,{onClick:this.setEntityAlignmentCenter,className:"rdw-image-alignment-option"},"C"),i.a.createElement(I,{onClick:this.setEntityAlignmentRight,className:"rdw-image-alignment-option"},"R"))}},{key:"render",value:function(){var t=this.props,n=t.block,r=t.contentState,o=this.state.hovered,a=e.isReadOnly,l=e.isImageAlignmentEnabled,s=r.getEntity(n.getEntityAt(0)).getData(),c=s.src,u=s.alignment,f=s.height,h=s.width,p=s.alt;return i.a.createElement("span",{onMouseEnter:this.toggleHovered,onMouseLeave:this.toggleHovered,className:d()("rdw-image-alignment",{"rdw-image-left":"left"===u,"rdw-image-right":"right"===u,"rdw-image-center":!u||"none"===u})},i.a.createElement("span",{className:"rdw-image-imagewrapper"},i.a.createElement("img",{src:c,alt:p,style:{height:f,width:h}}),!a()&&o&&l()?this.renderAlignmentOptions(u):void 0))}}])&&Ir(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}()).propTypes={block:a.a.object,contentState:a.a.object},t},Br=function(e,t){return function(n){if("function"==typeof t){var r=t(n,e,e.getEditorState);if(r)return r}if("atomic"===n.getType()){var i=e.getEditorState().getCurrentContent().getEntity(n.getEntityAt(0));if(i&&"IMAGE"===i.type)return{component:Rr(e),editable:!1};if(i&&"EMBEDDED_LINK"===i.type)return{component:Nr,editable:!1}}}},Pr={options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","embedded","emoji","image","remove","history"],inline:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["bold","italic","underline","strikethrough","monospace","superscript","subscript"],bold:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuMjM2IDBjMS42NTIgMCAyLjk0LjI5OCAzLjg2Ni44OTMuOTI1LjU5NSAxLjM4OCAxLjQ4NSAxLjM4OCAyLjY2OSAwIC42MDEtLjE3MyAxLjEzOS0uNTE2IDEuNjEtLjM0My40NzQtLjg0NC44My0xLjQ5OSAxLjA2OC44NDMuMTY3IDEuNDc0LjUyMyAxLjg5NSAxLjA3MS40MTkuNTUuNjMgMS4xODMuNjMgMS45MDMgMCAxLjI0NS0uNDQ0IDIuMTg3LTEuMzMgMi44MjUtLjg4Ni42NDEtMi4xNDQuOTYxLTMuNzY5Ljk2MUgwdi0yLjE2N2gxLjQ5NFYyLjE2N0gwVjBoNi4yMzZ6TTQuMzA4IDUuNDQ2aDIuMDI0Yy43NTIgMCAxLjMzLS4xNDMgMS43MzQtLjQzLjQwNS0uMjg1LjYwOC0uNzAxLjYwOC0xLjI1IDAtLjYtLjIwNC0xLjA0NC0uNjEyLTEuMzMtLjQwOC0uMjg2LTEuMDE2LS40MjctMS44MjYtLjQyN0g0LjMwOHYzLjQzN3ptMCAxLjgwNFYxMWgyLjU5M2MuNzQ3IDAgMS4zMTQtLjE1MiAxLjcwNy0uNDUyLjM5LS4zLjU4OC0uNzQ1LjU4OC0xLjMzNCAwLS42MzYtLjE2OC0xLjEyNC0uNS0xLjQ2LS4zMzYtLjMzNS0uODY0LS41MDQtMS41ODItLjUwNEg0LjMwOHoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},italic:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTcgM1YyaDR2MUg5Ljc1M2wtMyAxMEg4djFINHYtMWgxLjI0N2wzLTEwSDd6Ii8+PC9zdmc+",className:void 0,title:void 0},underline:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTYuMDQ1IDJ2Ljk5Mkw0Ljc4NSAzdjUuMTcyYzAgLjg1OS4yNDMgMS41MTIuNzI3IDEuOTU3czEuMTI0LjY2OCAxLjkxOC42NjhjLjgzNiAwIDEuNTA5LS4yMjEgMi4wMTktLjY2NC41MTEtLjQ0Mi43NjYtMS4wOTYuNzY2LTEuOTYxVjNsLTEuMjYtLjAwOFYySDEzdi45OTJMMTEuNzM5IDN2NS4xNzJjMCAxLjIzNC0uMzk4IDIuMTgxLTEuMTk1IDIuODQtLjc5Ny42NTktMS44MzUuOTg4LTMuMTE0Ljk4OC0xLjI0MiAwLTIuMjQ4LS4zMjktMy4wMTctLjk4OC0uNzY5LS42NTktMS4xNTItMS42MDUtMS4xNTItMi44NFYzTDIgMi45OTJWMmg0LjA0NXpNMiAxM2gxMXYxSDJ6Ii8+PC9zdmc+",className:void 0,title:void 0},strikethrough:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4wNCA1Ljk1NGg2LjIxNWE3LjQxMiA3LjQxMiAwIDAgMC0uNzk1LS40MzggMTEuOTA3IDExLjkwNyAwIDAgMC0xLjQ0Ny0uNTU3Yy0xLjE4OC0uMzQ4LTEuOTY2LS43MTEtMi4zMzQtMS4wODgtLjM2OC0uMzc3LS41NTItLjc3LS41NTItMS4xODEgMC0uNDk1LjE4Ny0uOTA2LjU2LTEuMjMyLjM4LS4zMzEuODg3LS40OTcgMS41MjMtLjQ5Ny42OCAwIDEuMjY2LjI1NSAxLjc1Ny43NjcuMjk1LjMxNS41ODIuODkxLjg2MSAxLjczbC4xMTcuMDE2LjcwMy4wNS4xLS4wMjRjLjAyOC0uMTUyLjA0Mi0uMjc5LjA0Mi0uMzggMC0uMzM3LS4wMzktLjg1Mi0uMTE3LTEuNTQ0YTkuMzc0IDkuMzc0IDAgMCAwLS4xNzYtLjk5NUM5Ljg4LjM3OSA5LjM4NS4yNDQgOS4wMTcuMTc2IDguMzY1LjA3IDcuODk5LjAxNiA3LjYyLjAxNmMtMS40NSAwLTIuNTQ1LjM1Ny0zLjI4NyAxLjA3MS0uNzQ3LjcyLTEuMTIgMS41ODktMS4xMiAyLjYwNyAwIC41MTEuMTMzIDEuMDQuNCAxLjU4Ni4xMjkuMjUzLjI3LjQ3OC40MjcuNjc0ek04LjI4IDguMTE0Yy41NzUuMjM2Ljk1Ny40MzYgMS4xNDcuNTk5LjQ1MS40MS42NzcuODUyLjY3NyAxLjMyNCAwIC4zODMtLjEzLjc0NS0uMzkzIDEuMDg4LS4yNS4zMzgtLjU5LjU4LTEuMDIuNzI2YTMuNDE2IDMuNDE2IDAgMCAxLTEuMTYzLjIyOGMtLjQwNyAwLS43NzUtLjA2Mi0xLjEwNC0uMTg2YTIuNjk2IDIuNjk2IDAgMCAxLS44NzgtLjQ4IDMuMTMzIDMuMTMzIDAgMCAxLS42Ny0uNzk0IDEuNTI3IDEuNTI3IDAgMCAxLS4xMDQtLjIyNyA1Ny41MjMgNTcuNTIzIDAgMCAwLS4xODgtLjQ3MyAyMS4zNzEgMjEuMzcxIDAgMCAwLS4yNTEtLjU5OWwtLjg1My4wMTd2LjM3MWwtLjAxNy4zMTNhOS45MiA5LjkyIDAgMCAwIDAgLjU3M2MuMDExLjI3LjAxNy43MDkuMDE3IDEuMzE2di4xMWMwIC4wNzkuMDIyLjE0LjA2Ny4xODUuMDgzLjA2OC4yODQuMTQ3LjYwMi4yMzdsMS4xNy4zMzdjLjQ1Mi4xMy45OTYuMTk0IDEuNjMyLjE5NC42ODYgMCAxLjI1Mi0uMDU5IDEuNjk4LS4xNzdhNC42OTQgNC42OTQgMCAwIDAgMS4yOC0uNTU3Yy40MDEtLjI1OS43MDUtLjQ4Ni45MTEtLjY4My4yNjgtLjI3Ni40NjYtLjU2OC41OTQtLjg3OGE0Ljc0IDQuNzQgMCAwIDAgLjM0My0xLjc4OGMwLS4yOTgtLjAyLS41NTctLjA1OC0uNzc2SDguMjgxek0xNC45MTQgNi41N2EuMjYuMjYgMCAwIDAtLjE5My0uMDc2SC4yNjhhLjI2LjI2IDAgMCAwLS4xOTMuMDc2LjI2NC4yNjQgMCAwIDAtLjA3NS4xOTR2LjU0YzAgLjA3OS4wMjUuMTQzLjA3NS4xOTRhLjI2LjI2IDAgMCAwIC4xOTMuMDc2SDE0LjcyYS4yNi4yNiAwIDAgMCAuMTkzLS4wNzYuMjY0LjI2NCAwIDAgMCAuMDc1LS4xOTR2LS41NGEuMjY0LjI2NCAwIDAgMC0uMDc1LS4xOTR6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},monospace:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzQ0NCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS4wMjEgMi45MDZjLjE4NiAxLjIxOS4zNzIgMS41LjM3MiAyLjcxOUMxLjM5MyA2LjM3NSAwIDcuMDMxIDAgNy4wMzF2LjkzOHMxLjM5My42NTYgMS4zOTMgMS40MDZjMCAxLjIxOS0uMTg2IDEuNS0uMzcyIDIuNzE5Qy43NDMgMTQuMDYzIDEuNzY0IDE1IDIuNjkzIDE1aDEuOTV2LTEuODc1cy0xLjY3Mi4xODgtMS42NzItLjkzOGMwLS44NDMuMTg2LS44NDMuMzcyLTIuNzE4LjA5My0uODQ0LS40NjQtMS41LTEuMDIyLTEuOTY5LjU1OC0uNDY5IDEuMTE1LTEuMDMxIDEuMDIyLTEuODc1QzMuMDY0IDMuNzUgMi45NyAzLjc1IDIuOTcgMi45MDZjMC0xLjEyNSAxLjY3Mi0xLjAzMSAxLjY3Mi0xLjAzMVYwaC0xLjk1QzEuNjcgMCAuNzQzLjkzOCAxLjAyIDIuOTA2ek0xMS45NzkgMi45MDZjLS4xODYgMS4yMTktLjM3MiAxLjUtLjM3MiAyLjcxOSAwIC43NSAxLjM5MyAxLjQwNiAxLjM5MyAxLjQwNnYuOTM4cy0xLjM5My42NTYtMS4zOTMgMS40MDZjMCAxLjIxOS4xODYgMS41LjM3MiAyLjcxOS4yNzggMS45NjktLjc0MyAyLjkwNi0xLjY3MiAyLjkwNmgtMS45NXYtMS44NzVzMS42NzIuMTg4IDEuNjcyLS45MzhjMC0uODQzLS4xODYtLjg0My0uMzcyLTIuNzE4LS4wOTMtLjg0NC40NjQtMS41IDEuMDIyLTEuOTY5LS41NTgtLjQ2OS0xLjExNS0xLjAzMS0xLjAyMi0xLjg3NS4xODYtMS44NzUuMzcyLTEuODc1LjM3Mi0yLjcxOSAwLTEuMTI1LTEuNjcyLTEuMDMxLTEuNjcyLTEuMDMxVjBoMS45NWMxLjAyMiAwIDEuOTUuOTM4IDEuNjcyIDIuOTA2eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},superscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMzA1IDEwLjE2NUwxMS44NjUgMTVIOS4wNTdsLTMuMTkyLTMuNTM2TDIuNzQ2IDE1SDBsNC41MjMtNC44MzVMLjIxOCA1LjYwM2gyLjc3TDUuOTg2IDguOTEgOS4wMSA1LjYwM2gyLjY0OWwtNC4zNTQgNC41NjJ6bTYuMjM0LTMuMjY5bDEuODc5LTEuMzA2Yy42NC0uNDE2IDEuMDYyLS44MDEgMS4yNjQtMS4xNTcuMjAxLS4zNTYuMzAyLS43MzguMzAyLTEuMTQ4IDAtLjY2OS0uMjM3LTEuMjEtLjcxLTEuNjItLjQ3NC0uNDExLTEuMDk3LS42MTctMS44NjgtLjYxNy0uNzQ0IDAtMS4zNC4yMDgtMS43ODUuNjI0LS40NDcuNDE2LS42NyAxLjA0My0uNjcgMS44ODFoMS40MzZjMC0uNS4wOTQtLjg0Ni4yODEtMS4wMzguMTg4LS4xOTEuNDQ1LS4yODcuNzcyLS4yODdzLjU4NS4wOTcuNzc3LjI5MmMuMTkuMTk1LjI4Ni40MzcuMjg2LjcyNiAwIC4yOS0uMDg5LjU1LS4yNjYuNzg1cy0uNjcuNjI4LTEuNDc5IDEuMTg0Yy0uNjkxLjQ3Ny0xLjYyNy45MjctMS45MDggMS4zNWwuMDE0IDEuNTY5SDE3VjYuODk2aC0zLjQ2MXoiLz48L3N2Zz4=",className:void 0,title:void 0},subscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExLjg2NiAxMS42NDZIOS4wNkw1Ljg2NyA3Ljk0MmwtMy4xMjEgMy43MDRIMGw0LjUyNC01LjA2NEwuMjE4IDEuODA0aDIuNzdsMyAzLjQ2NCAzLjAyMy0zLjQ2NGgyLjY1TDcuMzA2IDYuNTgybDQuNTYgNS4wNjR6bTEuNzI1IDIuMDU4bDEuODI3LTEuMzY4Yy42NC0uNDM1IDEuMDYyLS44NCAxLjI2NC0xLjIxMi4yMDItLjM3Mi4zMDItLjc3My4zMDItMS4yMDIgMC0uNy0uMjM3LTEuMjY2LS43MS0xLjY5Ni0uNDc0LS40MzEtMS4wOTctLjY0Ni0xLjg2OS0uNjQ2LS43NDQgMC0xLjM0LjIxOC0xLjc4NS42NTMtLjQ0Ni40MzYtLjY3IDEuMDkyLS42NyAxLjk3aDEuNDM2YzAtLjUyNC4wOTQtLjg4Ni4yODEtMS4wODcuMTg4LS4yLjQ0NS0uMzAxLjc3Mi0uMzAxcy41ODYuMTAyLjc3Ny4zMDZjLjE5LjIwNC4yODYuNDU4LjI4Ni43NiAwIC4zMDMtLjA4OC41NzctLjI2Ni44MjItLjE3Ny4yNDUtLjY3LjY1OC0xLjQ3OCAxLjI0LS42OTIuNS0xLjYyOC45NzEtMS45MSAxLjQxM0wxMS44NjQgMTVIMTd2LTEuMjk2aC0zLjQxeiIvPjwvc3ZnPg==",className:void 0,title:void 0}},blockType:{inDropdown:!0,options:["Normal","H1","H2","H3","H4","H5","H6","Blockquote","Code"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontSize:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuOTIxIDMuMTE5YS40MjcuNDI3IDAgMCAwIC4zMzUuMTY0aC45N2EuNDI2LjQyNiAwIDAgMCAuMzA0LS4xMy40NDEuNDQxIDAgMCAwIC4xMjUtLjMxbC4wMDItMi40MWEuNDM0LjQzNCAwIDAgMC0uNDMtLjQzMkguNDNBLjQzNC40MzQgMCAwIDAgMCAuNDR2Mi40MDZjMCAuMjQyLjE5Mi40MzguNDMuNDM4aC45N2MuMTMgMCAuMjU0LS4wNi4zMzUtLjE2NWwuNzMtLjkzSDUuNTR2MTEuMzZjMCAuMjQxLjE5Mi40MzcuNDMuNDM3aDEuNzE3Yy4yMzcgMCAuNDMtLjE5Ni40My0uNDM3VjIuMTg4aDMuMDdsLjczNC45MzF6TTEzLjg5OCAxMS4yNjNhLjQyNS40MjUgMCAwIDAtLjQ4Mi0uMTQ2bC0uNTQ3LjE5NFY5LjYxN2EuNDQyLjQ0MiAwIDAgMC0uMTI2LS4zMS40MjYuNDI2IDAgMCAwLS4zMDQtLjEyN2gtLjQyOWEuNDM0LjQzNCAwIDAgMC0uNDMuNDM3djEuNjk0bC0uNTQ3LS4xOTRhLjQyNS40MjUgMCAwIDAtLjQ4MS4xNDYuNDQ0LjQ0NCAwIDAgMC0uMDE2LjUxMmwxLjMzMiAyLjAxN2EuNDI3LjQyNyAwIDAgMCAuNzEzIDBsMS4zMzMtMi4wMTdhLjQ0NC40NDQgMCAwIDAtLjAxNi0uNTEyeiIvPjwvZz48L3N2Zz4=",options:[8,9,10,11,12,14,16,18,24,30,36,48,60,72,96],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontFamily:{options:["Arial","Georgia","Impact","Tahoma","Times New Roman","Verdana"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},list:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["unordered","ordered","indent","outdent"],unordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS43MiAzLjQyN2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3LjAxIDEuNzIuMDFDLjc3LjAwOCAwIC43NzUgMCAxLjcxNWMwIC45NC43NzQgMS43MTEgMS43MiAxLjcxMXptMC0yLjYyNWMuNTEgMCAuOTIyLjQxMi45MjIuOTE0YS45Mi45MiAwIDAgMS0xLjg0MiAwIC45Mi45MiAwIDAgMSAuOTItLjkxNHpNMS43MiA4LjcwM2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3IDUuMjg3IDEuNzIgNS4yODdDLjc3IDUuMjg3IDAgNi4wNTIgMCA2Ljk5NXMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjJjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAwIDEtMS44NDIgMGMwLS41MDUuNDE1LS45MTQuOTItLjkxNHpNMS43MiAxMy45ODJjLjk1MSAwIDEuNzIyLS43NjggMS43MjItMS43MDggMC0uOTQzLS43NzQtMS43MDgtMS43MjEtMS43MDgtLjk0NyAwLTEuNzIxLjc2OC0xLjcyMSAxLjcwOHMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjVjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAxIDEtMS44NDIgMCAuOTIuOTIgMCAwIDEgLjkyLS45MTR6TTUuNzQ0IDIuMTE1aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OS40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDcuMzk0aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOThINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OC40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDEyLjY3aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjQuNC40IDAgMCAwIC40MDIuMzk4eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},ordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4yMDIgMS40NjZoOC4xNWMuMzM4IDAgLjYxMi0uMzIyLjYxMi0uNzIgMC0uMzk3LS4yNzQtLjcyLS42MTItLjcyaC04LjE1Yy0uMzM4IDAtLjYxMS4zMjMtLjYxMS43MiAwIC4zOTguMjczLjcyLjYxLjcyek0xMi4zNTIgNS43ODNoLTguMTVjLS4zMzggMC0uNjExLjMyMi0uNjExLjcyIDAgLjM5Ny4yNzMuNzIuNjEuNzJoOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5OC0uMjc0LS43Mi0uNjEyLS43MnpNMTIuMzUyIDExLjU0aC04LjE1Yy0uMzM4IDAtLjYxMS4zMjItLjYxMS43MiAwIC4zOTYuMjczLjcxOS42MS43MTloOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5Ny0uMjc0LS43Mi0uNjEyLS43MnpNLjc2NyAxLjI0OXYxLjgwMmMwIC4xOTUuMTM2LjM0My4zMTUuMzQzLjE3NiAwIC4zMTUtLjE1LjMxNS0uMzQzVi4zNTZjMC0uMTktLjEzMy0uMzM5LS4zMDItLjMzOS0uMTQ4IDAtLjIyMy4xMTgtLjI0Ny4xNTZhLjIyOC4yMjggMCAwIDAtLjAwMy4wMDVMLjU3OS42MjFhLjQ3NC40NzQgMCAwIDAtLjA5OC4yNzNjMCAuMTk0LjEyOC4zNTEuMjg2LjM1NXpNLjM1MiA4LjE5SDEuNTVjLjE1NyAwIC4yODUtLjE2Mi4yODUtLjM2MiAwLS4xOTgtLjEyOC0uMzU5LS4yODUtLjM1OUguNjh2LS4wMDZjMC0uMTA3LjIxLS4yODEuMzc4LS40MjIuMzM2LS4yNzguNzUzLS42MjUuNzUzLTEuMjI2IDAtLjU3LS4zNzYtMS0uODc0LTEtLjQ3NyAwLS44MzYuMzg1LS44MzYuODk3IDAgLjI5Ny4xNjQuNDAyLjMwNS40MDIuMiAwIC4zMjEtLjE3Ni4zMjEtLjM0NiAwLS4xMDYuMDIzLS4yMjguMjA0LS4yMjguMjQzIDAgLjI1LjI1NC4yNS4yODMgMCAuMjI4LS4yNTIuNDQyLS40OTUuNjQ5LS4zMDEuMjU1LS42NDIuNTQ0LS42NDIuOTkydi4zODRjMCAuMjA1LjE1OS4zNDMuMzA4LjM0M3pNMS43NyAxMC41NDNjMC0uNTkyLS4yOTYtLjkzMS0uODE0LS45MzEtLjY4IDAtLjg1OS41Ny0uODU5Ljg3MiAwIC4zNTEuMjIyLjM5LjMxOC4zOS4xODUgMCAuMzEtLjE0OC4zMS0uMzY2IDAtLjA4NC4wMjYtLjE4MS4yMjQtLjE4MS4xNDIgMCAuMi4wMjQuMi4yNjcgMCAuMjM3LS4wNDMuMjYzLS4yMTMuMjYzLS4xNjQgMC0uMjg4LjE1Mi0uMjg4LjM1NCAwIC4yLjEyNS4zNS4yOTEuMzUuMjI1IDAgLjI3LjEwOC4yNy4yODN2LjA3NWMwIC4yOTQtLjA5Ny4zNS0uMjc3LjM1LS4yNDggMC0uMjY3LS4xNS0uMjY3LS4xOTcgMC0uMTc0LS4wOTgtLjM1LS4zMTctLjM1LS4xOTIgMC0uMzA3LjE0MS0uMzA3LjM3OCAwIC40My4zMTMuODg4Ljg5NS44ODguNTY0IDAgLjkwMS0uNC45MDEtMS4wN3YtLjA3NGMwLS4yNzQtLjA3NC0uNTAyLS4yMTQtLjY2Ni4wOTYtLjE2My4xNDgtLjM4LjE0OC0uNjM1eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},indent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS43MTYgMy4yMTFIMTd2MS4xOTdINS43MTZ6TTAgLjAyaDE3djEuMTk3SDB6TTAgMTIuNzgzaDE3djEuMTk3SDB6TTUuNzE2IDkuNTkzSDE3djEuMTk3SDUuNzE2ek01LjcxNiA2LjQwMkgxN3YxLjE5N0g1LjcxNnpNLjE4NyA5LjQ5MUwyLjUyIDcgLjE4NyA0LjUwOXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},outdent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS4zOTYgMy4xOTNoMTAuNTczVjQuMzlINS4zOTZ6TS4wMzkuMDAzaDE1LjkzVjEuMkguMDM5ek0uMDM5IDEyLjc2NmgxNS45M3YxLjE5N0guMDM5ek01LjM5NiA5LjU3NWgxMC41NzN2MS4xOTdINS4zOTZ6TTUuMzk2IDYuMzg0aDEwLjU3M3YxLjE5N0g1LjM5NnpNMi4xODcgNC40OTFMMCA2Ljk4M2wyLjE4NyAyLjQ5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},title:void 0},textAlign:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["left","center","right","justify"],left:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNOC40OTMgMTQuODg3SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4IDEwLjE2MkguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1M2gxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUzek04LjQ5MyA1LjQzNUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOC43MDlILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTJoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},center:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNTU2IDE0Ljg4N0gzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTggMTAuMTYySC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUzaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6TTExLjU1NiA1LjQzNUgzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTguNzA5SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTJ6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},right:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjE4IDE0Ljg4N0g2LjQ1YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOCAxMC4xNjJILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTNoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1M3pNMTQuNjE4IDUuNDM1SDYuNDVhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4LjcwOUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1MmgxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyeiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},justify:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjIgMTQuODg4SC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgMTAuMTYySC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgNS40MzZILjMyNWEuMzI2LjMyNiAwIDAgMSAwLS42NTJIMTQuNjJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42Mi43MUguMzI1YS4zMjYuMzI2IDAgMCAxIDAtLjY1M0gxNC42MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},title:void 0},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",className:void 0,component:void 0,popupClassName:void 0,colors:["rgb(97,189,109)","rgb(26,188,156)","rgb(84,172,210)","rgb(44,130,201)","rgb(147,101,184)","rgb(71,85,119)","rgb(204,204,204)","rgb(65,168,95)","rgb(0,168,133)","rgb(61,142,185)","rgb(41,105,176)","rgb(85,57,130)","rgb(40,50,78)","rgb(0,0,0)","rgb(247,218,100)","rgb(251,160,38)","rgb(235,107,86)","rgb(226,80,65)","rgb(163,143,132)","rgb(239,239,239)","rgb(255,255,255)","rgb(250,197,28)","rgb(243,121,52)","rgb(209,72,65)","rgb(184,49,47)","rgb(124,112,107)","rgb(209,213,216)"],title:void 0},link:{inDropdown:!1,className:void 0,component:void 0,popupClassName:void 0,dropdownClassName:void 0,showOpenOptionOnHover:!0,defaultTargetOption:"_self",options:["link","unlink"],link:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjk2Ny45NUEzLjIyNiAzLjIyNiAwIDAgMCAxMS42Ny4wMDJjLS44NyAwLTEuNjg2LjMzNy0yLjI5Ny45NDhMNy4xMDUgMy4yMThBMy4yNDcgMy4yNDcgMCAwIDAgNi4yNCA2LjI0YTMuMjI1IDMuMjI1IDAgMCAwLTMuMDIyLjg2NUwuOTUgOS4zNzNhMy4yNTMgMy4yNTMgMCAwIDAgMCA0LjU5NCAzLjIyNiAzLjIyNiAwIDAgMCAyLjI5Ny45NDhjLjg3IDAgMS42ODYtLjMzNiAyLjI5OC0uOTQ4TDcuODEyIDExLjdhMy4yNDcgMy4yNDcgMCAwIDAgLjg2NS0zLjAyMyAzLjIyNSAzLjIyNSAwIDAgMCAzLjAyMi0uODY1bDIuMjY4LTIuMjY3YTMuMjUyIDMuMjUyIDAgMCAwIDAtNC41OTV6TTcuMTA1IDEwLjk5M0w0LjgzNyAxMy4yNmEyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NSAyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LS42NTUgMi4yNTIgMi4yNTIgMCAwIDEgMC0zLjE4bDIuMjY4LTIuMjY4YTIuMjMyIDIuMjMyIDAgMCAxIDEuNTktLjY1NWMuNDMgMCAuODQxLjEyIDEuMTk1LjM0M0w0Ljc3MiA5LjQzOGEuNS41IDAgMSAwIC43MDcuNzA3bDEuOTM5LTEuOTM4Yy41NDUuODY4LjQ0MiAyLjAzLS4zMTMgMi43ODV6bTYuMTU1LTYuMTU1bC0yLjI2OCAyLjI2N2EyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NWMtLjQzMSAwLS44NDEtLjEyLTEuMTk1LS4zNDNsMS45MzgtMS45MzhhLjUuNSAwIDEgMC0uNzA3LS43MDdMNy40OTkgNi43MWEyLjI1MiAyLjI1MiAwIDAgMSAuMzEzLTIuNzg1bDIuMjY3LTIuMjY4YTIuMjMzIDIuMjMzIDAgMCAxIDEuNTktLjY1NSAyLjIzMyAyLjIzMyAwIDAgMSAyLjI0NiAyLjI0NWMwIC42MDMtLjIzMiAxLjE2OC0uNjU1IDEuNTl6IiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",className:void 0,title:void 0},unlink:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTMuOTU2IDEuMDM3YTMuNTUgMy41NSAwIDAgMC01LjAxNCAwTDYuNDM2IDMuNTQ0YS41NDUuNTQ1IDAgMSAwIC43Ny43N2wyLjUwOC0yLjUwNmEyLjQzOCAyLjQzOCAwIDAgMSAxLjczNS0uNzE1Yy42NTggMCAxLjI3NS4yNTQgMS43MzYuNzE1LjQ2LjQ2MS43MTUgMS4wNzguNzE1IDEuNzM2IDAgLjY1OC0uMjU0IDEuMjc0LS43MTUgMS43MzVMOS45MDcgOC41NThhMi40NTggMi40NTggMCAwIDEtMy40NzIgMCAuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3MSAzLjUzNCAzLjUzNCAwIDAgMCAyLjUwNyAxLjAzN2MuOTA4IDAgMS44MTYtLjM0NiAyLjUwNy0xLjAzN2wzLjI3OC0zLjI3OGEzLjUyIDMuNTIgMCAwIDAgMS4wMzUtMi41MDdjMC0uOTUtLjM2Ny0xLjg0LTEuMDM1LTIuNTA3eiIvPjxwYXRoIGQ9Ik03LjQgMTEuMDY1bC0yLjEyMiAyLjEyYTIuNDM3IDIuNDM3IDAgMCAxLTEuNzM1LjcxNiAyLjQzNyAyLjQzNyAwIDAgMS0xLjczNi0uNzE1IDIuNDU3IDIuNDU3IDAgMCAxIDAtMy40NzFsMy4wODYtMy4wODZhMi40MzggMi40MzggMCAwIDEgMS43MzUtLjcxNWMuNjU4IDAgMS4yNzUuMjU0IDEuNzM2LjcxNWEuNTQ1LjU0NSAwIDEgMCAuNzcxLS43NzEgMy41NSAzLjU1IDAgMCAwLTUuMDE0IDBMMS4wMzYgOC45NDRBMy41MiAzLjUyIDAgMCAwIDAgMTEuNDVjMCAuOTUuMzY3IDEuODQgMS4wMzUgMi41MDdhMy41MiAzLjUyIDAgMCAwIDIuNTA2IDEuMDM1Yy45NSAwIDEuODQtLjM2OCAyLjUwNy0xLjAzNWwyLjEyMi0yLjEyMWEuNTQ1LjU0NSAwIDAgMC0uNzcxLS43NzF6TTkuMjc0IDEyLjAwMmEuNTQ2LjU0NiAwIDAgMC0uNTQ2LjU0NXYxLjYzN2EuNTQ2LjU0NiAwIDAgMCAxLjA5MSAwdi0xLjYzN2EuNTQ1LjU0NSAwIDAgMC0uNTQ1LS41NDV6TTExLjIzIDExLjYxNmEuNTQ1LjU0NSAwIDEgMC0uNzcyLjc3MmwxLjE1NyAxLjE1NmEuNTQzLjU0MyAwIDAgMCAuNzcxIDAgLjU0NS41NDUgMCAwIDAgMC0uNzdsLTEuMTU2LTEuMTU4ek0xMi41MzcgOS44MkgxMC45YS41NDYuNTQ2IDAgMCAwIDAgMS4wOTFoMS42MzdhLjU0Ni41NDYgMCAwIDAgMC0xLjA5ek00LjkxIDMuNTQ3YS41NDYuNTQ2IDAgMCAwIC41NDUtLjU0NVYxLjM2NmEuNTQ2LjU0NiAwIDAgMC0xLjA5IDB2MS42MzZjMCAuMzAxLjI0NC41NDUuNTQ1LjU0NXpNMi44ODggMy45MzNhLjU0My41NDMgMCAwIDAgLjc3MSAwIC41NDUuNTQ1IDAgMCAwIDAtLjc3MUwyLjUwMiAyLjAwNWEuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3bDEuMTU3IDEuMTU4ek0xLjYyOCA1LjczaDEuNjM2YS41NDYuNTQ2IDAgMCAwIDAtMS4wOTJIMS42MjhhLjU0Ni41NDYgMCAwIDAgMCAxLjA5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},linkCallback:void 0},emoji:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjE1LjcyOSAyMi4wODIgMTcgMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTI5LjcwOCAyNS4xMDRjLTMuMDIxLTMuMDIyLTcuOTM3LTMuMDIyLTEwLjk1OCAwLTMuMDIxIDMuMDItMy4wMiA3LjkzNiAwIDEwLjk1OCAzLjAyMSAzLjAyIDcuOTM3IDMuMDIgMTAuOTU4LS4wMDEgMy4wMi0zLjAyMSAzLjAyLTcuOTM2IDAtMTAuOTU3em0tLjg0NSAxMC4xMTJhNi41NiA2LjU2IDAgMCAxLTkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAtOS4yNjcgNi41NiA2LjU2IDAgMCAxIDkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAgOS4yNjd6bS03LjUyNC02LjczYS45MDYuOTA2IDAgMSAxIDEuODExIDAgLjkwNi45MDYgMCAwIDEtMS44MTEgMHptNC4xMDYgMGEuOTA2LjkwNiAwIDEgMSAxLjgxMiAwIC45MDYuOTA2IDAgMCAxLTEuODEyIDB6bTIuMTQxIDMuNzA4Yy0uNTYxIDEuMjk4LTEuODc1IDIuMTM3LTMuMzQ4IDIuMTM3LTEuNTA1IDAtMi44MjctLjg0My0zLjM2OS0yLjE0N2EuNDM4LjQzOCAwIDAgMSAuODEtLjMzNmMuNDA1Ljk3NiAxLjQxIDEuNjA3IDIuNTU5IDEuNjA3IDEuMTIzIDAgMi4xMjEtLjYzMSAyLjU0NC0xLjYwOGEuNDM4LjQzOCAwIDAgMSAuODA0LjM0N3oiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,emojis:["😀","😁","😂","😃","😉","😋","😎","😍","😗","🤗","🤔","😣","😫","😴","😌","🤓","😛","😜","😠","😇","😷","😈","👻","😺","😸","😹","😻","😼","😽","🙀","🙈","🙉","🙊","👼","👮","🕵","💂","👳","🎅","👸","👰","👲","🙍","🙇","🚶","🏃","💃","⛷","🏂","🏌","🏄","🚣","🏊","⛹","🏋","🚴","👫","💪","👈","👉","👆","🖕","👇","🖖","🤘","🖐","👌","👍","👎","✊","👊","👏","🙌","🙏","🐵","🐶","🐇","🐥","🐸","🐌","🐛","🐜","🐝","🍉","🍄","🍔","🍤","🍨","🍪","🎂","🍰","🍾","🍷","🍸","🍺","🌍","🚑","⏰","🌙","🌝","🌞","⭐","🌟","🌠","🌨","🌩","⛄","🔥","🎄","🎈","🎉","🎊","🎁","🎗","🏀","🏈","🎲","🔇","🔈","📣","🔔","🎵","🎷","💰","🖊","📅","✅","❎","💯"],title:void 0},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0},remove:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBkPSJNOC4xIDE0bDYuNC03LjJjLjYtLjcuNi0xLjgtLjEtMi41bC0yLjctMi43Yy0uMy0uNC0uOC0uNi0xLjMtLjZIOC42Yy0uNSAwLTEgLjItMS40LjZMLjUgOS4yYy0uNi43LS42IDEuOS4xIDIuNWwyLjcgMi43Yy4zLjQuOC42IDEuMy42SDE2di0xSDguMXptLTEuMy0uMXMwLS4xIDAgMGwtMi43LTIuN2MtLjQtLjQtLjQtLjkgMC0xLjNMNy41IDZoLTFsLTMgMy4zYy0uNi43LS42IDEuNy4xIDIuNEw1LjkgMTRINC42Yy0uMiAwLS40LS4xLS42LS4yTDEuMiAxMWMtLjMtLjMtLjMtLjggMC0xLjFMNC43IDZoMS44TDEwIDJoMUw3LjUgNmwzLjEgMy43LTMuNSA0Yy0uMS4xLS4yLjEtLjMuMnoiLz48L3N2Zz4=",className:void 0,component:void 0,title:void 0},history:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["undo","redo"],undo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQuODc1YzIuNjcyIDAgNC44NDYtMi4xNDUgNC44NDYtNC43ODEgMC0yLjYzNy0yLjE3NC00Ljc4MS00Ljg0Ni00Ljc4MVY4LjVMMS42MTUgNC4yNSA3IDB2My4xODhjMy44NiAwIDcgMy4wOTggNyA2LjkwNlMxMC44NiAxNyA3IDE3cy03LTMuMDk4LTctNi45MDZoMi4xNTRjMCAyLjYzNiAyLjE3NCA0Ljc4MSA0Ljg0NiA0Ljc4MXoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},redo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNTA0IDEzLjk3N2E0LjQ5NyA0LjQ5NyAwIDAgMS00LjQ5Mi00LjQ5MiA0LjQ5NyA0LjQ5NyAwIDAgMSA0LjQ5Mi00LjQ5M3YyLjk5NWw0Ljk5LTMuOTkzTDYuNTA0IDB2Mi45OTVhNi40OTYgNi40OTYgMCAwIDAtNi40ODggNi40OWMwIDMuNTc4IDIuOTEgNi40OSA2LjQ4OCA2LjQ5YTYuNDk2IDYuNDk2IDAgMCAwIDYuNDg3LTYuNDloLTEuOTk2YTQuNDk3IDQuNDk3IDAgMCAxLTQuNDkxIDQuNDkyeiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+",className:void 0,title:void 0},title:void 0}},Fr={en:{"generic.add":"Add","generic.cancel":"Cancel","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Block Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Color Picker","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Highlight","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Embedded Link","components.controls.embedded.enterlink":"Enter link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Font","components.controls.fontsize.fontsize":"Font Size","components.controls.history.history":"History","components.controls.history.undo":"Undo","components.controls.history.redo":"Redo","components.controls.image.image":"Image","components.controls.image.fileUpload":"File Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop the file or click to upload","components.controls.inline.bold":"Bold","components.controls.inline.italic":"Italic","components.controls.inline.underline":"Underline","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Link Title","components.controls.link.linkTarget":"Link Target","components.controls.link.linkTargetOption":"Open link in new window","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"List","components.controls.list.unordered":"Unordered","components.controls.list.ordered":"Ordered","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Remove","components.controls.textalign.textalign":"Text Align","components.controls.textalign.left":"Left","components.controls.textalign.center":"Center","components.controls.textalign.right":"Right","components.controls.textalign.justify":"Justify"},fr:{"generic.add":"Ok","generic.cancel":"Annuler","components.controls.blocktype.h1":"Titre 1","components.controls.blocktype.h2":"Titre 2","components.controls.blocktype.h3":"Titre 3","components.controls.blocktype.h4":"Titre 4","components.controls.blocktype.h5":"Titre 5","components.controls.blocktype.h6":"Titre 6","components.controls.blocktype.blockquote":"Citation","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Type bloc","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Palette de couleur","components.controls.colorpicker.text":"Texte","components.controls.colorpicker.background":"Fond","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Lien iFrame","components.controls.embedded.enterlink":"Entrer le lien","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Police","components.controls.fontsize.fontsize":"Taille de police","components.controls.history.history":"Historique","components.controls.history.undo":"Précédent","components.controls.history.redo":"Suivant","components.controls.image.image":"Image","components.controls.image.fileUpload":"Téléchargement","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Glisser une image ou cliquer pour télécharger","components.controls.inline.bold":"Gras","components.controls.inline.italic":"Italique","components.controls.inline.underline":"Souligner","components.controls.inline.strikethrough":"Barrer","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Exposant","components.controls.inline.subscript":"Indice","components.controls.link.linkTitle":"Titre du lien","components.controls.link.linkTarget":"Cible du lien","components.controls.link.linkTargetOption":"Ouvrir le lien dans une nouvelle fenêtre","components.controls.link.link":"Lier","components.controls.link.unlink":"Délier","components.controls.list.list":"Liste","components.controls.list.unordered":"Désordonnée","components.controls.list.ordered":"Ordonnée","components.controls.list.indent":"Augmenter le retrait","components.controls.list.outdent":"Diminuer le retrait","components.controls.remove.remove":"Supprimer","components.controls.textalign.textalign":"Alignement du texte","components.controls.textalign.left":"Gauche","components.controls.textalign.center":"Centre","components.controls.textalign.right":"Droite","components.controls.textalign.justify":"Justifier"},zh:{"generic.add":"添加","generic.cancel":"取消","components.controls.blocktype.h1":"标题1","components.controls.blocktype.h2":"标题2","components.controls.blocktype.h3":"标题3","components.controls.blocktype.h4":"标题4","components.controls.blocktype.h5":"标题5","components.controls.blocktype.h6":"标题6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"源码","components.controls.blocktype.blocktype":"样式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"选色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"内嵌","components.controls.embedded.embeddedlink":"内嵌网页","components.controls.embedded.enterlink":"输入网页地址","components.controls.emoji.emoji":"表情符号","components.controls.fontfamily.fontfamily":"字体","components.controls.fontsize.fontsize":"字号","components.controls.history.history":"历史","components.controls.history.undo":"撤销","components.controls.history.redo":"恢复","components.controls.image.image":"图片","components.controls.image.fileUpload":"来自文件","components.controls.image.byURL":"在线图片","components.controls.image.dropFileText":"点击或者拖拽文件上传","components.controls.inline.bold":"粗体","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下划线","components.controls.inline.strikethrough":"删除线","components.controls.inline.monospace":"等宽字体","components.controls.inline.superscript":"上标","components.controls.inline.subscript":"下标","components.controls.link.linkTitle":"超链接","components.controls.link.linkTarget":"输入链接地址","components.controls.link.linkTargetOption":"在新窗口中打开链接","components.controls.link.link":"链接","components.controls.link.unlink":"删除链接","components.controls.list.list":"列表","components.controls.list.unordered":"项目符号","components.controls.list.ordered":"编号","components.controls.list.indent":"增加缩进量","components.controls.list.outdent":"减少缩进量","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文本对齐","components.controls.textalign.left":"文本左对齐","components.controls.textalign.center":"居中","components.controls.textalign.right":"文本右对齐","components.controls.textalign.justify":"两端对齐"},ru:{"generic.add":"Добавить","generic.cancel":"Отменить","components.controls.blocktype.h1":"Заголовок 1","components.controls.blocktype.h2":"Заголовок 2","components.controls.blocktype.h3":"Заголовок 3","components.controls.blocktype.h4":"Заголовок 4","components.controls.blocktype.h5":"Заголовок 5","components.controls.blocktype.h6":"Заголовок 6","components.controls.blocktype.blockquote":"Цитата","components.controls.blocktype.code":"Код","components.controls.blocktype.blocktype":"Форматирование","components.controls.blocktype.normal":"Обычный","components.controls.colorpicker.colorpicker":"Выбор цвета","components.controls.colorpicker.text":"Текст","components.controls.colorpicker.background":"Фон","components.controls.embedded.embedded":"Встраивание","components.controls.embedded.embeddedlink":"Ссылка в iFrame","components.controls.embedded.enterlink":"Вставьте ссылку","components.controls.emoji.emoji":"Эмодзи","components.controls.fontfamily.fontfamily":"Шрифт","components.controls.fontsize.fontsize":"Размер шрифта","components.controls.history.history":"История","components.controls.history.undo":"Отменить","components.controls.history.redo":"Вернуть","components.controls.image.image":"Изображение","components.controls.image.fileUpload":"Файлы","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Переместите в эту область файлы или кликните для загрузки","components.controls.inline.bold":"Жирный","components.controls.inline.italic":"Курсив","components.controls.inline.underline":"Подчеркивание","components.controls.inline.strikethrough":"Зачеркивание","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Верхний индекс","components.controls.inline.subscript":"Нижний индекс","components.controls.link.linkTitle":"Текст","components.controls.link.linkTarget":"Адрес ссылки","components.controls.link.linkTargetOption":"Открывать в новом окне","components.controls.link.link":"Ссылка","components.controls.link.unlink":"Убрать ссылку","components.controls.list.list":"Список","components.controls.list.unordered":"Неупорядоченный","components.controls.list.ordered":"Упорядоченный","components.controls.list.indent":"Отступ","components.controls.list.outdent":"Выступ","components.controls.remove.remove":"Удалить","components.controls.textalign.textalign":"Выравнивание текста","components.controls.textalign.left":"Слева","components.controls.textalign.center":"По центру","components.controls.textalign.right":"Справа","components.controls.textalign.justify":"Выравнить"},pt:{"generic.add":"Ok","generic.cancel":"Cancelar","components.controls.blocktype.h1":"Título 1","components.controls.blocktype.h2":"Título 2","components.controls.blocktype.h3":"Título 3","components.controls.blocktype.h4":"Título 4","components.controls.blocktype.h5":"Título 5","components.controls.blocktype.h6":"Título 6","components.controls.blocktype.blockquote":"Citação","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Estilo","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Paleta de cores","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Fundo","components.controls.embedded.embedded":"Embarcado","components.controls.embedded.embeddedlink":"Link embarcado","components.controls.embedded.enterlink":"Coloque o link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonte","components.controls.fontsize.fontsize":"Tamanho da Fonte","components.controls.history.history":"Histórico","components.controls.history.undo":"Desfazer","components.controls.history.redo":"Refazer","components.controls.image.image":"Imagem","components.controls.image.fileUpload":"Carregar arquivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arraste uma imagem aqui ou clique para carregar","components.controls.inline.bold":"Negrito","components.controls.inline.italic":"Itálico","components.controls.inline.underline":"Sublinhado","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobrescrito","components.controls.inline.subscript":"Subscrito","components.controls.link.linkTitle":"Título do link","components.controls.link.linkTarget":"Alvo do link","components.controls.link.linkTargetOption":"Abrir link em outra janela","components.controls.link.link":"Adicionar Link","components.controls.link.unlink":"Remover link","components.controls.list.list":"Lista","components.controls.list.unordered":"Sem ordenção","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Aumentar recuo","components.controls.list.outdent":"Diminuir recuo","components.controls.remove.remove":"Remover","components.controls.textalign.textalign":"Alinhamento do texto","components.controls.textalign.left":"À Esquerda","components.controls.textalign.center":"Centralizado","components.controls.textalign.right":"À Direita","components.controls.textalign.justify":"Justificado"},ko:{"generic.add":"입력","generic.cancel":"취소","components.controls.blocktype.h1":"제목1","components.controls.blocktype.h2":"제목2","components.controls.blocktype.h3":"제목3","components.controls.blocktype.h4":"제목4","components.controls.blocktype.h5":"제목5","components.controls.blocktype.h6":"제목6","components.controls.blocktype.blockquote":"인용","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"블록","components.controls.blocktype.normal":"표준","components.controls.colorpicker.colorpicker":"색상 선택","components.controls.colorpicker.text":"글꼴색","components.controls.colorpicker.background":"배경색","components.controls.embedded.embedded":"임베드","components.controls.embedded.embeddedlink":"임베드 링크","components.controls.embedded.enterlink":"주소를 입력하세요","components.controls.emoji.emoji":"이모지","components.controls.fontfamily.fontfamily":"글꼴","components.controls.fontsize.fontsize":"글꼴 크기","components.controls.history.history":"히스토리","components.controls.history.undo":"실행 취소","components.controls.history.redo":"다시 실행","components.controls.image.image":"이미지","components.controls.image.fileUpload":"파일 업로드","components.controls.image.byURL":"주소","components.controls.image.dropFileText":"클릭하거나 파일을 드롭하여 업로드하세요","components.controls.inline.bold":"굵게","components.controls.inline.italic":"기울임꼴","components.controls.inline.underline":"밑줄","components.controls.inline.strikethrough":"취소선","components.controls.inline.monospace":"고정 너비","components.controls.inline.superscript":"위 첨자","components.controls.inline.subscript":"아래 첨자","components.controls.link.linkTitle":"링크 제목","components.controls.link.linkTarget":"링크 타겟","components.controls.link.linkTargetOption":"새창으로 열기","components.controls.link.link":"링크","components.controls.link.unlink":"링크 제거","components.controls.list.list":"리스트","components.controls.list.unordered":"일반 리스트","components.controls.list.ordered":"순서 리스트","components.controls.list.indent":"들여쓰기","components.controls.list.outdent":"내어쓰기","components.controls.remove.remove":"삭제","components.controls.textalign.textalign":"텍스트 정렬","components.controls.textalign.left":"왼쪽","components.controls.textalign.center":"중앙","components.controls.textalign.right":"오른쪽","components.controls.textalign.justify":"양쪽"},it:{"generic.add":"Aggiungi","generic.cancel":"Annulla","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Citazione","components.controls.blocktype.code":"Codice","components.controls.blocktype.blocktype":"Stili","components.controls.blocktype.normal":"Normale","components.controls.colorpicker.colorpicker":"Colore testo","components.controls.colorpicker.text":"Testo","components.controls.colorpicker.background":"Evidenziazione","components.controls.embedded.embedded":"Incorpora","components.controls.embedded.embeddedlink":"Incorpora link","components.controls.embedded.enterlink":"Inserisci link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Carattere","components.controls.fontsize.fontsize":"Dimensione carattere","components.controls.history.history":"Modifiche","components.controls.history.undo":"Annulla","components.controls.history.redo":"Ripristina","components.controls.image.image":"Immagine","components.controls.image.fileUpload":"Carica immagine","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Trascina il file o clicca per caricare","components.controls.inline.bold":"Grassetto","components.controls.inline.italic":"Corsivo","components.controls.inline.underline":"Sottolineato","components.controls.inline.strikethrough":"Barrato","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Apice","components.controls.inline.subscript":"Pedice","components.controls.link.linkTitle":"Testo","components.controls.link.linkTarget":"Link","components.controls.link.linkTargetOption":"Apri link in una nuova finestra","components.controls.link.link":"Inserisci link","components.controls.link.unlink":"Rimuovi link","components.controls.list.list":"Lista","components.controls.list.unordered":"Elenco puntato","components.controls.list.ordered":"Elenco numerato","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Rimuovi formattazione","components.controls.textalign.textalign":"Allineamento del testo","components.controls.textalign.left":"Allinea a sinistra","components.controls.textalign.center":"Allinea al centro","components.controls.textalign.right":"Allinea a destra","components.controls.textalign.justify":"Giustifica"},nl:{"generic.add":"Toevoegen","generic.cancel":"Annuleren","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Blocktype","components.controls.blocktype.normal":"Normaal","components.controls.colorpicker.colorpicker":"Kleurkiezer","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Achtergrond","components.controls.embedded.embedded":"Ingevoegd","components.controls.embedded.embeddedlink":"Ingevoegde link","components.controls.embedded.enterlink":"Voeg link toe","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Lettertype","components.controls.fontsize.fontsize":"Lettergrootte","components.controls.history.history":"Geschiedenis","components.controls.history.undo":"Ongedaan maken","components.controls.history.redo":"Opnieuw","components.controls.image.image":"Afbeelding","components.controls.image.fileUpload":"Bestand uploaden","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop het bestand hier of klik om te uploaden","components.controls.inline.bold":"Dikgedrukt","components.controls.inline.italic":"Schuingedrukt","components.controls.inline.underline":"Onderstrepen","components.controls.inline.strikethrough":"Doorstrepen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Linktitel","components.controls.link.linkTarget":"Link bestemming","components.controls.link.linkTargetOption":"Open link in een nieuw venster","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"Lijst","components.controls.list.unordered":"Ongeordend","components.controls.list.ordered":"Geordend","components.controls.list.indent":"Inspringen","components.controls.list.outdent":"Inspringen verkleinen","components.controls.remove.remove":"Verwijderen","components.controls.textalign.textalign":"Tekst uitlijnen","components.controls.textalign.left":"Links","components.controls.textalign.center":"Gecentreerd","components.controls.textalign.right":"Rechts","components.controls.textalign.justify":"Uitgelijnd"},de:{"generic.add":"Hinzufügen","generic.cancel":"Abbrechen","components.controls.blocktype.h1":"Überschrift 1","components.controls.blocktype.h2":"Überschrift 2","components.controls.blocktype.h3":"Überschrift 3","components.controls.blocktype.h4":"Überschrift 4","components.controls.blocktype.h5":"Überschrift 5","components.controls.blocktype.h6":"Überschrift 6","components.controls.blocktype.blockquote":"Zitat","components.controls.blocktype.code":"Quellcode","components.controls.blocktype.blocktype":"Blocktyp","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farbauswahl","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Hintergrund","components.controls.embedded.embedded":"Eingebettet","components.controls.embedded.embeddedlink":"Eingebetteter Link","components.controls.embedded.enterlink":"Link eingeben","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Schriftart","components.controls.fontsize.fontsize":"Schriftgröße","components.controls.history.history":"Historie","components.controls.history.undo":"Zurücknehmen","components.controls.history.redo":"Wiederholen","components.controls.image.image":"Bild","components.controls.image.fileUpload":"Datei-Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Dateien ziehen und ablegen, oder klicken zum Hochladen","components.controls.inline.bold":"Fett","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Unterstreichen","components.controls.inline.strikethrough":"Durchstreichen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hochgestellt","components.controls.inline.subscript":"Tiefgestellt","components.controls.link.linkTitle":"Link-Titel","components.controls.link.linkTarget":"Link-Ziel","components.controls.link.linkTargetOption":"Link in neuem Fenster öffnen","components.controls.link.link":"Link","components.controls.link.unlink":"Aufheben","components.controls.list.list":"Liste","components.controls.list.unordered":"Aufzählung","components.controls.list.ordered":"Nummerierte Liste","components.controls.list.indent":"Einzug vergrößern","components.controls.list.outdent":"Einzug reduzieren","components.controls.remove.remove":"Entfernen","components.controls.textalign.textalign":"Textausrichtung","components.controls.textalign.left":"Linksbündig","components.controls.textalign.center":"Zentrieren","components.controls.textalign.right":"Rechtsbündig","components.controls.textalign.justify":"Blocksatz"},da:{"generic.add":"Tilføj","generic.cancel":"Annuller","components.controls.blocktype.h1":"Overskrift 1","components.controls.blocktype.h2":"Overskrift 2","components.controls.blocktype.h3":"Overskrift 3","components.controls.blocktype.h4":"Overskrift 4","components.controls.blocktype.h5":"Overskrift 5","components.controls.blocktype.h6":"Overskrift 6","components.controls.blocktype.blockquote":"Blokcitat","components.controls.blocktype.code":"Kode","components.controls.blocktype.blocktype":"Blok Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farver","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Baggrund","components.controls.embedded.embedded":"Indlejre","components.controls.embedded.embeddedlink":"Indlejre Link","components.controls.embedded.enterlink":"Indtast link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonttype","components.controls.fontsize.fontsize":"Fontstørrelser","components.controls.history.history":"Historie","components.controls.history.undo":"Fortryd","components.controls.history.redo":"Gendan","components.controls.image.image":"Billede","components.controls.image.fileUpload":"Filoverførsel","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop filen eller klik for at uploade","components.controls.inline.bold":"Fed","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Understrege","components.controls.inline.strikethrough":"Gennemstreget","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hævet","components.controls.inline.subscript":"Sænket","components.controls.link.linkTitle":"Link Titel","components.controls.link.linkTarget":"Link Mål","components.controls.link.linkTargetOption":"Åbn link i nyt vindue","components.controls.link.link":"Link","components.controls.link.unlink":"Fjern link","components.controls.list.list":"Liste","components.controls.list.unordered":"Uordnet","components.controls.list.ordered":"Ordnet","components.controls.list.indent":"Indrykning","components.controls.list.outdent":"Udrykning","components.controls.remove.remove":"Fjern","components.controls.textalign.textalign":"Tekstjustering","components.controls.textalign.left":"Venstre","components.controls.textalign.center":"Center","components.controls.textalign.right":"Højre","components.controls.textalign.justify":"Margener"},zh_tw:{"generic.add":"新增","generic.cancel":"取消","components.controls.blocktype.h1":"標題1","components.controls.blocktype.h2":"標題2","components.controls.blocktype.h3":"標題3","components.controls.blocktype.h4":"標題4","components.controls.blocktype.h5":"標題5","components.controls.blocktype.h6":"標題6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"程式碼","components.controls.blocktype.blocktype":"樣式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"選色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"內嵌","components.controls.embedded.embeddedlink":"內嵌網頁","components.controls.embedded.enterlink":"輸入網頁地址","components.controls.emoji.emoji":"表情符號","components.controls.fontfamily.fontfamily":"字體","components.controls.fontsize.fontsize":"字體大小","components.controls.history.history":"歷史紀錄","components.controls.history.undo":"復原","components.controls.history.redo":"重做","components.controls.image.image":"圖片","components.controls.image.fileUpload":"檔案上傳","components.controls.image.byURL":"網址","components.controls.image.dropFileText":"點擊或拖曳檔案上傳","components.controls.inline.bold":"粗體","components.controls.inline.italic":"斜體","components.controls.inline.underline":"底線","components.controls.inline.strikethrough":"刪除線","components.controls.inline.monospace":"等寬字體","components.controls.inline.superscript":"上標","components.controls.inline.subscript":"下標","components.controls.link.linkTitle":"超連結","components.controls.link.linkTarget":"輸入連結位址","components.controls.link.linkTargetOption":"在新視窗打開連結","components.controls.link.link":"連結","components.controls.link.unlink":"刪除連結","components.controls.list.list":"列表","components.controls.list.unordered":"項目符號","components.controls.list.ordered":"編號","components.controls.list.indent":"增加縮排","components.controls.list.outdent":"減少縮排","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文字對齊","components.controls.textalign.left":"文字向左對齊","components.controls.textalign.center":"文字置中","components.controls.textalign.right":"文字向右對齊","components.controls.textalign.justify":"兩端對齊"},pl:{"generic.add":"Dodaj","generic.cancel":"Anuluj","components.controls.blocktype.h1":"Nagłówek 1","components.controls.blocktype.h2":"Nagłówek 2","components.controls.blocktype.h3":"Nagłówek 3","components.controls.blocktype.h4":"Nagłówek 4","components.controls.blocktype.h5":"Nagłówek 5","components.controls.blocktype.h6":"Nagłówek 6","components.controls.blocktype.blockquote":"Cytat","components.controls.blocktype.code":"Kod","components.controls.blocktype.blocktype":"Format","components.controls.blocktype.normal":"Normalny","components.controls.colorpicker.colorpicker":"Kolor","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Tło","components.controls.embedded.embedded":"Osadź","components.controls.embedded.embeddedlink":"Osadź odnośnik","components.controls.embedded.enterlink":"Wprowadź odnośnik","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Krój czcionki","components.controls.fontsize.fontsize":"Rozmiar czcionki","components.controls.history.history":"Historia","components.controls.history.undo":"Cofnij","components.controls.history.redo":"Ponów","components.controls.image.image":"Obrazek","components.controls.image.fileUpload":"Prześlij plik","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Upuść plik lub kliknij, aby przesłać","components.controls.inline.bold":"Pogrubienie","components.controls.inline.italic":"Kursywa","components.controls.inline.underline":"Podkreślenie","components.controls.inline.strikethrough":"Przekreślenie","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Indeks górny","components.controls.inline.subscript":"Indeks dolny","components.controls.link.linkTitle":"Tytuł odnośnika","components.controls.link.linkTarget":"Adres odnośnika","components.controls.link.linkTargetOption":"Otwórz odnośnik w nowej karcie","components.controls.link.link":"Wstaw odnośnik","components.controls.link.unlink":"Usuń odnośnik","components.controls.list.list":"Lista","components.controls.list.unordered":"Lista nieuporządkowana","components.controls.list.ordered":"Lista uporządkowana","components.controls.list.indent":"Zwiększ wcięcie","components.controls.list.outdent":"Zmniejsz wcięcie","components.controls.remove.remove":"Usuń","components.controls.textalign.textalign":"Wyrównaj tekst","components.controls.textalign.left":"Do lewej","components.controls.textalign.center":"Do środka","components.controls.textalign.right":"Do prawej","components.controls.textalign.justify":"Wyjustuj"},es:{"generic.add":"Añadir","generic.cancel":"Cancelar","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Código","components.controls.blocktype.blocktype":"Tipo de bloque","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Seleccionar color","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Subrayado","components.controls.embedded.embedded":"Adjuntar","components.controls.embedded.embeddedlink":"Adjuntar Link","components.controls.embedded.enterlink":"Introducir link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fuente","components.controls.fontsize.fontsize":"Tamaño de fuente","components.controls.history.history":"Histórico","components.controls.history.undo":"Deshacer","components.controls.history.redo":"Rehacer","components.controls.image.image":"Imagen","components.controls.image.fileUpload":"Subir archivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arrastra el archivo o haz click para subirlo","components.controls.inline.bold":"Negrita","components.controls.inline.italic":"Cursiva","components.controls.inline.underline":"Subrayado","components.controls.inline.strikethrough":"Tachado","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobreíndice","components.controls.inline.subscript":"Subíndice","components.controls.link.linkTitle":"Título del enlace","components.controls.link.linkTarget":"Objetivo del enlace","components.controls.link.linkTargetOption":"Abrir en nueva ventana","components.controls.link.link":"Enlazar","components.controls.link.unlink":"Desenlazar","components.controls.list.list":"Lista","components.controls.list.unordered":"Desordenada","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Indentada","components.controls.list.outdent":"Dentada","components.controls.remove.remove":"Eliminar","components.controls.textalign.textalign":"Alineación del texto","components.controls.textalign.left":"Izquierda","components.controls.textalign.center":"Centrado","components.controls.textalign.right":"Derecha","components.controls.textalign.justify":"Justificado"},ja:{"generic.add":"追加","generic.cancel":"キャンセル","components.controls.blocktype.h1":"見出し1","components.controls.blocktype.h2":"見出し2","components.controls.blocktype.h3":"見出し3","components.controls.blocktype.h4":"見出し4","components.controls.blocktype.h5":"見出し5","components.controls.blocktype.h6":"見出し6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"コード","components.controls.blocktype.blocktype":"スタイル","components.controls.blocktype.normal":"標準テキスト","components.controls.colorpicker.colorpicker":"テキストの色","components.controls.colorpicker.text":"テキスト","components.controls.colorpicker.background":"ハイライト","components.controls.embedded.embedded":"埋め込み","components.controls.embedded.embeddedlink":"埋め込みリンク","components.controls.embedded.enterlink":"リンクを入力してください","components.controls.emoji.emoji":"絵文字","components.controls.fontfamily.fontfamily":"フォント","components.controls.fontsize.fontsize":"フォントサイズ","components.controls.history.history":"履歴","components.controls.history.undo":"元に戻す","components.controls.history.redo":"やり直し","components.controls.image.image":"画像","components.controls.image.fileUpload":"ファイルをアップロード","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"ここに画像をドラッグするか、クリックしてください","components.controls.inline.bold":"太字","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下線","components.controls.inline.strikethrough":"取り消し線","components.controls.inline.monospace":"等幅フォント","components.controls.inline.superscript":"上付き文字","components.controls.inline.subscript":"下付き文字","components.controls.link.linkTitle":"リンクタイトル","components.controls.link.linkTarget":"リンク対象","components.controls.link.linkTargetOption":"新しいウィンドウで開く","components.controls.link.link":"リンク","components.controls.link.unlink":"リンクを解除","components.controls.list.list":"リスト","components.controls.list.unordered":"箇条書き","components.controls.list.ordered":"番号付き","components.controls.list.indent":"インデント増","components.controls.list.outdent":"インデント減","components.controls.remove.remove":"書式をクリア","components.controls.textalign.textalign":"整列","components.controls.textalign.left":"左揃え","components.controls.textalign.center":"中央揃え","components.controls.textalign.right":"右揃え","components.controls.textalign.justify":"両端揃え"}};function Ur(e){return(Ur="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)}function qr(){return(qr=Object.assign?Object.assign.bind():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}).apply(this,arguments)}function Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wr(Object(n),!0).forEach(function(t){Gr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(e){return function(e){if(Array.isArray(e))return Yr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Yr(e,t);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)?Yr(e,t):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.")}()}function Yr(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 Xr(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)}}function Jr(e,t){return(Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ei(e);if(t){var i=ei(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(38),n(39);var ti=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jr(e,t)}(o,r.Component);var e,t,n=$r(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onEditorBlur=function(){t.setState({editorFocused:!1})},t.onEditorFocus=function(e){var n=t.props.onFocus;t.setState({editorFocused:!0});var r=t.focusHandler.isEditorFocused();n&&r&&n(e)},t.onEditorMouseDown=function(){t.focusHandler.onEditorMouseDown()},t.keyBindingFn=function(e){if("Tab"!==e.key)return"ArrowUp"!==e.key&&"ArrowDown"!==e.key||w()&&e.preventDefault(),Object(l.getDefaultKeyBinding)(e);var n=t.props.onTab;if(!n||!n(e)){var r=Object(s.changeDepth)(t.state.editorState,e.shiftKey?-1:1,4);r&&r!==t.state.editorState&&(t.onChange(r),e.preventDefault())}return null},t.onToolbarFocus=function(e){var n=t.props.onFocus;n&&t.focusHandler.isToolbarFocused()&&n(e)},t.onWrapperBlur=function(e){var n=t.props.onBlur;n&&t.focusHandler.isEditorBlur(e)&&n(e,t.getEditorState())},t.onChange=function(e){var n=t.props,r=n.readOnly,i=n.onEditorStateChange;r||"atomic"===Object(s.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(i&&i(e,t.props.wrapperId),M(t.props,"editorState")?t.afterChange(e):t.setState({editorState:e},t.afterChange(e)))},t.setWrapperReference=function(e){t.wrapper=e},t.setEditorReference=function(e){t.props.editorRef&&t.props.editorRef(e),t.editor=e},t.getCompositeDecorator=function(e){var n=[].concat(Kr(t.props.customDecorators),[{strategy:mr,component:gr({showOpenOptionOnHover:e.link.showOpenOptionOnHover})}]);return t.props.mention&&n.push.apply(n,Kr(Sr(Qr(Qr({},t.props.mention),{},{onChange:t.onChange,getEditorState:t.getEditorState,getSuggestions:t.getSuggestions,getWrapperRef:t.getWrapperRef,modalHandler:t.modalHandler})))),t.props.hashtag&&n.push(zr(t.props.hashtag)),new l.CompositeDecorator(n)},t.getWrapperRef=function(){return t.wrapper},t.getEditorState=function(){return t.state?t.state.editorState:null},t.getSuggestions=function(){return t.props.mention&&t.props.mention.suggestions},t.afterChange=function(e){setTimeout(function(){var n=t.props,r=n.onChange,i=n.onContentStateChange;r&&r(Object(l.convertToRaw)(e.getCurrentContent())),i&&i(Object(l.convertToRaw)(e.getCurrentContent()))})},t.isReadOnly=function(){return t.props.readOnly},t.isImageAlignmentEnabled=function(){return t.state.toolbar.image.alignmentEnabled},t.createEditorState=function(e){var n;if(M(t.props,"editorState"))t.props.editorState&&(n=l.EditorState.set(t.props.editorState,{decorator:e}));else if(M(t.props,"defaultEditorState"))t.props.defaultEditorState&&(n=l.EditorState.set(t.props.defaultEditorState,{decorator:e}));else if(M(t.props,"contentState")){if(t.props.contentState){var r=Object(l.convertFromRaw)(t.props.contentState);n=l.EditorState.createWithContent(r,e),n=l.EditorState.moveSelectionToEnd(n)}}else if(M(t.props,"defaultContentState")||M(t.props,"initialContentState")){var i=t.props.defaultContentState||t.props.initialContentState;i&&(i=Object(l.convertFromRaw)(i),n=l.EditorState.createWithContent(i,e),n=l.EditorState.moveSelectionToEnd(n))}return n||l.EditorState.createEmpty(e)},t.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","locale","localization","toolbarOnFocus","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","toolbarHidden","wrapperClassName","toolbarStyle","editorStyle","wrapperStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],r=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),i={},r&&0<r.length&&r.forEach(function(e){i[e]=t[e]}),i;var t,n,r,i},t.getStyleMap=function(e){return Qr(Qr({},Object(s.getCustomStyleMap)()),e.customStyleMap)},t.changeEditorState=function(e){var n=Object(l.convertFromRaw)(e),r=t.state.editorState;return r=l.EditorState.push(r,n,"insert-characters"),l.EditorState.moveSelectionToEnd(r)},t.focusEditor=function(){setTimeout(function(){t.editor.focus()})},t.handleKeyCommand=function(e){var n=t.state,r=n.editorState,i=n.toolbar.inline;if(i&&0<=i.options.indexOf(e)){var o=l.RichUtils.handleKeyCommand(r,e);if(o)return t.onChange(o),!0}return!1},t.handleReturn=function(e){if(w())return!0;var n=t.state.editorState,r=Object(s.handleNewLine)(n,e);return!!r&&(t.onChange(r),!0)},t.handlePastedTextFn=function(e,n){var r=t.state.editorState,i=t.props,o=i.handlePastedText,a=i.stripPastedStyles;return o?o(e,n,r,t.onChange):!a&&function(e,t,n,r){var i=Object(s.getSelectedBlock)(n);if(i&&"code"===i.type){var o=l.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());return r(l.EditorState.push(n,o,"insert-characters")),!0}if(t){var a=H()(t),c=n.getCurrentContent();return a.entityMap.forEach(function(e,t){c=c.mergeEntityData(t,e)}),c=l.Modifier.replaceWithFragment(c,n.getSelection(),new S.List(a.contentBlocks)),r(l.EditorState.push(n,c,"insert-characters")),!0}return!1}(e,n,r,t.onChange)},t.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?t.focusHandler.onInputMouseDown():e.preventDefault()};var r=L(Pr,e.toolbar),i=e.wrapperId?e.wrapperId:Math.floor(1e4*Math.random());t.wrapperId="rdw-wrapper-".concat(i),t.modalHandler=new f,t.focusHandler=new C,t.blockRendererFn=Br({isReadOnly:t.isReadOnly,isImageAlignmentEnabled:t.isImageAlignmentEnabled,getEditorState:t.getEditorState,onChange:t.onChange},e.customBlockRenderFunc),t.editorProps=t.filterEditorProps(e),t.customStyleMap=t.getStyleMap(e),t.compositeDecorator=t.getCompositeDecorator(r);var a=t.createEditorState(t.compositeDecorator);return Object(s.extractInlineStyle)(a),t.state={editorState:a,editorFocused:!1,toolbar:r},t}return e=o,(t=[{key:"componentDidMount",value:function(){this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t={},n=this.props,r=n.editorState,i=n.contentState;if(!this.state.toolbar){var o=L(Pr,o);t.toolbar=o}if(M(this.props,"editorState")&&r!==e.editorState)t.editorState=r?l.EditorState.set(r,{decorator:this.compositeDecorator}):l.EditorState.createEmpty(this.compositeDecorator);else if(M(this.props,"contentState")&&i!==e.contentState)if(i){var a=this.changeEditorState(i);a&&(t.editorState=a)}else t.editorState=l.EditorState.createEmpty(this.compositeDecorator);e.editorState===r&&e.contentState===i||Object(s.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props)}}},{key:"render",value:function(){var e=this.state,t=e.editorState,n=e.editorFocused,r=e.toolbar,o=this.props,a=o.locale,c=o.localization,u=c.locale,f=c.translations,h=o.toolbarCustomButtons,p=o.toolbarOnFocus,C=o.toolbarClassName,m=o.toolbarHidden,v=o.editorClassName,y=o.wrapperClassName,w=o.toolbarStyle,E=o.editorStyle,M=o.wrapperStyle,A=o.uploadCallback,x=o.ariaLabel,L={modalHandler:this.modalHandler,editorState:t,onChange:this.onChange,translations:Qr(Qr({},Fr[a||u]),f)},k=n||this.focusHandler.isInputFocused()||!p;return i.a.createElement("div",{id:this.wrapperId,className:d()(y,"rdw-editor-wrapper"),style:M,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur,"aria-label":"rdw-wrapper"},!m&&i.a.createElement("div",{className:d()("rdw-editor-toolbar",C),style:Qr({visibility:k?"visible":"hidden"},w),onMouseDown:this.preventDefault,"aria-label":"rdw-toolbar","aria-hidden":(!n&&p).toString(),onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=lr[e],o=r[e];return"image"===e&&A&&(o.uploadCallback=A),i.a.createElement(n,qr({key:t},L,{config:o}))}),h&&h.map(function(e,t){return i.a.cloneElement(e,Qr({key:t},L))})),i.a.createElement("div",{ref:this.setWrapperReference,className:d()(v,"rdw-editor-main"),style:E,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:g.onKeyDown,onMouseDown:this.onEditorMouseDown},i.a.createElement(l.Editor,qr({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:b,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,handlePastedText:this.handlePastedTextFn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:x||"rdw-editor",blockRenderMap:s.blockRenderMap},this.editorProps))))}}])&&Xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ti.propTypes={onChange:a.a.func,onEditorStateChange:a.a.func,onContentStateChange:a.a.func,initialContentState:a.a.object,defaultContentState:a.a.object,contentState:a.a.object,editorState:a.a.object,defaultEditorState:a.a.object,toolbarOnFocus:a.a.bool,spellCheck:a.a.bool,stripPastedStyles:a.a.bool,toolbar:a.a.object,toolbarCustomButtons:a.a.array,toolbarClassName:a.a.string,toolbarHidden:a.a.bool,locale:a.a.string,localization:a.a.object,editorClassName:a.a.string,wrapperClassName:a.a.string,toolbarStyle:a.a.object,editorStyle:a.a.object,wrapperStyle:a.a.object,uploadCallback:a.a.func,onFocus:a.a.func,onBlur:a.a.func,onTab:a.a.func,mention:a.a.object,hashtag:a.a.object,textAlignment:a.a.string,readOnly:a.a.bool,tabIndex:a.a.number,placeholder:a.a.string,ariaLabel:a.a.string,ariaOwneeID:a.a.string,ariaActiveDescendantID:a.a.string,ariaAutoComplete:a.a.string,ariaDescribedBy:a.a.string,ariaExpanded:a.a.string,ariaHasPopup:a.a.string,customBlockRenderFunc:a.a.func,wrapperId:a.a.number,customDecorators:a.a.array,editorRef:a.a.func,handlePastedText:a.a.func},ti.defaultProps={toolbarOnFocus:!1,toolbarHidden:!1,stripPastedStyles:!1,localization:{locale:"en",translations:{}},customDecorators:[]};var ni=ti}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8);function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o}(i,VB(),Yq)),zB.exports);const Jq=t=>{const{contentState:n,entityKey:r,children:i}=t,o=n.getEntity(r),{url:a,target:l}=o.getData();return e("a",{href:a,target:l||"_blank",rel:"noopener noreferrer",onClick:e=>{e.preventDefault(),e.stopPropagation(),a&&("_blank"!==l&&l?window.open(a,l):window.open(a,"_blank","noopener,noreferrer"))},style:{color:"var(--ff-step-element-color)",textDecoration:"underline",cursor:"pointer"},children:i})},$q=({convertedContent:t,setConvertedContent:r,readOnly:i,toolbarHidden:o,toolbarOptions:s,label:d,required:u=!1,onBlur:f,mode:h,helperText:p,analyticsClasses:C=!1,error:m,editableTextEditor:g=!1,onSubmit:v,onFocus:y})=>{const[w,b]=c(null),[E,M]=c(!1),[A,x]=c(!1),[L,k]=c(!1),[H,S]=c(t),_=a(null),V=a(null),O=new OB.CompositeDecorator([{strategy:(e,t,n)=>{e.findEntityRanges(e=>{const t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)},component:Jq}]),z=e=>{if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t&&t.blocks?t:OB.convertToRaw(OB.ContentState.createFromText(e))}catch(t){return OB.convertToRaw(OB.ContentState.createFromText(e))}};l(()=>{let e;try{if(G(t))e="view"===h||g&&!L?OB.EditorState.createWithContent(OB.ContentState.createFromText("---"),O):OB.EditorState.createEmpty(O);else{const n=z(t);e=n?OB.EditorState.createWithContent(OB.convertFromRaw(n),O):OB.EditorState.createEmpty(O)}}catch(n){console.error("Error creating editor state:",n),e=OB.EditorState.createWithContent(OB.ContentState.createFromText(t||"Invalid content"),O)}b(e),S(t)},[t,h,L,g]),l(()=>{if(0===t?.length){let e;if("view"===h||g&&!L){const t=OB.ContentState.createFromText("---");e=OB.EditorState.createWithContent(t,O)}else e=OB.EditorState.createEmpty(O);b(e)}},[t,h,L,g]),l(()=>{if(!_.current)return;const e=e=>{const t=e.target.closest("a");if(t&&_.current?.contains(t)){e.preventDefault(),e.stopPropagation();const n=t.getAttribute("href"),r=t.getAttribute("target")||"_blank";n&&("_blank"===r?window.open(n,"_blank","noopener,noreferrer"):window.open(n,r))}},t=_.current;return t.addEventListener("click",e),()=>{t.removeEventListener("click",e)}},[]);Y(_,()=>{if(g&&L&&!A){k(!1),r(H||"");const e=z(H),t=e?OB.EditorState.createWithContent(OB.convertFromRaw(e),O):OB.EditorState.createWithContent(OB.ContentState.createFromText("---"),O);b(t)}},[V]);const N=Xq.Editor;return n("div",{className:"ff-textEditor-container",children:[n("div",{className:"ff-title-button",children:[n("div",{className:"ff-textEditor-label-asterisk-container",children:[u&&e(F,{className:"required-asterisk",children:"* "}),d&&e(F,{lineHeight:"10px",fontWeight:"medium",fontSize:"12px",children:d})]}),g&&L&&n("div",{ref:V,className:"ff-textEditor-buttons",children:[e(K,{title:"Update",placement:"bottom",children:e(P,{name:"update_icon",color:"var(--label-edit-confirm-icon)",height:20,width:20,hoverEffect:!0,onClick:()=>{if(A||!w)return;const e=OB.convertToRaw(w.getCurrentContent());let t=JSON.stringify(e);""===e?.blocks[0]?.text&&(t=JSON.stringify(OB.convertToRaw(OB.ContentState.createFromText("---")))),r(t),v&&v(t),S(t),k(!1)}})}),e(K,{title:"Cancel",placement:"bottom",children:e(P,{name:"close",color:"var(--label-edit-cancel-icon)",height:20,width:20,onClick:()=>{k(!1),r(H||"");const e=z(H),t=e?OB.EditorState.createWithContent(OB.convertFromRaw(e),O):OB.EditorState.createWithContent(OB.ContentState.createFromText("---"),O);b(t),x(!1)},hoverEffect:!0})})]})]}),e("div",{ref:_,onDoubleClick:()=>{if(g&&!L){k(!0),S(t);const e=z(t),n="---"===e?.blocks[0]?.text?OB.EditorState.createEmpty(O):e?OB.EditorState.createWithContent(OB.convertFromRaw(e),O):OB.EditorState.createEmpty(O);b(n)}},children:w&&e(N,{editorState:w,onEditorStateChange:e=>{b(e);const t=OB.convertToRaw(e.getCurrentContent());L&&""===t?.blocks[0]?.text&&u?x(!0):""!==t?.blocks[0]?.text&&x(!1)},wrapperClassName:"wrapperClass",editorClassName:"ff-heading-TextEditor-style "+(C?"fontSm":"fontMd"),editorStyle:"view"===h||g&&!L?{border:"none"}:E?{border:"1px solid var(--text-editor-in-focus-border-color)",borderRadius:"4px"}:{border:"1px solid var(--text-editor-out-focus-border-color) ",borderRadius:"4px"},onFocus:()=>{M(!0),y&&y()},onBlur:e=>{if(!g&&w){const e=OB.convertToRaw(w.getCurrentContent());r(JSON.stringify(e)),""===e?.blocks[0]?.text&&x(!0)}f&&f(e)},readOnly:g?!L:i,toolbarHidden:g?!L:o,toolbarClassName:"ff-toolbarClass",handlePastedText:()=>!1,toolbar:{options:Array.isArray(s)&&s?.length>0?s:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],fontFamily:{options:["Arial","Georgia","Impact","OpenSans-Regular","Tahoma","Times New Roman","Verdana","poppins"]},link:{defaultTargetOption:"_blank",showOpenOptionOnHover:!1}}})}),u&&A||p&&m?e(F,{fontSize:10,className:"ff-textEditor-error-msg",as:"span",children:p}):null]})},eW=({iconName:t,iconWidth:r=120,iconHeight:i=115,text:o,textFontSize:a="24px",textDirectionRow:l=!1,gap:s="40px"})=>n("div",{className:`no_data_message ${l&&"flex-row"}`,style:{gap:s},children:[e(P,{name:t,width:r,height:i}),e(F,{fontSize:a,lineHeight:"36px",fontWeight:"semi-bold",children:o})]}),tW=({cardProperties:t={width:"200px",height:"200px",background:"white",borderRadius:"16px",boxShadow:"1px 4px 8px var(--plugins-header-bg-color)",padding:"16px",margin:"0",border:"none",className:"",style:{},onClick:()=>{}},headerContent:r,midContent:i,footerContent:o})=>{const{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,className:p="",style:C={}}=t;return n("section",{className:`ff-card ${p}`,style:{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,...C},onClick:t.onClick,children:[r?.isHeader&&e("div",{className:"ff-card-header",children:r.content}),i?.isMidContent&&e("div",{className:"ff-card-content",children:i.content}),o?.isFooter&&e("div",{className:"ff-card-footer",children:o.content})]})},nW=e=>Lt.test(e)?e:e.toLowerCase().split(/[\s_-]+/).map((e,t)=>0===t?e:e.charAt(0).toUpperCase()+e.slice(1)).join(""),rW=(e,t)=>{let n;if(e.current){const r=e.current;n=new MutationObserver(()=>{const e=r.scrollHeight;r.scrollTop=e+(t||0)}),n.observe(r,{childList:!0,subtree:!0});const i=r.scrollHeight;r.scrollTop=i}return()=>{n&&n.disconnect()}},iW=(e,t,n,r,i=void 0,o=!1)=>{if(!t&&!i)throw new Error("Key is required for individual node expansion/collapse or a valid treeAction for all nodes");const a=new Map,l=new Map,s=new Set;let c=[...e];function d(e,t){if(s.has(e))throw new Error(`Cycle detected at node: ${e}`);s.add(e);(l.get(e)||[]).forEach(e=>{e.expanded=t,e.expandedAll=t,e.hide=!t,d(e.key,t)}),s.delete(e)}if(n&&!G(n)&&(c=[n,...e]),c.forEach(e=>{a.set(e.key,e),e.parentId&&(l.has(e.parentId)||l.set(e.parentId,[]),l.get(e.parentId).push(e))}),"expandAll"!==i&&"collapseAll"!==i||!t)if("expandAll"!==i&&"collapseAll"!==i||t){if(t){const e=a.get(t);if(e)if(e.expanded=r,e.expandedAll=r,e.hide=!1,r){(l.get(t)||[]).forEach(e=>e.hide=!!o)}else d(t,!1)}}else{const e="expandAll"===i;c.forEach(t=>{t.expanded=e,t.expandedAll=e,t.hide=!e})}else{const e=a.get(t);if(e){const n="expandAll"===i;e.expanded=n,e.expandedAll=n,e.hide=!1,d(t,n)}}return G(n)?{data:c}:{rootNode:c[0],data:c.slice(1)}};function oW(e,t,n){if(!Array.isArray(e))throw new Error("Input data must be an array of TreeNode objects.");const r=n?["script","element","sharedelement","program_element","stepgroup","file","webservice_collection","workbench_request"]:["pre","post"],i=e=>n?!t||!["module"].includes(e.entityType?.toLowerCase()??"")||(e.totalSubContainerCount??0)>0:e.expandable;return e.map(e=>r.includes(e.entityType?.toLowerCase()??"")?{...e,hide:t}:{...e,expandable:i(e)})}function aW(e,t){if(!e)return null;const n=e.querySelector(".table-scrollable");if(!n)return null;const r=n.scrollTop,i=Array.from(n.querySelectorAll("tbody tr"));if(0===i.length)return null;const o=i[0].offsetHeight||0;if(!o)return null;const a=t[Math.floor(r/o)]??t[0];return{key:a?.key||null,searchKey:a?.searchKey||null}}const lW=e=>new Promise(t=>setTimeout(t,e)),sW=(e,t,n)=>{const r=(e,t)=>e.filter(e=>e.searchKey&&e.searchKey.startsWith(t+"/")),i=(e,t)=>{const n=e.filter(e=>e.searchKey&&e.searchKey.startsWith(t.searchKey+"/"));if(0===n.length)return t.key;const r=n[n.length-1];return r?.container?i(e,r):r?.key};if("/Root"!==e.path){const n=i(t,e),o=r(t,e?.searchKey),a=((e,t)=>{const n=t.split("/").filter(e=>""!==e),r={};return n.forEach((t,i)=>{const o="/"+n.slice(0,i+1).join("/"),a=e.find(e=>e.searchKey===o);if(a){r[i]={key:a.key,name:a.name??"",type:a.entityType??"",searchKey:a.searchKey??"",hierarchy:a.hierarchy,isContainer:a.container??!1,hasPrePost:!1};const t=e.filter(e=>e?.searchKey?.startsWith(o+"/")&&e?.searchKey?.split("/").length===o?.split("/").length+1);r[i].hasPrePost=t.some(e=>"PRE"===e.entityType||"POST"===e.entityType)}}),r})(t,e?.searchKey),l=Object.values(a).find(t=>t.key===e.key);if(o.length>0){const e=o.filter(e=>"POST"!==e.entityType&&"PRE"!==e.entityType);return e.length>0?{navigateTo:l?.hasPrePost?e[e.length-1]?.key:n}:{navigateTo:o[o.length-1]?.key}}return{navigateTo:e?.key}}{const n=((e,t)=>e.filter(e=>e.parentId===t.key&&"POST"!==e.entityType&&"PRE"!==e.entityType))(t,e);if(n.length>0){const e=n[n.length-1];if(!1===e?.expandedAll||!1===e?.expanded)return{navigateTo:e?.key};if(!0===e?.expandedAll||!0===e?.expanded){const n=r(t,e?.searchKey);return{navigateTo:n[n.length-1]?.key}}}}return{navigateTo:e?.key}},cW=async(e,{requestDeniedMsg:t,notSupportedMsg:n,micAccessDeniedMsg:r})=>{try{const n=await(navigator?.permissions.query({name:"microphone"}));if("granted"===n?.state)e();else if("prompt"===n?.state)try{const t=await(navigator?.mediaDevices?.getUserMedia({audio:!0}));t?.getTracks()?.forEach(e=>e?.stop()),e()}catch(e){Ta.error(t),console.error("getUserMedia error:",e)}else"denied"===n?.state&&Ta.error(r)}catch(e){Ta.error(n),console.error("Permission query error:",e)}},dW=({buttons:t=[],panelContentMap:r={},headerIconsMap:i={},headerLeadingIconMap:o={},panelheight:s="100%",panelwidth:d="485px"})=>{const u=a({}),[f,p]=c(0),[C,m]=c(null);l(()=>{if(C&&u.current[C]){const e=u.current[C],t=e.getBoundingClientRect(),n=e.parentElement.getBoundingClientRect(),r=t.top-n.top+t.height/2-10;p(r)}},[C]);const g=h(()=>C?[{id:C,label:C,icon:o?.[C]}]:[],[C,o]);return n("div",{className:"ff-debug-buttons-container",children:[e("div",{className:"ff-debug_buttons",children:t.map(t=>e("div",{ref:e=>u.current[t]=e,children:e(U,{onClick:()=>(e=>{m(t=>t===e?null:e)})(t),variant:"custom",className:"ff-debug-button "+(C===t?"active":""),children:t})},t))}),C&&n("div",{className:"ff-debug-panel",style:{height:s,width:d},children:[e("div",{className:"ff-dropdown-notch",style:{top:`${f}px`}}),n("div",{className:"ff-debug-panel__header",children:[e("div",{className:"ff-debug-panel__title",children:e(Ps,{tabsData:g,activeTabId:C,variant:"default",noPadding:!0,onTabClick:()=>{}})}),e("div",{className:"ff-debug-panel__header-icons",children:i?.[C]??e(P,{name:"close",className:"ff-debug-panel__close-icon",onClick:()=>m(null)})})]}),e("div",{className:"ff-debug-panel__content",children:e(F,{children:r?.[C]})})]})]})};dW.displayName="DebugToolsPanel";const uW=o(({isRotate:t=!1,modal:r=[],onClick:i=()=>{},tooltip:o={},icons:a=["app_actions_icon","screenshot_icon","video_record_icon","test_gallary_icon","session_setting_icon"],className:l="",disabledIcons:s=[],activeIcon:d=""},u)=>{const[f,h]=c(null),[p,C]=c(null),m=()=>{h(null),C(null)};return e("div",{ref:u,className:`ff-body-container ${t?"vertical":"horizontal"} ${l}`,children:a.map((a,l)=>{const c=s.includes(a);return e(K,{title:o?.[a]||"",placement:t?"right":"bottom",children:n("div",{className:"ff-body-container__icon-wrapper "+(d===a?"active":""),onMouseEnter:()=>((e,t)=>{s.includes(t)||(h(e),r.includes(t)&&C(t))})(l,a),onMouseLeave:m,onClick:()=>((e,t)=>{s.includes(t)||(i(e),r.includes(t)&&C(p===t?null:t))})(l,a),id:a,children:[e(P,{className:"ff-body-container__icon",name:a,width:24,height:24,color:f===l||d===a?"var(--session-control-bg)":"var(--base-bg-color)",disabled:c}),!c&&r.includes(a)&&p===a&&e("div",{className:"ff-body-container__modal"})]})},a)})})});uW.displayName="SessionManager";const fW=({gap:t=8,fontSize:r=12,statusValues:i})=>{const o=e=>{if(Number.isInteger(e))return String(e);const[t,n=""]=String(e).split(".");let r="";return r=1===t?.length?n.slice(0,4).padEnd(4,"0"):2===t?.length?n.slice(0,3).padEnd(3,"0"):n.slice(0,2).padEnd(2,"0"),`${t}.${r}`};return e("div",{className:"ff-statusbadge-container",style:{gap:`${t}px`},children:i.map((t,i)=>{return e(K,{title:`${_p(t?.status)} : ${t?.value}`,zIndex:1e3,children:n("div",{className:"ff-statusbadge-item",children:[e(P,{name:(a=t?.status?.toLowerCase(),"passed"===a?"pass_result_icon":"failed"===a?"fail_result_icon":"warning"===a?"warning_result_icon":"skipped_result_icon")}),e(F,{fontSize:r,children:o(t?.value)})]})},`${i}-${t}`);var a})})};var hW=function(e){if("function"==typeof define&&define.amd)define(e);else if("object"==typeof module&&module.exports)module.exports=e();else if("object"==typeof window)return e()}(function(){t.sessions=new Map,t.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return!0;if(window.navigator.userAgent.match("Chrome")){let e=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10),n=33;return window.navigator.userAgent.match("Linux")&&(n=35),e>=26&&e<=n||t.extension.isInstalled()}return!0};var e={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return null!==document.querySelector("#janus-extension-installed")},getScreen:function(e){let t=window.setTimeout(function(){let t=new Error("NavigatorUserMediaError");return t.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)',e(t)},1e3);this.cache[t]=e,window.postMessage({type:"janusGetScreen",id:t},"*")},init:function(){let e={};this.cache=e,window.addEventListener("message",function(t){if(t.origin==window.location.origin)if("janusGotScreen"==t.data.type&&e[t.data.id]){let n=e[t.data.id];if(delete e[t.data.id],""===t.data.sourceId){let e=new Error("NavigatorUserMediaError");e.name="You cancelled the request for permission, giving up...",n(e)}else n(null,t.data.sourceId)}else"janusGetScreenPending"==t.data.type&&window.clearTimeout(t.data.id)})}};function t(e){if((e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.destroyed="function"==typeof e.destroyed?e.destroyed:t.noop,!t.initDone)return e.error("Library not initialized"),{};if(!t.isWebrtcSupported())return e.error("WebRTC not supported by this browser"),{};if(t.log("Library initialized: "+t.initDone),!e.server)return e.error("Invalid server url"),{};let n=!1,r=null,i={},o=null,a=null,l=0,s=e.server;t.isArray(s)?(t.log("Multiple servers provided ("+s.length+"), will use the first that works"),s=null,a=e.server,t.debug(a)):0===s.indexOf("ws")?(n=!0,t.log("Using WebSockets to contact Janus: "+s)):(n=!1,t.log("Using REST API to contact Janus: "+s));let c=e.iceServers||[{urls:"stun:stun.l.google.com:19302"}],d=e.iceTransportPolicy,u=e.bundlePolicy,f=!1;void 0!==e.withCredentials&&null!==e.withCredentials&&(f=!0===e.withCredentials);let h=10;void 0!==e.max_poll_events&&null!==e.max_poll_events&&(h=e.max_poll_events),h<1&&(h=1);let p=null;void 0!==e.token&&null!==e.token&&(p=e.token);let C=null;void 0!==e.apisecret&&null!==e.apisecret&&(C=e.apisecret),this.destroyOnUnload=!0,void 0!==e.destroyOnUnload&&null!==e.destroyOnUnload&&(this.destroyOnUnload=!0===e.destroyOnUnload);let m=25e3;void 0!==e.keepAlivePeriod&&null!==e.keepAlivePeriod&&(m=e.keepAlivePeriod),isNaN(m)&&(m=25e3);let g=6e4;function v(e){let t={high:9e5,medium:3e5,low:1e5};return null!=e&&(e.high&&(t.high=e.high),e.medium&&(t.medium=e.medium),e.low&&(t.low=e.low)),t}void 0!==e.longPollTimeout&&null!==e.longPollTimeout&&(g=e.longPollTimeout),isNaN(g)&&(g=6e4);let y=!1,w=null,b=new Map,E=this,M=0,A=new Map;function x(){if(null==w)return;if(t.debug("Long poll..."),!y)return void t.warn("Is the server down? (connected=false)");let n=s+"/"+w+"?rid="+(new Date).getTime();h&&(n=n+"&maxev="+h),p&&(n=n+"&token="+encodeURIComponent(p)),C&&(n=n+"&apisecret="+encodeURIComponent(C)),t.httpAPICall(n,{verb:"GET",withCredentials:f,success:L,timeout:g,error:function(n,r){if(t.error(n+":",r),M++,M>3)return y=!1,void e.error("Lost connection to the server (is it down?)");x()}})}function L(e,i){if(M=0,n||null==w||!0===i||x(),n||!t.isArray(e))if("keepalive"!==e.janus){if("server_info"===e.janus){t.debug("Got info on the Janus instance"),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("ack"===e.janus){t.debug("Got an ack on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("success"===e.janus){t.debug("Got a success on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("trickle"===e.janus){const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");let i=e.candidate;t.debug("Got a trickled candidate on session "+w),t.debug(i);let o=r.webrtcStuff;o.pc&&o.remoteSdp?(t.debug("Adding remote candidate:",i),i&&!0!==i.completed?o.pc.addIceCandidate(i):o.pc.addIceCandidate(t.endOfCandidates)):(t.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),o.candidates||(o.candidates=[]),o.candidates.push(i),t.debug(o.candidates))}else{if("webrtcup"===e.janus){t.debug("Got a webrtcup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);return r?void r.webrtcState(!0):void t.debug("This handle is not attached to this session")}if("hangup"===e.janus){t.debug("Got a hangup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.webrtcState(!1,e.reason),r.hangup()}else if("detached"===e.janus){t.debug("Got a detached event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return;r.ondetached(),r.detach()}else if("media"===e.janus){t.debug("Got a media event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.mediaState(e.type,e.receiving,e.mid)}else if("slowlink"===e.janus){t.debug("Got a slowlink event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.slowLink(e.uplink,e.lost,e.mid)}else{if("error"===e.janus){t.error("Ooops: "+e.error.code+" "+e.error.reason),t.debug(e);let n=e.transaction;if(n){let t=A.get(n);t&&t(e),A.delete(n)}return}if("event"===e.janus){t.debug("Got a plugin event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");let r=e.plugindata;if(!r)return void t.warn("Missing plugindata...");t.debug(" -- Event is coming from "+n+" ("+r.plugin+")");let i=r.data;t.debug(i);const o=b.get(n);if(!o)return void t.warn("This handle is not attached to this session");let a=e.jsep;a&&(t.debug("Handling SDP as well..."),t.debug(a));let l=o.onmessage;l?(t.debug("Notifying application..."),l(i,a)):t.debug("No provided notification callback")}else{if("timeout"===e.janus)return t.error("Timeout on session "+w),t.debug(e),void(n&&r.close(3504,"Gateway timeout"));t.warn("Unknown message/event '"+e.janus+"' on session "+w),t.debug(e)}}}}else t.vdebug("Got a keepalive on session "+w);else for(let t=0;t<e.length;t++)L(e[t],!0)}function k(){if(!s||!n||!y)return;o=setTimeout(k,m);let e={janus:"keepalive",session_id:w,transaction:t.randomString(12)};p&&(e.token=p),C&&(e.apisecret=C),r.send(JSON.stringify(e))}function H(c){let d=t.randomString(12),u={janus:"create",transaction:d};if(c.reconnect&&(y=!1,u.janus="claim",u.session_id=w,r&&(r.onopen=null,r.onerror=null,r.onclose=null,o&&(clearTimeout(o),o=null))),p&&(u.token=p),C&&(u.apisecret=C),!s&&t.isArray(a)&&(s=a[l],0===s.indexOf("ws")?(n=!0,t.log("Server #"+(l+1)+": trying WebSockets to contact Janus ("+s+")")):(n=!1,t.log("Server #"+(l+1)+": trying REST API to contact Janus ("+s+")"))),n){r=t.newWebSocket(s,"janus-protocol"),i={error:function(){if(t.error("Error connecting to the Janus WebSockets server... "+s),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));c.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){A.set(d,function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);o=setTimeout(k,m),y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),c.success()}),r.send(JSON.stringify(u))},message:function(e){L(JSON.parse(e.data))},close:function(){s&&y&&(y=!1,e.error("Lost connection to the server (is it down?)"))}};for(let e in i)r.addEventListener(e,i[e])}else t.httpAPICall(s,{verb:"POST",withCredentials:f,body:u,success:function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),x(),c.success()},error:function(e,n){if(t.error(e+":",n),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));""===n?c.error(e+": Is the server down?"):n&&n.error?c.error(e+": "+n.error.message):c.error(e+": "+n)}})}function S(e,i){if((i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i.error("Invalid handle");let a=i.message,l=i.jsep,c=t.randomString(12),d={janus:"message",body:a,transaction:c};if(o.token&&(d.token=o.token),C&&(d.apisecret=C),l){d.jsep={type:l.type,sdp:l.sdp},l.e2ee&&(d.jsep.e2ee=!0),"hml"!==l.rid_order&&"lmh"!==l.rid_order||(d.jsep.rid_order=l.rid_order),l.force_relay&&(d.jsep.force_relay=!0);let e=null,t=o.webrtcStuff;if(t.pc){let n=t.pc.getTransceivers();if(n&&n.length>0)for(let t in n){let r=n[t];if(r&&r.sender&&r.sender.track&&"video"===r.sender.track.kind){let n=r.sender.getParameters();n&&n.encodings&&1===n.encodings.length&&n.encodings[0]&&n.encodings[0].scalabilityMode&&(e||(e=[]),e.push({mindex:parseInt(t),mid:r.mid,svc:n.encodings[0].scalabilityMode}))}}}e&&(d.jsep.svc=e)}if(t.debug("Sending message to plugin (handle="+e+"):"),t.debug(d),n)return d.session_id=w,d.handle_id=e,A.set(c,function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))}),void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:d,success:function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))},error:function(e,n){t.error(e+":",n),i.error(e+": "+n)}})}function _(e,i){if(!y)return void t.warn("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return void t.warn("Invalid handle");let a={janus:"trickle",candidate:i,transaction:t.randomString(12)};if(o.token&&(a.token=o.token),C&&(a.apisecret=C),t.vdebug("Sending trickle candidate (handle="+e+"):"),t.vdebug(a),n)return a.session_id=w,a.handle_id=e,void r.send(JSON.stringify(a));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:a,success:function(e){t.vdebug("Candidate sent!"),t.vdebug(e),"ack"===e.janus||t.error("Ooops: "+e.error.code+" "+e.error.reason)},error:function(e,n){t.error(e+":",n)}})}function V(e,n,r,i,o){let a=b.get(e);if(!a||!a.webrtcStuff)return void t.warn("Invalid handle");let l=a.webrtcStuff;if(!l.pc)return void t.warn("Invalid PeerConnection");let s=function(e){t.log("Received state change on data channel:",e);let n=e.target.label,r=e.target.protocol,i=l.dataChannel[n]?l.dataChannel[n].readyState:"null";if(t.log("State change on <"+n+"> data channel: "+i),"open"===i){if(l.dataChannel[n].pending&&l.dataChannel[n].pending.length>0){t.log("Sending pending messages on <"+n+">:",l.dataChannel[n].pending.length);for(let e of l.dataChannel[n].pending)t.log("Sending data on data channel <"+n+">"),t.debug(e),l.dataChannel[n].send(e);l.dataChannel[n].pending=[]}a.ondataopen(n,r)}};if(i)l.dataChannel[n]=i;else{let e=l.dataChannelOptions;r&&(e.protocol=r),l.dataChannel[n]=l.pc.createDataChannel(n,e)}l.dataChannel[n].onmessage=function(e){t.log("Received message on data channel:",e);let n=e.target.label;a.ondata(e.data,n)},l.dataChannel[n].onopen=s,l.dataChannel[n].onclose=s,l.dataChannel[n].onerror=function(e){t.error("Got error on data channel:",e)},l.dataChannel[n].pending=[],o&&l.dataChannel[n].pending.push(o)}function O(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff,o=n.text||n.data;if(!o)return t.warn("Invalid data"),void n.error("Invalid data");let a=n.label?n.label:t.dataChanDefaultLabel;return i.dataChannel[a]?"open"!==i.dataChannel[a].readyState?(i.dataChannel[a].pending.push(o),void n.success()):(t.log("Sending data on data channel <"+a+">"),t.debug(o),i.dataChannel[a].send(o),void n.success()):(V(e,a,n.protocol,!1,o,n.protocol),void n.success())}function z(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff;if(!i.dtmfSender){if(i.pc){let e=i.pc.getSenders().find(function(e){return e.track&&"audio"===e.track.kind});if(!e)return t.warn("Invalid DTMF configuration (no audio track)"),void n.error("Invalid DTMF configuration (no audio track)");i.dtmfSender=e.dtmf,i.dtmfSender&&(t.log("Created DTMF Sender"),i.dtmfSender.ontonechange=function(e){t.debug("Sent DTMF tone: "+e.tone)})}if(!i.dtmfSender)return t.warn("Invalid DTMF configuration"),void n.error("Invalid DTMF configuration")}let o=n.dtmf;if(!o)return t.warn("Invalid DTMF parameters"),void n.error("Invalid DTMF parameters");let a=o.tones;if(!a)return t.warn("Invalid DTMF string"),void n.error("Invalid DTMF string");let l="number"==typeof o.duration?o.duration:500,s="number"==typeof o.gap?o.gap:50;t.debug("Sending DTMF string "+a+" (duration "+l+"ms, gap "+s+"ms)"),i.dtmfSender.insertDTMF(a,l,s),n.success()}function N(e,i){(i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop;let o=!0===i.noRequest;t.log("Destroying handle "+e+" (only-locally="+o+")"),G(e);let a=b.get(e);if(!a||a.detached)return b.delete(e),void i.success();if(a.detached=!0,o)return b.delete(e),void i.success();if(!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let l={janus:"detach",transaction:t.randomString(12)};if(a.token&&(l.token=a.token),C&&(l.apisecret=C),n)return l.session_id=w,l.handle_id=e,r.send(JSON.stringify(l)),b.delete(e),void i.success();t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:l,success:function(n){t.log("Destroyed handle:"),t.debug(n),"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),b.delete(e),i.success()},error:function(n,r){t.error(n+":",r),b.delete(e),i.success()}})}function T(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(i.pc)return;let o={iceServers:c,iceTransportPolicy:d,bundlePolicy:u,sdpSemantics:"unified-plan"},a=!1;if(n.tracks)for(let e of n.tracks)if(e.transforms&&(e.transforms.sender||e.transforms.receiver)){a=!0;break}n.externalEncryption&&(a=!0,i.externalEncryption=!0),RTCRtpSender&&(RTCRtpSender.prototype.createEncodedStreams||RTCRtpSender.prototype.createEncodedAudioStreams&&RTCRtpSender.prototype.createEncodedVideoStreams)&&a&&(i.insertableStreams=!0,o.forceEncodedAudioInsertableStreams=!0,o.forceEncodedVideoInsertableStreams=!0,o.encodedInsertableStreams=!0),t.log("Creating PeerConnection"),i.pc=new RTCPeerConnection(o),t.debug(i.pc),i.pc.getStats&&(i.volume={},i.bitrate.value="0 kbits/sec"),t.log("Preparing local SDP and gathering candidates (trickle="+i.trickle+")"),i.pc.onconnectionstatechange=function(){i.pc&&r.connectionState(i.pc.connectionState)},i.pc.oniceconnectionstatechange=function(){i.pc&&r.iceState(i.pc.iceConnectionState)},i.pc.onicecandidate=function(r){if(!r.candidate||r.candidate.candidate&&r.candidate.candidate.indexOf("endOfCandidates")>0)t.log("End of candidates."),i.iceDone=!0,!0===i.trickle?_(e,{completed:!0}):function(e,n){n=n||{},n.success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return void t.warn("Invalid handle, not sending anything");let i=r.webrtcStuff;if(t.log("Sending offer/answer SDP..."),!i.mySdp)return void t.warn("Local SDP instance is invalid, not sending anything...");i.mySdp={type:i.pc.localDescription.type,sdp:i.pc.localDescription.sdp},!1===i.trickle&&(i.mySdp.trickle=!1);t.debug(n),i.sdpSent=!0,n.success(i.mySdp)}(e,n);else{let t={candidate:r.candidate.candidate,sdpMid:r.candidate.sdpMid,sdpMLineIndex:r.candidate.sdpMLineIndex};!0===i.trickle&&_(e,t)}},i.pc.ontrack=function(e){if(t.log("Handling Remote Track",e),!e.streams)return;if(!e.track)return;let n=e.transceiver?e.transceiver.mid:e.track.id;try{e.transceiver&&e.transceiver.mid&&e.track.id&&(r.mids||(r.mids={}),r.mids[e.track.id]=e.transceiver.mid),r.onremotetrack(e.track,n,!0,{reason:"created"})}catch(e){t.error("Error calling onremotetrack",e)}if(e.track.onended)return;let o=null;t.log("Adding onended callback to track:",e.track),e.track.onended=function(n){t.log("Remote track removed:",n),clearTimeout(o);let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"ended"})}catch(e){t.error("Error calling onremotetrack on removal",e)}delete r.mids[e.track.id]},e.track.onmute=function(n){t.log("Remote track muted:",n),o||(o=setTimeout(function(){t.log("Removing remote track");let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"mute"})}catch(e){t.error("Error calling onremotetrack on mute",e)}o=null},2520))},e.track.onunmute=function(e){if(t.log("Remote track flowing again:",e),null!=o)clearTimeout(o),o=null;else try{let t=i.pc?i.pc.getTransceivers():null,n=t?t.find(t=>t.receiver.track===e.target):null,o=n?n.mid:e.target.id;r.onremotetrack(e.target,o,!0,{reason:"unmute"})}catch(e){t.error("Error calling onremotetrack on unmute",e)}}}}async function I(e,n,r){(r=r||{}).success="function"==typeof r.success?r.success:t.noop,r.error="function"==typeof r.error?r.error:Q;let i=r.jsep;if(n&&i)return t.error("Provided a JSEP to a createOffer"),void r.error("Provided a JSEP to a createOffer");if(!(n||i&&i.type&&i.sdp))return t.error("A valid JSEP is required for createAnswer"),void r.error("A valid JSEP is required for createAnswer");if(r.media&&!r.tracks){if(r.tracks=t.mediaToTracks(r.media),!0===r.simulcast||!0===r.simulcast2||r.svc)for(let e of r.tracks)if("video"===e.type){!0===r.simulcast||!0===r.simulcast2?e.simulcast=!0:r.svc&&(e.svc=r.svc);break}t.warn("Deprecated media object passed, use tracks instead. Automatically translated to:",r.tracks)}if(r.tracks&&!Array.isArray(r.tracks))return t.error("Tracks must be an array"),void r.error("Tracks must be an array");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void r.error("Invalid handle");let a=o.webrtcStuff;var l;a.trickle=(l=r.trickle,t.debug("isTrickleEnabled:",l),!1!==l);try{if(T(e,r),n&&await j(e,r),i){if(await a.pc.setRemoteDescription(i),t.log("Remote description accepted!"),a.remoteSdp=i.sdp,a.candidates&&a.candidates.length>0){for(let e=0;e<a.candidates.length;e++){let n=a.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?a.pc.addIceCandidate(n):a.pc.addIceCandidate(t.endOfCandidates)}a.candidates=[]}await j(e,r);let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating answer (iceDone="+i.iceDone+")");let o=await i.pc.createAnswer();t.debug(o);let a={type:"answer",sdp:o.sdp};if(n.customizeSdp(a),o.sdp=a.sdp,t.log("Setting local description"),i.mySdp={type:"answer",sdp:o.sdp},await i.pc.setLocalDescription(o),!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(o.e2ee=!0);return o}(e,r);r.success(n)}else{let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating offer (iceDone="+i.iceDone+")");let o={},a=!0===n.iceRestart;a&&(o.iceRestart=!0);t.debug(o);let l=await i.pc.createOffer(o);t.debug(l);let s={type:"offer",sdp:l.sdp};if(n.customizeSdp(s),l.sdp=s.sdp,t.log("Setting local description"),i.mySdp={type:"offer",sdp:l.sdp},await i.pc.setLocalDescription(l),i.mediaConstraints=o,!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(l.e2ee=!0);return l}(e,r);r.success(n)}}catch(e){t.error(e),r.error(e)}}function D(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:Q,n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=n.jsep,i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let o=i.webrtcStuff;if(r){if(!o.pc)return t.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),void n.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");n.customizeSdp(r),o.pc.setRemoteDescription(r).then(function(){if(t.log("Remote description accepted!"),o.remoteSdp=r.sdp,o.candidates&&o.candidates.length>0){for(let e=0;e<o.candidates.length;e++){let n=o.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?o.pc.addIceCandidate(n):o.pc.addIceCandidate(t.endOfCandidates)}o.candidates=[]}n.success()},n.error)}else n.error("Invalid JSEP")}async function Z(e,n){if((n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop,n.tracks&&!Array.isArray(n.tracks))return t.error("Tracks must be an array"),void n.error("Tracks must be an array");for(let e of n.tracks)(e.add||!e.replace&&!e.remove)&&(e.replace=!0);try{await j(e,n),n.success()}catch(e){t.error(e),n.error(e)}}async function j(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle, not sending anything"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)throw t.warn("Invalid PeerConnection"),"Invalid PeerConnection";let o=n.tracks;if(!o||!Array.isArray(o)||0===o.length)return;let a=!1,l={};for(let e of o){if(delete e.gumGroup,!e.type||!["audio","video"].includes(e.type))continue;if(!e.capture||e.capture instanceof MediaStreamTrack)continue;let t=e.group?e.group:"default";l[t]||(l[t]={}),l[t][e.type]||(e.gumGroup=t,l[t][e.type]=e)}let s=Object.keys(l);for(let e of s){let t=l[e];t.audio&&t.video||(t.audio&&delete t.audio.gumGroup,t.video&&delete t.video.gumGroup,delete l[e])}let c=!!n.jsep;for(let n of o){if(!n.type){t.warn("Missing track type:",n);continue}if("data"===n.type){if(i.pc.ondatachannel){t.warn("Data channel exists already, not creating another one");continue}t.log("Creating default data channel"),V(e,t.dataChanDefaultLabel,null,!1),i.pc.ondatachannel=function(n){t.log("Data channel created by Janus:",n),V(e,n.channel.label,n.channel.protocol,n.channel)};continue}if(void 0!==n.add&&null!==n.add||void 0!==n.remove&&null!==n.remove||void 0!==n.replace&&null!==n.replace||(n.add=!0),n.add&&n.remove||n.add&&n.remove&&n.replace){t.warn("Conflicting actions for track, ignoring:",n);continue}n.add&&n.replace?(t.warn("Both add and replace provided, falling back to replace:",n),delete n.add):n.remove&&n.replace&&(t.warn("Both remove and replace provided, falling back to remove:",n),delete n.replace);let o=n.type;"screen"===n.type&&(o="video");let s=null,d=null;if(n.mid?s=i.pc.getTransceivers().find(e=>e.mid===n.mid&&e.receiver.track.kind===o):n.add||(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o)),n.replace||n.remove){if(!s){t.warn("Couldn't find a transceiver for track:",n);continue}if(!s.sender){t.warn("No sender in the transceiver for track:",n);continue}d=s.sender}if(c&&!s&&(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o),!s)){t.warn("Couldn't find a transceiver for track:",n);continue}let u=null,f=null;if((n.remove||n.replace)&&(t.log("Removing track from PeerConnection",n),f=d.track?d.track.id:null,await d.replaceTrack(null),f&&i.myStream)){let e=null;if("audio"===o&&i.myStream.getAudioTracks()&&i.myStream.getAudioTracks().length)for(let n of i.myStream.getAudioTracks())n.id===f&&(e=n,t.log("Removing audio track:",e));else if("video"===o&&i.myStream.getVideoTracks()&&i.myStream.getVideoTracks().length)for(let n of i.myStream.getVideoTracks())n.id===f&&(e=n,t.log("Removing video track:",e));if(e){try{i.myStream.removeTrack(e),r.onlocaltrack(e,!1)}catch(e){t.error("Error calling onlocaltrack on removal for renegotiation",e)}if(!0!==e.dontStop)try{e.stop()}catch(e){}}}if(n.capture){if(n.gumGroup&&l[n.gumGroup]&&l[n.gumGroup].stream){let e=l[n.gumGroup].stream;u="audio"===n.type?e.getAudioTracks()[0]:e.getVideoTracks()[0],delete l[n.gumGroup].stream,delete l[n.gumGroup],delete n.gumGroup}else if(n.capture instanceof MediaStreamTrack)u=n.capture;else{a||(a=!0,r.consentDialog(!0));let e=t.trackConstraints(n),i=null;if("audio"===n.type||"video"===n.type){if(n.gumGroup){let r="audio"===n.type?"video":"audio";if(l[n.gumGroup]&&l[n.gumGroup][r]){let i=l[n.gumGroup][r],o=t.trackConstraints(i);e[r]=o[r]}}i=await navigator.mediaDevices.getUserMedia(e),n.gumGroup&&e.audio&&e.video&&(l[n.gumGroup].stream=i,delete n.gumGroup)}else i=await navigator.mediaDevices.getDisplayMedia(e);u="audio"===n.type?i.getAudioTracks()[0]:i.getVideoTracks()[0]}if(n.replace){await d.replaceTrack(u);let e="sendrecv";!1!==n.recv&&"inactive"!==s.direction&&"sendonly"!==s.direction||(e="sendonly"),s.setDirection?s.setDirection(e):s.direction=e}else{if(i.myStream||(i.myStream=new MediaStream),"audio"===o||!n.simulcast&&!n.svc)d=i.pc.addTrack(u,i.myStream),s=i.pc.getTransceivers().find(e=>e.sender===d);else if(n.simulcast){t.log("Enabling rid-based simulcasting:",u);let e=v(n.simulcastMaxBitrates);s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:n.sendEncodings||[{rid:"h",active:!0,scalabilityMode:"L1T2",maxBitrate:e.high},{rid:"m",active:!0,scalabilityMode:"L1T2",maxBitrate:e.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,scalabilityMode:"L1T2",maxBitrate:e.low,scaleResolutionDownBy:4}]})}else t.log("Enabling SVC ("+n.svc+"):",u),s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:[{scalabilityMode:n.svc}]});if(d||(d=s?s.sender:null),n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length){if(s)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(n.bitrate)if(n.simulcast||n.svc)t.warn("Ignoring bitrate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.bitrate)||n.bitrate<0)t.warn("Ignoring invalid bitrate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxBitrate=n.bitrate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring bitrate for track:",n)}if("video"===o&&n.framerate)if(n.simulcast||n.svc)t.warn("Ignoring framerate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.framerate)||n.framerate<0)t.warn("Ignoring invalid framerate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxFramerate=n.framerate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring framerate for track:",n)}if(n.transforms){if(d&&n.transforms.sender){let e=null;RTCRtpSender.prototype.createEncodedStreams?e=d.createEncodedStreams():(RTCRtpSender.prototype.createAudioEncodedStreams||RTCRtpSender.prototype.createEncodedVideoStreams)&&("audio"===o?e=d.createEncodedAudioStreams():"video"===o&&(e=d.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.sender).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.sender).pipeTo(e.writable))}if(s&&s.receiver&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}}u&&!0===n.dontStop&&(u.dontStop=!0)}else if(n.recv&&(s||(s=i.pc.addTransceiver(o)),s)){if(n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(s.receiver&&n.transforms&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}if(u){i.myStream.addTrack(u),u.onended=function(e){t.log("Local track removed:",e);try{r.onlocaltrack(e.target,!1)}catch(e){t.error("Error calling onlocaltrack following end",e)}};try{r.onlocaltrack(u,!0)}catch(e){t.error("Error calling onlocaltrack for track add",e)}}if(s){let e=s.direction,r=null,i=u&&s.sender.track,o=!1!==n.recv&&s.receiver.track;i&&o?r="sendrecv":i&&!o?r="sendonly":!i&&o?r="recvonly":i||o||(r="inactive"),r&&r!==e&&(t.warn("Changing direction of transceiver to "+r+" (was "+e+")",n),s.setDirection?s.setDirection(r):s.direction=r)}}a&&r.consentDialog(!1)}function R(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.sender&&e.sender.track&&(t={mid:e.mid},t.type=e.sender.track.kind,t.id=e.sender.track.id,t.label=e.sender.track.label),t&&i.push(t)}return i}function B(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.receiver&&e.receiver.track&&(t={mid:e.mid},t.type=e.receiver.track.kind,t.id=e.receiver.track.id,t.label=e.receiver.track.label),t&&i.push(t)}return i}function P(e,n,r,i){i="function"==typeof i?i:t.noop;let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i(0);let a=r?"remote":"local",l=o.webrtcStuff;if(l.volume[a]||(l.volume[a]={value:0}),l.pc&&l.pc.getStats&&("chrome"===t.webRTCAdapter.browserDetails.browser||"safari"===t.webRTCAdapter.browserDetails.browser)){let e=l.pc;if(n){let o=l.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!o)return t.warn("No audio transceiver with mid "+n),void i(0);if(r&&!o.receiver)return t.warn("Remote transceiver track unavailable"),void i(0);if(!r&&!o.sender)return t.warn("Local transceiver track unavailable"),void i(0);e=r?o.receiver:o.sender}return e.getStats().then(function(e){e.forEach(function(e){e&&"audio"===e.kind&&(r&&!e.remoteSource||!r&&"media-source"!==e.type||i(e.audioLevel?e.audioLevel:0))})}),l.volume[a].value}return t.warn("Getting the "+a+" volume unsupported by browser"),void i(0)}function F(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),!0;let o=i.webrtcStuff;if(!o.pc)return t.warn("Invalid PeerConnection"),!0;if(!o.myStream)return t.warn("Invalid local MediaStream"),!0;if(r){if(!o.myStream.getVideoTracks()||0===o.myStream.getVideoTracks().length)return t.warn("No video track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No video sender with mid "+n),!0):(t.warn("No video transceiver with mid "+n),!0)}return!o.myStream.getVideoTracks()[0].enabled}if(!o.myStream.getAudioTracks()||0===o.myStream.getAudioTracks().length)return t.warn("No audio track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No audio sender with mid "+n),!0):(t.warn("No audio transceiver with mid "+n),!0)}return!o.myStream.getAudioTracks()[0].enabled}function U(e,n,r,i){let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),!1;let a=o.webrtcStuff;if(!a.pc)return t.warn("Invalid PeerConnection"),!1;if(!a.myStream)return t.warn("Invalid local MediaStream"),!1;if(r){if(!a.myStream.getVideoTracks()||0===a.myStream.getVideoTracks().length)return t.warn("No video track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!e)return t.warn("No video transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No video sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getVideoTracks())e.enabled=!i}else{if(!a.myStream.getAudioTracks()||0===a.myStream.getAudioTracks().length)return t.warn("No audio track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!e)return t.warn("No audio transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No audio sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getAudioTracks())e.enabled=!i}return!0}function q(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)return"Invalid PeerConnection";if(i.pc.getStats){let e=i.pc,r=n||"default";if(n){let r=i.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!r)return t.warn("No video transceiver with mid "+n),"No video transceiver with mid "+n;if(!r.receiver)return t.warn("No video receiver with mid "+n),"No video receiver with mid "+n;e=r.receiver}return i.bitrate[r]||(i.bitrate[r]={timer:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,value:"0 kbits/sec"}),i.bitrate[r].timer?i.bitrate[r].value:(t.log("Starting bitrate timer"+(n?" for mid "+n:"")+" (via getStats)"),i.bitrate[r].timer=setInterval(function(){e.getStats().then(function(e){e.forEach(function(e){if(!e)return;let n=!1;if(("video"===e.mediaType||"video"===e.kind||e.id.toLowerCase().indexOf("video")>-1)&&"inbound-rtp"===e.type&&e.id.indexOf("rtcp")<0?n=!0:"ssrc"!=e.type||!e.bytesReceived||"VP8"!==e.googCodecName&&""!==e.googCodecName||(n=!0),n)if(i.bitrate[r].bsnow=e.bytesReceived,i.bitrate[r].tsnow=e.timestamp,null===i.bitrate[r].bsbefore||null===i.bitrate[r].tsbefore)i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow;else{let e=i.bitrate[r].tsnow-i.bitrate[r].tsbefore;"safari"===t.webRTCAdapter.browserDetails.browser&&(e/=1e3);let n=Math.round(8*(i.bitrate[r].bsnow-i.bitrate[r].bsbefore)/e);"safari"===t.webRTCAdapter.browserDetails.browser&&(n=parseInt(n/1e3)),i.bitrate[r].value=n+" kbits/sec",i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow}})})},1e3),"0 kbits/sec")}return t.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser"}function W(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return void t.warn("Invalid handle");let o=i.webrtcStuff;if(!o.pc)return void t.warn("Invalid PeerConnection");let a=o.pc.getTransceivers().find(e=>e.mid===n);if(!a)return void t.warn("No transceiver with mid",n);if(!a.sender)return void t.warn("No sender for transceiver with mid",n);let l=a.sender.getParameters();l&&l.encodings&&0!==l.encodings.length?l.encodings.length>1?t.warn("Ignoring bitrate for simulcast track, use sendEncodings for that"):isNaN(r)||r<0?t.warn("Invalid bitrate (must be a positive integer)"):(l.encodings[0].maxBitrate=r,a.sender.setParameters(l)):t.warn("No parameters encodings")}function Q(e){t.error("WebRTC error:",e)}function G(e,i){t.log("Cleaning WebRTC stuff");let o=b.get(e);if(!o)return;let a=o.webrtcStuff;if(a){if(!0===i){let i={janus:"hangup",transaction:t.randomString(12)};o.token&&(i.token=o.token),C&&(i.apisecret=C),t.debug("Sending hangup request (handle="+e+"):"),t.debug(i),n?(i.session_id=w,i.handle_id=e,r.send(JSON.stringify(i))):t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:i})}a.volume&&(a.volume.local&&a.volume.local.timer&&clearInterval(a.volume.local.timer),a.volume.remote&&a.volume.remote.timer&&clearInterval(a.volume.remote.timer));for(let e in a.bitrate)a.bitrate[e].timer&&clearInterval(a.bitrate[e].timer);a.bitrate={},!a.streamExternal&&a.myStream&&(t.log("Stopping local stream tracks"),t.stopAllTracks(a.myStream)),a.streamExternal=!1,a.myStream=null;try{a.pc.close()}catch(e){}a.pc=null,a.candidates=null,a.mySdp=null,a.remoteSdp=null,a.iceDone=!1,a.dataChannel={},a.dtmfSender=null,a.insertableStreams=!1,a.externalEncryption=!1}o.oncleanup()}H(e),this.getServer=function(){return s},this.isConnected=function(){return y},this.reconnect=function(e){(e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.reconnect=!0,H(e)},this.getSessionId=function(){return w},this.getInfo=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,t.log("Getting info on Janus instance"),!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=t.randomString(12),o={janus:"info",transaction:i};p&&(o.token=p);C&&(o.apisecret=C);if(n)return A.set(i,function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)}),void r.send(JSON.stringify(o));t.httpAPICall(s,{verb:"POST",withCredentials:f,body:o,success:function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)},this.destroy=function(a){!function(a){a=a||{},a.success="function"==typeof a.success?a.success:t.noop,a.error="function"==typeof a.error?a.error:t.noop;let l=!0===a.unload,c=!0;void 0!==a.notifyDestroyed&&null!==a.notifyDestroyed&&(c=!0===a.notifyDestroyed);let d=!0===a.cleanupHandles;if(t.log("Destroying session "+w+" (unload="+l+")"),!w)return t.warn("No session to destroy"),a.success(),void(c&&e.destroyed());if(d)for(const e of b.keys())N(e,{noRequest:!0});if(!y)return t.warn("Is the server down? (connected=false)"),w=null,void a.success();let u={janus:"destroy",transaction:t.randomString(12)};p&&(u.token=p);C&&(u.apisecret=C);if(l)return n?(r.onclose=null,r.close(),r=null):navigator.sendBeacon(s+"/"+w,JSON.stringify(u)),t.log("Destroyed session:"),w=null,y=!1,a.success(),void(c&&e.destroyed());if(n){u.session_id=w;let t=function(){for(let e in i)r.removeEventListener(e,i[e]);r.removeEventListener("message",n),r.removeEventListener("error",l),o&&clearTimeout(o),r.close()},n=function(n){let r=JSON.parse(n.data);r.session_id==u.session_id&&r.transaction==u.transaction&&(t(),a.success(),c&&e.destroyed())},l=function(){t(),a.error("Failed to destroy the server: Is the server down?"),c&&e.destroyed()};return r.addEventListener("message",n),r.addEventListener("error",l),void(1===r.readyState?r.send(JSON.stringify(u)):l())}t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:u,success:function(n){t.log("Destroyed session:"),t.debug(n),w=null,y=!1,"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),a.success(),c&&e.destroyed()},error:function(n,r){t.error(n+":",r),w=null,y=!1,a.success(),c&&e.destroyed()}})}(a)},this.attach=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.dataChannelOptions=e.dataChannelOptions||{ordered:!0},e.consentDialog="function"==typeof e.consentDialog?e.consentDialog:t.noop,e.connectionState="function"==typeof e.connectionState?e.connectionState:t.noop,e.iceState="function"==typeof e.iceState?e.iceState:t.noop,e.mediaState="function"==typeof e.mediaState?e.mediaState:t.noop,e.webrtcState="function"==typeof e.webrtcState?e.webrtcState:t.noop,e.slowLink="function"==typeof e.slowLink?e.slowLink:t.noop,e.onmessage="function"==typeof e.onmessage?e.onmessage:t.noop,e.onlocaltrack="function"==typeof e.onlocaltrack?e.onlocaltrack:t.noop,e.onremotetrack="function"==typeof e.onremotetrack?e.onremotetrack:t.noop,e.ondata="function"==typeof e.ondata?e.ondata:t.noop,e.ondataopen="function"==typeof e.ondataopen?e.ondataopen:t.noop,e.oncleanup="function"==typeof e.oncleanup?e.oncleanup:t.noop,e.ondetached="function"==typeof e.ondetached?e.ondetached:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=e.plugin;if(!i)return t.error("Invalid plugin"),void e.error("Invalid plugin");let o=e.opaqueId,a=e.loopIndex,l=e.token?e.token:p,c=t.randomString(12),d={janus:"attach",plugin:i,opaque_id:o,loop_index:a,transaction:c};l&&(d.token=l);C&&(d.apisecret=C);if(n)return A.set(c,function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){z(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){I(r,!0,e)},createAnswer:function(e){I(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){N(r,e)}};b.set(r,o),e.success(o)}),d.session_id=w,void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:d,success:function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){z(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){I(r,!0,e)},createAnswer:function(e){I(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){N(r,e)}};b.set(r,o),e.success(o)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)}}return t.useDefaultDependencies=function(n){let r=n&&n.fetch||fetch,i=n&&n.Promise||Promise,o=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new o(e,t)},extension:n&&n.extension||e,isArray:function(e){return Array.isArray(e)},webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let o={method:n.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};"POST"===n.verb&&(o.headers["Content-Type"]="application/json"),void 0!==n.withCredentials&&(o.credentials=!0===n.withCredentials?"include":n.withCredentials?n.withCredentials:"omit"),n.body&&(o.body=JSON.stringify(n.body));let a=r(e,o).catch(function(e){return i.reject({message:"Probably a network error, is the server down?",error:e})});if(n.timeout){let e=new i(function(e,t){let r=setTimeout(function(){return clearTimeout(r),t({message:"Request timed out",timeout:n.timeout})},n.timeout)});a=i.race([a,e])}return a.then(function(e){return e.ok?typeof n.success==typeof t.noop?e.json().then(function(e){try{n.success(e)}catch(e){t.error("Unhandled httpAPICall success callback error",e)}},function(t){return i.reject({message:"Failed to parse response body",error:t,response:e})}):void 0:i.reject({message:"API call failed",response:e})}).catch(function(e){typeof n.error==typeof t.noop&&n.error(e.message||"<< internal error >>",e)}),a}}},t.useOldDependencies=function(n){let r=n&&n.jQuery||jQuery,i=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new i(e,t)},isArray:function(e){return r.isArray(e)},extension:n&&n.extension||e,webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let i=void 0!==n.body?{contentType:"application/json",data:JSON.stringify(n.body)}:{},o=void 0!==n.withCredentials?{xhrFields:{withCredentials:n.withCredentials}}:{};return r.ajax(r.extend(i,o,{url:e,type:n.verb,cache:!1,dataType:"json",async:n.async,timeout:n.timeout,success:function(e){typeof n.success==typeof t.noop&&n.success(e)},error:function(e,r,i){typeof n.error==typeof t.noop&&n.error(r,i)}}))}}},t.mediaToTracks=function(e){let t=[];if(e){if(!e.keepAudio&&!1!==e.audio&&(void 0===e.audio||e.audio||e.audioSend||e.audioRecv||e.addAudio||e.replaceAudio||e.removeAudio)){let n={type:"audio"};e.removeAudio?n.remove=!0:(e.addAudio?n.add=!0:e.replaceAudio&&(n.replace=!0),!1!==e.audioSend&&(n.capture=e.audio||!0),!1!==e.audioRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}if(!e.keepVideo&&!1!==e.video&&(void 0===e.video||e.video||e.videoSend||e.videoRecv||e.addVideo||e.replaceVideo||e.removeVideo)){let n={type:"video"};e.removeVideo?n.remove=!0:(e.addVideo?n.add=!0:e.replaceVideo&&(n.replace=!0),!1!==e.videoSend&&(n.capture=e.video||!0,["screen","window","desktop"].includes(n.capture)&&(n.type="screen",n.capture={video:{}},e.screenshareFrameRate&&(n.capture.frameRate=e.screenshareFrameRate),e.screenshareHeight&&(n.capture.height=e.screenshareHeight),e.screenshareWidth&&(n.capture.width=e.screenshareWidth))),!1!==e.videoRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}e.data&&t.push({type:"data"})}else t.push({type:"audio",capture:!0,recv:!0}),t.push({type:"video",capture:!0,recv:!0});return t},t.trackConstraints=function(e){let n={};if(!e||!e.capture)return n;if("audio"===e.type)n.audio=e.capture;else if("video"===e.type)if((e.simulcast||e.svc)&&!0===e.capture&&(e.capture="hires"),!0===e.capture||"object"==typeof e.capture)n.video=e.capture;else{let r=0,i=0;"lowres"===e.capture?(r=320,i=240):"lowres-16:9"===e.capture?(r=320,i=180):"hires"===e.capture||"hires-16:9"===e.capture||"hdres"===e.capture?(r=1280,i=720):"fhdres"===e.capture?(r=1920,i=1080):"4kres"===e.capture?(r=3840,i=2160):"stdres"===e.capture?(r=640,i=480):"stdres-16:9"===e.capture?(r=640,i=360):(t.log("Default video setting is stdres 4:3"),r=640,i=480),n.video={width:{ideal:r},height:{ideal:i}}}else"screen"===e.type&&(n.video=e.capture);return n},t.noop=function(){},t.dataChanDefaultLabel="JanusDataChannel",t.endOfCandidates=null,t.stopAllTracks=function(e){try{let n=e.getTracks();for(let e of n)t.log(e),e&&!0!==e.dontStop&&e.stop()}catch(e){}},t.init=function(e){if((e=e||{}).callback="function"==typeof e.callback?e.callback:t.noop,t.initDone)e.callback();else{if(void 0===console.log&&(console.log=function(){}),t.trace=t.noop,t.debug=t.noop,t.vdebug=t.noop,t.log=t.noop,t.warn=t.noop,t.error=t.noop,!0===e.debug||"all"===e.debug)t.trace=console.trace.bind(console),t.debug=console.debug.bind(console),t.vdebug=console.debug.bind(console),t.log=console.log.bind(console),t.warn=console.warn.bind(console),t.error=console.error.bind(console);else if(Array.isArray(e.debug))for(let n of e.debug)switch(n){case"trace":t.trace=console.trace.bind(console);break;case"debug":t.debug=console.debug.bind(console);break;case"vdebug":t.vdebug=console.debug.bind(console);break;case"log":t.log=console.log.bind(console);break;case"warn":t.warn=console.warn.bind(console);break;case"error":t.error=console.error.bind(console)}t.log("Initializing library");let n=e.dependencies||t.useDefaultDependencies();t.isArray=n.isArray,t.webRTCAdapter=n.webRTCAdapter,t.httpAPICall=n.httpAPICall,t.newWebSocket=n.newWebSocket,t.extension=n.extension,t.extension.init(),t.listDevices=function(e,n){e="function"==typeof e?e:t.noop,n||(n={audio:!0,video:!0}),t.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(n).then(function(n){navigator.mediaDevices.enumerateDevices().then(function(r){t.debug(r),e(r),t.stopAllTracks(n)})}).catch(function(n){t.error(n),e([])}):(t.warn("navigator.mediaDevices unavailable"),e([]))},t.attachMediaStream=function(e,n){try{e.srcObject=n}catch(r){try{e.src=URL.createObjectURL(n)}catch(e){t.error("Error attaching stream to element",e)}}},t.reattachMediaStream=function(e,n){try{e.srcObject=n.srcObject}catch(r){try{e.src=n.src}catch(e){t.error("Error reattaching stream to element",e)}}};let r=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0?"pagehide":"beforeunload",i=window["on"+r];if(window.addEventListener(r,function(){t.log("Closing window");for(const[e,n]of t.sessions)n&&n.destroyOnUnload&&(t.log("Destroying session "+e),n.destroy({unload:!0,notifyDestroyed:!1}));i&&"function"==typeof i&&i()}),t.safariVp8=!1,t.safariVp9=!1,"safari"===t.webRTCAdapter.browserDetails.browser&&t.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(let e of RTCRtpSender.getCapabilities("video").codecs)e&&e.mimeType&&"video/vp8"===e.mimeType.toLowerCase()?t.safariVp8=!0:e&&e.mimeType&&"video/vp9"===e.mimeType.toLowerCase()&&(t.safariVp9=!0);t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}else{let e=new RTCPeerConnection({});e.createOffer({offerToReceiveVideo:!0}).then(function(n){t.safariVp8=-1!==n.sdp.indexOf("VP8"),t.safariVp9=-1!==n.sdp.indexOf("VP9"),t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu"),e.close(),e=null})}t.initDone=!0,e.callback()}},t.isWebrtcSupported=function(){return!!window.RTCPeerConnection},t.isGetUserMediaAvailable=function(){return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia},t.randomString=function(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="";for(let r=0;r<e;r++){let e=Math.floor(62*Math.random());n+=t.charAt(e)}return n},t});let pW=!0,CW=!0;function mW(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function gW(e,t,n){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);const o=e=>{const t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,o),i.apply(this,[e,o])};const o=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);if(!this._eventMap[t].has(n))return o.apply(this,arguments);const r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function vW(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(pW=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function yW(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(CW=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function wW(){if("object"==typeof window){if(pW)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function bW(e,t){CW&&console.warn(e+" is deprecated, please use "+t+" instead.")}function EW(e){return"[object Object]"===Object.prototype.toString.call(e)}function MW(e){return EW(e)?Object.keys(e).reduce(function(t,n){const r=EW(e[n]),i=r?MW(e[n]):e[n],o=r&&!Object.keys(i).length;return void 0===i||o?t:Object.assign(t,{[n]:i})},{}):e}function AW(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith("Id")?AW(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(t=>{AW(e,e.get(t),n)})}))}function xW(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;const o=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)}),o.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&AW(e,n,i)})}),i}const LW=wW;function kW(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach(n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);const i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"==typeof r.ideal?(e[i("min",n)]=r.ideal,t.optional.push(e),e={},e[i("max",n)]=r.ideal,t.optional.push(e)):(e[i("",n)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",n)]=r.exact):["min","max"].forEach(e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"==typeof e.video){let o=e.video.facingMode;o=o&&("object"==typeof o?o:{ideal:o});const a=t.version<66;if(o&&("user"===o.exact||"environment"===o.exact||"user"===o.ideal||"environment"===o.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||a)){let t;if(delete e.video.facingMode,"environment"===o.exact||"environment"===o.ideal?t=["back","rear"]:"user"!==o.exact&&"user"!==o.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then(n=>{let a=(n=n.filter(e=>"videoinput"===e.kind)).find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!a&&n.length&&t.includes("back")&&(a=n[n.length-1]),a&&(e.video.deviceId=o.exact?{exact:a.deviceId}:{ideal:a.deviceId}),e.video=r(e.video),LW("chrome: "+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return LW("chrome: "+JSON.stringify(e)),i(e)},o=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){i(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(o(e))})})}.bind(n),n.mediaDevices.getUserMedia){const e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return i(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(o(e))))}}}function HW(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function SW(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};const i=new Event("track");i.track=n.track,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};const i=new Event("track");i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else gW(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function _W(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{const t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function VW(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>xW(t,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),gW(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>xW(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function OW(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")});const t=this.getSenders();n.apply(this,arguments);const r=this.getSenders().filter(e=>-1===t.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]}),i.apply(this,arguments)}}function zW(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return OW(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};const i=e.RTCPeerConnection.prototype.removeStream;function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,"g"),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find(e=>e===t))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(e=>e.track===t))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)},["createOffer","createAnswer"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[t=>{const n=o(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>o(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});const a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})}(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};const l=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=l.get.apply(this);return""===e.type?e:o(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function NW(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})}function TW(e,t){gW(e,"negotiationneeded",e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e})}var IW=Object.freeze({__proto__:null,fixNegotiationNeeded:TW,shimAddTrackRemoveTrack:zW,shimAddTrackRemoveTrackWithNative:OW,shimGetSendersWithDtmf:_W,shimGetUserMedia:kW,shimMediaStream:HW,shimOnTrack:SW,shimPeerConnection:NW,shimSenderReceiverGetStats:VW});function DW(e,t){const n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){bW("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"==typeof n&&"object"==typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},r&&r.prototype.getSettings){const t=r.prototype.getSettings;r.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(r&&r.prototype.applyConstraints){const t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"==typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function ZW(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function jW(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]});const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,i,o]=arguments;return r.apply(this,[e||null]).then(e=>{if(t.version<53&&!i)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(i,o)}}function RW(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function BW(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),gW(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function PW(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){bW("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function FW(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function UW(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const n=e.length>0;n&&e.forEach(e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const r=t.apply(this,arguments);if(n){const{sender:t}=r,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function qW(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function WW(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function QW(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}var GW=Object.freeze({__proto__:null,shimAddTransceiver:UW,shimCreateAnswer:QW,shimCreateOffer:WW,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})},shimGetParameters:qW,shimGetUserMedia:DW,shimOnTrack:ZW,shimPeerConnection:jW,shimRTCDataChannel:FW,shimReceiverGetStats:BW,shimRemoveStream:PW,shimSenderGetStats:RW});function KW(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function YW(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function XW(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,o=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};let l=function(e,t,n){const r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=l,l=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=l,l=function(e,t,n){const r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=l}function JW(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n($W(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function $W(e){return e&&void 0!==e.video?Object.assign({},e,{video:MW(e.video)}):e}function eQ(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];void 0===r.urls&&r.url?(bW("RTCIceServer.url","RTCIceServer.urls"),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function tQ(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function nQ(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function rQ(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var iQ,oQ=Object.freeze({__proto__:null,shimAudioContext:rQ,shimCallbacksAPI:XW,shimConstraints:$W,shimCreateOfferLegacy:nQ,shimGetUserMedia:JW,shimLocalStreamsAPI:KW,shimRTCIceServerUrls:eQ,shimRemoteStreamsAPI:YW,shimTrackEventTransceiver:tQ}),aQ={exports:{}};var lQ=(iQ||(iQ=1,function(e){const t={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map(e=>e.trim())},t.splitSections=function(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+"\r\n")},t.getDescription=function(e){const n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){const n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter(e=>0===e.indexOf(n))},t.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const n={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case"raddr":n.relatedAddress=t[e+1];break;case"rport":n.relatedPort=parseInt(t[e+1],10);break;case"tcptype":n.tcpType=t[e+1];break;case"ufrag":n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:void 0===n[t[e]]&&(n[t[e]]=t[e+1])}return n},t.writeCandidate=function(e){const t=[];t.push(e.foundation);const n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" ");const n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){const t={};let n;const r=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<r.length;e++)n=r[e].trim().split("="),t[n[0].trim()]=n[1];return t},t.writeFmtp=function(e){let t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const r=[];Object.keys(e.parameters).forEach(t=>{void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)}),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},t.parseSsrcMedia=function(e){const t=e.indexOf(" "),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},t.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},t.getMid=function(e){const n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substring(6)},t.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(e=>{n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},t.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){const r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],i=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&i?{usernameFragment:r.substring(12),password:i.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){const n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" ");n.profile=r[2];for(let i=3;i<r.length;i++){const o=r[i],a=t.matchPrefix(e,"a=rtpmap:"+o+" ")[0];if(a){const r=t.parseRtpMap(a),i=t.matchPrefix(e,"a=fmtp:"+o+" ");switch(r.parameters=i.length?t.parseFmtp(i[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+o+" ").map(t.parseRtcpFb),n.codecs.push(r),r.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(r.name.toUpperCase())}}}t.matchPrefix(e,"a=extmap:").forEach(e=>{n.headerExtensions.push(t.parseExtmap(e))});const i=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return n.codecs.forEach(e=>{i.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),n},t.writeRtpDescription=function(e,n){let r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" "+(n.profile||"UDP/TLS/RTP/SAVPF")+" ",r+=n.codecs.map(e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach(e=>{r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)});let i=0;return n.codecs.forEach(e=>{e.maxptime>i&&(i=e.maxptime)}),i>0&&(r+="a=maxptime:"+i+"\r\n"),n.headerExtensions&&n.headerExtensions.forEach(e=>{r+=t.writeExtmap(e)}),r},t.parseRtpEncodingParameters=function(e){const n=[],r=t.parseRtpParameters(e),i=-1!==r.fecMechanisms.indexOf("RED"),o=-1!==r.fecMechanisms.indexOf("ULPFEC"),a=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),l=a.length>0&&a[0].ssrc;let s;const c=t.matchPrefix(e,"a=ssrc-group:FID").map(e=>e.substring(17).split(" ").map(e=>parseInt(e,10)));c.length>0&&c[0].length>1&&c[0][0]===l&&(s=c[0][1]),r.codecs.forEach(e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:l,codecPayloadType:parseInt(e.parameters.apt,10)};l&&s&&(t.rtx={ssrc:s}),n.push(t),i&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:l,mechanism:o?"red+ulpfec":"red"},n.push(t))}}),0===n.length&&l&&n.push({ssrc:l});let d=t.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substring(7),10):0===d[0].indexOf("b=AS:")?1e3*parseInt(d[0].substring(5),10)*.95-16e3:void 0,n.forEach(e=>{e.maxBitrate=d})),n},t.parseRtcpParameters=function(e){const n={},r=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute)[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);const i=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=i.length>0,n.compound=0===i.length;const o=t.matchPrefix(e,"a=rtcp-mux");return n.mux=o.length>0,n},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let n;const r=t.matchPrefix(e,"a=msid:");if(1===r.length)return n=r[0].substring(7).split(" "),{stream:n[0],track:n[1]};const i=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"msid"===e.attribute);return i.length>0?(n=i[0].value.split(" "),{stream:n[0],track:n[1]}):void 0},t.parseSctpDescription=function(e){const n=t.parseMLine(e),r=t.matchPrefix(e,"a=max-message-size:");let i;r.length>0&&(i=parseInt(r[0].substring(19),10)),isNaN(i)&&(i=65536);const o=t.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substring(12),10),protocol:n.fmt,maxMessageSize:i};const a=t.matchPrefix(e,"a=sctpmap:");if(a.length>0){const e=a[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:i}}},t.writeSctpDescription=function(e,t){let n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,n,r){let i;const o=void 0!==n?n:2;return i=e||t.generateSessionId(),"v=0\r\no="+(r||"thisisadapterortc")+" "+i+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,n){const r=t.splitLines(e);for(let e=0;e<r.length;e++)switch(r[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[e].substring(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){const n=t.splitLines(e)[0].substring(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){const n=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;const n=t.splitLines(e);for(let e=0;e<n.length;e++)if(n[e].length<2||"="!==n[e].charAt(1))return!1;return!0},e.exports=t}(aQ)),aQ.exports),sQ=H(lQ),cQ=L({__proto__:null,default:sQ},[lQ]);function dQ(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){const n=new t(e),r=sQ.parseCandidate(e.candidate);for(const e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,gW(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function uQ(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||gW(e,"icecandidate",e=>{if(e.candidate){const t=sQ.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e})}function fQ(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(e){if(!e||!e.sdp)return!1;const t=sQ.splitSections(e.sdp);return t.shift(),t.some(e=>{const t=sQ.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")})}(arguments[0])){const e=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!=n?-1:n}(arguments[0]),n=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n}(e),r=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const i=sQ.matchPrefix(e.sdp,"a=max-message-size:");return i.length>0?r=parseInt(i[0].substring(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r}(arguments[0],e);let i;i=0===n&&0===r?Number.POSITIVE_INFINITY:0===n||0===r?Math.max(n,r):Math.min(n,r);const o={};Object.defineProperty(o,"maxMessageSize",{get:()=>i}),this._sctp=o}return n.apply(this,arguments)}}function hQ(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},gW(e,"datachannel",e=>(t(e.channel,e.target),e))}function pQ(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}})}function CQ(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t._safariVersion>=13.1)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const n=t.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function mQ(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function gQ(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return n.apply(this,[e]);return("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then(e=>n.apply(this,[e]))})}var vQ=Object.freeze({__proto__:null,removeExtmapAllowMixed:CQ,shimAddIceCandidateNullOrEmpty:mQ,shimConnectionState:pQ,shimMaxMessageSize:fQ,shimParameterlessSetLocalDescription:gQ,shimRTCIceCandidate:dQ,shimRTCIceCandidateRelayProtocol:uQ,shimSendThrowTypeError:hQ});const yQ=function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const n=wW,r=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){const e=n.userAgentData.brands.find(e=>"Chromium"===e.brand);if(e)return{browser:"chrome",version:parseInt(e.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=parseInt(mW(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=parseInt(mW(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2));else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=parseInt(mW(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,t._safariVersion=mW(n.userAgent,/Version\/(\d+(\.?\d+))/,1)}return t}(e),i={browserDetails:r,commonShim:vQ,extractVersion:mW,disableLog:vW,disableWarnings:yW,sdp:cQ};switch(r.browser){case"chrome":if(!IW||!NW||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),i;if(null===r.version)return n("Chrome shim can not determine version, not shimming."),i;n("adapter.js shimming chrome."),i.browserShim=IW,mQ(e,r),gQ(e),kW(e,r),HW(e),NW(e,r),SW(e),zW(e,r),_W(e),VW(e),TW(e,r),dQ(e),uQ(e),pQ(e),fQ(e,r),hQ(e),CQ(e,r);break;case"firefox":if(!GW||!jW||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),i;n("adapter.js shimming firefox."),i.browserShim=GW,mQ(e,r),gQ(e),DW(e,r),jW(e,r),ZW(e),PW(e),RW(e),BW(e),FW(e),UW(e),qW(e),WW(e),QW(e),dQ(e),pQ(e),fQ(e,r),hQ(e);break;case"safari":if(!oQ||!t.shimSafari)return n("Safari shim is not included in this adapter release."),i;n("adapter.js shimming safari."),i.browserShim=oQ,mQ(e,r),gQ(e),eQ(e),nQ(e),XW(e),KW(e),YW(e),tQ(e),JW(e),rQ(e),dQ(e),uQ(e),fQ(e,r),hQ(e),CQ(e,r);break;default:n("Unsupported browser!")}return i}({window:"undefined"==typeof window?void 0:window}),wQ=({actions:t=[{text:"Analyzing your application flow...",color:"var(--brand-color)"},{text:"AI agents are on action...",color:"var(--ff-electric-indigo)"},{text:"Thinking like a QA expert… just a few more seconds...",color:"var(--ff-vivid-orange)"},{text:"Hold on, test cases are on the way!",color:"var(--ff-dodger-blue)"}],width:r,height:i,path:o,DynamicHeight:a=500})=>{const[s,d]=c(0),[u,f]=c("");l(()=>{if(s>=t?.length)return;const e=t[s]?.text||" ";let n=0;const r=setInterval(()=>{n<=e?.length?(f(e?.slice(0,n)),n++):(clearInterval(r),setTimeout(()=>{d(e=>e<t?.length-1?e+1:e)},1e3))},80);return()=>clearInterval(r)},[s,t]);const h=t[s]?.color;return n("div",{className:"loader-container",style:{width:`${r}%`,height:`${i}%`},children:[e("div",{className:"ff-moving-sections-container",children:[1,2,3,4]?.map(t=>e("div",{className:`ff-moving-section${t}`,style:{height:""+(a+"px")}},t))}),n("div",{className:"ff-gif-container",children:[e("div",{className:"ff-typing-wrapper",children:e(F,{className:"ff-typing-text",fontSize:16,fontWeight:"medium",style:{color:h},children:u})}),e("img",{height:100,width:100,alt:"generation",src:o})]})]})},bQ=()=>{const e=()=>{const e=window.innerWidth;return{isMobile:e<=640,isTab:e>640&&e<=820,isLargeTab:e>820&&e<1025,isWeb:e>=1025}},[t,n]=c(e());return l(()=>{const t=()=>{n(e())};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),t},EQ=e=>{const t=document.createElement("textarea");document.body.appendChild(t),t.value=e,t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n};export{je as AADHAAR_REGEX,ye as ALPHABET_ONLY_REGEX,Bt as ALPHABET_WITH_SPACES_ONLY_REGEX,ht as ALPHANUMERIC_PARENTHESIS_REGEX,be as ALPHANUMERIC_REGEX,jt as ALPHANUMERIC_WITH_DOT_REGEX,Ee as ALPHANUMERIC_WITH_ROUND_BRACES_REGEX,Zt as ALPHA_NUM_EXTENDED_REGEX,Ot as ALPHA_NUM_REGEX,$ as Accordion,TE as AddContentButton,Ha as AddResourceButton,SE as AiToggle,rh as AllProjectsDropdown,_E as AnimatedSetting,dh as AppHeader,xv as AttachMedia,Ap as AttachmentButton,Lp as Avatar,Ye as BASE64_REGEX,ze as BIG_END_WHITESPACE,Xe as BINARY_NUMBER_REGEX,Mt as BODY_TAG_TYPE_VALIDATION,xA as BarChart,tW as Box,Fs as BrowserTabs,U as Button,Ct as CAMEL_CASE_REGEX,bt as CERTIFICATES_NAME_REGEX,Lt as CHECK_CAMEL_CASE,ke as CREDIT_CARD_REGEX,et as CURRENCY_GENERIC_REGEX,LE as ChatModal,kE as ChatModalAi,te as Checkbox,tn as Chip,zE as ChipWithCount,yE as ChooseFile,$t as Col,XL as Comments,rk as ConditionalDropdown,qL as ConnectingBranch,Xt as Container,Hp as ContentCard,mE as CreateVariableSlider,Me as DATE_REGEX,We as DECIMAL_NUMBER_REGEX,Ue as DRIVING_LICENSE_REGEX,vt as DYNAMIC_VALUE_PATTERN_REGEX,yt as DYNAMIC_VALUE_TYPE_REGEX,wt as DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX,gt as DYNAMIC_VALUE__PLACEHOLDER_REGEX,gh as DashboardDonutChart,Kf as DatePicker,dW as DebugToolsPanel,_a as DonutChart,fE as DownloadClient,th as DragAndDrop,X as Drawer,Ra as Dropzone,dt as ELEMENTS_TRAILING_SPACE_REGEX,ut as ELEMENTS_WHITE_SPACE_REGEX,qt as EMAIL_FORMAT_REGEX,de as EMAIL_REGEX,It as EMAIL_VALIDATION_REGEX,Rt as EXCEL_SPACING_REGEX,Ts as EditLabel,Vp as EditTextField,jL as Editor,NE as ErrorBoundary,bv as Excel,an as ExpandableMenu,Pt as FILENAME_VALIDATION_REGEX,xe as FILE_EXTENSION_REGEX,ct as FILE_NAME_REGEX,hE as FieldSet,Pa as FileDropzone,Ba as FilePreview,ks as Form,tk as FormatString,De as GSTIN_REGEX,Je as HEXADECIMAL_NUMBER_REGEX,me as HEX_COLOR_REGEX,Ke as HSL_COLOR_REGEX,Qe as HTML_ATTRIBUTE_REGEX,Et as HTML_FILE_TYPE_VALIDATION,_e as HTML_TAG_REGEX,J as HighlightText,HE as HistoryCard,Be as INDIAN_CURRENCY_REGEX,Fe as INDIAN_PASSPORT_REGEX,Te as INDIAN_PHONE_REGEX,Ie as INDIAN_PIN_CODE_REGEX,Pe as INTERNATIONAL_PHONE_REGEX,pe as IPV4_REGEX,Ce as IPV6_REGEX,P as Icon,Xf as IconButton,Av as IconRadialChart,Cp as IconRadioGroup,nn as Input,Hs as InputWithDropdown,xt as JAVASCRIPT_FILE_TYPE_VALIDATION,hW as Janus,tt as LINKEDIN_PROFILE_REGEX,Dt as LINK_VALIDATION_REGEX,Sp as LabelEditTextField,tr as LazyLoad,uE as LineChart,kp as LineLoader,OE as Link,Le as MAC_ADDRESS_REGEX,at as MEMORY_VALIDATION_REGEX,mp as MachineInputField,EE as MediaPreview,RE as MediaViewerModel,fr as MenuOption,xE as MessageBox,Ss as MiniModal,ME as MobileSkin,Jf as Modal,Ev as ModuleChip,kA as MultiRadialChart,Kt as MultiSelect,pp as NLPInput,st as NLP_DESCRIPTION_REGEX,Ft as NO_LEADING_TRAILING_SPACE_REGEX,we as NUMBERS_ONLY_REGEX,rt as NUMBER_REGEX,eW as NoDataContent,ZE as OsTree,jE as OtpVerification,_s as OverviewModal,Ze as PAN_CARD_REGEX,ft as PARAMETER_ALPHANUMERIC_REGEX,ve as PASSWORD_COMPLEX_REGEX,ge as PASSWORD_SIMPLE_REGEX,fe as PHONE_REGEX,he as POSTAL_CODE_REGEX,uh as Paper,wO as PhoneInputField,oh as PieChart,$L as PopUpModal,jO as PrePostTable,vE as ProgressBar,AE as Prompt,VE as PromptContainer,Ge as RGB_COLOR_REGEX,$e as ROMAN_NUMERALS_REGEX,on as RadialChart,Da as RadioButton,Za as RadioGroup,cp as Recaptcha,Jt as Row,ot as SCRIPT_REGEX,Ut as SERVER_HOST_REGEX,He as SSN_REGEX,Vt as START_END_WHITESPACE_REGEX,lt as STEP_GROUP_NAME_REGEX,wQ as ScriptGenerationLoader,wE as ScriptSwitchButton,Us as Search,ar as Select,Mp as SequentialConnectingBranch,BE as SessionDropdown,uW as SessionManager,Yf as StateDropdown,fW as StatusBadge,cr as StatusButton,Lv as StatusCard,DE as StatusIndicator,ez as StepLandingTable,JO as StepResultStats,bE as SwitchButton,Ae as TIME_REGEX,nt as TWITTER_HANDLE_REGEX,La as Table,Bs as TableTree,JE as TableTreeFn,gE as TableWithAccordion,Ps as Tabs,IE as TabsWithSilder,sr as TextArea,$q as TextEditor,Q as ThemeProvider,Yt as Toaster,Na as Toastify,en as Toggle,xp as ToggleSwitch,K as Tooltip,sn as TruncatedTooltip,F as Typography,it as UNIT_REGEX,ue as URL_REGEX,Ne as USERNAME_REGEX,qe as USERNAME_SPECIAL_REGEX,Oe as US_ZIP_CODE_REGEX,Se as UUID_REGEX,Re as VEHICLE_REGISTRATION_REGEX,dE as VariableDropdown,nh as VariableInput,CE as VariableSuggestionInputDropDown,Ve as WHITESPACE_REGEX,At as XML_FILE_TYPE_VALIDATION,yQ as adapter,VO as addPrePostStepGroup,OO as addStepGroup,rW as autoScrollToTableLastRow,_p as capitalize,G as checkEmpty,cW as checkMicrophoneAccess,ch as clearStore,tM as compareArrays,eM as compareObjects,MO as convertFormDataToObject,MA as convertToBytes,AA as convertToGB,zO as convertToISO,EQ as copyToClipboard,xa as debounce,sh as deleteStoreValue,gp as ffid,$E as findAndInsert,_O as formatDate,EO as formatResponseDate,EA as getEncryptedData,Va as getExtension,Oa as getExtensionWithPeriod,sW as getNavigateToKey,RL as getSequentialPayload,lh as getStoreValue,aW as getTopVisibleNodeKey,AO as getTreeDetails,NO as handleTimeZoneChange,iW as handleTreeExpandAllCollapseAll,SO as handleTreeNodeExpandCollapse,kO as handleTreeNodeSect,HO as handleUnCheckAllTreeNodesWithUpdates,ik as hasDuplicateFile,yp as isEmptyObject,oe as isTextTruncated,lW as nlpInputDelay,bO as rearrangeDragItem,WL as saveFileFromBlob,ZO as scrollToView,ah as setStoreValue,vv as throttle,nW as toCamelCase,Ta as toast,oW as toggleShowHideEntity,ie as truncateText,xO as updateTreeState,LO as useBeforeUnload,Y as useClickOutside,bQ as useDeviceType,Ia as useFileDropzone,ce as useKeyboardActions,Fa as useTheme,JL as useTriggerControl};
|
|
48
|
+
*/!function(){var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"==o||"number"==o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"==o)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,n){e.exports=t},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(3),o=n(5),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(0),i=n(1);function o(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getStartKey(),i=t.getEndKey(),o=n.getBlockMap();return o.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===i}).concat([[i,o.get(i)]])}function a(e){return o(e).toList()}function l(e){if(e)return a(e).get(0)}function s(e){if(e){var t=l(e),n=e.getCurrentContent().getBlockMap().toSeq().toList(),r=0;if(n.forEach(function(e,n){e.get("key")===t.get("key")&&(r=n-1)}),-1<r)return n.get(r)}}function c(e){return e?e.getCurrentContent().getBlockMap().toList():new i.List}function d(e){var t=a(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function u(e){var t=r.RichUtils.tryToRemoveBlockStyle(e);return t?r.EditorState.push(e,t,"change-block-type"):e}function f(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),i=n.getFocusOffset(),o=a(e);if(0<o.size){if(n.getIsBackward()){var l=r;r=i,i=l}for(var s=0;s<o.size;s+=1){var c=0===s?r:0,d=s===o.size-1?i:o.get(s).getText().length;t+=o.get(s).getText().slice(c,d)}}return t}function h(e){var t=e.getCurrentContent(),n=e.getSelection(),i=r.Modifier.removeRange(t,n,"forward"),o=i.getSelectionAfter(),a=i.getBlockForKey(o.getStartKey());return i=r.Modifier.insertText(i,o,"\n",a.getInlineStyleAt(o.getStartOffset()),null),r.EditorState.push(e,i,"insert-fragment")}function p(e){var t=r.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return u(r.EditorState.push(e,t,"split-block"))}function C(e){var t=e.getCurrentContent().getBlockMap().toList(),n=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),i=r.Modifier.removeRange(e.getCurrentContent(),n,"forward");return r.EditorState.push(e,i,"remove-range")}function m(e,t){var n=r.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return r.EditorState.push(e,n,"change-block-data")}function g(e){var t=new i.Map({}),n=a(e);if(n&&0<n.size)for(var r=function(e){var r=n.get(e).getData();if(!r||0===r.size)return t=t.clear(),"break";if(0===e)t=r;else if(t.forEach(function(e,n){r.get(n)&&r.get(n)===e||(t=t.delete(n))}),0===t.size)return t=t.clear(),"break"},o=0;o<n.size&&"break"!==r(o);o+=1);return t}var v=Object(i.Map)({code:{element:"pre"}}),y=r.DefaultDraftBlockRenderMap.merge(v);function w(e){if(e){var t=e.getType();return"unordered-list-item"===t||"ordered-list-item"===t}return!1}function b(e,t,n){var i,a=e.getSelection();i=a.getIsBackward()?a.getFocusKey():a.getAnchorKey();var l=e.getCurrentContent(),s=l.getBlockForKey(i),c=s.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return e;var d=l.getBlockBefore(i);if(!d)return e;if(d.getType()!==c)return e;var u=s.getDepth();if(1===t&&u===n)return e;var f,h,p,C,m,g,v,y=Math.min(d.getDepth()+1,n),w=(h=t,p=y,C=(f=e).getSelection(),g=(m=f.getCurrentContent()).getBlockMap(),v=o(f).map(function(e){var t=e.getDepth()+h;return t=Math.max(0,Math.min(t,p)),e.set("depth",t)}),g=g.merge(v),m.merge({blockMap:g,selectionBefore:C,selectionAfter:C}));return r.EditorState.push(e,w,"adjust-depth")}function E(e,t){var n;return 13===(n=t).which&&(n.getModifierState("Shift")||n.getModifierState("Alt")||n.getModifierState("Control"))?e.getSelection().isCollapsed()?r.RichUtils.insertSoftNewline(e):h(e):function(e){var t=e.getSelection();if(t.isCollapsed()){var n=e.getCurrentContent(),r=t.getStartKey(),i=n.getBlockForKey(r);if(!w(i)&&"unstyled"!==i.getType()&&i.getLength()===t.getStartOffset())return p(e);if(w(i)&&0===i.getLength()){var o=i.getDepth();if(0===o)return u(e);if(0<o)return b(e,-1,o)}}}(e)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){return(x="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)}function L(e){var t=e.getSelection();if(t.isCollapsed()){var n={},r=e.getCurrentInlineStyle().toList().toJS();if(r)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=0<=r.indexOf(e)}),n}var i=t.getStartOffset(),o=t.getEndOffset(),l=a(e);if(0<l.size){var s=function(){for(var e={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},t=0;t<l.size;t+=1){var n=0===t?i:0,r=t===l.size-1?o:l.get(t).getText().length;n===r&&0===n?(n=1,r=2):n===r&&--n;for(var a=function(n){var r=l.get(t).getInlineStyleAt(n);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(t){e[t]=e[t]&&r.get(t)===t})},s=n;s<r;s+=1)a(s)}return{v:e}}();if("object"===x(s))return s.v}return{}}function k(e){var t,n=e.getSelection(),r=n.getStartOffset(),i=n.getEndOffset();r===i&&0===r?i=1:r===i&&--r;for(var o=l(e),a=r;a<i;a+=1){var s=o.getEntityAt(a);if(!s){t=void 0;break}if(a===r)t=s;else if(t!==s){t=void 0;break}}return t}function H(e,t){var n,r=l(e);return r.findEntityRanges(function(e){return e.get("entity")===t},function(e,t){n={start:e,end:t,text:r.get("text").slice(e,t)}}),n}function S(e,t,n){V[e]["".concat(e.toLowerCase(),"-").concat(n)]=A({},"".concat(t),n)}function _(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},V.color,{},V.bgcolor,{},V.fontSize,{},V.fontFamily,{CODE:V.CODE,SUPERSCRIPT:V.SUPERSCRIPT,SUBSCRIPT:V.SUBSCRIPT})}var V={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function O(e,t,n){var i=e.getSelection(),o=Object.keys(V[t]).reduce(function(e,t){return r.Modifier.removeInlineStyle(e,i,t)},e.getCurrentContent()),a=r.EditorState.push(e,o,"changeinline-style"),l=e.getCurrentInlineStyle();if(i.isCollapsed()&&(a=l.reduce(function(e,t){return r.RichUtils.toggleInlineStyle(e,t)},a)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t)l.has(n)||(a=r.RichUtils.toggleInlineStyle(a,n));else{var s="bgcolor"===t?"backgroundColor":t;l.has("".concat(s,"-").concat(n))||(a=r.RichUtils.toggleInlineStyle(a,"".concat(t.toLowerCase(),"-").concat(n)),S(t,s,n))}return a}function z(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?S("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?S("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?S("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&S("fontFamily","fontFamily",e.substr(11))})}function N(e,t,n){var r=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(r&&0<r.size)return r.get(0)}function T(e,t){if(e&&t&&0<t.length){var n=function(){var n=e.getSelection(),r={};if(n.isCollapsed())return t.forEach(function(t){r[t]=function(e,t){var n=e.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(n&&0<n.size)return n.get(0)}(e,t)}),{v:r};var i=n.getStartOffset(),o=n.getEndOffset(),l=a(e);if(0<l.size){for(var s=function(e){var n=0===e?i:0,a=e===l.size-1?o:l.get(e).getText().length;n===a&&0===n?(n=1,a=2):n===a&&--n;for(var s=function(i){i===n?t.forEach(function(t){r[t]=N(l.get(e),t,i)}):t.forEach(function(t){r[t]&&r[t]!==N(l.get(e),t,i)&&(r[t]=void 0)})},c=n;c<a;c+=1)s(c)},c=0;c<l.size;c+=1)s(c);return{v:r}}}();if("object"===x(n))return n.v}return{}}function I(e){var t=e.getCurrentInlineStyle(),n=e.getCurrentContent();return t.forEach(function(t){n=r.Modifier.removeInlineStyle(n,e.getSelection(),t)}),r.EditorState.push(e,n,"change-inline-style")}n.d(t,"isListBlock",function(){return w}),n.d(t,"changeDepth",function(){return b}),n.d(t,"handleNewLine",function(){return E}),n.d(t,"getEntityRange",function(){return H}),n.d(t,"getCustomStyleMap",function(){return _}),n.d(t,"toggleCustomInlineStyle",function(){return O}),n.d(t,"getSelectionEntity",function(){return k}),n.d(t,"extractInlineStyle",function(){return z}),n.d(t,"removeAllInlineStyles",function(){return I}),n.d(t,"getSelectionInlineStyle",function(){return L}),n.d(t,"getSelectionCustomInlineStyle",function(){return T}),n.d(t,"getSelectedBlocksMap",function(){return o}),n.d(t,"getSelectedBlocksList",function(){return a}),n.d(t,"getSelectedBlock",function(){return l}),n.d(t,"getBlockBeforeSelectedBlock",function(){return s}),n.d(t,"getAllBlocks",function(){return c}),n.d(t,"getSelectedBlocksType",function(){return d}),n.d(t,"removeSelectedBlocksStyle",function(){return u}),n.d(t,"getSelectionText",function(){return f}),n.d(t,"addLineBreakRemovingSelection",function(){return h}),n.d(t,"insertNewUnstyledBlock",function(){return p}),n.d(t,"clearEditorContent",function(){return C}),n.d(t,"setBlockData",function(){return m}),n.d(t,"getSelectedBlocksMetadata",function(){return g}),n.d(t,"blockRenderMap",function(){return y})}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t){e.exports=n},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(5),o=n(3),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(1),i=n(0),o=function(e,t,n){var r,o=e.textContent;return""===o.trim()?{chunk:(r=n,{text:" ",inlines:[new i.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:o,inlines:Array(o.length).fill(t),entities:Array(o.length).fill(n),blocks:[]}}},a=function(){return{text:"\n",inlines:[new i.OrderedSet],entities:new Array(1),blocks:[]}},l=function(){return{text:"",inlines:[],entities:[],blocks:[]}},s=function(e,t){return{text:"",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new i.Map({})}]}},c=function(e,t,n){return{text:"\r",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new i.Map({})}]}},d=function(e){return{text:"\r ",inlines:[new i.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new i.Map({})}]}},u=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},f=new i.Map({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:"ul"},"ordered-list-item":{element:"li",wrapper:"ol"},blockquote:{element:"blockquote"},code:{element:"pre"},atomic:{element:"figure"},unstyled:{element:"p",aliasedElements:["div"]}}),h={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function p(e){return e.style.textAlign?new i.Map({"text-align":e.style.textAlign}):e.style.marginLeft?new i.Map({"margin-left":e.style.marginLeft}):void 0}var C=function(e){var t=void 0;if(e instanceof HTMLAnchorElement){var n={};t=e.dataset&&void 0!==e.dataset.mention?(n.url=e.href,n.text=e.innerHTML,n.value=e.dataset.value,r.Entity.__create("MENTION","IMMUTABLE",n)):(n.url=e.getAttribute&&e.getAttribute("href")||e.href,n.title=e.innerHTML,n.targetOption=e.target,r.Entity.__create("LINK","MUTABLE",n))}return t};n.d(t,"default",function(){return y});var m=" ",g=new RegExp(" ","g"),v=!0;function y(e,t){var n,y,w=(n=t,(y=function(e){var t,n=null;return document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}(e.trim().replace(g,m)))?(v=!0,{chunk:function e(t,n,i,m,g,y){var w=t.nodeName.toLowerCase();if(y){var b=y(w,t);if(b){var E=r.Entity.__create(b.type,b.mutability,b.data||{});return{chunk:d(E)}}}if("#text"===w&&"\n"!==t.textContent)return o(t,n,g);if("br"===w)return{chunk:a()};if("img"===w&&t instanceof HTMLImageElement){var M={};M.src=t.getAttribute&&t.getAttribute("src")||t.src,M.alt=t.alt,M.height=t.style.height,M.width=t.style.width,t.style.float&&(M.alignment=t.style.float);var A=r.Entity.__create("IMAGE","MUTABLE",M);return{chunk:d(A)}}if("video"===w&&t instanceof HTMLVideoElement){var x={};x.src=t.getAttribute&&t.getAttribute("src")||t.src,x.alt=t.alt,x.height=t.style.height,x.width=t.style.width,t.style.float&&(x.alignment=t.style.float);var L=r.Entity.__create("VIDEO","MUTABLE",x);return{chunk:d(L)}}if("iframe"===w&&t instanceof HTMLIFrameElement){var k={};k.src=t.getAttribute&&t.getAttribute("src")||t.src,k.height=t.height,k.width=t.width;var H=r.Entity.__create("EMBEDDED_LINK","MUTABLE",k);return{chunk:d(H)}}var S,_=function(e,t){var n=f.filter(function(n){return n.element===e&&(!n.wrapper||n.wrapper===t)||n.wrapper===e||n.aliasedElements&&-1<n.aliasedElements.indexOf(e)}).keySeq().toSet().toArray();if(1===n.length)return n[0]}(w,m);_&&("ul"===w||"ol"===w?(m=w,i+=1):("unordered-list-item"!==_&&"ordered-list-item"!==_&&(m="",i=-1),v?(S=s(_,p(t)),v=!1):S=c(_,i,p(t)))),S=S||l(),n=function(e,t,n){var r,i=h[e];if(i)r=n.add(i).toOrderedSet();else if(t instanceof HTMLElement){var o=t;r=(r=n).withMutations(function(e){var t=o.style.color,n=o.style.backgroundColor,r=o.style.fontSize,i=o.style.fontFamily.replace(/^"|"$/g,""),a=o.style.fontWeight,l=o.style.textDecoration,s=o.style.fontStyle;t&&e.add("color-".concat(t.replace(/ /g,""))),n&&e.add("bgcolor-".concat(n.replace(/ /g,""))),r&&e.add("fontsize-".concat(r.replace(/px$/g,""))),i&&e.add("fontfamily-".concat(i)),"bold"===a&&e.add(h.strong),"underline"===l&&e.add(h.ins),"italic"===s&&e.add(h.em)}).toOrderedSet()}return r}(w,t,n);for(var V=t.firstChild;V;){var O=e(V,n,i,m,C(V)||g,y).chunk;S=u(S,O),V=V.nextSibling}return{chunk:S}}(y,new i.OrderedSet,-1,"",void 0,n).chunk}):null);if(w){var b=w.chunk,E=new i.OrderedMap({});b.entities&&b.entities.forEach(function(e){e&&(E=E.set(e,r.Entity.__get(e)))});var M=0;return{contentBlocks:b.text.split("\r").map(function(e,t){var n=M+e.length,o=b&&b.inlines.slice(M,n),a=b&&b.entities.slice(M,n),l=new i.List(o.map(function(e,t){var n={style:e,entity:null};return a[t]&&(n.entity=a[t]),r.CharacterMetadata.create(n)}));return M=n,new r.ContentBlock({key:Object(r.genKey)(),type:b&&b.blocks[t]&&b.blocks[t].type||"unstyled",depth:b&&b.blocks[t]&&b.blocks[t].depth,data:b&&b.blocks[t]&&b.blocks[t].data||new i.Map({}),text:e,characterList:l})}),entityMap:E}}return null}}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t,n){function r(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function i(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===i(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var l={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},s={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?3<=t&&":"===e[t-3]||3<=t&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",d="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(){return function(e,t){t.normalize(e)}}function f(e){var t=e.re=n(21)(e.__opts__),r=e.__tlds__.slice();function l(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(c),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(l(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(l(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(l(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(l(t.tpl_host_fuzzy_test),"i");var s=[];function d(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){var n=e.__schemas__[t];if(null!==n){var r,a={validate:null,link:null};if(e.__compiled__[t]=a,"[object Object]"===i(n))return"[object RegExp]"===i(n.validate)?a.validate=(r=n.validate,function(e,t){var n=e.slice(t);return r.test(n)?n.match(r)[0].length:0}):o(n.validate)?a.validate=n.validate:d(t,n),void(o(n.normalize)?a.normalize=n.normalize:n.normalize?d(t,n):a.normalize=u());"[object String]"!==i(n)?d(t,n):s.push(t)}}),s.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:u()};var f,h=Object.keys(e.__compiled__).filter(function(t){return 0<t.length&&e.__compiled__[t]}).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),(f=e).__index__=-1,f.__text_cache__=""}function h(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function p(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function C(e,t){if(!(this instanceof C))return new C(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||l.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=r({},l,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},s,e),this.__compiled__={},this.__tlds__=d,this.__tlds_replaced__=!1,this.re={},f(this)}C.prototype.add=function(e,t){return this.__schemas__[e]=t,f(this),this},C.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},C.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,l,s;if(this.re.schema_test.test(e))for((l=this.re.schema_search).lastIndex=0;null!==(t=l.exec(e));)if(i=this.testSchemaAt(e,t[2],l.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(s=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||s<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&0<=e.indexOf("@")&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),0<=this.__index__},C.prototype.pretest=function(e){return this.re.pretest.test(e)},C.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},C.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(p(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(p(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},C.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),f(this),this},C.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},C.prototype.onCompile=function(){},e.exports=C},function(e,t,n){e.exports=n(40)},function(e,t,n){},function(e,t,n){var r=n(11);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var l=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 l.name="Invariant Violation",l}}function t(){return e}var n={array:e.isRequired=e,bigint: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:o,resetWarningCache:i};return n.PropTypes=n}},function(e,t,n){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports=function(e){var t={};t.src_Any=n(22).source,t.src_Cc=n(23).source,t.src_Z=n(24).source,t.src_P=n(25).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var r="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){n.r(t),n.d(t,"Editor",function(){return ni});var r=n(1),i=n.n(r),o=n(0),a=n.n(o),l=n(3),s=n(4),c=n(2),d=n.n(c);function u(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var f=u(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(e){t.callBacks.forEach(function(t){t(e)})},this.init=function(e){var n=document.getElementById(e);n&&n.addEventListener("click",function(){t.editorFlag=!0}),document&&(document.addEventListener("click",function(){t.editorFlag?t.editorFlag=!1:(t.closeAllModals(),t.suggestionCallback&&t.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&t.closeAllModals()}))},this.onEditorClick=function(){t.closeModals(),!t.suggestionFlag&&t.suggestionCallback?t.suggestionCallback():t.suggestionFlag=!1},this.closeModals=function(e){t.closeAllModals(e)},this.registerCallBack=function(e){t.callBacks.push(e)},this.deregisterCallBack=function(e){t.callBacks=t.callBacks.filter(function(t){return t!==e})},this.setSuggestionCallback=function(e){t.suggestionCallback=e},this.removeSuggestionCallback=function(){t.suggestionCallback=void 0},this.onSuggestionClick=function(){t.suggestionFlag=!0}});function h(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var p,C=h(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused||(t.editorFocused=!1)):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}),m=[],g={onKeyDown:function(e){m.forEach(function(t){t(e)})},registerCallBack:function(e){m.push(e)},deregisterCallBack:function(e){m=m.filter(function(t){return t!==e})}},v=function(){p=!0},y=function(){p=!1},w=function(){return p};function b(e){var t=e.getData()&&e.getData().get("text-align");return t?"rdw-".concat(t,"-aligned-block"):""}function E(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function M(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function A(e){e.stopPropagation()}function x(e){return e[e.options[0]].icon}function L(e,t){if(e&&void 0===t)return e;var n={};return E(e,function(e,r){var i;i=r,"[object Object]"===Object.prototype.toString.call(i)?n[e]=L(r,t[e]):n[e]=void 0!==t[e]?t[e]:r}),n}var k=n(6),H=n.n(k),S=n(5);function _(e){return(_="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)}function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(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)}}function z(e,t){return(z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var i=T(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(9);var I=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&z(e,t)}(o,r.Component);var e,t,n=N(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(){var t=e.props,n=t.disabled,r=t.onClick,i=t.value;n||r(i)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,o=t.activeClassName,a=t.active,l=t.disabled,s=t.title;return i.a.createElement("div",{className:d()("rdw-option-wrapper",r,(V(e={},"rdw-option-active ".concat(o),a),V(e,"rdw-option-disabled",l),e)),onClick:this.onClick,"aria-selected":a,title:s},n)}}])&&O(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function D(e){return(D="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)}function Z(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)}}function j(e,t){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}I.propTypes={onClick:a.a.func.isRequired,children:a.a.any,value:a.a.string,className:a.a.string,activeClassName:a.a.string,active:a.a.bool,disabled:a.a.bool,title:a.a.string},I.defaultProps={activeClassName:""},n(12);var P=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(o,r.Component);var e,t,n=R(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={highlighted:-1},e.onChange=function(t){var n=e.props.onChange;n&&n(t),e.toggleExpansion()},e.setHighlighted=function(t){e.setState({highlighted:t})},e.toggleExpansion=function(){var t=e.props,n=t.doExpand,r=t.doCollapse;t.expanded?r():n()},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&this.setState({highlighted:-1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.expanded,r=t.children,o=t.className,a=t.optionWrapperClassName,l=t.ariaLabel,s=t.onExpandEvent,c=t.title,u=this.state.highlighted,f=r.slice(1,r.length);return i.a.createElement("div",{className:d()("rdw-dropdown-wrapper",o),"aria-expanded":n,"aria-label":l||"rdw-dropdown"},i.a.createElement("a",{className:"rdw-dropdown-selectedtext",onClick:s,title:c},r[0],i.a.createElement("div",{className:d()({"rdw-dropdown-carettoclose":n,"rdw-dropdown-carettoopen":!n})})),n?i.a.createElement("ul",{className:d()("rdw-dropdown-optionwrapper",a),onClick:A},i.a.Children.map(f,function(t,n){return t&&i.a.cloneElement(t,{onSelect:e.onChange,highlighted:u===n,setHighlighted:e.setHighlighted,index:n})})):void 0)}}])&&Z(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function F(e){return(F="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)}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(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)}}function W(e,t){return(W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=G(e);if(t){var i=G(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function G(e){return(G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}P.propTypes={children:a.a.any,onChange:a.a.func,className:a.a.string,expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,optionWrapperClassName:a.a.string,ariaLabel:a.a.string,title:a.a.string},n(13);var K=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(o,r.Component);var e,t,n=Q(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(t){var n=e.props,r=n.onSelect,i=n.onClick,o=n.value;n.disabled||(r&&r(o),i&&(t.stopPropagation(),i(o)))},e.setHighlighted=function(){var t=e.props;(0,t.setHighlighted)(t.index)},e.resetHighlighted=function(){(0,e.props.setHighlighted)(-1)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,o=t.disabled,a=t.highlighted,l=t.className,s=t.activeClassName,c=t.disabledClassName,u=t.highlightedClassName,f=t.title;return i.a.createElement("li",{className:d()("rdw-dropdownoption-default",l,(U(e={},"rdw-dropdownoption-active ".concat(s),r),U(e,"rdw-dropdownoption-highlighted ".concat(u),a),U(e,"rdw-dropdownoption-disabled ".concat(c),o),e)),onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick,title:f},n)}}])&&q(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Y(e){return(Y="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)}function X(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)}}function J(e,t){return(J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ee(e);if(t){var i=ee(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}K.propTypes={children:a.a.any,value:a.a.any,onClick:a.a.func,onSelect:a.a.func,setHighlighted:a.a.func,index:a.a.number,disabled:a.a.bool,active:a.a.bool,highlighted:a.a.bool,className:a.a.string,activeClassName:a.a.string,disabledClassName:a.a.string,highlightedClassName:a.a.string,title:a.a.string},K.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""},n(14);var te=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(o,r.Component);var e,t,n=$(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState,r=e.onChange,o=e.translations;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",t.className),"aria-label":"rdw-inline-control"},t.options.map(function(e,a){return i.a.createElement(I,{key:a,value:e,onClick:r,className:d()(t[e].className),active:!0===n[e]||"MONOSPACE"===e&&n.CODE,title:t[e].title||o["components.controls.inline.".concat(e)]},i.a.createElement("img",{alt:"",src:t[e].icon}))}))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=e.onChange,c=e.translations,u=t.className,f=t.dropdownClassName,h=t.title;return i.a.createElement(P,{className:d()("rdw-inline-dropdown",u),optionWrapperClassName:d()(f),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-inline-control",title:h},i.a.createElement("img",{src:x(t),alt:""}),t.options.map(function(e,n){return i.a.createElement(K,{key:n,value:e,className:d()("rdw-inline-dropdownoption",t[e].className),active:!0===l[e]||"MONOSPACE"===e&&l.CODE,title:t[e].title||c["components.controls.inline.".concat(e)]},i.a.createElement("img",{src:t[e].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&X(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ne(e){return(ne="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)}function re(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)}}function ie(e,t){return(ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ae(e);if(t){var i=ae(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}te.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var le=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}(o,r.Component);var e,t,n=oe(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.toggleInlineStyle=function(e){var n="monospace"===e?"CODE":e.toUpperCase(),r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleInlineStyle(i,n);if("subscript"===e||"superscript"===e){var s="subscript"===e?"SUPERSCRIPT":"SUBSCRIPT",c=l.Modifier.removeInlineStyle(a.getCurrentContent(),a.getSelection(),s);a=l.EditorState.push(a,c,"change-inline-style")}a&&o(a)},t.changeKeys=function(e){if(e){var t={};return E(e,function(e,n){t["CODE"===e?"monospace":e.toLowerCase()]=n}),t}},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={currentStyles:i?t.changeKeys(Object(s.getSelectionInlineStyle)(i)):{}},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(s.getSelectionInlineStyle)(t))})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentStyles,l=t.component||te;return i.a.createElement(l,{config:t,translations:n,currentState:a,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle})}}])&&re(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function se(e){return(se="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)}function ce(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)}}function de(e,t){return(de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=fe(e);if(t){var i=fe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}le.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(15);var he=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(o,r.Component);var e,t,n=ue(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).getBlockTypes=function(e){return[{label:"Normal",displayName:e["components.controls.blocktype.normal"]},{label:"H1",displayName:e["components.controls.blocktype.h1"]},{label:"H2",displayName:e["components.controls.blocktype.h2"]},{label:"H3",displayName:e["components.controls.blocktype.h3"]},{label:"H4",displayName:e["components.controls.blocktype.h4"]},{label:"H5",displayName:e["components.controls.blocktype.h5"]},{label:"H6",displayName:e["components.controls.blocktype.h6"]},{label:"Blockquote",displayName:e["components.controls.blocktype.blockquote"]},{label:"Code",displayName:e["components.controls.blocktype.code"]}]},t.state={blockTypes:t.getBlockTypes(e.translations)},t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.translations;t!==e.translations&&this.setState({blockTypes:this.getBlockTypes(t)})}},{key:"renderFlat",value:function(e){var t=this.props,n=t.config.className,r=t.onChange,o=t.currentState.blockType;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",n)},e.map(function(e,t){return i.a.createElement(I,{key:t,value:e.label,active:o===e.label,onClick:r},e.displayName)}))}},{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.title,l=t.currentState.blockType,s=t.expanded,c=t.doExpand,u=t.onExpandEvent,f=t.doCollapse,h=t.onChange,p=t.translations,C=this.state.blockTypes.filter(function(e){return e.label===l}),m=C&&C[0]&&C[0].displayName;return i.a.createElement("div",{className:"rdw-block-wrapper","aria-label":"rdw-block-control"},i.a.createElement(P,{className:d()("rdw-block-dropdown",r),optionWrapperClassName:d()(o),onChange:h,expanded:s,doExpand:c,doCollapse:f,onExpandEvent:u,title:a||p["components.controls.blocktype.blocktype"]},i.a.createElement("span",null,m||p["components.controls.blocktype.blocktype"]),e.map(function(e,t){return i.a.createElement(K,{active:l===e.label,value:e.label,key:t},e.displayName)})))}},{key:"render",value:function(){var e=this.props.config,t=e.inDropdown,n=this.state.blockTypes.filter(function(t){var n=t.label;return-1<e.options.indexOf(n)});return t?this.renderInDropdown(n):this.renderFlat(n)}}])&&ce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();he.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var pe=he;function Ce(e){return(Ce="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)}function me(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)}}function ge(e,t){return(ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ye(e);if(t){var i=ye(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ye(e){return(ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var we=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ge(e,t)}(o,r.Component);var e,t,n=ve(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.blocksTypes=[{label:"Normal",style:"unstyled"},{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"},{label:"H5",style:"header-five"},{label:"H6",style:"header-six"},{label:"Blockquote",style:"blockquote"},{label:"Code",style:"code"}],t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.blocksTypes.find(function(t){return t.label===e}).style,r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleBlockType(i,n);a&&o(a)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:!1,currentBlockType:r?Object(s.getSelectedBlocksType)(r):"unstyled"},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(s.getSelectedBlocksType)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentBlockType,l=t.component||pe,s=this.blocksTypes.find(function(e){return e.style===a});return i.a.createElement(l,{config:t,translations:n,currentState:{blockType:s&&s.label},onChange:this.toggleBlockType,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();we.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var be=we;function Ee(e){return(Ee="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)}function Me(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)}}function Ae(e,t){return(Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Le(e);if(t){var i=Le(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Le(e){return(Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(16);var ke=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ae(e,t)}(o,r.Component);var e,t,n=xe(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontSize:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-size");t=t.substring(0,t.length-2),this.setState({defaultFontSize:t})}}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.dropdownClassName,a=t.options,l=t.title,s=e.onChange,c=e.expanded,u=e.doCollapse,f=e.onExpandEvent,h=e.doExpand,p=e.translations,C=this.props.currentState.fontSize,m=this.state.defaultFontSize;return m=Number(m),C=C||a&&0<=a.indexOf(m)&&m,i.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},i.a.createElement(P,{className:d()("rdw-fontsize-dropdown",r),optionWrapperClassName:d()(o),onChange:s,expanded:c,doExpand:h,doCollapse:u,onExpandEvent:f,title:l||p["components.controls.fontsize.fontsize"]},C?i.a.createElement("span",null,C):i.a.createElement("img",{src:n,alt:""}),a.map(function(e,t){return i.a.createElement(K,{className:"rdw-fontsize-option",active:C===e,value:e,key:t},e)})))}}])&&Me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function He(e){return(He="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)}function Se(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)}}function _e(e,t){return(_e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Oe(e);if(t){var i=Oe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===He(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ke.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var ze=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_e(e,t)}(o,r.Component);var e,t,n=Ve(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontSize=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontSize",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontSize:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTSIZE"]).FONTSIZE:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(s.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontSize,l=t.component||ke,s=a&&Number(a.substring(9));return i.a.createElement(l,{config:t,translations:n,currentState:{fontSize:s},onChange:this.toggleFontSize,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Ne(e){return(Ne="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)}function Te(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)}}function Ie(e,t){return(Ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function De(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ze(e);if(t){var i=Ze(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ze.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(17);var je=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ie(e,t)}(o,r.Component);var e,t,n=De(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontFamily:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-family");this.setState({defaultFontFamily:t})}}},{key:"render",value:function(){var e=this.state.defaultFontFamily,t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.options,l=n.title,s=t.translations,c=t.onChange,u=t.expanded,f=t.doCollapse,h=t.onExpandEvent,p=t.doExpand,C=this.props.currentState.fontFamily;return C=C||a&&e&&a.some(function(t){return t.toLowerCase()===e.toLowerCase()})&&e,i.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},i.a.createElement(P,{className:d()("rdw-fontfamily-dropdown",r),optionWrapperClassName:d()("rdw-fontfamily-optionwrapper",o),onChange:c,expanded:u,doExpand:p,doCollapse:f,onExpandEvent:h,title:l||s["components.controls.fontfamily.fontfamily"]},i.a.createElement("span",{className:"rdw-fontfamily-placeholder"},C||s["components.controls.fontfamily.fontfamily"]),a.map(function(e,t){return i.a.createElement(K,{active:C===e,value:e,key:t},e)})))}}])&&Te(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();je.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Re=je;function Be(e){return(Be="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)}function Pe(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)}}function Fe(e,t){return(Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=qe(e);if(t){var i=qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var We=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}(o,r.Component);var e,t,n=Ue(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontFamily=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontFamily",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontFamily:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTFAMILY"]).FONTFAMILY:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(s.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontFamily,l=t.component||Re,s=a&&a.substring(11);return i.a.createElement(l,{translations:n,config:t,currentState:{fontFamily:s},onChange:this.toggleFontFamily,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Pe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Qe(e){return(Qe="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)}function Ge(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)}}function Ke(e,t){return(Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Xe(e);if(t){var i=Xe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}We.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(18);var Je=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ke(e,t)}(o,r.Component);var e,t,n=Ye(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).options=["unordered","ordered","indent","outdent"],e.toggleBlockType=function(t){(0,e.props.onChange)(t)},e.indent=function(){(0,e.props.onChange)("indent")},e.outdent=function(){(0,e.props.onChange)("outdent")},e}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,r=e.translations,o=e.indentDisabled,a=e.outdentDisabled,l=t.options,s=t.unordered,c=t.ordered,u=t.indent,f=t.outdent,h=t.className;return i.a.createElement("div",{className:d()("rdw-list-wrapper",h),"aria-label":"rdw-list-control"},0<=l.indexOf("unordered")&&i.a.createElement(I,{value:"unordered",onClick:this.toggleBlockType,className:d()(s.className),active:"unordered"===n,title:s.title||r["components.controls.list.unordered"]},i.a.createElement("img",{src:s.icon,alt:""})),0<=l.indexOf("ordered")&&i.a.createElement(I,{value:"ordered",onClick:this.toggleBlockType,className:d()(c.className),active:"ordered"===n,title:c.title||r["components.controls.list.ordered"]},i.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("indent")&&i.a.createElement(I,{onClick:this.indent,disabled:o,className:d()(u.className),title:u.title||r["components.controls.list.indent"]},i.a.createElement("img",{src:u.icon,alt:""})),0<=l.indexOf("outdent")&&i.a.createElement(I,{onClick:this.outdent,disabled:a,className:d()(f.className),title:f.title||r["components.controls.list.outdent"]},i.a.createElement("img",{src:f.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this,t=this.props,n=t.config,r=t.expanded,o=t.doCollapse,a=t.doExpand,l=t.onExpandEvent,s=t.onChange,c=t.currentState.listType,u=t.translations,f=n.options,h=n.className,p=n.dropdownClassName,C=n.title;return i.a.createElement(P,{className:d()("rdw-list-dropdown",h),optionWrapperClassName:d()(p),onChange:s,expanded:r,doExpand:a,doCollapse:o,onExpandEvent:l,"aria-label":"rdw-list-control",title:C||u["components.controls.list.list"]},i.a.createElement("img",{src:x(n),alt:""}),this.options.filter(function(e){return 0<=f.indexOf(e)}).map(function(t,r){return i.a.createElement(K,{key:r,value:t,disabled:e.props["".concat(t,"Disabled")],className:d()("rdw-list-dropdownOption",n[t].className),active:c===t,title:n[t].title||u["components.controls.list.".concat(t)]},i.a.createElement("img",{src:n[t].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Ge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function $e(e){return($e="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)}function et(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)}}function tt(e,t){return(tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=rt(e);if(t){var i=rt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function rt(e){return(rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Je.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object,indentDisabled:a.a.bool,outdentDisabled:a.a.bool};var it=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tt(e,t)}(o,r.Component);var e,t,n=nt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){"unordered"===e?t.toggleBlockType("unordered-list-item"):"ordered"===e?t.toggleBlockType("ordered-list-item"):"indent"===e?t.adjustDepth(1):t.adjustDepth(-1)},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=l.RichUtils.toggleBlockType(i,e);o&&r(o)},t.adjustDepth=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=Object(s.changeDepth)(i,e,4);o&&r(o)},t.isIndentDisabled=function(){var e=t.props.editorState,n=t.state.currentBlock,r=Object(s.getBlockBeforeSelectedBlock)(e);return!r||!Object(s.isListBlock)(n)||r.get("type")!==n.get("type")||r.get("depth")<n.get("depth")},t.isOutdentDisabled=function(){var e=t.state.currentBlock;return!e||!Object(s.isListBlock)(e)||e.get("depth")<=0};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,currentBlock:i?Object(s.getSelectedBlock)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(s.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,o=this.state,a=o.expanded,l=o.currentBlock,s=n.component||Je;"unordered-list-item"===l.get("type")?e="unordered":"ordered-list-item"===l.get("type")&&(e="ordered");var c=this.isIndentDisabled(),d=this.isOutdentDisabled();return i.a.createElement(s,{config:n,translations:r,currentState:{listType:e},expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,indentDisabled:c,outdentDisabled:d})}}])&&et(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ot(e){return(ot="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)}function at(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)}}function lt(e,t){return(lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function st(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ct(e);if(t){var i=ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ct(e){return(ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}it.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(19);var dt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&<(e,t)}(o,r.Component);var e,t,n=st(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,a=t.right,l=t.justify,s=t.className,c=e.onChange,u=e.currentState.textAlignment,f=e.translations;return i.a.createElement("div",{className:d()("rdw-text-align-wrapper",s),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&i.a.createElement(I,{value:"left",className:d()(r.className),active:"left"===u,onClick:c,title:r.title||f["components.controls.textalign.left"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&i.a.createElement(I,{value:"center",className:d()(o.className),active:"center"===u,onClick:c,title:o.title||f["components.controls.textalign.center"]},i.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&i.a.createElement(I,{value:"right",className:d()(a.className),active:"right"===u,onClick:c,title:a.title||f["components.controls.textalign.right"]},i.a.createElement("img",{src:a.icon,alt:""})),0<=n.indexOf("justify")&&i.a.createElement(I,{value:"justify",className:d()(l.className),active:"justify"===u,onClick:c,title:l.title||f["components.controls.textalign.justify"]},i.a.createElement("img",{src:l.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState.textAlignment,s=e.onChange,c=e.translations,u=t.options,f=t.left,h=t.center,p=t.right,C=t.justify,m=t.className,g=t.dropdownClassName,v=t.title;return i.a.createElement(P,{className:d()("rdw-text-align-dropdown",m),optionWrapperClassName:d()(g),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:v||c["components.controls.textalign.textalign"]},i.a.createElement("img",{src:l&&t[l]&&t[l].icon||x(t),alt:""}),0<=u.indexOf("left")&&i.a.createElement(K,{value:"left",active:"left"===l,className:d()("rdw-text-align-dropdownOption",f.className),title:f.title||c["components.controls.textalign.left"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("center")&&i.a.createElement(K,{value:"center",active:"center"===l,className:d()("rdw-text-align-dropdownOption",h.className),title:h.title||c["components.controls.textalign.center"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=u.indexOf("right")&&i.a.createElement(K,{value:"right",active:"right"===l,className:d()("rdw-text-align-dropdownOption",p.className),title:p.title||c["components.controls.textalign.right"]},i.a.createElement("img",{src:p.icon,alt:""})),0<=u.indexOf("justify")&&i.a.createElement(K,{value:"justify",active:"justify"===l,className:d()("rdw-text-align-dropdownOption",C.className),title:C.title||c["components.controls.textalign.justify"]},i.a.createElement("img",{src:C.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&at(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ut(e){return(ut="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)}function ft(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)}}function ht(e,t){return(ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ct(e);if(t){var i=Ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ut(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ct(e){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}dt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var mt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ht(e,t)}(o,r.Component);var e,t,n=pt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.addBlockAlignmentData=function(e){var n=t.props,r=n.editorState;(0,n.onChange)(t.state.currentTextAlignment!==e?Object(s.setBlockData)(r,{"text-align":e}):Object(s.setBlockData)(r,{"text-align":void 0}))};var r=t.props.modalHandler;return t.state={currentTextAlignment:void 0},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(s.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentTextAlignment,l=t.component||dt;return i.a.createElement(l,{config:t,translations:n,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:a},onChange:this.addBlockAlignmentData})}}])&&ft(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function gt(e){return(gt="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)}function vt(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)}}function yt(e,t){return(yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=bt(e);if(t){var i=bt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function bt(e){return(bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}mt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(20);var Et=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yt(e,t)}(o,r.Component);var e,t,n=wt(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return(e=n.call.apply(n,[this].concat(r))).state={currentStyle:"color"},e.onChange=function(t){(0,e.props.onChange)(e.state.currentStyle,t)},e.setCurrentStyleColor=function(){e.setState({currentStyle:"color"})},e.setCurrentStyleBgcolor=function(){e.setState({currentStyle:"bgcolor"})},e.renderModal=function(){var t=e.props,n=t.config,r=n.popupClassName,o=n.colors,a=t.currentState,l=a.color,s=a.bgColor,c=t.translations,u=e.state.currentStyle,f="color"===u?l:s;return i.a.createElement("div",{className:d()("rdw-colorpicker-modal",r),onClick:A},i.a.createElement("span",{className:"rdw-colorpicker-modal-header"},i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"color"===u}),onClick:e.setCurrentStyleColor},c["components.controls.colorpicker.text"]),i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"bgcolor"===u}),onClick:e.setCurrentStyleBgcolor},c["components.controls.colorpicker.background"])),i.a.createElement("span",{className:"rdw-colorpicker-modal-options"},o.map(function(t,n){return i.a.createElement(I,{value:t,key:n,className:"rdw-colorpicker-option",activeClassName:"rdw-colorpicker-option-active",active:f===t,onClick:e.onChange},i.a.createElement("span",{style:{backgroundColor:t},className:"rdw-colorpicker-cube"}))})))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&this.setState({currentStyle:"color"})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-colorpicker-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-color-picker",title:o||s["components.controls.colorpicker.colorpicker"]},i.a.createElement(I,{onClick:l,className:d()(r)},i.a.createElement("img",{src:n,alt:""})),a?this.renderModal():void 0)}}])&&vt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Et.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Mt=Et;function At(e){return(At="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)}function xt(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)}}function Lt(e,t){return(Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ht(e);if(t){var i=Ht(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===At(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var St=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lt(e,t)}(o,r.Component);var e,t,n=kt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).state={expanded:!1,currentColor:void 0,currentBgColor:void 0},t.onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleColor=function(e,n){var r=t.props,i=r.editorState,o=r.onChange,a=Object(s.toggleCustomInlineStyle)(i,e,n);a&&o(a),t.doCollapse()};var r=e.editorState,i=e.modalHandler,a={expanded:!1,currentColor:void 0,currentBgColor:void 0};return r&&(a.currentColor=Object(s.getSelectionCustomInlineStyle)(r,["COLOR"]).COLOR,a.currentBgColor=Object(s.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR),t.state=a,i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentColor:Object(s.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR,currentBgColor:Object(s.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.currentColor,a=r.currentBgColor,l=r.expanded,s=t.component||Mt,c=o&&o.substring(6),d=a&&a.substring(8);return i.a.createElement(s,{config:t,translations:n,onChange:this.toggleColor,expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{color:c,bgColor:d}})}}])&&xt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();St.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var _t=St,Vt=n(7),Ot=n.n(Vt);function zt(e){return(zt="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)}function Nt(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)}}function Tt(e,t){return(Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function It(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Dt(e);if(t){var i=Dt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===zt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Dt(e){return(Dt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(26);var Zt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tt(e,t)}(o,r.Component);var e,t,n=It(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:e.props.config.defaultTargetOption},e.removeLink=function(){(0,e.props.onChange)("unlink")},e.addLink=function(){var t=e.props.onChange,n=e.state;t("link",n.linkTitle,n.linkTarget,n.linkTargetOption)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.updateTargetOption=function(t){e.setState({linkTargetOption:t.target.checked?"_blank":"_self"})},e.hideModal=function(){e.setState({showModal:!1})},e.signalExpandShowModal=function(){var t=e.props,n=t.onExpandEvent,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target||"",linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e.forceExpandAndShowModal=function(){var t=e.props,n=t.doExpand,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target,linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption})}},{key:"renderAddLinkModal",value:function(){var e=this.props,t=e.config.popupClassName,n=e.doCollapse,r=e.translations,o=this.state,a=o.linkTitle,l=o.linkTarget,s=o.linkTargetOption;return i.a.createElement("div",{className:d()("rdw-link-modal",t),onClick:A},i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTitle"},r["components.controls.link.linkTitle"]),i.a.createElement("input",{id:"linkTitle",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:a}),i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTarget"},r["components.controls.link.linkTarget"]),i.a.createElement("input",{id:"linkTarget",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:l}),i.a.createElement("label",{className:"rdw-link-modal-target-option",htmlFor:"openLinkInNewWindow"},i.a.createElement("input",{id:"openLinkInNewWindow",type:"checkbox",defaultChecked:"_blank"===s,value:"_blank",onChange:this.updateTargetOption}),i.a.createElement("span",null,r["components.controls.link.linkTargetOption"])),i.a.createElement("span",{className:"rdw-link-modal-buttonsection"},i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:this.addLink,disabled:!l||!a},r["generic.add"]),i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:n},r["generic.cancel"])))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.link,o=t.unlink,a=t.className,l=e.currentState,s=e.expanded,c=e.translations,u=this.state.showModal;return i.a.createElement("div",{className:d()("rdw-link-wrapper",a),"aria-label":"rdw-link-control"},0<=n.indexOf("link")&&i.a.createElement(I,{value:"unordered-list-item",className:d()(r.className),onClick:this.signalExpandShowModal,"aria-haspopup":"true","aria-expanded":u,title:r.title||c["components.controls.link.link"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("unlink")&&i.a.createElement(I,{disabled:!l.link,value:"ordered-list-item",className:d()(o.className),onClick:this.removeLink,title:o.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:o.icon,alt:""})),s&&u?this.renderAddLinkModal():void 0)}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.expanded,n=e.onExpandEvent,r=e.doCollapse,o=e.doExpand,a=e.onChange,l=e.config,s=e.currentState,c=e.translations,u=l.options,f=l.link,h=l.unlink,p=l.className,C=l.dropdownClassName,m=l.title,g=this.state.showModal;return i.a.createElement("div",{className:"rdw-link-wrapper","aria-haspopup":"true","aria-label":"rdw-link-control","aria-expanded":t,title:m},i.a.createElement(P,{className:d()("rdw-link-dropdown",p),optionWrapperClassName:d()(C),onChange:a,expanded:t&&!g,doExpand:o,doCollapse:r,onExpandEvent:n},i.a.createElement("img",{src:x(l),alt:""}),0<=u.indexOf("link")&&i.a.createElement(K,{onClick:this.forceExpandAndShowModal,className:d()("rdw-link-dropdownoption",f.className),title:f.title||c["components.controls.link.link"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("unlink")&&i.a.createElement(K,{onClick:this.removeLink,disabled:!s.link,className:d()("rdw-link-dropdownoption",h.className),title:h.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:h.icon,alt:""}))),t&&g?this.renderAddLinkModal():void 0)}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Nt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Zt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var jt=Zt;function Rt(e){return(Rt="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)}function Bt(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)}}function Pt(e,t){return(Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ut(e);if(t){var i=Ut(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Rt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ut(e){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(n),!0).forEach(function(t){Qt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gt(e){var t=Kt.match(e.target);return Wt(Wt({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var Kt=Ot()(),Yt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pt(e,t)}(o,r.Component);var e,t,n=Ft(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e,n,r,i){var o=t.props.config.linkCallback;if("link"===e){var a=(o||Gt)({title:n,target:r,targetOption:i});t.addLink(a.title,a.target,a.targetOption)}else t.removeLink()},t.getCurrentValues=function(){var e=t.props.editorState,n=t.state.currentEntity,r=e.getCurrentContent(),i={};if(n&&"LINK"===r.getEntity(n).get("type")){i.link={};var o=n&&Object(s.getEntityRange)(e,n);i.link.target=n&&r.getEntity(n).get("data").url,i.link.targetOption=n&&r.getEntity(n).get("data").targetOption,i.link.title=o&&o.text}return i.selectionText=Object(s.getSelectionText)(e),i},t.doExpand=function(){t.setState({expanded:!0})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doCollapse=function(){t.setState({expanded:!1})},t.removeLink=function(){var e=t.props,n=e.editorState,r=e.onChange,i=t.state.currentEntity,o=n.getSelection();if(i){var a=Object(s.getEntityRange)(n,i);o=o.getIsBackward()?o.merge({anchorOffset:a.end,focusOffset:a.start}):o.merge({anchorOffset:a.start,focusOffset:a.end}),r(l.RichUtils.toggleLink(n,o,null))}},t.addLink=function(e,n,r){var i=t.props,o=i.editorState,a=i.onChange,c=t.state.currentEntity,d=o.getSelection();if(c){var u=Object(s.getEntityRange)(o,c);d=d.getIsBackward()?d.merge({anchorOffset:u.end,focusOffset:u.start}):d.merge({anchorOffset:u.start,focusOffset:u.end})}var f=o.getCurrentContent().createEntity("LINK","MUTABLE",{url:n,targetOption:r}).getLastCreatedEntityKey(),h=l.Modifier.replaceText(o.getCurrentContent(),d,"".concat(e),o.getCurrentInlineStyle(),f),p=l.EditorState.push(o,h,"insert-characters");d=p.getSelection().merge({anchorOffset:d.get("anchorOffset")+e.length,focusOffset:d.get("anchorOffset")+e.length}),p=l.EditorState.acceptSelection(p,d),h=l.Modifier.insertText(p.getCurrentContent(),d," ",p.getCurrentInlineStyle(),void 0),a(l.EditorState.push(p,h,"insert-characters")),t.doCollapse()};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,link:void 0,selectionText:void 0,currentEntity:i?Object(s.getSelectionEntity)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(s.getSelectionEntity)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=this.getCurrentValues(),a=o.link,l=o.selectionText,s=t.component||jt;return i.a.createElement(s,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:a,selectionText:l},onChange:this.onChange})}}])&&Bt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Yt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Xt=Yt;function Jt(e){return(Jt="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)}function $t(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)}}function en(e,t){return(en=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=nn(e);if(t){var i=nn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Jt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function nn(e){return(nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(27);var rn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&en(e,t)}(o,r.Component);var e,t,n=tn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={embeddedLink:"",height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width},e.onChange=function(){var t=e.props.onChange,n=e.state;t(n.embeddedLink,n.height,n.width)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,r=t.config;if(!n&&e.expanded){var i=r.defaultSize,o=i.height,a=i.width;this.setState({embeddedLink:"",height:o,width:a})}}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,r=e.width,o=this.props,a=o.config.popupClassName,l=o.doCollapse,s=o.translations;return i.a.createElement("div",{className:d()("rdw-embedded-modal",a),onClick:A},i.a.createElement("div",{className:"rdw-embedded-modal-header"},i.a.createElement("span",{className:"rdw-embedded-modal-header-option"},s["components.controls.embedded.embeddedlink"],i.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),i.a.createElement("div",{className:"rdw-embedded-modal-link-section"},i.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},i.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:s["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("div",{className:"rdw-embedded-modal-size"},i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:r,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),i.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!r},s["generic.add"]),i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:l},s["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-embedded-control"},i.a.createElement(I,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.embedded.embedded"]},i.a.createElement("img",{src:n,alt:""})),a?this.rendeEmbeddedLinkModal():void 0)}}])&&$t(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();rn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,doCollapse:a.a.func};var on=rn;function an(e){return(an="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)}function ln(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)}}function sn(e,t){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=dn(e);if(t){var i=dn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===an(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var un=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sn(e,t)}(o,r.Component);var e,t,n=cn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmbeddedLink=function(t,n,r){var i=e.props,o=i.editorState,a=i.onChange,s=i.config.embedCallback,c=s?s(t):t,d=o.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:c,height:n,width:r}).getLastCreatedEntityKey();a(l.AtomicBlockUtils.insertAtomicBlock(o,d," ")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||on;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmbeddedLink,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&ln(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();un.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var fn=un;function hn(e){return(hn="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)}function pn(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)}}function Cn(e,t){return(Cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=gn(e);if(t){var i=gn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===hn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function gn(e){return(gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(28);var vn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cn(e,t)}(o,r.Component);var e,t,n=mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t.target.innerHTML)},e}return e=o,(t=[{key:"renderEmojiModal",value:function(){var e=this,t=this.props.config,n=t.popupClassName,r=t.emojis;return i.a.createElement("div",{className:d()("rdw-emoji-modal",n),onClick:A},r.map(function(t,n){return i.a.createElement("span",{key:n,className:"rdw-emoji-icon",alt:"",onClick:e.onChange},t)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":a,title:o||s["components.controls.emoji.emoji"]},i.a.createElement(I,{className:d()(r),value:"unordered-list-item",onClick:l},i.a.createElement("img",{src:n,alt:""})),a?this.renderEmojiModal():void 0)}}])&&pn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();vn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var yn=vn;function wn(e){return(wn="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)}function bn(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)}}function En(e,t){return(En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=An(e);if(t){var i=An(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function An(e){return(An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&En(e,t)}(o,r.Component);var e,t,n=Mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmoji=function(t){var n=e.props,r=n.editorState,i=n.onChange,o=l.Modifier.replaceText(r.getCurrentContent(),r.getSelection(),t,r.getCurrentInlineStyle());i(l.EditorState.push(r,o,"insert-characters")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||yn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmoji,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&bn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Ln(){return i.a.createElement("div",{className:"rdw-spinner"},i.a.createElement("div",{className:"rdw-bounce1"}),i.a.createElement("div",{className:"rdw-bounce2"}),i.a.createElement("div",{className:"rdw-bounce3"}))}function kn(e){return(kn="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)}function Hn(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)}}function Sn(e,t){return(Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Vn(e);if(t){var i=Vn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Vn(e){return(Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(29),n(30);var On=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sn(e,t)}(o,r.Component);var e,t,n=_n(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={imgSrc:"",dragEnter:!1,uploadHighlighted:e.props.config.uploadEnabled&&!!e.props.config.uploadCallback,showImageLoading:!1,height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width,alt:""},e.onDragEnter=function(t){e.stopPropagation(t),e.setState({dragEnter:!0})},e.onImageDrop=function(t){var n,r;t.preventDefault(),t.stopPropagation(),e.setState({dragEnter:!1}),r=t.dataTransfer.items?(n=t.dataTransfer.items,!0):(n=t.dataTransfer.files,!1);for(var i=0;i<n.length;i+=1)if((!r||"file"===n[i].kind)&&n[i].type.match("^image/")){var o=r?n[i].getAsFile():n[i];e.uploadImage(o)}},e.showImageUploadOption=function(){e.setState({uploadHighlighted:!0})},e.addImageFromState=function(){var t=e.state,n=t.imgSrc,r=t.alt,i=e.state,o=i.height,a=i.width,l=e.props.onChange;isNaN(o)||(o+="px"),isNaN(a)||(a+="px"),l(n,o,a,r)},e.showImageURLOption=function(){e.setState({uploadHighlighted:!1})},e.toggleShowImageLoading=function(){var t=!e.state.showImageLoading;e.setState({showImageLoading:t})},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.selectImage=function(t){t.target.files&&0<t.target.files.length&&e.uploadImage(t.target.files[0])},e.uploadImage=function(t){e.toggleShowImageLoading(),(0,e.props.config.uploadCallback)(t).then(function(t){var n=t.data;e.setState({showImageLoading:!1,dragEnter:!1,imgSrc:n.link||n.url}),e.fileUpload=!1}).catch(function(){e.setState({showImageLoading:!1,dragEnter:!1})})},e.fileUploadClick=function(t){e.fileUpload=!0,t.stopPropagation()},e.stopPropagation=function(t){e.fileUpload?e.fileUpload=!1:(t.preventDefault(),t.stopPropagation())},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"renderAddImageModal",value:function(){var e=this.state,t=e.imgSrc,n=e.uploadHighlighted,r=e.showImageLoading,o=e.dragEnter,a=e.height,l=e.width,s=e.alt,c=this.props,u=c.config,f=u.popupClassName,h=u.uploadCallback,p=u.uploadEnabled,C=u.urlEnabled,m=u.previewImage,g=u.inputAccept,v=u.alt,y=c.doCollapse,w=c.translations;return i.a.createElement("div",{className:d()("rdw-image-modal",f),onClick:this.stopPropagation},i.a.createElement("div",{className:"rdw-image-modal-header"},p&&h&&i.a.createElement("span",{onClick:this.showImageUploadOption,className:"rdw-image-modal-header-option"},w["components.controls.image.fileUpload"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":n})})),C&&i.a.createElement("span",{onClick:this.showImageURLOption,className:"rdw-image-modal-header-option"},w["components.controls.image.byURL"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":!n})}))),n?i.a.createElement("div",{onClick:this.fileUploadClick},i.a.createElement("div",{onDragEnter:this.onDragEnter,onDragOver:this.stopPropagation,onDrop:this.onImageDrop,className:d()("rdw-image-modal-upload-option",{"rdw-image-modal-upload-option-highlighted":o})},i.a.createElement("label",{htmlFor:"file",className:"rdw-image-modal-upload-option-label"},m&&t?i.a.createElement("img",{src:t,alt:t,className:"rdw-image-modal-upload-option-image-preview"}):t||w["components.controls.image.dropFileText"])),i.a.createElement("input",{type:"file",id:"file",accept:g,onChange:this.selectImage,className:"rdw-image-modal-upload-option-input"})):i.a.createElement("div",{className:"rdw-image-modal-url-section"},i.a.createElement("input",{className:"rdw-image-modal-url-input",placeholder:w["components.controls.image.enterlink"],name:"imgSrc",onChange:this.updateValue,onBlur:this.updateValue,value:t}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),v.present&&i.a.createElement("div",{className:"rdw-image-modal-size"},i.a.createElement("span",{className:"rdw-image-modal-alt-lbl"},"Alt Text"),i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:s,name:"alt",className:"rdw-image-modal-alt-input",placeholder:"alt"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},v.mandatory&&"*")),i.a.createElement("div",{className:"rdw-image-modal-size"},"↕ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:a,name:"height",className:"rdw-image-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")," ↔ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:l,name:"width",className:"rdw-image-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",{className:"rdw-image-modal-btn-section"},i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:this.addImageFromState,disabled:!t||!a||!l||v.mandatory&&!s},w["generic.add"]),i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:y},w["generic.cancel"])),r?i.a.createElement("div",{className:"rdw-image-modal-spinner"},i.a.createElement(Ln,null)):void 0)}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-image-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-image-control"},i.a.createElement(I,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.image.image"]},i.a.createElement("img",{src:n,alt:""})),a?this.renderAddImageModal():void 0)}}])&&Hn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();On.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var zn=On;function Nn(e){return(Nn="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)}function Tn(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)}}function In(e,t){return(In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Zn(e);if(t){var i=Zn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Nn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Zn(e){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&In(e,t)}(o,r.Component);var e,t,n=Dn(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.addImage=function(e,n,r,i){var o=t.props,a=o.editorState,s=o.onChange,c={src:e,height:n,width:r};o.config.alt.present&&(c.alt=i);var d=a.getCurrentContent().createEntity("IMAGE","MUTABLE",c).getLastCreatedEntityKey();s(l.AtomicBlockUtils.insertAtomicBlock(a,d," ")),t.doCollapse()};var r=t.props.modalHandler;return t.state={expanded:!1},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||zn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addImage,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Tn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Rn(e){var t=e.config,n=e.onChange,r=e.translations,o=t.icon,a=t.className,l=t.title;return i.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},i.a.createElement(I,{className:d()(a),onClick:n,title:l||r["components.controls.remove.remove"]},i.a.createElement("img",{src:o,alt:""})))}jn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Bn=jn;n(31),Rn.propTypes={onChange:a.a.func,config:a.a.object,translations:a.a.object};var Pn=Rn;function Fn(e){return(Fn="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)}function Un(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)}}function qn(e,t){return(qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Qn(e);if(t){var i=Qn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Fn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Qn(e){return(Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qn(e,t)}(o,r.Component);var e,t,n=Wn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.removeInlineStyles=function(){var t=e.props,n=t.editorState;(0,t.onChange)(e.removeAllInlineStyles(n))},e.removeAllInlineStyles=function(e){var t=e.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(n){t=l.Modifier.removeInlineStyle(t,e.getSelection(),n)}),E(Object(s.getSelectionCustomInlineStyle)(e,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(n,r){r&&(t=l.Modifier.removeInlineStyle(t,e.getSelection(),r))}),l.EditorState.push(e,t,"change-inline-style")},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||Pn;return i.a.createElement(o,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Un(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Kn(e){return(Kn="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)}function Yn(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)}}function Xn(e,t){return(Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=$n(e);if(t){var i=$n(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function $n(e){return($n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Gn.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,config:a.a.object,translations:a.a.object,modalHandler:a.a.object},n(32);var er=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xn(e,t)}(o,r.Component);var e,t,n=Jn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t)},e}return e=o,(t=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations,f=t.options,h=t.undo,p=t.redo,C=t.className,m=t.dropdownClassName,g=t.title;return i.a.createElement(P,{className:d()("rdw-history-dropdown",C),optionWrapperClassName:d()(m),expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-history-control",title:g||u["components.controls.history.history"]},i.a.createElement("img",{src:x(t),alt:""}),0<=f.indexOf("undo")&&i.a.createElement(K,{value:"undo",onClick:this.onChange,disabled:s,className:d()("rdw-history-dropdownoption",h.className),title:h.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=f.indexOf("redo")&&i.a.createElement(K,{value:"redo",onClick:this.onChange,disabled:c,className:d()("rdw-history-dropdownoption",p.className),title:p.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:p.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,a=t.className,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations;return i.a.createElement("div",{className:d()("rdw-history-wrapper",a),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&i.a.createElement(I,{value:"undo",onClick:this.onChange,className:d()(r.className),disabled:s,title:r.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&i.a.createElement(I,{value:"redo",onClick:this.onChange,className:d()(o.className),disabled:c,title:o.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Yn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function tr(e){return(tr="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)}function nr(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)}}function rr(e,t){return(rr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ir(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=or(e);if(t){var i=or(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===tr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function or(e){return(or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}er.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var ar=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rr(e,t)}(o,r.Component);var e,t,n=ir(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=l.EditorState[e](r);o&&i(o)},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r={expanded:!(t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},i=e.editorState,a=e.modalHandler;return i&&(r.undoDisabled=0===i.getUndoStack().size,r.redoDisabled=0===i.getRedoStack().size),t.state=r,a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.undoDisabled,a=r.redoDisabled,l=r.expanded,s=t.component||er;return i.a.createElement(s,{config:t,translations:n,currentState:{undoDisabled:o,redoDisabled:a},expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&nr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ar.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var lr={inline:le,blockType:be,fontSize:ze,fontFamily:We,list:it,textAlign:mt,colorPicker:_t,link:Xt,embedded:fn,emoji:xn,image:Bn,remove:Gn,history:ar},sr=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,cr=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function dr(e){return String(e).replace(sr,"").match(cr)?e:"#"}function ur(e){return(ur="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)}function fr(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)}}function hr(e,t){return(hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Cr(e);if(t){var i=Cr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Cr(e){return(Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mr(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)}function gr(e){var t,n=e.showOpenOptionOnHover;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hr(e,t)}(a,r.Component);var e,t,o=pr(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={showPopOver:!1},e.openLink=function(){var t=e.props,n=t.entityKey,r=t.contentState.getEntity(n).getData().url,i=window.open(dr(r),"blank");i&&i.focus()},e.toggleShowPopOver=function(){var t=!e.state.showPopOver;e.setState({showPopOver:t})},e}return e=a,(t=[{key:"render",value:function(){var e=this.props,t=e.children,r=e.entityKey,o=e.contentState.getEntity(r).getData(),a=o.url,l=o.targetOption,s=this.state.showPopOver;return i.a.createElement("span",{className:"rdw-link-decorator-wrapper",onMouseEnter:this.toggleShowPopOver,onMouseLeave:this.toggleShowPopOver},i.a.createElement("a",{href:dr(a),target:l},t),s&&n?i.a.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuMDcyIDBIOC45MTVhLjkyNS45MjUgMCAwIDAgMCAxLjg0OWgyLjkyNUw2Ljk2MSA2LjcyN2EuOTE4LjkxOCAwIDAgMC0uMjcuNjU0YzAgLjI0Ny4wOTUuNDguMjcuNjU0YS45MTguOTE4IDAgMCAwIC42NTQuMjcuOTE4LjkxOCAwIDAgMCAuNjUzLS4yN2w0Ljg4LTQuODh2Mi45MjZhLjkyNS45MjUgMCAwIDAgMS44NDggMFYuOTI0QS45MjUuOTI1IDAgMCAwIDE0LjA3MiAweiIvPjxwYXRoIGQ9Ik0xMC42MjMgMTMuNDExSDEuNTg1VjQuMzcyaDYuNzk4bDEuNTg0LTEuNTg0SC43OTJBLjc5Mi43OTIgMCAwIDAgMCAzLjU4djEwLjYyNGMwIC40MzcuMzU1Ljc5Mi43OTIuNzkyaDEwLjYyNGEuNzkyLjc5MiAwIDAgMCAuNzkyLS43OTJWNS4wMjlsLTEuNTg1IDEuNTg0djYuNzk4eiIvPjwvZz48L3N2Zz4=",alt:"",onClick:this.openLink,className:"rdw-link-decorator-icon"}):void 0)}}])&&fr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}()).propTypes={entityKey:a.a.string.isRequired,children:a.a.array,contentState:a.a.object},t}function vr(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}n(33),n(34);var yr=vr(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getMentionComponent=function(){function e(e){var n=e.entityKey,r=e.children,o=e.contentState.getEntity(n).getData(),a=o.url,l=o.value;return i.a.createElement("a",{href:a||l,className:d()("rdw-mention-link",t)},r)}var t=n.className;return e.propTypes={entityKey:a.a.number,children:a.a.array,contentState:a.a.object},e},this.getMentionDecorator=function(){return{strategy:n.findMentionEntities,component:n.getMentionComponent()}},this.className=t});yr.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"MENTION"===n.getEntity(t).getType()},t)};var wr=yr;function br(e){return(br="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)}function Er(e,t){return(Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ar(e);if(t){var i=Ar(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===br(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ar(e){return(Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xr(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)}}function Lr(e,t,n){return t&&xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n(35);var Hr=Lr(function e(t){var n=this;kr(this,e),this.findSuggestionEntities=function(e,t){if(n.config.getEditorState()){var r=n.config,i=r.separator,o=r.trigger,a=r.getSuggestions,l=(0,r.getEditorState)().getSelection();if(l.get("anchorKey")===e.get("key")&&l.get("anchorKey")===l.get("focusKey")){var s=e.getText(),c=(s=s.substr(0,l.get("focusOffset")===s.length-1?s.length:l.get("focusOffset")+1)).lastIndexOf(i+o),d=i+o;if((void 0===c||c<0)&&s[0]===o&&(c=0,d=o),0<=c){var u=s.substr(c+d.length,s.length);a().some(function(e){return!!e.value&&(n.config.caseSensitive?0<=e.value.indexOf(u):0<=e.value.toLowerCase().indexOf(u&&u.toLowerCase()))})&&t(0===c?0:c+1,s.length)}}}},this.getSuggestionComponent=function(){var e,t=this.config;return(e=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Er(e,t)}(n,r.Component);var e=Mr(n);function n(){var r;kr(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=e.call.apply(e,[this].concat(o))).state={style:{left:15},activeOption:-1,showSuggestions:!0},r.onEditorKeyDown=function(e){var t=r.state.activeOption,n={};"ArrowDown"===e.key?(e.preventDefault(),t===r.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=t+1):"ArrowUp"===e.key?n.activeOption=t<=0?r.filteredSuggestions.length-1:t-1:"Escape"===e.key?(n.showSuggestions=!1,y()):"Enter"===e.key&&r.addMention(),r.setState(n)},r.onOptionMouseEnter=function(e){var t=e.target.getAttribute("data-index");r.setState({activeOption:t})},r.onOptionMouseLeave=function(){r.setState({activeOption:-1})},r.setSuggestionReference=function(e){r.suggestion=e},r.setDropdownReference=function(e){r.dropdown=e},r.closeSuggestionDropdown=function(){r.setState({showSuggestions:!1})},r.filteredSuggestions=[],r.filterSuggestions=function(e){var n=e.children[0].props.text.substr(1),i=t.getSuggestions();r.filteredSuggestions=i&&i.filter(function(e){return!n||0===n.length||(t.caseSensitive?0<=e.value.indexOf(n):0<=e.value.toLowerCase().indexOf(n&&n.toLowerCase()))})},r.addMention=function(){var e=r.state.activeOption,n=t.getEditorState(),i=t.onChange,o=t.separator,a=t.trigger,c=r.filteredSuggestions[e];c&&function(e,t,n,r,i){var o=i.value,a=i.url,c=e.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(r).concat(o),value:o,url:a}).getLastCreatedEntityKey(),d=Object(s.getSelectedBlock)(e).getText(),u=e.getSelection().focusOffset,f=(d.lastIndexOf(n+r,u)||0)+1,h=!1;d.length===f+1&&(u=d.length)," "===d[u]&&(h=!0);var p=e.getSelection().merge({anchorOffset:f,focusOffset:u}),C=l.EditorState.acceptSelection(e,p),m=l.Modifier.replaceText(C.getCurrentContent(),p,"".concat(r).concat(o),C.getCurrentInlineStyle(),c);C=l.EditorState.push(C,m,"insert-characters"),h||(p=C.getSelection().merge({anchorOffset:f+o.length+r.length,focusOffset:f+o.length+r.length}),C=l.EditorState.acceptSelection(C,p),m=l.Modifier.insertText(C.getCurrentContent(),p," ",C.getCurrentInlineStyle(),void 0)),t(l.EditorState.push(C,m,"insert-characters"))}(n,i,o,a,c)},r}return Lr(n,[{key:"componentDidMount",value:function(){var e,n,r,i=t.getWrapperRef().getBoundingClientRect(),o=this.suggestion.getBoundingClientRect(),a=this.dropdown.getBoundingClientRect();i.width<o.left-i.left+a.width?n=15:e=15,i.bottom<a.bottom&&(r=0),this.setState({style:{left:e,right:n,bottom:r}}),g.registerCallBack(this.onEditorKeyDown),v(),t.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.filterSuggestions(this.props)}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.filterSuggestions(e),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){g.deregisterCallBack(this.onEditorKeyDown),y(),t.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this,n=this.props.children,r=this.state,o=r.activeOption,a=r.showSuggestions,l=t.dropdownClassName,s=t.optionClassName;return i.a.createElement("span",{className:"rdw-suggestion-wrapper",ref:this.setSuggestionReference,onClick:t.modalHandler.onSuggestionClick,"aria-haspopup":"true","aria-label":"rdw-suggestion-popup"},i.a.createElement("span",null,n),a&&i.a.createElement("span",{className:d()("rdw-suggestion-dropdown",l),contentEditable:"false",suppressContentEditableWarning:!0,style:this.state.style,ref:this.setDropdownReference},this.filteredSuggestions.map(function(t,n){return i.a.createElement("span",{key:n,spellCheck:!1,onClick:e.addMention,"data-index":n,onMouseEnter:e.onOptionMouseEnter,onMouseLeave:e.onOptionMouseLeave,className:d()("rdw-suggestion-option",s,{"rdw-suggestion-option-active":n===o})},t.text)})))}}]),n}()).propTypes={children:a.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:n.findSuggestionEntities,component:n.getSuggestionComponent()}};var o=t.separator,c=t.trigger,u=t.getSuggestions,f=t.onChange,h=t.getEditorState,p=t.getWrapperRef,C=t.caseSensitive,m=t.dropdownClassName,w=t.optionClassName,b=t.modalHandler;this.config={separator:o,trigger:c,getSuggestions:u,onChange:f,getEditorState:h,getWrapperRef:p,caseSensitive:C,dropdownClassName:m,optionClassName:w,modalHandler:b}}),Sr=function(e){return[new wr(e.mentionClassName).getMentionDecorator(),new Hr(e).getSuggestionDecorator()]};function _r(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function Vr(e){var t=e.block,n=e.contentState.getEntity(t.getEntityAt(0)).getData(),r=n.src,o=n.height,a=n.width;return i.a.createElement("iframe",{height:o,width:a,src:r,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}n(36);var Or=_r(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getHashtagComponent=function(){function e(e){var n=e.children,r=n[0].props.text;return i.a.createElement("a",{href:r,className:d()("rdw-hashtag-link",t)},n)}var t=n.className;return e.propTypes={children:a.a.object},e},this.findHashtagEntities=function(e,t){for(var r=e.getText(),i=0,o=0;0<r.length&&0<=i;)if(r[0]===n.hashCharacter?(o=i=0,r=r.substr(n.hashCharacter.length)):0<=(i=r.indexOf(n.separator+n.hashCharacter))&&(r=r.substr(i+(n.separator+n.hashCharacter).length),o+=i+n.separator.length),0<=i){var a=0<=r.indexOf(n.separator)?r.indexOf(n.separator):r.length,l=r.substr(0,a);l&&0<l.length&&(t(o,o+l.length+n.hashCharacter.length),o+=n.hashCharacter.length)}},this.getHashtagDecorator=function(){return{strategy:n.findHashtagEntities,component:n.getHashtagComponent()}},this.className=t.className,this.hashCharacter=t.hashCharacter||"#",this.separator=t.separator||" "}),zr=function(e){return new Or(e).getHashtagDecorator()};Vr.propTypes={block:a.a.object,contentState:a.a.object};var Nr=Vr;function Tr(e){return(Tr="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)}function Ir(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)}}function Dr(e,t){return(Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Zr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=jr(e);if(t){var i=jr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Tr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(37);var Rr=function(e){var t;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dr(e,t)}(a,r.Component);var t,n,o=Zr(a);function a(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=o.call.apply(o,[this].concat(r))).state={hovered:!1},t.setEntityAlignmentLeft=function(){t.setEntityAlignment("left")},t.setEntityAlignmentRight=function(){t.setEntityAlignment("right")},t.setEntityAlignmentCenter=function(){t.setEntityAlignment("none")},t.setEntityAlignment=function(n){var r=t.props,i=r.block,o=r.contentState,a=i.getEntityAt(0);o.mergeEntityData(a,{alignment:n}),e.onChange(l.EditorState.push(e.getEditorState(),o,"change-block-data")),t.setState({dummy:!0})},t.toggleHovered=function(){var e=!t.state.hovered;t.setState({hovered:e})},t}return t=a,(n=[{key:"renderAlignmentOptions",value:function(e){return i.a.createElement("div",{className:d()("rdw-image-alignment-options-popup",{"rdw-image-alignment-options-popup-right":"right"===e})},i.a.createElement(I,{onClick:this.setEntityAlignmentLeft,className:"rdw-image-alignment-option"},"L"),i.a.createElement(I,{onClick:this.setEntityAlignmentCenter,className:"rdw-image-alignment-option"},"C"),i.a.createElement(I,{onClick:this.setEntityAlignmentRight,className:"rdw-image-alignment-option"},"R"))}},{key:"render",value:function(){var t=this.props,n=t.block,r=t.contentState,o=this.state.hovered,a=e.isReadOnly,l=e.isImageAlignmentEnabled,s=r.getEntity(n.getEntityAt(0)).getData(),c=s.src,u=s.alignment,f=s.height,h=s.width,p=s.alt;return i.a.createElement("span",{onMouseEnter:this.toggleHovered,onMouseLeave:this.toggleHovered,className:d()("rdw-image-alignment",{"rdw-image-left":"left"===u,"rdw-image-right":"right"===u,"rdw-image-center":!u||"none"===u})},i.a.createElement("span",{className:"rdw-image-imagewrapper"},i.a.createElement("img",{src:c,alt:p,style:{height:f,width:h}}),!a()&&o&&l()?this.renderAlignmentOptions(u):void 0))}}])&&Ir(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}()).propTypes={block:a.a.object,contentState:a.a.object},t},Br=function(e,t){return function(n){if("function"==typeof t){var r=t(n,e,e.getEditorState);if(r)return r}if("atomic"===n.getType()){var i=e.getEditorState().getCurrentContent().getEntity(n.getEntityAt(0));if(i&&"IMAGE"===i.type)return{component:Rr(e),editable:!1};if(i&&"EMBEDDED_LINK"===i.type)return{component:Nr,editable:!1}}}},Pr={options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","embedded","emoji","image","remove","history"],inline:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["bold","italic","underline","strikethrough","monospace","superscript","subscript"],bold:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuMjM2IDBjMS42NTIgMCAyLjk0LjI5OCAzLjg2Ni44OTMuOTI1LjU5NSAxLjM4OCAxLjQ4NSAxLjM4OCAyLjY2OSAwIC42MDEtLjE3MyAxLjEzOS0uNTE2IDEuNjEtLjM0My40NzQtLjg0NC44My0xLjQ5OSAxLjA2OC44NDMuMTY3IDEuNDc0LjUyMyAxLjg5NSAxLjA3MS40MTkuNTUuNjMgMS4xODMuNjMgMS45MDMgMCAxLjI0NS0uNDQ0IDIuMTg3LTEuMzMgMi44MjUtLjg4Ni42NDEtMi4xNDQuOTYxLTMuNzY5Ljk2MUgwdi0yLjE2N2gxLjQ5NFYyLjE2N0gwVjBoNi4yMzZ6TTQuMzA4IDUuNDQ2aDIuMDI0Yy43NTIgMCAxLjMzLS4xNDMgMS43MzQtLjQzLjQwNS0uMjg1LjYwOC0uNzAxLjYwOC0xLjI1IDAtLjYtLjIwNC0xLjA0NC0uNjEyLTEuMzMtLjQwOC0uMjg2LTEuMDE2LS40MjctMS44MjYtLjQyN0g0LjMwOHYzLjQzN3ptMCAxLjgwNFYxMWgyLjU5M2MuNzQ3IDAgMS4zMTQtLjE1MiAxLjcwNy0uNDUyLjM5LS4zLjU4OC0uNzQ1LjU4OC0xLjMzNCAwLS42MzYtLjE2OC0xLjEyNC0uNS0xLjQ2LS4zMzYtLjMzNS0uODY0LS41MDQtMS41ODItLjUwNEg0LjMwOHoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},italic:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTcgM1YyaDR2MUg5Ljc1M2wtMyAxMEg4djFINHYtMWgxLjI0N2wzLTEwSDd6Ii8+PC9zdmc+",className:void 0,title:void 0},underline:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTYuMDQ1IDJ2Ljk5Mkw0Ljc4NSAzdjUuMTcyYzAgLjg1OS4yNDMgMS41MTIuNzI3IDEuOTU3czEuMTI0LjY2OCAxLjkxOC42NjhjLjgzNiAwIDEuNTA5LS4yMjEgMi4wMTktLjY2NC41MTEtLjQ0Mi43NjYtMS4wOTYuNzY2LTEuOTYxVjNsLTEuMjYtLjAwOFYySDEzdi45OTJMMTEuNzM5IDN2NS4xNzJjMCAxLjIzNC0uMzk4IDIuMTgxLTEuMTk1IDIuODQtLjc5Ny42NTktMS44MzUuOTg4LTMuMTE0Ljk4OC0xLjI0MiAwLTIuMjQ4LS4zMjktMy4wMTctLjk4OC0uNzY5LS42NTktMS4xNTItMS42MDUtMS4xNTItMi44NFYzTDIgMi45OTJWMmg0LjA0NXpNMiAxM2gxMXYxSDJ6Ii8+PC9zdmc+",className:void 0,title:void 0},strikethrough:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4wNCA1Ljk1NGg2LjIxNWE3LjQxMiA3LjQxMiAwIDAgMC0uNzk1LS40MzggMTEuOTA3IDExLjkwNyAwIDAgMC0xLjQ0Ny0uNTU3Yy0xLjE4OC0uMzQ4LTEuOTY2LS43MTEtMi4zMzQtMS4wODgtLjM2OC0uMzc3LS41NTItLjc3LS41NTItMS4xODEgMC0uNDk1LjE4Ny0uOTA2LjU2LTEuMjMyLjM4LS4zMzEuODg3LS40OTcgMS41MjMtLjQ5Ny42OCAwIDEuMjY2LjI1NSAxLjc1Ny43NjcuMjk1LjMxNS41ODIuODkxLjg2MSAxLjczbC4xMTcuMDE2LjcwMy4wNS4xLS4wMjRjLjAyOC0uMTUyLjA0Mi0uMjc5LjA0Mi0uMzggMC0uMzM3LS4wMzktLjg1Mi0uMTE3LTEuNTQ0YTkuMzc0IDkuMzc0IDAgMCAwLS4xNzYtLjk5NUM5Ljg4LjM3OSA5LjM4NS4yNDQgOS4wMTcuMTc2IDguMzY1LjA3IDcuODk5LjAxNiA3LjYyLjAxNmMtMS40NSAwLTIuNTQ1LjM1Ny0zLjI4NyAxLjA3MS0uNzQ3LjcyLTEuMTIgMS41ODktMS4xMiAyLjYwNyAwIC41MTEuMTMzIDEuMDQuNCAxLjU4Ni4xMjkuMjUzLjI3LjQ3OC40MjcuNjc0ek04LjI4IDguMTE0Yy41NzUuMjM2Ljk1Ny40MzYgMS4xNDcuNTk5LjQ1MS40MS42NzcuODUyLjY3NyAxLjMyNCAwIC4zODMtLjEzLjc0NS0uMzkzIDEuMDg4LS4yNS4zMzgtLjU5LjU4LTEuMDIuNzI2YTMuNDE2IDMuNDE2IDAgMCAxLTEuMTYzLjIyOGMtLjQwNyAwLS43NzUtLjA2Mi0xLjEwNC0uMTg2YTIuNjk2IDIuNjk2IDAgMCAxLS44NzgtLjQ4IDMuMTMzIDMuMTMzIDAgMCAxLS42Ny0uNzk0IDEuNTI3IDEuNTI3IDAgMCAxLS4xMDQtLjIyNyA1Ny41MjMgNTcuNTIzIDAgMCAwLS4xODgtLjQ3MyAyMS4zNzEgMjEuMzcxIDAgMCAwLS4yNTEtLjU5OWwtLjg1My4wMTd2LjM3MWwtLjAxNy4zMTNhOS45MiA5LjkyIDAgMCAwIDAgLjU3M2MuMDExLjI3LjAxNy43MDkuMDE3IDEuMzE2di4xMWMwIC4wNzkuMDIyLjE0LjA2Ny4xODUuMDgzLjA2OC4yODQuMTQ3LjYwMi4yMzdsMS4xNy4zMzdjLjQ1Mi4xMy45OTYuMTk0IDEuNjMyLjE5NC42ODYgMCAxLjI1Mi0uMDU5IDEuNjk4LS4xNzdhNC42OTQgNC42OTQgMCAwIDAgMS4yOC0uNTU3Yy40MDEtLjI1OS43MDUtLjQ4Ni45MTEtLjY4My4yNjgtLjI3Ni40NjYtLjU2OC41OTQtLjg3OGE0Ljc0IDQuNzQgMCAwIDAgLjM0My0xLjc4OGMwLS4yOTgtLjAyLS41NTctLjA1OC0uNzc2SDguMjgxek0xNC45MTQgNi41N2EuMjYuMjYgMCAwIDAtLjE5My0uMDc2SC4yNjhhLjI2LjI2IDAgMCAwLS4xOTMuMDc2LjI2NC4yNjQgMCAwIDAtLjA3NS4xOTR2LjU0YzAgLjA3OS4wMjUuMTQzLjA3NS4xOTRhLjI2LjI2IDAgMCAwIC4xOTMuMDc2SDE0LjcyYS4yNi4yNiAwIDAgMCAuMTkzLS4wNzYuMjY0LjI2NCAwIDAgMCAuMDc1LS4xOTR2LS41NGEuMjY0LjI2NCAwIDAgMC0uMDc1LS4xOTR6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},monospace:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzQ0NCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS4wMjEgMi45MDZjLjE4NiAxLjIxOS4zNzIgMS41LjM3MiAyLjcxOUMxLjM5MyA2LjM3NSAwIDcuMDMxIDAgNy4wMzF2LjkzOHMxLjM5My42NTYgMS4zOTMgMS40MDZjMCAxLjIxOS0uMTg2IDEuNS0uMzcyIDIuNzE5Qy43NDMgMTQuMDYzIDEuNzY0IDE1IDIuNjkzIDE1aDEuOTV2LTEuODc1cy0xLjY3Mi4xODgtMS42NzItLjkzOGMwLS44NDMuMTg2LS44NDMuMzcyLTIuNzE4LjA5My0uODQ0LS40NjQtMS41LTEuMDIyLTEuOTY5LjU1OC0uNDY5IDEuMTE1LTEuMDMxIDEuMDIyLTEuODc1QzMuMDY0IDMuNzUgMi45NyAzLjc1IDIuOTcgMi45MDZjMC0xLjEyNSAxLjY3Mi0xLjAzMSAxLjY3Mi0xLjAzMVYwaC0xLjk1QzEuNjcgMCAuNzQzLjkzOCAxLjAyIDIuOTA2ek0xMS45NzkgMi45MDZjLS4xODYgMS4yMTktLjM3MiAxLjUtLjM3MiAyLjcxOSAwIC43NSAxLjM5MyAxLjQwNiAxLjM5MyAxLjQwNnYuOTM4cy0xLjM5My42NTYtMS4zOTMgMS40MDZjMCAxLjIxOS4xODYgMS41LjM3MiAyLjcxOS4yNzggMS45NjktLjc0MyAyLjkwNi0xLjY3MiAyLjkwNmgtMS45NXYtMS44NzVzMS42NzIuMTg4IDEuNjcyLS45MzhjMC0uODQzLS4xODYtLjg0My0uMzcyLTIuNzE4LS4wOTMtLjg0NC40NjQtMS41IDEuMDIyLTEuOTY5LS41NTgtLjQ2OS0xLjExNS0xLjAzMS0xLjAyMi0xLjg3NS4xODYtMS44NzUuMzcyLTEuODc1LjM3Mi0yLjcxOSAwLTEuMTI1LTEuNjcyLTEuMDMxLTEuNjcyLTEuMDMxVjBoMS45NWMxLjAyMiAwIDEuOTUuOTM4IDEuNjcyIDIuOTA2eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},superscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMzA1IDEwLjE2NUwxMS44NjUgMTVIOS4wNTdsLTMuMTkyLTMuNTM2TDIuNzQ2IDE1SDBsNC41MjMtNC44MzVMLjIxOCA1LjYwM2gyLjc3TDUuOTg2IDguOTEgOS4wMSA1LjYwM2gyLjY0OWwtNC4zNTQgNC41NjJ6bTYuMjM0LTMuMjY5bDEuODc5LTEuMzA2Yy42NC0uNDE2IDEuMDYyLS44MDEgMS4yNjQtMS4xNTcuMjAxLS4zNTYuMzAyLS43MzguMzAyLTEuMTQ4IDAtLjY2OS0uMjM3LTEuMjEtLjcxLTEuNjItLjQ3NC0uNDExLTEuMDk3LS42MTctMS44NjgtLjYxNy0uNzQ0IDAtMS4zNC4yMDgtMS43ODUuNjI0LS40NDcuNDE2LS42NyAxLjA0My0uNjcgMS44ODFoMS40MzZjMC0uNS4wOTQtLjg0Ni4yODEtMS4wMzguMTg4LS4xOTEuNDQ1LS4yODcuNzcyLS4yODdzLjU4NS4wOTcuNzc3LjI5MmMuMTkuMTk1LjI4Ni40MzcuMjg2LjcyNiAwIC4yOS0uMDg5LjU1LS4yNjYuNzg1cy0uNjcuNjI4LTEuNDc5IDEuMTg0Yy0uNjkxLjQ3Ny0xLjYyNy45MjctMS45MDggMS4zNWwuMDE0IDEuNTY5SDE3VjYuODk2aC0zLjQ2MXoiLz48L3N2Zz4=",className:void 0,title:void 0},subscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExLjg2NiAxMS42NDZIOS4wNkw1Ljg2NyA3Ljk0MmwtMy4xMjEgMy43MDRIMGw0LjUyNC01LjA2NEwuMjE4IDEuODA0aDIuNzdsMyAzLjQ2NCAzLjAyMy0zLjQ2NGgyLjY1TDcuMzA2IDYuNTgybDQuNTYgNS4wNjR6bTEuNzI1IDIuMDU4bDEuODI3LTEuMzY4Yy42NC0uNDM1IDEuMDYyLS44NCAxLjI2NC0xLjIxMi4yMDItLjM3Mi4zMDItLjc3My4zMDItMS4yMDIgMC0uNy0uMjM3LTEuMjY2LS43MS0xLjY5Ni0uNDc0LS40MzEtMS4wOTctLjY0Ni0xLjg2OS0uNjQ2LS43NDQgMC0xLjM0LjIxOC0xLjc4NS42NTMtLjQ0Ni40MzYtLjY3IDEuMDkyLS42NyAxLjk3aDEuNDM2YzAtLjUyNC4wOTQtLjg4Ni4yODEtMS4wODcuMTg4LS4yLjQ0NS0uMzAxLjc3Mi0uMzAxcy41ODYuMTAyLjc3Ny4zMDZjLjE5LjIwNC4yODYuNDU4LjI4Ni43NiAwIC4zMDMtLjA4OC41NzctLjI2Ni44MjItLjE3Ny4yNDUtLjY3LjY1OC0xLjQ3OCAxLjI0LS42OTIuNS0xLjYyOC45NzEtMS45MSAxLjQxM0wxMS44NjQgMTVIMTd2LTEuMjk2aC0zLjQxeiIvPjwvc3ZnPg==",className:void 0,title:void 0}},blockType:{inDropdown:!0,options:["Normal","H1","H2","H3","H4","H5","H6","Blockquote","Code"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontSize:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuOTIxIDMuMTE5YS40MjcuNDI3IDAgMCAwIC4zMzUuMTY0aC45N2EuNDI2LjQyNiAwIDAgMCAuMzA0LS4xMy40NDEuNDQxIDAgMCAwIC4xMjUtLjMxbC4wMDItMi40MWEuNDM0LjQzNCAwIDAgMC0uNDMtLjQzMkguNDNBLjQzNC40MzQgMCAwIDAgMCAuNDR2Mi40MDZjMCAuMjQyLjE5Mi40MzguNDMuNDM4aC45N2MuMTMgMCAuMjU0LS4wNi4zMzUtLjE2NWwuNzMtLjkzSDUuNTR2MTEuMzZjMCAuMjQxLjE5Mi40MzcuNDMuNDM3aDEuNzE3Yy4yMzcgMCAuNDMtLjE5Ni40My0uNDM3VjIuMTg4aDMuMDdsLjczNC45MzF6TTEzLjg5OCAxMS4yNjNhLjQyNS40MjUgMCAwIDAtLjQ4Mi0uMTQ2bC0uNTQ3LjE5NFY5LjYxN2EuNDQyLjQ0MiAwIDAgMC0uMTI2LS4zMS40MjYuNDI2IDAgMCAwLS4zMDQtLjEyN2gtLjQyOWEuNDM0LjQzNCAwIDAgMC0uNDMuNDM3djEuNjk0bC0uNTQ3LS4xOTRhLjQyNS40MjUgMCAwIDAtLjQ4MS4xNDYuNDQ0LjQ0NCAwIDAgMC0uMDE2LjUxMmwxLjMzMiAyLjAxN2EuNDI3LjQyNyAwIDAgMCAuNzEzIDBsMS4zMzMtMi4wMTdhLjQ0NC40NDQgMCAwIDAtLjAxNi0uNTEyeiIvPjwvZz48L3N2Zz4=",options:[8,9,10,11,12,14,16,18,24,30,36,48,60,72,96],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontFamily:{options:["Arial","Georgia","Impact","Tahoma","Times New Roman","Verdana"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},list:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["unordered","ordered","indent","outdent"],unordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS43MiAzLjQyN2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3LjAxIDEuNzIuMDFDLjc3LjAwOCAwIC43NzUgMCAxLjcxNWMwIC45NC43NzQgMS43MTEgMS43MiAxLjcxMXptMC0yLjYyNWMuNTEgMCAuOTIyLjQxMi45MjIuOTE0YS45Mi45MiAwIDAgMS0xLjg0MiAwIC45Mi45MiAwIDAgMSAuOTItLjkxNHpNMS43MiA4LjcwM2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3IDUuMjg3IDEuNzIgNS4yODdDLjc3IDUuMjg3IDAgNi4wNTIgMCA2Ljk5NXMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjJjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAwIDEtMS44NDIgMGMwLS41MDUuNDE1LS45MTQuOTItLjkxNHpNMS43MiAxMy45ODJjLjk1MSAwIDEuNzIyLS43NjggMS43MjItMS43MDggMC0uOTQzLS43NzQtMS43MDgtMS43MjEtMS43MDgtLjk0NyAwLTEuNzIxLjc2OC0xLjcyMSAxLjcwOHMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjVjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAxIDEtMS44NDIgMCAuOTIuOTIgMCAwIDEgLjkyLS45MTR6TTUuNzQ0IDIuMTE1aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OS40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDcuMzk0aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOThINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OC40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDEyLjY3aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjQuNC40IDAgMCAwIC40MDIuMzk4eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},ordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4yMDIgMS40NjZoOC4xNWMuMzM4IDAgLjYxMi0uMzIyLjYxMi0uNzIgMC0uMzk3LS4yNzQtLjcyLS42MTItLjcyaC04LjE1Yy0uMzM4IDAtLjYxMS4zMjMtLjYxMS43MiAwIC4zOTguMjczLjcyLjYxLjcyek0xMi4zNTIgNS43ODNoLTguMTVjLS4zMzggMC0uNjExLjMyMi0uNjExLjcyIDAgLjM5Ny4yNzMuNzIuNjEuNzJoOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5OC0uMjc0LS43Mi0uNjEyLS43MnpNMTIuMzUyIDExLjU0aC04LjE1Yy0uMzM4IDAtLjYxMS4zMjItLjYxMS43MiAwIC4zOTYuMjczLjcxOS42MS43MTloOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5Ny0uMjc0LS43Mi0uNjEyLS43MnpNLjc2NyAxLjI0OXYxLjgwMmMwIC4xOTUuMTM2LjM0My4zMTUuMzQzLjE3NiAwIC4zMTUtLjE1LjMxNS0uMzQzVi4zNTZjMC0uMTktLjEzMy0uMzM5LS4zMDItLjMzOS0uMTQ4IDAtLjIyMy4xMTgtLjI0Ny4xNTZhLjIyOC4yMjggMCAwIDAtLjAwMy4wMDVMLjU3OS42MjFhLjQ3NC40NzQgMCAwIDAtLjA5OC4yNzNjMCAuMTk0LjEyOC4zNTEuMjg2LjM1NXpNLjM1MiA4LjE5SDEuNTVjLjE1NyAwIC4yODUtLjE2Mi4yODUtLjM2MiAwLS4xOTgtLjEyOC0uMzU5LS4yODUtLjM1OUguNjh2LS4wMDZjMC0uMTA3LjIxLS4yODEuMzc4LS40MjIuMzM2LS4yNzguNzUzLS42MjUuNzUzLTEuMjI2IDAtLjU3LS4zNzYtMS0uODc0LTEtLjQ3NyAwLS44MzYuMzg1LS44MzYuODk3IDAgLjI5Ny4xNjQuNDAyLjMwNS40MDIuMiAwIC4zMjEtLjE3Ni4zMjEtLjM0NiAwLS4xMDYuMDIzLS4yMjguMjA0LS4yMjguMjQzIDAgLjI1LjI1NC4yNS4yODMgMCAuMjI4LS4yNTIuNDQyLS40OTUuNjQ5LS4zMDEuMjU1LS42NDIuNTQ0LS42NDIuOTkydi4zODRjMCAuMjA1LjE1OS4zNDMuMzA4LjM0M3pNMS43NyAxMC41NDNjMC0uNTkyLS4yOTYtLjkzMS0uODE0LS45MzEtLjY4IDAtLjg1OS41Ny0uODU5Ljg3MiAwIC4zNTEuMjIyLjM5LjMxOC4zOS4xODUgMCAuMzEtLjE0OC4zMS0uMzY2IDAtLjA4NC4wMjYtLjE4MS4yMjQtLjE4MS4xNDIgMCAuMi4wMjQuMi4yNjcgMCAuMjM3LS4wNDMuMjYzLS4yMTMuMjYzLS4xNjQgMC0uMjg4LjE1Mi0uMjg4LjM1NCAwIC4yLjEyNS4zNS4yOTEuMzUuMjI1IDAgLjI3LjEwOC4yNy4yODN2LjA3NWMwIC4yOTQtLjA5Ny4zNS0uMjc3LjM1LS4yNDggMC0uMjY3LS4xNS0uMjY3LS4xOTcgMC0uMTc0LS4wOTgtLjM1LS4zMTctLjM1LS4xOTIgMC0uMzA3LjE0MS0uMzA3LjM3OCAwIC40My4zMTMuODg4Ljg5NS44ODguNTY0IDAgLjkwMS0uNC45MDEtMS4wN3YtLjA3NGMwLS4yNzQtLjA3NC0uNTAyLS4yMTQtLjY2Ni4wOTYtLjE2My4xNDgtLjM4LjE0OC0uNjM1eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},indent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS43MTYgMy4yMTFIMTd2MS4xOTdINS43MTZ6TTAgLjAyaDE3djEuMTk3SDB6TTAgMTIuNzgzaDE3djEuMTk3SDB6TTUuNzE2IDkuNTkzSDE3djEuMTk3SDUuNzE2ek01LjcxNiA2LjQwMkgxN3YxLjE5N0g1LjcxNnpNLjE4NyA5LjQ5MUwyLjUyIDcgLjE4NyA0LjUwOXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},outdent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS4zOTYgMy4xOTNoMTAuNTczVjQuMzlINS4zOTZ6TS4wMzkuMDAzaDE1LjkzVjEuMkguMDM5ek0uMDM5IDEyLjc2NmgxNS45M3YxLjE5N0guMDM5ek01LjM5NiA5LjU3NWgxMC41NzN2MS4xOTdINS4zOTZ6TTUuMzk2IDYuMzg0aDEwLjU3M3YxLjE5N0g1LjM5NnpNMi4xODcgNC40OTFMMCA2Ljk4M2wyLjE4NyAyLjQ5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},title:void 0},textAlign:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["left","center","right","justify"],left:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNOC40OTMgMTQuODg3SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4IDEwLjE2MkguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1M2gxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUzek04LjQ5MyA1LjQzNUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOC43MDlILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTJoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},center:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNTU2IDE0Ljg4N0gzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTggMTAuMTYySC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUzaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6TTExLjU1NiA1LjQzNUgzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTguNzA5SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTJ6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},right:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjE4IDE0Ljg4N0g2LjQ1YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOCAxMC4xNjJILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTNoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1M3pNMTQuNjE4IDUuNDM1SDYuNDVhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4LjcwOUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1MmgxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyeiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},justify:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjIgMTQuODg4SC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgMTAuMTYySC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgNS40MzZILjMyNWEuMzI2LjMyNiAwIDAgMSAwLS42NTJIMTQuNjJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42Mi43MUguMzI1YS4zMjYuMzI2IDAgMCAxIDAtLjY1M0gxNC42MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},title:void 0},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",className:void 0,component:void 0,popupClassName:void 0,colors:["rgb(97,189,109)","rgb(26,188,156)","rgb(84,172,210)","rgb(44,130,201)","rgb(147,101,184)","rgb(71,85,119)","rgb(204,204,204)","rgb(65,168,95)","rgb(0,168,133)","rgb(61,142,185)","rgb(41,105,176)","rgb(85,57,130)","rgb(40,50,78)","rgb(0,0,0)","rgb(247,218,100)","rgb(251,160,38)","rgb(235,107,86)","rgb(226,80,65)","rgb(163,143,132)","rgb(239,239,239)","rgb(255,255,255)","rgb(250,197,28)","rgb(243,121,52)","rgb(209,72,65)","rgb(184,49,47)","rgb(124,112,107)","rgb(209,213,216)"],title:void 0},link:{inDropdown:!1,className:void 0,component:void 0,popupClassName:void 0,dropdownClassName:void 0,showOpenOptionOnHover:!0,defaultTargetOption:"_self",options:["link","unlink"],link:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjk2Ny45NUEzLjIyNiAzLjIyNiAwIDAgMCAxMS42Ny4wMDJjLS44NyAwLTEuNjg2LjMzNy0yLjI5Ny45NDhMNy4xMDUgMy4yMThBMy4yNDcgMy4yNDcgMCAwIDAgNi4yNCA2LjI0YTMuMjI1IDMuMjI1IDAgMCAwLTMuMDIyLjg2NUwuOTUgOS4zNzNhMy4yNTMgMy4yNTMgMCAwIDAgMCA0LjU5NCAzLjIyNiAzLjIyNiAwIDAgMCAyLjI5Ny45NDhjLjg3IDAgMS42ODYtLjMzNiAyLjI5OC0uOTQ4TDcuODEyIDExLjdhMy4yNDcgMy4yNDcgMCAwIDAgLjg2NS0zLjAyMyAzLjIyNSAzLjIyNSAwIDAgMCAzLjAyMi0uODY1bDIuMjY4LTIuMjY3YTMuMjUyIDMuMjUyIDAgMCAwIDAtNC41OTV6TTcuMTA1IDEwLjk5M0w0LjgzNyAxMy4yNmEyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NSAyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LS42NTUgMi4yNTIgMi4yNTIgMCAwIDEgMC0zLjE4bDIuMjY4LTIuMjY4YTIuMjMyIDIuMjMyIDAgMCAxIDEuNTktLjY1NWMuNDMgMCAuODQxLjEyIDEuMTk1LjM0M0w0Ljc3MiA5LjQzOGEuNS41IDAgMSAwIC43MDcuNzA3bDEuOTM5LTEuOTM4Yy41NDUuODY4LjQ0MiAyLjAzLS4zMTMgMi43ODV6bTYuMTU1LTYuMTU1bC0yLjI2OCAyLjI2N2EyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NWMtLjQzMSAwLS44NDEtLjEyLTEuMTk1LS4zNDNsMS45MzgtMS45MzhhLjUuNSAwIDEgMC0uNzA3LS43MDdMNy40OTkgNi43MWEyLjI1MiAyLjI1MiAwIDAgMSAuMzEzLTIuNzg1bDIuMjY3LTIuMjY4YTIuMjMzIDIuMjMzIDAgMCAxIDEuNTktLjY1NSAyLjIzMyAyLjIzMyAwIDAgMSAyLjI0NiAyLjI0NWMwIC42MDMtLjIzMiAxLjE2OC0uNjU1IDEuNTl6IiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",className:void 0,title:void 0},unlink:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTMuOTU2IDEuMDM3YTMuNTUgMy41NSAwIDAgMC01LjAxNCAwTDYuNDM2IDMuNTQ0YS41NDUuNTQ1IDAgMSAwIC43Ny43N2wyLjUwOC0yLjUwNmEyLjQzOCAyLjQzOCAwIDAgMSAxLjczNS0uNzE1Yy42NTggMCAxLjI3NS4yNTQgMS43MzYuNzE1LjQ2LjQ2MS43MTUgMS4wNzguNzE1IDEuNzM2IDAgLjY1OC0uMjU0IDEuMjc0LS43MTUgMS43MzVMOS45MDcgOC41NThhMi40NTggMi40NTggMCAwIDEtMy40NzIgMCAuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3MSAzLjUzNCAzLjUzNCAwIDAgMCAyLjUwNyAxLjAzN2MuOTA4IDAgMS44MTYtLjM0NiAyLjUwNy0xLjAzN2wzLjI3OC0zLjI3OGEzLjUyIDMuNTIgMCAwIDAgMS4wMzUtMi41MDdjMC0uOTUtLjM2Ny0xLjg0LTEuMDM1LTIuNTA3eiIvPjxwYXRoIGQ9Ik03LjQgMTEuMDY1bC0yLjEyMiAyLjEyYTIuNDM3IDIuNDM3IDAgMCAxLTEuNzM1LjcxNiAyLjQzNyAyLjQzNyAwIDAgMS0xLjczNi0uNzE1IDIuNDU3IDIuNDU3IDAgMCAxIDAtMy40NzFsMy4wODYtMy4wODZhMi40MzggMi40MzggMCAwIDEgMS43MzUtLjcxNWMuNjU4IDAgMS4yNzUuMjU0IDEuNzM2LjcxNWEuNTQ1LjU0NSAwIDEgMCAuNzcxLS43NzEgMy41NSAzLjU1IDAgMCAwLTUuMDE0IDBMMS4wMzYgOC45NDRBMy41MiAzLjUyIDAgMCAwIDAgMTEuNDVjMCAuOTUuMzY3IDEuODQgMS4wMzUgMi41MDdhMy41MiAzLjUyIDAgMCAwIDIuNTA2IDEuMDM1Yy45NSAwIDEuODQtLjM2OCAyLjUwNy0xLjAzNWwyLjEyMi0yLjEyMWEuNTQ1LjU0NSAwIDAgMC0uNzcxLS43NzF6TTkuMjc0IDEyLjAwMmEuNTQ2LjU0NiAwIDAgMC0uNTQ2LjU0NXYxLjYzN2EuNTQ2LjU0NiAwIDAgMCAxLjA5MSAwdi0xLjYzN2EuNTQ1LjU0NSAwIDAgMC0uNTQ1LS41NDV6TTExLjIzIDExLjYxNmEuNTQ1LjU0NSAwIDEgMC0uNzcyLjc3MmwxLjE1NyAxLjE1NmEuNTQzLjU0MyAwIDAgMCAuNzcxIDAgLjU0NS41NDUgMCAwIDAgMC0uNzdsLTEuMTU2LTEuMTU4ek0xMi41MzcgOS44MkgxMC45YS41NDYuNTQ2IDAgMCAwIDAgMS4wOTFoMS42MzdhLjU0Ni41NDYgMCAwIDAgMC0xLjA5ek00LjkxIDMuNTQ3YS41NDYuNTQ2IDAgMCAwIC41NDUtLjU0NVYxLjM2NmEuNTQ2LjU0NiAwIDAgMC0xLjA5IDB2MS42MzZjMCAuMzAxLjI0NC41NDUuNTQ1LjU0NXpNMi44ODggMy45MzNhLjU0My41NDMgMCAwIDAgLjc3MSAwIC41NDUuNTQ1IDAgMCAwIDAtLjc3MUwyLjUwMiAyLjAwNWEuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3bDEuMTU3IDEuMTU4ek0xLjYyOCA1LjczaDEuNjM2YS41NDYuNTQ2IDAgMCAwIDAtMS4wOTJIMS42MjhhLjU0Ni41NDYgMCAwIDAgMCAxLjA5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},linkCallback:void 0},emoji:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjE1LjcyOSAyMi4wODIgMTcgMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTI5LjcwOCAyNS4xMDRjLTMuMDIxLTMuMDIyLTcuOTM3LTMuMDIyLTEwLjk1OCAwLTMuMDIxIDMuMDItMy4wMiA3LjkzNiAwIDEwLjk1OCAzLjAyMSAzLjAyIDcuOTM3IDMuMDIgMTAuOTU4LS4wMDEgMy4wMi0zLjAyMSAzLjAyLTcuOTM2IDAtMTAuOTU3em0tLjg0NSAxMC4xMTJhNi41NiA2LjU2IDAgMCAxLTkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAtOS4yNjcgNi41NiA2LjU2IDAgMCAxIDkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAgOS4yNjd6bS03LjUyNC02LjczYS45MDYuOTA2IDAgMSAxIDEuODExIDAgLjkwNi45MDYgMCAwIDEtMS44MTEgMHptNC4xMDYgMGEuOTA2LjkwNiAwIDEgMSAxLjgxMiAwIC45MDYuOTA2IDAgMCAxLTEuODEyIDB6bTIuMTQxIDMuNzA4Yy0uNTYxIDEuMjk4LTEuODc1IDIuMTM3LTMuMzQ4IDIuMTM3LTEuNTA1IDAtMi44MjctLjg0My0zLjM2OS0yLjE0N2EuNDM4LjQzOCAwIDAgMSAuODEtLjMzNmMuNDA1Ljk3NiAxLjQxIDEuNjA3IDIuNTU5IDEuNjA3IDEuMTIzIDAgMi4xMjEtLjYzMSAyLjU0NC0xLjYwOGEuNDM4LjQzOCAwIDAgMSAuODA0LjM0N3oiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,emojis:["😀","😁","😂","😃","😉","😋","😎","😍","😗","🤗","🤔","😣","😫","😴","😌","🤓","😛","😜","😠","😇","😷","😈","👻","😺","😸","😹","😻","😼","😽","🙀","🙈","🙉","🙊","👼","👮","🕵","💂","👳","🎅","👸","👰","👲","🙍","🙇","🚶","🏃","💃","⛷","🏂","🏌","🏄","🚣","🏊","⛹","🏋","🚴","👫","💪","👈","👉","👆","🖕","👇","🖖","🤘","🖐","👌","👍","👎","✊","👊","👏","🙌","🙏","🐵","🐶","🐇","🐥","🐸","🐌","🐛","🐜","🐝","🍉","🍄","🍔","🍤","🍨","🍪","🎂","🍰","🍾","🍷","🍸","🍺","🌍","🚑","⏰","🌙","🌝","🌞","⭐","🌟","🌠","🌨","🌩","⛄","🔥","🎄","🎈","🎉","🎊","🎁","🎗","🏀","🏈","🎲","🔇","🔈","📣","🔔","🎵","🎷","💰","🖊","📅","✅","❎","💯"],title:void 0},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0},remove:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBkPSJNOC4xIDE0bDYuNC03LjJjLjYtLjcuNi0xLjgtLjEtMi41bC0yLjctMi43Yy0uMy0uNC0uOC0uNi0xLjMtLjZIOC42Yy0uNSAwLTEgLjItMS40LjZMLjUgOS4yYy0uNi43LS42IDEuOS4xIDIuNWwyLjcgMi43Yy4zLjQuOC42IDEuMy42SDE2di0xSDguMXptLTEuMy0uMXMwLS4xIDAgMGwtMi43LTIuN2MtLjQtLjQtLjQtLjkgMC0xLjNMNy41IDZoLTFsLTMgMy4zYy0uNi43LS42IDEuNy4xIDIuNEw1LjkgMTRINC42Yy0uMiAwLS40LS4xLS42LS4yTDEuMiAxMWMtLjMtLjMtLjMtLjggMC0xLjFMNC43IDZoMS44TDEwIDJoMUw3LjUgNmwzLjEgMy43LTMuNSA0Yy0uMS4xLS4yLjEtLjMuMnoiLz48L3N2Zz4=",className:void 0,component:void 0,title:void 0},history:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["undo","redo"],undo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQuODc1YzIuNjcyIDAgNC44NDYtMi4xNDUgNC44NDYtNC43ODEgMC0yLjYzNy0yLjE3NC00Ljc4MS00Ljg0Ni00Ljc4MVY4LjVMMS42MTUgNC4yNSA3IDB2My4xODhjMy44NiAwIDcgMy4wOTggNyA2LjkwNlMxMC44NiAxNyA3IDE3cy03LTMuMDk4LTctNi45MDZoMi4xNTRjMCAyLjYzNiAyLjE3NCA0Ljc4MSA0Ljg0NiA0Ljc4MXoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},redo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNTA0IDEzLjk3N2E0LjQ5NyA0LjQ5NyAwIDAgMS00LjQ5Mi00LjQ5MiA0LjQ5NyA0LjQ5NyAwIDAgMSA0LjQ5Mi00LjQ5M3YyLjk5NWw0Ljk5LTMuOTkzTDYuNTA0IDB2Mi45OTVhNi40OTYgNi40OTYgMCAwIDAtNi40ODggNi40OWMwIDMuNTc4IDIuOTEgNi40OSA2LjQ4OCA2LjQ5YTYuNDk2IDYuNDk2IDAgMCAwIDYuNDg3LTYuNDloLTEuOTk2YTQuNDk3IDQuNDk3IDAgMCAxLTQuNDkxIDQuNDkyeiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+",className:void 0,title:void 0},title:void 0}},Fr={en:{"generic.add":"Add","generic.cancel":"Cancel","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Block Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Color Picker","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Highlight","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Embedded Link","components.controls.embedded.enterlink":"Enter link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Font","components.controls.fontsize.fontsize":"Font Size","components.controls.history.history":"History","components.controls.history.undo":"Undo","components.controls.history.redo":"Redo","components.controls.image.image":"Image","components.controls.image.fileUpload":"File Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop the file or click to upload","components.controls.inline.bold":"Bold","components.controls.inline.italic":"Italic","components.controls.inline.underline":"Underline","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Link Title","components.controls.link.linkTarget":"Link Target","components.controls.link.linkTargetOption":"Open link in new window","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"List","components.controls.list.unordered":"Unordered","components.controls.list.ordered":"Ordered","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Remove","components.controls.textalign.textalign":"Text Align","components.controls.textalign.left":"Left","components.controls.textalign.center":"Center","components.controls.textalign.right":"Right","components.controls.textalign.justify":"Justify"},fr:{"generic.add":"Ok","generic.cancel":"Annuler","components.controls.blocktype.h1":"Titre 1","components.controls.blocktype.h2":"Titre 2","components.controls.blocktype.h3":"Titre 3","components.controls.blocktype.h4":"Titre 4","components.controls.blocktype.h5":"Titre 5","components.controls.blocktype.h6":"Titre 6","components.controls.blocktype.blockquote":"Citation","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Type bloc","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Palette de couleur","components.controls.colorpicker.text":"Texte","components.controls.colorpicker.background":"Fond","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Lien iFrame","components.controls.embedded.enterlink":"Entrer le lien","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Police","components.controls.fontsize.fontsize":"Taille de police","components.controls.history.history":"Historique","components.controls.history.undo":"Précédent","components.controls.history.redo":"Suivant","components.controls.image.image":"Image","components.controls.image.fileUpload":"Téléchargement","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Glisser une image ou cliquer pour télécharger","components.controls.inline.bold":"Gras","components.controls.inline.italic":"Italique","components.controls.inline.underline":"Souligner","components.controls.inline.strikethrough":"Barrer","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Exposant","components.controls.inline.subscript":"Indice","components.controls.link.linkTitle":"Titre du lien","components.controls.link.linkTarget":"Cible du lien","components.controls.link.linkTargetOption":"Ouvrir le lien dans une nouvelle fenêtre","components.controls.link.link":"Lier","components.controls.link.unlink":"Délier","components.controls.list.list":"Liste","components.controls.list.unordered":"Désordonnée","components.controls.list.ordered":"Ordonnée","components.controls.list.indent":"Augmenter le retrait","components.controls.list.outdent":"Diminuer le retrait","components.controls.remove.remove":"Supprimer","components.controls.textalign.textalign":"Alignement du texte","components.controls.textalign.left":"Gauche","components.controls.textalign.center":"Centre","components.controls.textalign.right":"Droite","components.controls.textalign.justify":"Justifier"},zh:{"generic.add":"添加","generic.cancel":"取消","components.controls.blocktype.h1":"标题1","components.controls.blocktype.h2":"标题2","components.controls.blocktype.h3":"标题3","components.controls.blocktype.h4":"标题4","components.controls.blocktype.h5":"标题5","components.controls.blocktype.h6":"标题6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"源码","components.controls.blocktype.blocktype":"样式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"选色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"内嵌","components.controls.embedded.embeddedlink":"内嵌网页","components.controls.embedded.enterlink":"输入网页地址","components.controls.emoji.emoji":"表情符号","components.controls.fontfamily.fontfamily":"字体","components.controls.fontsize.fontsize":"字号","components.controls.history.history":"历史","components.controls.history.undo":"撤销","components.controls.history.redo":"恢复","components.controls.image.image":"图片","components.controls.image.fileUpload":"来自文件","components.controls.image.byURL":"在线图片","components.controls.image.dropFileText":"点击或者拖拽文件上传","components.controls.inline.bold":"粗体","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下划线","components.controls.inline.strikethrough":"删除线","components.controls.inline.monospace":"等宽字体","components.controls.inline.superscript":"上标","components.controls.inline.subscript":"下标","components.controls.link.linkTitle":"超链接","components.controls.link.linkTarget":"输入链接地址","components.controls.link.linkTargetOption":"在新窗口中打开链接","components.controls.link.link":"链接","components.controls.link.unlink":"删除链接","components.controls.list.list":"列表","components.controls.list.unordered":"项目符号","components.controls.list.ordered":"编号","components.controls.list.indent":"增加缩进量","components.controls.list.outdent":"减少缩进量","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文本对齐","components.controls.textalign.left":"文本左对齐","components.controls.textalign.center":"居中","components.controls.textalign.right":"文本右对齐","components.controls.textalign.justify":"两端对齐"},ru:{"generic.add":"Добавить","generic.cancel":"Отменить","components.controls.blocktype.h1":"Заголовок 1","components.controls.blocktype.h2":"Заголовок 2","components.controls.blocktype.h3":"Заголовок 3","components.controls.blocktype.h4":"Заголовок 4","components.controls.blocktype.h5":"Заголовок 5","components.controls.blocktype.h6":"Заголовок 6","components.controls.blocktype.blockquote":"Цитата","components.controls.blocktype.code":"Код","components.controls.blocktype.blocktype":"Форматирование","components.controls.blocktype.normal":"Обычный","components.controls.colorpicker.colorpicker":"Выбор цвета","components.controls.colorpicker.text":"Текст","components.controls.colorpicker.background":"Фон","components.controls.embedded.embedded":"Встраивание","components.controls.embedded.embeddedlink":"Ссылка в iFrame","components.controls.embedded.enterlink":"Вставьте ссылку","components.controls.emoji.emoji":"Эмодзи","components.controls.fontfamily.fontfamily":"Шрифт","components.controls.fontsize.fontsize":"Размер шрифта","components.controls.history.history":"История","components.controls.history.undo":"Отменить","components.controls.history.redo":"Вернуть","components.controls.image.image":"Изображение","components.controls.image.fileUpload":"Файлы","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Переместите в эту область файлы или кликните для загрузки","components.controls.inline.bold":"Жирный","components.controls.inline.italic":"Курсив","components.controls.inline.underline":"Подчеркивание","components.controls.inline.strikethrough":"Зачеркивание","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Верхний индекс","components.controls.inline.subscript":"Нижний индекс","components.controls.link.linkTitle":"Текст","components.controls.link.linkTarget":"Адрес ссылки","components.controls.link.linkTargetOption":"Открывать в новом окне","components.controls.link.link":"Ссылка","components.controls.link.unlink":"Убрать ссылку","components.controls.list.list":"Список","components.controls.list.unordered":"Неупорядоченный","components.controls.list.ordered":"Упорядоченный","components.controls.list.indent":"Отступ","components.controls.list.outdent":"Выступ","components.controls.remove.remove":"Удалить","components.controls.textalign.textalign":"Выравнивание текста","components.controls.textalign.left":"Слева","components.controls.textalign.center":"По центру","components.controls.textalign.right":"Справа","components.controls.textalign.justify":"Выравнить"},pt:{"generic.add":"Ok","generic.cancel":"Cancelar","components.controls.blocktype.h1":"Título 1","components.controls.blocktype.h2":"Título 2","components.controls.blocktype.h3":"Título 3","components.controls.blocktype.h4":"Título 4","components.controls.blocktype.h5":"Título 5","components.controls.blocktype.h6":"Título 6","components.controls.blocktype.blockquote":"Citação","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Estilo","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Paleta de cores","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Fundo","components.controls.embedded.embedded":"Embarcado","components.controls.embedded.embeddedlink":"Link embarcado","components.controls.embedded.enterlink":"Coloque o link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonte","components.controls.fontsize.fontsize":"Tamanho da Fonte","components.controls.history.history":"Histórico","components.controls.history.undo":"Desfazer","components.controls.history.redo":"Refazer","components.controls.image.image":"Imagem","components.controls.image.fileUpload":"Carregar arquivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arraste uma imagem aqui ou clique para carregar","components.controls.inline.bold":"Negrito","components.controls.inline.italic":"Itálico","components.controls.inline.underline":"Sublinhado","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobrescrito","components.controls.inline.subscript":"Subscrito","components.controls.link.linkTitle":"Título do link","components.controls.link.linkTarget":"Alvo do link","components.controls.link.linkTargetOption":"Abrir link em outra janela","components.controls.link.link":"Adicionar Link","components.controls.link.unlink":"Remover link","components.controls.list.list":"Lista","components.controls.list.unordered":"Sem ordenção","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Aumentar recuo","components.controls.list.outdent":"Diminuir recuo","components.controls.remove.remove":"Remover","components.controls.textalign.textalign":"Alinhamento do texto","components.controls.textalign.left":"À Esquerda","components.controls.textalign.center":"Centralizado","components.controls.textalign.right":"À Direita","components.controls.textalign.justify":"Justificado"},ko:{"generic.add":"입력","generic.cancel":"취소","components.controls.blocktype.h1":"제목1","components.controls.blocktype.h2":"제목2","components.controls.blocktype.h3":"제목3","components.controls.blocktype.h4":"제목4","components.controls.blocktype.h5":"제목5","components.controls.blocktype.h6":"제목6","components.controls.blocktype.blockquote":"인용","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"블록","components.controls.blocktype.normal":"표준","components.controls.colorpicker.colorpicker":"색상 선택","components.controls.colorpicker.text":"글꼴색","components.controls.colorpicker.background":"배경색","components.controls.embedded.embedded":"임베드","components.controls.embedded.embeddedlink":"임베드 링크","components.controls.embedded.enterlink":"주소를 입력하세요","components.controls.emoji.emoji":"이모지","components.controls.fontfamily.fontfamily":"글꼴","components.controls.fontsize.fontsize":"글꼴 크기","components.controls.history.history":"히스토리","components.controls.history.undo":"실행 취소","components.controls.history.redo":"다시 실행","components.controls.image.image":"이미지","components.controls.image.fileUpload":"파일 업로드","components.controls.image.byURL":"주소","components.controls.image.dropFileText":"클릭하거나 파일을 드롭하여 업로드하세요","components.controls.inline.bold":"굵게","components.controls.inline.italic":"기울임꼴","components.controls.inline.underline":"밑줄","components.controls.inline.strikethrough":"취소선","components.controls.inline.monospace":"고정 너비","components.controls.inline.superscript":"위 첨자","components.controls.inline.subscript":"아래 첨자","components.controls.link.linkTitle":"링크 제목","components.controls.link.linkTarget":"링크 타겟","components.controls.link.linkTargetOption":"새창으로 열기","components.controls.link.link":"링크","components.controls.link.unlink":"링크 제거","components.controls.list.list":"리스트","components.controls.list.unordered":"일반 리스트","components.controls.list.ordered":"순서 리스트","components.controls.list.indent":"들여쓰기","components.controls.list.outdent":"내어쓰기","components.controls.remove.remove":"삭제","components.controls.textalign.textalign":"텍스트 정렬","components.controls.textalign.left":"왼쪽","components.controls.textalign.center":"중앙","components.controls.textalign.right":"오른쪽","components.controls.textalign.justify":"양쪽"},it:{"generic.add":"Aggiungi","generic.cancel":"Annulla","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Citazione","components.controls.blocktype.code":"Codice","components.controls.blocktype.blocktype":"Stili","components.controls.blocktype.normal":"Normale","components.controls.colorpicker.colorpicker":"Colore testo","components.controls.colorpicker.text":"Testo","components.controls.colorpicker.background":"Evidenziazione","components.controls.embedded.embedded":"Incorpora","components.controls.embedded.embeddedlink":"Incorpora link","components.controls.embedded.enterlink":"Inserisci link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Carattere","components.controls.fontsize.fontsize":"Dimensione carattere","components.controls.history.history":"Modifiche","components.controls.history.undo":"Annulla","components.controls.history.redo":"Ripristina","components.controls.image.image":"Immagine","components.controls.image.fileUpload":"Carica immagine","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Trascina il file o clicca per caricare","components.controls.inline.bold":"Grassetto","components.controls.inline.italic":"Corsivo","components.controls.inline.underline":"Sottolineato","components.controls.inline.strikethrough":"Barrato","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Apice","components.controls.inline.subscript":"Pedice","components.controls.link.linkTitle":"Testo","components.controls.link.linkTarget":"Link","components.controls.link.linkTargetOption":"Apri link in una nuova finestra","components.controls.link.link":"Inserisci link","components.controls.link.unlink":"Rimuovi link","components.controls.list.list":"Lista","components.controls.list.unordered":"Elenco puntato","components.controls.list.ordered":"Elenco numerato","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Rimuovi formattazione","components.controls.textalign.textalign":"Allineamento del testo","components.controls.textalign.left":"Allinea a sinistra","components.controls.textalign.center":"Allinea al centro","components.controls.textalign.right":"Allinea a destra","components.controls.textalign.justify":"Giustifica"},nl:{"generic.add":"Toevoegen","generic.cancel":"Annuleren","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Blocktype","components.controls.blocktype.normal":"Normaal","components.controls.colorpicker.colorpicker":"Kleurkiezer","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Achtergrond","components.controls.embedded.embedded":"Ingevoegd","components.controls.embedded.embeddedlink":"Ingevoegde link","components.controls.embedded.enterlink":"Voeg link toe","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Lettertype","components.controls.fontsize.fontsize":"Lettergrootte","components.controls.history.history":"Geschiedenis","components.controls.history.undo":"Ongedaan maken","components.controls.history.redo":"Opnieuw","components.controls.image.image":"Afbeelding","components.controls.image.fileUpload":"Bestand uploaden","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop het bestand hier of klik om te uploaden","components.controls.inline.bold":"Dikgedrukt","components.controls.inline.italic":"Schuingedrukt","components.controls.inline.underline":"Onderstrepen","components.controls.inline.strikethrough":"Doorstrepen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Linktitel","components.controls.link.linkTarget":"Link bestemming","components.controls.link.linkTargetOption":"Open link in een nieuw venster","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"Lijst","components.controls.list.unordered":"Ongeordend","components.controls.list.ordered":"Geordend","components.controls.list.indent":"Inspringen","components.controls.list.outdent":"Inspringen verkleinen","components.controls.remove.remove":"Verwijderen","components.controls.textalign.textalign":"Tekst uitlijnen","components.controls.textalign.left":"Links","components.controls.textalign.center":"Gecentreerd","components.controls.textalign.right":"Rechts","components.controls.textalign.justify":"Uitgelijnd"},de:{"generic.add":"Hinzufügen","generic.cancel":"Abbrechen","components.controls.blocktype.h1":"Überschrift 1","components.controls.blocktype.h2":"Überschrift 2","components.controls.blocktype.h3":"Überschrift 3","components.controls.blocktype.h4":"Überschrift 4","components.controls.blocktype.h5":"Überschrift 5","components.controls.blocktype.h6":"Überschrift 6","components.controls.blocktype.blockquote":"Zitat","components.controls.blocktype.code":"Quellcode","components.controls.blocktype.blocktype":"Blocktyp","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farbauswahl","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Hintergrund","components.controls.embedded.embedded":"Eingebettet","components.controls.embedded.embeddedlink":"Eingebetteter Link","components.controls.embedded.enterlink":"Link eingeben","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Schriftart","components.controls.fontsize.fontsize":"Schriftgröße","components.controls.history.history":"Historie","components.controls.history.undo":"Zurücknehmen","components.controls.history.redo":"Wiederholen","components.controls.image.image":"Bild","components.controls.image.fileUpload":"Datei-Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Dateien ziehen und ablegen, oder klicken zum Hochladen","components.controls.inline.bold":"Fett","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Unterstreichen","components.controls.inline.strikethrough":"Durchstreichen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hochgestellt","components.controls.inline.subscript":"Tiefgestellt","components.controls.link.linkTitle":"Link-Titel","components.controls.link.linkTarget":"Link-Ziel","components.controls.link.linkTargetOption":"Link in neuem Fenster öffnen","components.controls.link.link":"Link","components.controls.link.unlink":"Aufheben","components.controls.list.list":"Liste","components.controls.list.unordered":"Aufzählung","components.controls.list.ordered":"Nummerierte Liste","components.controls.list.indent":"Einzug vergrößern","components.controls.list.outdent":"Einzug reduzieren","components.controls.remove.remove":"Entfernen","components.controls.textalign.textalign":"Textausrichtung","components.controls.textalign.left":"Linksbündig","components.controls.textalign.center":"Zentrieren","components.controls.textalign.right":"Rechtsbündig","components.controls.textalign.justify":"Blocksatz"},da:{"generic.add":"Tilføj","generic.cancel":"Annuller","components.controls.blocktype.h1":"Overskrift 1","components.controls.blocktype.h2":"Overskrift 2","components.controls.blocktype.h3":"Overskrift 3","components.controls.blocktype.h4":"Overskrift 4","components.controls.blocktype.h5":"Overskrift 5","components.controls.blocktype.h6":"Overskrift 6","components.controls.blocktype.blockquote":"Blokcitat","components.controls.blocktype.code":"Kode","components.controls.blocktype.blocktype":"Blok Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farver","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Baggrund","components.controls.embedded.embedded":"Indlejre","components.controls.embedded.embeddedlink":"Indlejre Link","components.controls.embedded.enterlink":"Indtast link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonttype","components.controls.fontsize.fontsize":"Fontstørrelser","components.controls.history.history":"Historie","components.controls.history.undo":"Fortryd","components.controls.history.redo":"Gendan","components.controls.image.image":"Billede","components.controls.image.fileUpload":"Filoverførsel","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop filen eller klik for at uploade","components.controls.inline.bold":"Fed","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Understrege","components.controls.inline.strikethrough":"Gennemstreget","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hævet","components.controls.inline.subscript":"Sænket","components.controls.link.linkTitle":"Link Titel","components.controls.link.linkTarget":"Link Mål","components.controls.link.linkTargetOption":"Åbn link i nyt vindue","components.controls.link.link":"Link","components.controls.link.unlink":"Fjern link","components.controls.list.list":"Liste","components.controls.list.unordered":"Uordnet","components.controls.list.ordered":"Ordnet","components.controls.list.indent":"Indrykning","components.controls.list.outdent":"Udrykning","components.controls.remove.remove":"Fjern","components.controls.textalign.textalign":"Tekstjustering","components.controls.textalign.left":"Venstre","components.controls.textalign.center":"Center","components.controls.textalign.right":"Højre","components.controls.textalign.justify":"Margener"},zh_tw:{"generic.add":"新增","generic.cancel":"取消","components.controls.blocktype.h1":"標題1","components.controls.blocktype.h2":"標題2","components.controls.blocktype.h3":"標題3","components.controls.blocktype.h4":"標題4","components.controls.blocktype.h5":"標題5","components.controls.blocktype.h6":"標題6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"程式碼","components.controls.blocktype.blocktype":"樣式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"選色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"內嵌","components.controls.embedded.embeddedlink":"內嵌網頁","components.controls.embedded.enterlink":"輸入網頁地址","components.controls.emoji.emoji":"表情符號","components.controls.fontfamily.fontfamily":"字體","components.controls.fontsize.fontsize":"字體大小","components.controls.history.history":"歷史紀錄","components.controls.history.undo":"復原","components.controls.history.redo":"重做","components.controls.image.image":"圖片","components.controls.image.fileUpload":"檔案上傳","components.controls.image.byURL":"網址","components.controls.image.dropFileText":"點擊或拖曳檔案上傳","components.controls.inline.bold":"粗體","components.controls.inline.italic":"斜體","components.controls.inline.underline":"底線","components.controls.inline.strikethrough":"刪除線","components.controls.inline.monospace":"等寬字體","components.controls.inline.superscript":"上標","components.controls.inline.subscript":"下標","components.controls.link.linkTitle":"超連結","components.controls.link.linkTarget":"輸入連結位址","components.controls.link.linkTargetOption":"在新視窗打開連結","components.controls.link.link":"連結","components.controls.link.unlink":"刪除連結","components.controls.list.list":"列表","components.controls.list.unordered":"項目符號","components.controls.list.ordered":"編號","components.controls.list.indent":"增加縮排","components.controls.list.outdent":"減少縮排","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文字對齊","components.controls.textalign.left":"文字向左對齊","components.controls.textalign.center":"文字置中","components.controls.textalign.right":"文字向右對齊","components.controls.textalign.justify":"兩端對齊"},pl:{"generic.add":"Dodaj","generic.cancel":"Anuluj","components.controls.blocktype.h1":"Nagłówek 1","components.controls.blocktype.h2":"Nagłówek 2","components.controls.blocktype.h3":"Nagłówek 3","components.controls.blocktype.h4":"Nagłówek 4","components.controls.blocktype.h5":"Nagłówek 5","components.controls.blocktype.h6":"Nagłówek 6","components.controls.blocktype.blockquote":"Cytat","components.controls.blocktype.code":"Kod","components.controls.blocktype.blocktype":"Format","components.controls.blocktype.normal":"Normalny","components.controls.colorpicker.colorpicker":"Kolor","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Tło","components.controls.embedded.embedded":"Osadź","components.controls.embedded.embeddedlink":"Osadź odnośnik","components.controls.embedded.enterlink":"Wprowadź odnośnik","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Krój czcionki","components.controls.fontsize.fontsize":"Rozmiar czcionki","components.controls.history.history":"Historia","components.controls.history.undo":"Cofnij","components.controls.history.redo":"Ponów","components.controls.image.image":"Obrazek","components.controls.image.fileUpload":"Prześlij plik","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Upuść plik lub kliknij, aby przesłać","components.controls.inline.bold":"Pogrubienie","components.controls.inline.italic":"Kursywa","components.controls.inline.underline":"Podkreślenie","components.controls.inline.strikethrough":"Przekreślenie","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Indeks górny","components.controls.inline.subscript":"Indeks dolny","components.controls.link.linkTitle":"Tytuł odnośnika","components.controls.link.linkTarget":"Adres odnośnika","components.controls.link.linkTargetOption":"Otwórz odnośnik w nowej karcie","components.controls.link.link":"Wstaw odnośnik","components.controls.link.unlink":"Usuń odnośnik","components.controls.list.list":"Lista","components.controls.list.unordered":"Lista nieuporządkowana","components.controls.list.ordered":"Lista uporządkowana","components.controls.list.indent":"Zwiększ wcięcie","components.controls.list.outdent":"Zmniejsz wcięcie","components.controls.remove.remove":"Usuń","components.controls.textalign.textalign":"Wyrównaj tekst","components.controls.textalign.left":"Do lewej","components.controls.textalign.center":"Do środka","components.controls.textalign.right":"Do prawej","components.controls.textalign.justify":"Wyjustuj"},es:{"generic.add":"Añadir","generic.cancel":"Cancelar","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Código","components.controls.blocktype.blocktype":"Tipo de bloque","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Seleccionar color","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Subrayado","components.controls.embedded.embedded":"Adjuntar","components.controls.embedded.embeddedlink":"Adjuntar Link","components.controls.embedded.enterlink":"Introducir link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fuente","components.controls.fontsize.fontsize":"Tamaño de fuente","components.controls.history.history":"Histórico","components.controls.history.undo":"Deshacer","components.controls.history.redo":"Rehacer","components.controls.image.image":"Imagen","components.controls.image.fileUpload":"Subir archivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arrastra el archivo o haz click para subirlo","components.controls.inline.bold":"Negrita","components.controls.inline.italic":"Cursiva","components.controls.inline.underline":"Subrayado","components.controls.inline.strikethrough":"Tachado","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobreíndice","components.controls.inline.subscript":"Subíndice","components.controls.link.linkTitle":"Título del enlace","components.controls.link.linkTarget":"Objetivo del enlace","components.controls.link.linkTargetOption":"Abrir en nueva ventana","components.controls.link.link":"Enlazar","components.controls.link.unlink":"Desenlazar","components.controls.list.list":"Lista","components.controls.list.unordered":"Desordenada","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Indentada","components.controls.list.outdent":"Dentada","components.controls.remove.remove":"Eliminar","components.controls.textalign.textalign":"Alineación del texto","components.controls.textalign.left":"Izquierda","components.controls.textalign.center":"Centrado","components.controls.textalign.right":"Derecha","components.controls.textalign.justify":"Justificado"},ja:{"generic.add":"追加","generic.cancel":"キャンセル","components.controls.blocktype.h1":"見出し1","components.controls.blocktype.h2":"見出し2","components.controls.blocktype.h3":"見出し3","components.controls.blocktype.h4":"見出し4","components.controls.blocktype.h5":"見出し5","components.controls.blocktype.h6":"見出し6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"コード","components.controls.blocktype.blocktype":"スタイル","components.controls.blocktype.normal":"標準テキスト","components.controls.colorpicker.colorpicker":"テキストの色","components.controls.colorpicker.text":"テキスト","components.controls.colorpicker.background":"ハイライト","components.controls.embedded.embedded":"埋め込み","components.controls.embedded.embeddedlink":"埋め込みリンク","components.controls.embedded.enterlink":"リンクを入力してください","components.controls.emoji.emoji":"絵文字","components.controls.fontfamily.fontfamily":"フォント","components.controls.fontsize.fontsize":"フォントサイズ","components.controls.history.history":"履歴","components.controls.history.undo":"元に戻す","components.controls.history.redo":"やり直し","components.controls.image.image":"画像","components.controls.image.fileUpload":"ファイルをアップロード","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"ここに画像をドラッグするか、クリックしてください","components.controls.inline.bold":"太字","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下線","components.controls.inline.strikethrough":"取り消し線","components.controls.inline.monospace":"等幅フォント","components.controls.inline.superscript":"上付き文字","components.controls.inline.subscript":"下付き文字","components.controls.link.linkTitle":"リンクタイトル","components.controls.link.linkTarget":"リンク対象","components.controls.link.linkTargetOption":"新しいウィンドウで開く","components.controls.link.link":"リンク","components.controls.link.unlink":"リンクを解除","components.controls.list.list":"リスト","components.controls.list.unordered":"箇条書き","components.controls.list.ordered":"番号付き","components.controls.list.indent":"インデント増","components.controls.list.outdent":"インデント減","components.controls.remove.remove":"書式をクリア","components.controls.textalign.textalign":"整列","components.controls.textalign.left":"左揃え","components.controls.textalign.center":"中央揃え","components.controls.textalign.right":"右揃え","components.controls.textalign.justify":"両端揃え"}};function Ur(e){return(Ur="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)}function qr(){return(qr=Object.assign?Object.assign.bind():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}).apply(this,arguments)}function Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wr(Object(n),!0).forEach(function(t){Gr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(e){return function(e){if(Array.isArray(e))return Yr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Yr(e,t);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)?Yr(e,t):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.")}()}function Yr(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 Xr(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)}}function Jr(e,t){return(Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ei(e);if(t){var i=ei(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(38),n(39);var ti=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jr(e,t)}(o,r.Component);var e,t,n=$r(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onEditorBlur=function(){t.setState({editorFocused:!1})},t.onEditorFocus=function(e){var n=t.props.onFocus;t.setState({editorFocused:!0});var r=t.focusHandler.isEditorFocused();n&&r&&n(e)},t.onEditorMouseDown=function(){t.focusHandler.onEditorMouseDown()},t.keyBindingFn=function(e){if("Tab"!==e.key)return"ArrowUp"!==e.key&&"ArrowDown"!==e.key||w()&&e.preventDefault(),Object(l.getDefaultKeyBinding)(e);var n=t.props.onTab;if(!n||!n(e)){var r=Object(s.changeDepth)(t.state.editorState,e.shiftKey?-1:1,4);r&&r!==t.state.editorState&&(t.onChange(r),e.preventDefault())}return null},t.onToolbarFocus=function(e){var n=t.props.onFocus;n&&t.focusHandler.isToolbarFocused()&&n(e)},t.onWrapperBlur=function(e){var n=t.props.onBlur;n&&t.focusHandler.isEditorBlur(e)&&n(e,t.getEditorState())},t.onChange=function(e){var n=t.props,r=n.readOnly,i=n.onEditorStateChange;r||"atomic"===Object(s.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(i&&i(e,t.props.wrapperId),M(t.props,"editorState")?t.afterChange(e):t.setState({editorState:e},t.afterChange(e)))},t.setWrapperReference=function(e){t.wrapper=e},t.setEditorReference=function(e){t.props.editorRef&&t.props.editorRef(e),t.editor=e},t.getCompositeDecorator=function(e){var n=[].concat(Kr(t.props.customDecorators),[{strategy:mr,component:gr({showOpenOptionOnHover:e.link.showOpenOptionOnHover})}]);return t.props.mention&&n.push.apply(n,Kr(Sr(Qr(Qr({},t.props.mention),{},{onChange:t.onChange,getEditorState:t.getEditorState,getSuggestions:t.getSuggestions,getWrapperRef:t.getWrapperRef,modalHandler:t.modalHandler})))),t.props.hashtag&&n.push(zr(t.props.hashtag)),new l.CompositeDecorator(n)},t.getWrapperRef=function(){return t.wrapper},t.getEditorState=function(){return t.state?t.state.editorState:null},t.getSuggestions=function(){return t.props.mention&&t.props.mention.suggestions},t.afterChange=function(e){setTimeout(function(){var n=t.props,r=n.onChange,i=n.onContentStateChange;r&&r(Object(l.convertToRaw)(e.getCurrentContent())),i&&i(Object(l.convertToRaw)(e.getCurrentContent()))})},t.isReadOnly=function(){return t.props.readOnly},t.isImageAlignmentEnabled=function(){return t.state.toolbar.image.alignmentEnabled},t.createEditorState=function(e){var n;if(M(t.props,"editorState"))t.props.editorState&&(n=l.EditorState.set(t.props.editorState,{decorator:e}));else if(M(t.props,"defaultEditorState"))t.props.defaultEditorState&&(n=l.EditorState.set(t.props.defaultEditorState,{decorator:e}));else if(M(t.props,"contentState")){if(t.props.contentState){var r=Object(l.convertFromRaw)(t.props.contentState);n=l.EditorState.createWithContent(r,e),n=l.EditorState.moveSelectionToEnd(n)}}else if(M(t.props,"defaultContentState")||M(t.props,"initialContentState")){var i=t.props.defaultContentState||t.props.initialContentState;i&&(i=Object(l.convertFromRaw)(i),n=l.EditorState.createWithContent(i,e),n=l.EditorState.moveSelectionToEnd(n))}return n||l.EditorState.createEmpty(e)},t.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","locale","localization","toolbarOnFocus","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","toolbarHidden","wrapperClassName","toolbarStyle","editorStyle","wrapperStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],r=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),i={},r&&0<r.length&&r.forEach(function(e){i[e]=t[e]}),i;var t,n,r,i},t.getStyleMap=function(e){return Qr(Qr({},Object(s.getCustomStyleMap)()),e.customStyleMap)},t.changeEditorState=function(e){var n=Object(l.convertFromRaw)(e),r=t.state.editorState;return r=l.EditorState.push(r,n,"insert-characters"),l.EditorState.moveSelectionToEnd(r)},t.focusEditor=function(){setTimeout(function(){t.editor.focus()})},t.handleKeyCommand=function(e){var n=t.state,r=n.editorState,i=n.toolbar.inline;if(i&&0<=i.options.indexOf(e)){var o=l.RichUtils.handleKeyCommand(r,e);if(o)return t.onChange(o),!0}return!1},t.handleReturn=function(e){if(w())return!0;var n=t.state.editorState,r=Object(s.handleNewLine)(n,e);return!!r&&(t.onChange(r),!0)},t.handlePastedTextFn=function(e,n){var r=t.state.editorState,i=t.props,o=i.handlePastedText,a=i.stripPastedStyles;return o?o(e,n,r,t.onChange):!a&&function(e,t,n,r){var i=Object(s.getSelectedBlock)(n);if(i&&"code"===i.type){var o=l.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());return r(l.EditorState.push(n,o,"insert-characters")),!0}if(t){var a=H()(t),c=n.getCurrentContent();return a.entityMap.forEach(function(e,t){c=c.mergeEntityData(t,e)}),c=l.Modifier.replaceWithFragment(c,n.getSelection(),new S.List(a.contentBlocks)),r(l.EditorState.push(n,c,"insert-characters")),!0}return!1}(e,n,r,t.onChange)},t.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?t.focusHandler.onInputMouseDown():e.preventDefault()};var r=L(Pr,e.toolbar),i=e.wrapperId?e.wrapperId:Math.floor(1e4*Math.random());t.wrapperId="rdw-wrapper-".concat(i),t.modalHandler=new f,t.focusHandler=new C,t.blockRendererFn=Br({isReadOnly:t.isReadOnly,isImageAlignmentEnabled:t.isImageAlignmentEnabled,getEditorState:t.getEditorState,onChange:t.onChange},e.customBlockRenderFunc),t.editorProps=t.filterEditorProps(e),t.customStyleMap=t.getStyleMap(e),t.compositeDecorator=t.getCompositeDecorator(r);var a=t.createEditorState(t.compositeDecorator);return Object(s.extractInlineStyle)(a),t.state={editorState:a,editorFocused:!1,toolbar:r},t}return e=o,(t=[{key:"componentDidMount",value:function(){this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t={},n=this.props,r=n.editorState,i=n.contentState;if(!this.state.toolbar){var o=L(Pr,o);t.toolbar=o}if(M(this.props,"editorState")&&r!==e.editorState)t.editorState=r?l.EditorState.set(r,{decorator:this.compositeDecorator}):l.EditorState.createEmpty(this.compositeDecorator);else if(M(this.props,"contentState")&&i!==e.contentState)if(i){var a=this.changeEditorState(i);a&&(t.editorState=a)}else t.editorState=l.EditorState.createEmpty(this.compositeDecorator);e.editorState===r&&e.contentState===i||Object(s.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props)}}},{key:"render",value:function(){var e=this.state,t=e.editorState,n=e.editorFocused,r=e.toolbar,o=this.props,a=o.locale,c=o.localization,u=c.locale,f=c.translations,h=o.toolbarCustomButtons,p=o.toolbarOnFocus,C=o.toolbarClassName,m=o.toolbarHidden,v=o.editorClassName,y=o.wrapperClassName,w=o.toolbarStyle,E=o.editorStyle,M=o.wrapperStyle,A=o.uploadCallback,x=o.ariaLabel,L={modalHandler:this.modalHandler,editorState:t,onChange:this.onChange,translations:Qr(Qr({},Fr[a||u]),f)},k=n||this.focusHandler.isInputFocused()||!p;return i.a.createElement("div",{id:this.wrapperId,className:d()(y,"rdw-editor-wrapper"),style:M,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur,"aria-label":"rdw-wrapper"},!m&&i.a.createElement("div",{className:d()("rdw-editor-toolbar",C),style:Qr({visibility:k?"visible":"hidden"},w),onMouseDown:this.preventDefault,"aria-label":"rdw-toolbar","aria-hidden":(!n&&p).toString(),onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=lr[e],o=r[e];return"image"===e&&A&&(o.uploadCallback=A),i.a.createElement(n,qr({key:t},L,{config:o}))}),h&&h.map(function(e,t){return i.a.cloneElement(e,Qr({key:t},L))})),i.a.createElement("div",{ref:this.setWrapperReference,className:d()(v,"rdw-editor-main"),style:E,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:g.onKeyDown,onMouseDown:this.onEditorMouseDown},i.a.createElement(l.Editor,qr({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:b,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,handlePastedText:this.handlePastedTextFn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:x||"rdw-editor",blockRenderMap:s.blockRenderMap},this.editorProps))))}}])&&Xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ti.propTypes={onChange:a.a.func,onEditorStateChange:a.a.func,onContentStateChange:a.a.func,initialContentState:a.a.object,defaultContentState:a.a.object,contentState:a.a.object,editorState:a.a.object,defaultEditorState:a.a.object,toolbarOnFocus:a.a.bool,spellCheck:a.a.bool,stripPastedStyles:a.a.bool,toolbar:a.a.object,toolbarCustomButtons:a.a.array,toolbarClassName:a.a.string,toolbarHidden:a.a.bool,locale:a.a.string,localization:a.a.object,editorClassName:a.a.string,wrapperClassName:a.a.string,toolbarStyle:a.a.object,editorStyle:a.a.object,wrapperStyle:a.a.object,uploadCallback:a.a.func,onFocus:a.a.func,onBlur:a.a.func,onTab:a.a.func,mention:a.a.object,hashtag:a.a.object,textAlignment:a.a.string,readOnly:a.a.bool,tabIndex:a.a.number,placeholder:a.a.string,ariaLabel:a.a.string,ariaOwneeID:a.a.string,ariaActiveDescendantID:a.a.string,ariaAutoComplete:a.a.string,ariaDescribedBy:a.a.string,ariaExpanded:a.a.string,ariaHasPopup:a.a.string,customBlockRenderFunc:a.a.func,wrapperId:a.a.number,customDecorators:a.a.array,editorRef:a.a.func,handlePastedText:a.a.func},ti.defaultProps={toolbarOnFocus:!1,toolbarHidden:!1,stripPastedStyles:!1,localization:{locale:"en",translations:{}},customDecorators:[]};var ni=ti}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8);function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o}(i,VB(),Yq)),zB.exports);const Jq=t=>{const{contentState:n,entityKey:r,children:i}=t,o=n.getEntity(r),{url:a,target:l}=o.getData();return e("a",{href:a,target:l||"_blank",rel:"noopener noreferrer",onClick:e=>{e.preventDefault(),e.stopPropagation(),a&&("_blank"!==l&&l?window.open(a,l):window.open(a,"_blank","noopener,noreferrer"))},style:{color:"var(--ff-step-element-color)",textDecoration:"underline",cursor:"pointer"},children:i})},$q=({convertedContent:t,setConvertedContent:r,readOnly:i,toolbarHidden:o,toolbarOptions:s,label:d,required:u=!1,onBlur:f,mode:h,helperText:p,analyticsClasses:C=!1,error:m,editableTextEditor:g=!1,onSubmit:v,onFocus:y})=>{const[w,b]=c(null),[E,M]=c(!1),[A,x]=c(!1),[L,k]=c(!1),[H,S]=c(t),_=a(null),V=a(null),O=new OB.CompositeDecorator([{strategy:(e,t,n)=>{e.findEntityRanges(e=>{const t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)},component:Jq}]),z=e=>{if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t&&t.blocks?t:OB.convertToRaw(OB.ContentState.createFromText(e))}catch(t){return OB.convertToRaw(OB.ContentState.createFromText(e))}};l(()=>{let e;try{if(G(t))e="view"===h||g&&!L?OB.EditorState.createWithContent(OB.ContentState.createFromText("---"),O):OB.EditorState.createEmpty(O);else{const n=z(t);e=n?OB.EditorState.createWithContent(OB.convertFromRaw(n),O):OB.EditorState.createEmpty(O)}}catch(n){console.error("Error creating editor state:",n),e=OB.EditorState.createWithContent(OB.ContentState.createFromText(t||"Invalid content"),O)}b(e),S(t)},[t,h,L,g]),l(()=>{if(0===t?.length){let e;if("view"===h||g&&!L){const t=OB.ContentState.createFromText("---");e=OB.EditorState.createWithContent(t,O)}else e=OB.EditorState.createEmpty(O);b(e)}},[t,h,L,g]),l(()=>{if(!_.current)return;const e=e=>{const t=e.target.closest("a");if(t&&_.current?.contains(t)){e.preventDefault(),e.stopPropagation();const n=t.getAttribute("href"),r=t.getAttribute("target")||"_blank";n&&("_blank"===r?window.open(n,"_blank","noopener,noreferrer"):window.open(n,r))}},t=_.current;return t.addEventListener("click",e),()=>{t.removeEventListener("click",e)}},[]);Y(_,()=>{if(g&&L&&!A){k(!1),r(H||"");const e=z(H),t=e?OB.EditorState.createWithContent(OB.convertFromRaw(e),O):OB.EditorState.createWithContent(OB.ContentState.createFromText("---"),O);b(t)}},[V]);const N=Xq.Editor;return n("div",{className:"ff-textEditor-container",children:[n("div",{className:"ff-title-button",children:[n("div",{className:"ff-textEditor-label-asterisk-container",children:[u&&e(F,{className:"required-asterisk",children:"* "}),d&&e(F,{lineHeight:"10px",fontWeight:"medium",fontSize:"12px",children:d})]}),g&&L&&n("div",{ref:V,className:"ff-textEditor-buttons",children:[e(K,{title:"Update",placement:"bottom",children:e(P,{name:"update_icon",color:"var(--label-edit-confirm-icon)",height:20,width:20,hoverEffect:!0,onClick:()=>{if(A||!w)return;const e=OB.convertToRaw(w.getCurrentContent());let t=JSON.stringify(e);""===e?.blocks[0]?.text&&(t=JSON.stringify(OB.convertToRaw(OB.ContentState.createFromText("---")))),r(t),v&&v(t),S(t),k(!1)}})}),e(K,{title:"Cancel",placement:"bottom",children:e(P,{name:"close",color:"var(--label-edit-cancel-icon)",height:20,width:20,onClick:()=>{k(!1),r(H||"");const e=z(H),t=e?OB.EditorState.createWithContent(OB.convertFromRaw(e),O):OB.EditorState.createWithContent(OB.ContentState.createFromText("---"),O);b(t),x(!1)},hoverEffect:!0})})]})]}),e("div",{ref:_,onDoubleClick:()=>{if(g&&!L){k(!0),S(t);const e=z(t),n="---"===e?.blocks[0]?.text?OB.EditorState.createEmpty(O):e?OB.EditorState.createWithContent(OB.convertFromRaw(e),O):OB.EditorState.createEmpty(O);b(n)}},children:w&&e(N,{editorState:w,onEditorStateChange:e=>{b(e);const t=OB.convertToRaw(e.getCurrentContent());L&&""===t?.blocks[0]?.text&&u?x(!0):""!==t?.blocks[0]?.text&&x(!1)},wrapperClassName:"wrapperClass",editorClassName:"ff-heading-TextEditor-style "+(C?"fontSm":"fontMd"),editorStyle:"view"===h||g&&!L?{border:"none"}:E?{border:"1px solid var(--text-editor-in-focus-border-color)",borderRadius:"4px"}:{border:"1px solid var(--text-editor-out-focus-border-color) ",borderRadius:"4px"},onFocus:()=>{M(!0),y&&y()},onBlur:e=>{if(!g&&w){const e=OB.convertToRaw(w.getCurrentContent());r(JSON.stringify(e)),""===e?.blocks[0]?.text&&x(!0)}f&&f(e)},readOnly:g?!L:i,toolbarHidden:g?!L:o,toolbarClassName:"ff-toolbarClass",handlePastedText:()=>!1,toolbar:{options:Array.isArray(s)&&s?.length>0?s:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],fontFamily:{options:["Arial","Georgia","Impact","OpenSans-Regular","Tahoma","Times New Roman","Verdana","poppins"]},link:{defaultTargetOption:"_blank",showOpenOptionOnHover:!1}}})}),u&&A||p&&m?e(F,{fontSize:10,className:"ff-textEditor-error-msg",as:"span",children:p}):null]})},eW=({iconName:t,iconWidth:r=120,iconHeight:i=115,text:o,textFontSize:a="24px",textDirectionRow:l=!1,gap:s="40px"})=>n("div",{className:`no_data_message ${l&&"flex-row"}`,style:{gap:s},children:[e(P,{name:t,width:r,height:i}),e(F,{fontSize:a,lineHeight:"36px",fontWeight:"semi-bold",children:o})]}),tW=({cardProperties:t={width:"200px",height:"200px",background:"white",borderRadius:"16px",boxShadow:"1px 4px 8px var(--plugins-header-bg-color)",padding:"16px",margin:"0",border:"none",className:"",style:{},onClick:()=>{}},headerContent:r,midContent:i,footerContent:o})=>{const{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,className:p="",style:C={}}=t;return n("section",{className:`ff-card ${p}`,style:{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,...C},onClick:t.onClick,children:[r?.isHeader&&e("div",{className:"ff-card-header",children:r.content}),i?.isMidContent&&e("div",{className:"ff-card-content",children:i.content}),o?.isFooter&&e("div",{className:"ff-card-footer",children:o.content})]})},nW=e=>Lt.test(e)?e:e.toLowerCase().split(/[\s_-]+/).map((e,t)=>0===t?e:e.charAt(0).toUpperCase()+e.slice(1)).join(""),rW=(e,t)=>{let n;if(e.current){const r=e.current;n=new MutationObserver(()=>{const e=r.scrollHeight;r.scrollTop=e+(t||0)}),n.observe(r,{childList:!0,subtree:!0});const i=r.scrollHeight;r.scrollTop=i}return()=>{n&&n.disconnect()}},iW=(e,t,n,r,i=void 0,o=!1)=>{if(!t&&!i)throw new Error("Key is required for individual node expansion/collapse or a valid treeAction for all nodes");const a=new Map,l=new Map,s=new Set;let c=[...e];function d(e,t){if(s.has(e))throw new Error(`Cycle detected at node: ${e}`);s.add(e);(l.get(e)||[]).forEach(e=>{e.expanded=t,e.expandedAll=t,e.hide=!t,d(e.key,t)}),s.delete(e)}if(n&&!G(n)&&(c=[n,...e]),c.forEach(e=>{a.set(e.key,e),e.parentId&&(l.has(e.parentId)||l.set(e.parentId,[]),l.get(e.parentId).push(e))}),"expandAll"!==i&&"collapseAll"!==i||!t)if("expandAll"!==i&&"collapseAll"!==i||t){if(t){const e=a.get(t);if(e)if(e.expanded=r,e.expandedAll=r,e.hide=!1,r){(l.get(t)||[]).forEach(e=>e.hide=!!o)}else d(t,!1)}}else{const e="expandAll"===i;c.forEach(t=>{t.expanded=e,t.expandedAll=e,t.hide=!e})}else{const e=a.get(t);if(e){const n="expandAll"===i;e.expanded=n,e.expandedAll=n,e.hide=!1,d(t,n)}}return G(n)?{data:c}:{rootNode:c[0],data:c.slice(1)}};function oW(e,t,n){if(!Array.isArray(e))throw new Error("Input data must be an array of TreeNode objects.");const r=n?["script","element","sharedelement","program_element","stepgroup","file","webservice_collection","workbench_request"]:["pre","post"],i=e=>n?!t||!["module"].includes(e.entityType?.toLowerCase()??"")||(e.totalSubContainerCount??0)>0:e.expandable;return e.map(e=>r.includes(e.entityType?.toLowerCase()??"")?{...e,hide:t}:{...e,expandable:i(e)})}function aW(e,t){if(!e)return null;const n=e.querySelector(".table-scrollable");if(!n)return null;const r=n.scrollTop,i=Array.from(n.querySelectorAll("tbody tr"));if(0===i.length)return null;const o=i[0].offsetHeight||0;if(!o)return null;const a=t[Math.floor(r/o)]??t[0];return{key:a?.key||null,searchKey:a?.searchKey||null}}const lW=e=>new Promise(t=>setTimeout(t,e)),sW=(e,t,n)=>{const r=(e,t)=>e.filter(e=>e.searchKey&&e.searchKey.startsWith(t+"/")),i=(e,t)=>{const n=e.filter(e=>e.searchKey&&e.searchKey.startsWith(t.searchKey+"/"));if(0===n.length)return t.key;const r=n[n.length-1];return r?.container?i(e,r):r?.key};if("/Root"!==e.path){const n=i(t,e),o=r(t,e?.searchKey),a=((e,t)=>{const n=t.split("/").filter(e=>""!==e),r={};return n.forEach((t,i)=>{const o="/"+n.slice(0,i+1).join("/"),a=e.find(e=>e.searchKey===o);if(a){r[i]={key:a.key,name:a.name??"",type:a.entityType??"",searchKey:a.searchKey??"",hierarchy:a.hierarchy,isContainer:a.container??!1,hasPrePost:!1};const t=e.filter(e=>e?.searchKey?.startsWith(o+"/")&&e?.searchKey?.split("/").length===o?.split("/").length+1);r[i].hasPrePost=t.some(e=>"PRE"===e.entityType||"POST"===e.entityType)}}),r})(t,e?.searchKey),l=Object.values(a).find(t=>t.key===e.key);if(o.length>0){const e=o.filter(e=>"POST"!==e.entityType&&"PRE"!==e.entityType);return e.length>0?{navigateTo:l?.hasPrePost?e[e.length-1]?.key:n}:{navigateTo:o[o.length-1]?.key}}return{navigateTo:e?.key}}{const n=((e,t)=>e.filter(e=>e.parentId===t.key&&"POST"!==e.entityType&&"PRE"!==e.entityType))(t,e);if(n.length>0){const e=n[n.length-1];if(!1===e?.expandedAll||!1===e?.expanded)return{navigateTo:e?.key};if(!0===e?.expandedAll||!0===e?.expanded){const n=r(t,e?.searchKey);return{navigateTo:n[n.length-1]?.key}}}}return{navigateTo:e?.key}},cW=async(e,{requestDeniedMsg:t,notSupportedMsg:n,micAccessDeniedMsg:r})=>{try{const n=await(navigator?.permissions.query({name:"microphone"}));if("granted"===n?.state)e();else if("prompt"===n?.state)try{const t=await(navigator?.mediaDevices?.getUserMedia({audio:!0}));t?.getTracks()?.forEach(e=>e?.stop()),e()}catch(e){Ta.error(t),console.error("getUserMedia error:",e)}else"denied"===n?.state&&Ta.error(r)}catch(e){Ta.error(n),console.error("Permission query error:",e)}},dW=({buttons:t=[],panelContentMap:r={},headerIconsMap:i={},headerLeadingIconMap:o={},panelheight:s="100%",panelwidth:d="485px"})=>{const u=a({}),[f,p]=c(0),[C,m]=c(null);l(()=>{if(C&&u.current[C]){const e=u.current[C],t=e.getBoundingClientRect(),n=e.parentElement.getBoundingClientRect(),r=t.top-n.top+t.height/2-10;p(r)}},[C]);const g=h(()=>C?[{id:C,label:C,icon:o?.[C]}]:[],[C,o]);return n("div",{className:"ff-debug-buttons-container",children:[e("div",{className:"ff-debug_buttons",children:t.map(t=>e("div",{ref:e=>u.current[t]=e,children:e(U,{onClick:()=>(e=>{m(t=>t===e?null:e)})(t),variant:"custom",className:"ff-debug-button "+(C===t?"active":""),children:t})},t))}),C&&n("div",{className:"ff-debug-panel",style:{height:s,width:d},children:[e("div",{className:"ff-dropdown-notch",style:{top:`${f}px`}}),n("div",{className:"ff-debug-panel__header",children:[e("div",{className:"ff-debug-panel__title",children:e(Ps,{tabsData:g,activeTabId:C,variant:"default",noPadding:!0,onTabClick:()=>{}})}),e("div",{className:"ff-debug-panel__header-icons",children:i?.[C]??e(P,{name:"close",className:"ff-debug-panel__close-icon",onClick:()=>m(null)})})]}),e("div",{className:"ff-debug-panel__content",children:e(F,{children:r?.[C]})})]})]})};dW.displayName="DebugToolsPanel";const uW=o(({isRotate:t=!1,modal:r=[],onClick:i=()=>{},tooltip:o={},icons:a=["app_actions_icon","screenshot_icon","video_record_icon","test_gallary_icon","session_setting_icon"],className:l="",disabledIcons:s=[],activeIcon:d=""},u)=>{const[f,h]=c(null),[p,C]=c(null),m=()=>{h(null),C(null)};return e("div",{ref:u,className:`ff-body-container ${t?"vertical":"horizontal"} ${l}`,children:a.map((a,l)=>{const c=s.includes(a);return e(K,{title:o?.[a]||"",placement:t?"right":"bottom",children:n("div",{className:"ff-body-container__icon-wrapper "+(d===a?"active":""),onMouseEnter:()=>((e,t)=>{s.includes(t)||(h(e),r.includes(t)&&C(t))})(l,a),onMouseLeave:m,onClick:()=>((e,t)=>{s.includes(t)||(i(e),r.includes(t)&&C(p===t?null:t))})(l,a),id:a,children:[e(P,{className:"ff-body-container__icon",name:a,width:24,height:24,color:f===l||d===a?"var(--session-control-bg)":"var(--base-bg-color)",disabled:c}),!c&&r.includes(a)&&p===a&&e("div",{className:"ff-body-container__modal"})]})},a)})})});uW.displayName="SessionManager";const fW=({gap:t=8,fontSize:r=12,entityType:i,statusValues:o})=>{const a=e=>{if(Number.isInteger(e))return String(e);const[t,n=""]=String(e).split(".");let r="";return r=1===t?.length?n.slice(0,4).padEnd(4,"0"):2===t?.length?n.slice(0,3).padEnd(3,"0"):n.slice(0,2).padEnd(2,"0"),`${t}.${r}`};return e("div",{className:"ff-statusbadge-container",style:{gap:`${t}px`},children:o.map((t,o)=>{return e(K,{title:`${_p(t?.status)}${i?` ${i}`:""} : ${t?.value}`,zIndex:1e3,children:n("div",{className:"ff-statusbadge-item",children:[e(P,{name:(l=t?.status?.toLowerCase(),"passed"===l?"pass_result_icon":"failed"===l?"fail_result_icon":"warning"===l?"warning_result_icon":"skipped_result_icon")}),e(F,{fontSize:r,children:a(t?.value)})]})},`${o}-${t}`);var l})})};var hW=function(e){if("function"==typeof define&&define.amd)define(e);else if("object"==typeof module&&module.exports)module.exports=e();else if("object"==typeof window)return e()}(function(){t.sessions=new Map,t.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return!0;if(window.navigator.userAgent.match("Chrome")){let e=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10),n=33;return window.navigator.userAgent.match("Linux")&&(n=35),e>=26&&e<=n||t.extension.isInstalled()}return!0};var e={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return null!==document.querySelector("#janus-extension-installed")},getScreen:function(e){let t=window.setTimeout(function(){let t=new Error("NavigatorUserMediaError");return t.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)',e(t)},1e3);this.cache[t]=e,window.postMessage({type:"janusGetScreen",id:t},"*")},init:function(){let e={};this.cache=e,window.addEventListener("message",function(t){if(t.origin==window.location.origin)if("janusGotScreen"==t.data.type&&e[t.data.id]){let n=e[t.data.id];if(delete e[t.data.id],""===t.data.sourceId){let e=new Error("NavigatorUserMediaError");e.name="You cancelled the request for permission, giving up...",n(e)}else n(null,t.data.sourceId)}else"janusGetScreenPending"==t.data.type&&window.clearTimeout(t.data.id)})}};function t(e){if((e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.destroyed="function"==typeof e.destroyed?e.destroyed:t.noop,!t.initDone)return e.error("Library not initialized"),{};if(!t.isWebrtcSupported())return e.error("WebRTC not supported by this browser"),{};if(t.log("Library initialized: "+t.initDone),!e.server)return e.error("Invalid server url"),{};let n=!1,r=null,i={},o=null,a=null,l=0,s=e.server;t.isArray(s)?(t.log("Multiple servers provided ("+s.length+"), will use the first that works"),s=null,a=e.server,t.debug(a)):0===s.indexOf("ws")?(n=!0,t.log("Using WebSockets to contact Janus: "+s)):(n=!1,t.log("Using REST API to contact Janus: "+s));let c=e.iceServers||[{urls:"stun:stun.l.google.com:19302"}],d=e.iceTransportPolicy,u=e.bundlePolicy,f=!1;void 0!==e.withCredentials&&null!==e.withCredentials&&(f=!0===e.withCredentials);let h=10;void 0!==e.max_poll_events&&null!==e.max_poll_events&&(h=e.max_poll_events),h<1&&(h=1);let p=null;void 0!==e.token&&null!==e.token&&(p=e.token);let C=null;void 0!==e.apisecret&&null!==e.apisecret&&(C=e.apisecret),this.destroyOnUnload=!0,void 0!==e.destroyOnUnload&&null!==e.destroyOnUnload&&(this.destroyOnUnload=!0===e.destroyOnUnload);let m=25e3;void 0!==e.keepAlivePeriod&&null!==e.keepAlivePeriod&&(m=e.keepAlivePeriod),isNaN(m)&&(m=25e3);let g=6e4;function v(e){let t={high:9e5,medium:3e5,low:1e5};return null!=e&&(e.high&&(t.high=e.high),e.medium&&(t.medium=e.medium),e.low&&(t.low=e.low)),t}void 0!==e.longPollTimeout&&null!==e.longPollTimeout&&(g=e.longPollTimeout),isNaN(g)&&(g=6e4);let y=!1,w=null,b=new Map,E=this,M=0,A=new Map;function x(){if(null==w)return;if(t.debug("Long poll..."),!y)return void t.warn("Is the server down? (connected=false)");let n=s+"/"+w+"?rid="+(new Date).getTime();h&&(n=n+"&maxev="+h),p&&(n=n+"&token="+encodeURIComponent(p)),C&&(n=n+"&apisecret="+encodeURIComponent(C)),t.httpAPICall(n,{verb:"GET",withCredentials:f,success:L,timeout:g,error:function(n,r){if(t.error(n+":",r),M++,M>3)return y=!1,void e.error("Lost connection to the server (is it down?)");x()}})}function L(e,i){if(M=0,n||null==w||!0===i||x(),n||!t.isArray(e))if("keepalive"!==e.janus){if("server_info"===e.janus){t.debug("Got info on the Janus instance"),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("ack"===e.janus){t.debug("Got an ack on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("success"===e.janus){t.debug("Got a success on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("trickle"===e.janus){const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");let i=e.candidate;t.debug("Got a trickled candidate on session "+w),t.debug(i);let o=r.webrtcStuff;o.pc&&o.remoteSdp?(t.debug("Adding remote candidate:",i),i&&!0!==i.completed?o.pc.addIceCandidate(i):o.pc.addIceCandidate(t.endOfCandidates)):(t.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),o.candidates||(o.candidates=[]),o.candidates.push(i),t.debug(o.candidates))}else{if("webrtcup"===e.janus){t.debug("Got a webrtcup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);return r?void r.webrtcState(!0):void t.debug("This handle is not attached to this session")}if("hangup"===e.janus){t.debug("Got a hangup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.webrtcState(!1,e.reason),r.hangup()}else if("detached"===e.janus){t.debug("Got a detached event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return;r.ondetached(),r.detach()}else if("media"===e.janus){t.debug("Got a media event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.mediaState(e.type,e.receiving,e.mid)}else if("slowlink"===e.janus){t.debug("Got a slowlink event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.slowLink(e.uplink,e.lost,e.mid)}else{if("error"===e.janus){t.error("Ooops: "+e.error.code+" "+e.error.reason),t.debug(e);let n=e.transaction;if(n){let t=A.get(n);t&&t(e),A.delete(n)}return}if("event"===e.janus){t.debug("Got a plugin event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");let r=e.plugindata;if(!r)return void t.warn("Missing plugindata...");t.debug(" -- Event is coming from "+n+" ("+r.plugin+")");let i=r.data;t.debug(i);const o=b.get(n);if(!o)return void t.warn("This handle is not attached to this session");let a=e.jsep;a&&(t.debug("Handling SDP as well..."),t.debug(a));let l=o.onmessage;l?(t.debug("Notifying application..."),l(i,a)):t.debug("No provided notification callback")}else{if("timeout"===e.janus)return t.error("Timeout on session "+w),t.debug(e),void(n&&r.close(3504,"Gateway timeout"));t.warn("Unknown message/event '"+e.janus+"' on session "+w),t.debug(e)}}}}else t.vdebug("Got a keepalive on session "+w);else for(let t=0;t<e.length;t++)L(e[t],!0)}function k(){if(!s||!n||!y)return;o=setTimeout(k,m);let e={janus:"keepalive",session_id:w,transaction:t.randomString(12)};p&&(e.token=p),C&&(e.apisecret=C),r.send(JSON.stringify(e))}function H(c){let d=t.randomString(12),u={janus:"create",transaction:d};if(c.reconnect&&(y=!1,u.janus="claim",u.session_id=w,r&&(r.onopen=null,r.onerror=null,r.onclose=null,o&&(clearTimeout(o),o=null))),p&&(u.token=p),C&&(u.apisecret=C),!s&&t.isArray(a)&&(s=a[l],0===s.indexOf("ws")?(n=!0,t.log("Server #"+(l+1)+": trying WebSockets to contact Janus ("+s+")")):(n=!1,t.log("Server #"+(l+1)+": trying REST API to contact Janus ("+s+")"))),n){r=t.newWebSocket(s,"janus-protocol"),i={error:function(){if(t.error("Error connecting to the Janus WebSockets server... "+s),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));c.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){A.set(d,function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);o=setTimeout(k,m),y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),c.success()}),r.send(JSON.stringify(u))},message:function(e){L(JSON.parse(e.data))},close:function(){s&&y&&(y=!1,e.error("Lost connection to the server (is it down?)"))}};for(let e in i)r.addEventListener(e,i[e])}else t.httpAPICall(s,{verb:"POST",withCredentials:f,body:u,success:function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),x(),c.success()},error:function(e,n){if(t.error(e+":",n),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));""===n?c.error(e+": Is the server down?"):n&&n.error?c.error(e+": "+n.error.message):c.error(e+": "+n)}})}function S(e,i){if((i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i.error("Invalid handle");let a=i.message,l=i.jsep,c=t.randomString(12),d={janus:"message",body:a,transaction:c};if(o.token&&(d.token=o.token),C&&(d.apisecret=C),l){d.jsep={type:l.type,sdp:l.sdp},l.e2ee&&(d.jsep.e2ee=!0),"hml"!==l.rid_order&&"lmh"!==l.rid_order||(d.jsep.rid_order=l.rid_order),l.force_relay&&(d.jsep.force_relay=!0);let e=null,t=o.webrtcStuff;if(t.pc){let n=t.pc.getTransceivers();if(n&&n.length>0)for(let t in n){let r=n[t];if(r&&r.sender&&r.sender.track&&"video"===r.sender.track.kind){let n=r.sender.getParameters();n&&n.encodings&&1===n.encodings.length&&n.encodings[0]&&n.encodings[0].scalabilityMode&&(e||(e=[]),e.push({mindex:parseInt(t),mid:r.mid,svc:n.encodings[0].scalabilityMode}))}}}e&&(d.jsep.svc=e)}if(t.debug("Sending message to plugin (handle="+e+"):"),t.debug(d),n)return d.session_id=w,d.handle_id=e,A.set(c,function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))}),void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:d,success:function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))},error:function(e,n){t.error(e+":",n),i.error(e+": "+n)}})}function _(e,i){if(!y)return void t.warn("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return void t.warn("Invalid handle");let a={janus:"trickle",candidate:i,transaction:t.randomString(12)};if(o.token&&(a.token=o.token),C&&(a.apisecret=C),t.vdebug("Sending trickle candidate (handle="+e+"):"),t.vdebug(a),n)return a.session_id=w,a.handle_id=e,void r.send(JSON.stringify(a));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:a,success:function(e){t.vdebug("Candidate sent!"),t.vdebug(e),"ack"===e.janus||t.error("Ooops: "+e.error.code+" "+e.error.reason)},error:function(e,n){t.error(e+":",n)}})}function V(e,n,r,i,o){let a=b.get(e);if(!a||!a.webrtcStuff)return void t.warn("Invalid handle");let l=a.webrtcStuff;if(!l.pc)return void t.warn("Invalid PeerConnection");let s=function(e){t.log("Received state change on data channel:",e);let n=e.target.label,r=e.target.protocol,i=l.dataChannel[n]?l.dataChannel[n].readyState:"null";if(t.log("State change on <"+n+"> data channel: "+i),"open"===i){if(l.dataChannel[n].pending&&l.dataChannel[n].pending.length>0){t.log("Sending pending messages on <"+n+">:",l.dataChannel[n].pending.length);for(let e of l.dataChannel[n].pending)t.log("Sending data on data channel <"+n+">"),t.debug(e),l.dataChannel[n].send(e);l.dataChannel[n].pending=[]}a.ondataopen(n,r)}};if(i)l.dataChannel[n]=i;else{let e=l.dataChannelOptions;r&&(e.protocol=r),l.dataChannel[n]=l.pc.createDataChannel(n,e)}l.dataChannel[n].onmessage=function(e){t.log("Received message on data channel:",e);let n=e.target.label;a.ondata(e.data,n)},l.dataChannel[n].onopen=s,l.dataChannel[n].onclose=s,l.dataChannel[n].onerror=function(e){t.error("Got error on data channel:",e)},l.dataChannel[n].pending=[],o&&l.dataChannel[n].pending.push(o)}function O(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff,o=n.text||n.data;if(!o)return t.warn("Invalid data"),void n.error("Invalid data");let a=n.label?n.label:t.dataChanDefaultLabel;return i.dataChannel[a]?"open"!==i.dataChannel[a].readyState?(i.dataChannel[a].pending.push(o),void n.success()):(t.log("Sending data on data channel <"+a+">"),t.debug(o),i.dataChannel[a].send(o),void n.success()):(V(e,a,n.protocol,!1,o,n.protocol),void n.success())}function z(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff;if(!i.dtmfSender){if(i.pc){let e=i.pc.getSenders().find(function(e){return e.track&&"audio"===e.track.kind});if(!e)return t.warn("Invalid DTMF configuration (no audio track)"),void n.error("Invalid DTMF configuration (no audio track)");i.dtmfSender=e.dtmf,i.dtmfSender&&(t.log("Created DTMF Sender"),i.dtmfSender.ontonechange=function(e){t.debug("Sent DTMF tone: "+e.tone)})}if(!i.dtmfSender)return t.warn("Invalid DTMF configuration"),void n.error("Invalid DTMF configuration")}let o=n.dtmf;if(!o)return t.warn("Invalid DTMF parameters"),void n.error("Invalid DTMF parameters");let a=o.tones;if(!a)return t.warn("Invalid DTMF string"),void n.error("Invalid DTMF string");let l="number"==typeof o.duration?o.duration:500,s="number"==typeof o.gap?o.gap:50;t.debug("Sending DTMF string "+a+" (duration "+l+"ms, gap "+s+"ms)"),i.dtmfSender.insertDTMF(a,l,s),n.success()}function N(e,i){(i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop;let o=!0===i.noRequest;t.log("Destroying handle "+e+" (only-locally="+o+")"),G(e);let a=b.get(e);if(!a||a.detached)return b.delete(e),void i.success();if(a.detached=!0,o)return b.delete(e),void i.success();if(!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let l={janus:"detach",transaction:t.randomString(12)};if(a.token&&(l.token=a.token),C&&(l.apisecret=C),n)return l.session_id=w,l.handle_id=e,r.send(JSON.stringify(l)),b.delete(e),void i.success();t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:l,success:function(n){t.log("Destroyed handle:"),t.debug(n),"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),b.delete(e),i.success()},error:function(n,r){t.error(n+":",r),b.delete(e),i.success()}})}function T(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(i.pc)return;let o={iceServers:c,iceTransportPolicy:d,bundlePolicy:u,sdpSemantics:"unified-plan"},a=!1;if(n.tracks)for(let e of n.tracks)if(e.transforms&&(e.transforms.sender||e.transforms.receiver)){a=!0;break}n.externalEncryption&&(a=!0,i.externalEncryption=!0),RTCRtpSender&&(RTCRtpSender.prototype.createEncodedStreams||RTCRtpSender.prototype.createEncodedAudioStreams&&RTCRtpSender.prototype.createEncodedVideoStreams)&&a&&(i.insertableStreams=!0,o.forceEncodedAudioInsertableStreams=!0,o.forceEncodedVideoInsertableStreams=!0,o.encodedInsertableStreams=!0),t.log("Creating PeerConnection"),i.pc=new RTCPeerConnection(o),t.debug(i.pc),i.pc.getStats&&(i.volume={},i.bitrate.value="0 kbits/sec"),t.log("Preparing local SDP and gathering candidates (trickle="+i.trickle+")"),i.pc.onconnectionstatechange=function(){i.pc&&r.connectionState(i.pc.connectionState)},i.pc.oniceconnectionstatechange=function(){i.pc&&r.iceState(i.pc.iceConnectionState)},i.pc.onicecandidate=function(r){if(!r.candidate||r.candidate.candidate&&r.candidate.candidate.indexOf("endOfCandidates")>0)t.log("End of candidates."),i.iceDone=!0,!0===i.trickle?_(e,{completed:!0}):function(e,n){n=n||{},n.success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return void t.warn("Invalid handle, not sending anything");let i=r.webrtcStuff;if(t.log("Sending offer/answer SDP..."),!i.mySdp)return void t.warn("Local SDP instance is invalid, not sending anything...");i.mySdp={type:i.pc.localDescription.type,sdp:i.pc.localDescription.sdp},!1===i.trickle&&(i.mySdp.trickle=!1);t.debug(n),i.sdpSent=!0,n.success(i.mySdp)}(e,n);else{let t={candidate:r.candidate.candidate,sdpMid:r.candidate.sdpMid,sdpMLineIndex:r.candidate.sdpMLineIndex};!0===i.trickle&&_(e,t)}},i.pc.ontrack=function(e){if(t.log("Handling Remote Track",e),!e.streams)return;if(!e.track)return;let n=e.transceiver?e.transceiver.mid:e.track.id;try{e.transceiver&&e.transceiver.mid&&e.track.id&&(r.mids||(r.mids={}),r.mids[e.track.id]=e.transceiver.mid),r.onremotetrack(e.track,n,!0,{reason:"created"})}catch(e){t.error("Error calling onremotetrack",e)}if(e.track.onended)return;let o=null;t.log("Adding onended callback to track:",e.track),e.track.onended=function(n){t.log("Remote track removed:",n),clearTimeout(o);let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"ended"})}catch(e){t.error("Error calling onremotetrack on removal",e)}delete r.mids[e.track.id]},e.track.onmute=function(n){t.log("Remote track muted:",n),o||(o=setTimeout(function(){t.log("Removing remote track");let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"mute"})}catch(e){t.error("Error calling onremotetrack on mute",e)}o=null},2520))},e.track.onunmute=function(e){if(t.log("Remote track flowing again:",e),null!=o)clearTimeout(o),o=null;else try{let t=i.pc?i.pc.getTransceivers():null,n=t?t.find(t=>t.receiver.track===e.target):null,o=n?n.mid:e.target.id;r.onremotetrack(e.target,o,!0,{reason:"unmute"})}catch(e){t.error("Error calling onremotetrack on unmute",e)}}}}async function I(e,n,r){(r=r||{}).success="function"==typeof r.success?r.success:t.noop,r.error="function"==typeof r.error?r.error:Q;let i=r.jsep;if(n&&i)return t.error("Provided a JSEP to a createOffer"),void r.error("Provided a JSEP to a createOffer");if(!(n||i&&i.type&&i.sdp))return t.error("A valid JSEP is required for createAnswer"),void r.error("A valid JSEP is required for createAnswer");if(r.media&&!r.tracks){if(r.tracks=t.mediaToTracks(r.media),!0===r.simulcast||!0===r.simulcast2||r.svc)for(let e of r.tracks)if("video"===e.type){!0===r.simulcast||!0===r.simulcast2?e.simulcast=!0:r.svc&&(e.svc=r.svc);break}t.warn("Deprecated media object passed, use tracks instead. Automatically translated to:",r.tracks)}if(r.tracks&&!Array.isArray(r.tracks))return t.error("Tracks must be an array"),void r.error("Tracks must be an array");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void r.error("Invalid handle");let a=o.webrtcStuff;var l;a.trickle=(l=r.trickle,t.debug("isTrickleEnabled:",l),!1!==l);try{if(T(e,r),n&&await j(e,r),i){if(await a.pc.setRemoteDescription(i),t.log("Remote description accepted!"),a.remoteSdp=i.sdp,a.candidates&&a.candidates.length>0){for(let e=0;e<a.candidates.length;e++){let n=a.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?a.pc.addIceCandidate(n):a.pc.addIceCandidate(t.endOfCandidates)}a.candidates=[]}await j(e,r);let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating answer (iceDone="+i.iceDone+")");let o=await i.pc.createAnswer();t.debug(o);let a={type:"answer",sdp:o.sdp};if(n.customizeSdp(a),o.sdp=a.sdp,t.log("Setting local description"),i.mySdp={type:"answer",sdp:o.sdp},await i.pc.setLocalDescription(o),!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(o.e2ee=!0);return o}(e,r);r.success(n)}else{let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating offer (iceDone="+i.iceDone+")");let o={},a=!0===n.iceRestart;a&&(o.iceRestart=!0);t.debug(o);let l=await i.pc.createOffer(o);t.debug(l);let s={type:"offer",sdp:l.sdp};if(n.customizeSdp(s),l.sdp=s.sdp,t.log("Setting local description"),i.mySdp={type:"offer",sdp:l.sdp},await i.pc.setLocalDescription(l),i.mediaConstraints=o,!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(l.e2ee=!0);return l}(e,r);r.success(n)}}catch(e){t.error(e),r.error(e)}}function D(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:Q,n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=n.jsep,i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let o=i.webrtcStuff;if(r){if(!o.pc)return t.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),void n.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");n.customizeSdp(r),o.pc.setRemoteDescription(r).then(function(){if(t.log("Remote description accepted!"),o.remoteSdp=r.sdp,o.candidates&&o.candidates.length>0){for(let e=0;e<o.candidates.length;e++){let n=o.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?o.pc.addIceCandidate(n):o.pc.addIceCandidate(t.endOfCandidates)}o.candidates=[]}n.success()},n.error)}else n.error("Invalid JSEP")}async function Z(e,n){if((n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop,n.tracks&&!Array.isArray(n.tracks))return t.error("Tracks must be an array"),void n.error("Tracks must be an array");for(let e of n.tracks)(e.add||!e.replace&&!e.remove)&&(e.replace=!0);try{await j(e,n),n.success()}catch(e){t.error(e),n.error(e)}}async function j(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle, not sending anything"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)throw t.warn("Invalid PeerConnection"),"Invalid PeerConnection";let o=n.tracks;if(!o||!Array.isArray(o)||0===o.length)return;let a=!1,l={};for(let e of o){if(delete e.gumGroup,!e.type||!["audio","video"].includes(e.type))continue;if(!e.capture||e.capture instanceof MediaStreamTrack)continue;let t=e.group?e.group:"default";l[t]||(l[t]={}),l[t][e.type]||(e.gumGroup=t,l[t][e.type]=e)}let s=Object.keys(l);for(let e of s){let t=l[e];t.audio&&t.video||(t.audio&&delete t.audio.gumGroup,t.video&&delete t.video.gumGroup,delete l[e])}let c=!!n.jsep;for(let n of o){if(!n.type){t.warn("Missing track type:",n);continue}if("data"===n.type){if(i.pc.ondatachannel){t.warn("Data channel exists already, not creating another one");continue}t.log("Creating default data channel"),V(e,t.dataChanDefaultLabel,null,!1),i.pc.ondatachannel=function(n){t.log("Data channel created by Janus:",n),V(e,n.channel.label,n.channel.protocol,n.channel)};continue}if(void 0!==n.add&&null!==n.add||void 0!==n.remove&&null!==n.remove||void 0!==n.replace&&null!==n.replace||(n.add=!0),n.add&&n.remove||n.add&&n.remove&&n.replace){t.warn("Conflicting actions for track, ignoring:",n);continue}n.add&&n.replace?(t.warn("Both add and replace provided, falling back to replace:",n),delete n.add):n.remove&&n.replace&&(t.warn("Both remove and replace provided, falling back to remove:",n),delete n.replace);let o=n.type;"screen"===n.type&&(o="video");let s=null,d=null;if(n.mid?s=i.pc.getTransceivers().find(e=>e.mid===n.mid&&e.receiver.track.kind===o):n.add||(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o)),n.replace||n.remove){if(!s){t.warn("Couldn't find a transceiver for track:",n);continue}if(!s.sender){t.warn("No sender in the transceiver for track:",n);continue}d=s.sender}if(c&&!s&&(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o),!s)){t.warn("Couldn't find a transceiver for track:",n);continue}let u=null,f=null;if((n.remove||n.replace)&&(t.log("Removing track from PeerConnection",n),f=d.track?d.track.id:null,await d.replaceTrack(null),f&&i.myStream)){let e=null;if("audio"===o&&i.myStream.getAudioTracks()&&i.myStream.getAudioTracks().length)for(let n of i.myStream.getAudioTracks())n.id===f&&(e=n,t.log("Removing audio track:",e));else if("video"===o&&i.myStream.getVideoTracks()&&i.myStream.getVideoTracks().length)for(let n of i.myStream.getVideoTracks())n.id===f&&(e=n,t.log("Removing video track:",e));if(e){try{i.myStream.removeTrack(e),r.onlocaltrack(e,!1)}catch(e){t.error("Error calling onlocaltrack on removal for renegotiation",e)}if(!0!==e.dontStop)try{e.stop()}catch(e){}}}if(n.capture){if(n.gumGroup&&l[n.gumGroup]&&l[n.gumGroup].stream){let e=l[n.gumGroup].stream;u="audio"===n.type?e.getAudioTracks()[0]:e.getVideoTracks()[0],delete l[n.gumGroup].stream,delete l[n.gumGroup],delete n.gumGroup}else if(n.capture instanceof MediaStreamTrack)u=n.capture;else{a||(a=!0,r.consentDialog(!0));let e=t.trackConstraints(n),i=null;if("audio"===n.type||"video"===n.type){if(n.gumGroup){let r="audio"===n.type?"video":"audio";if(l[n.gumGroup]&&l[n.gumGroup][r]){let i=l[n.gumGroup][r],o=t.trackConstraints(i);e[r]=o[r]}}i=await navigator.mediaDevices.getUserMedia(e),n.gumGroup&&e.audio&&e.video&&(l[n.gumGroup].stream=i,delete n.gumGroup)}else i=await navigator.mediaDevices.getDisplayMedia(e);u="audio"===n.type?i.getAudioTracks()[0]:i.getVideoTracks()[0]}if(n.replace){await d.replaceTrack(u);let e="sendrecv";!1!==n.recv&&"inactive"!==s.direction&&"sendonly"!==s.direction||(e="sendonly"),s.setDirection?s.setDirection(e):s.direction=e}else{if(i.myStream||(i.myStream=new MediaStream),"audio"===o||!n.simulcast&&!n.svc)d=i.pc.addTrack(u,i.myStream),s=i.pc.getTransceivers().find(e=>e.sender===d);else if(n.simulcast){t.log("Enabling rid-based simulcasting:",u);let e=v(n.simulcastMaxBitrates);s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:n.sendEncodings||[{rid:"h",active:!0,scalabilityMode:"L1T2",maxBitrate:e.high},{rid:"m",active:!0,scalabilityMode:"L1T2",maxBitrate:e.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,scalabilityMode:"L1T2",maxBitrate:e.low,scaleResolutionDownBy:4}]})}else t.log("Enabling SVC ("+n.svc+"):",u),s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:[{scalabilityMode:n.svc}]});if(d||(d=s?s.sender:null),n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length){if(s)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(n.bitrate)if(n.simulcast||n.svc)t.warn("Ignoring bitrate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.bitrate)||n.bitrate<0)t.warn("Ignoring invalid bitrate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxBitrate=n.bitrate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring bitrate for track:",n)}if("video"===o&&n.framerate)if(n.simulcast||n.svc)t.warn("Ignoring framerate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.framerate)||n.framerate<0)t.warn("Ignoring invalid framerate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxFramerate=n.framerate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring framerate for track:",n)}if(n.transforms){if(d&&n.transforms.sender){let e=null;RTCRtpSender.prototype.createEncodedStreams?e=d.createEncodedStreams():(RTCRtpSender.prototype.createAudioEncodedStreams||RTCRtpSender.prototype.createEncodedVideoStreams)&&("audio"===o?e=d.createEncodedAudioStreams():"video"===o&&(e=d.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.sender).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.sender).pipeTo(e.writable))}if(s&&s.receiver&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}}u&&!0===n.dontStop&&(u.dontStop=!0)}else if(n.recv&&(s||(s=i.pc.addTransceiver(o)),s)){if(n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(s.receiver&&n.transforms&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}if(u){i.myStream.addTrack(u),u.onended=function(e){t.log("Local track removed:",e);try{r.onlocaltrack(e.target,!1)}catch(e){t.error("Error calling onlocaltrack following end",e)}};try{r.onlocaltrack(u,!0)}catch(e){t.error("Error calling onlocaltrack for track add",e)}}if(s){let e=s.direction,r=null,i=u&&s.sender.track,o=!1!==n.recv&&s.receiver.track;i&&o?r="sendrecv":i&&!o?r="sendonly":!i&&o?r="recvonly":i||o||(r="inactive"),r&&r!==e&&(t.warn("Changing direction of transceiver to "+r+" (was "+e+")",n),s.setDirection?s.setDirection(r):s.direction=r)}}a&&r.consentDialog(!1)}function R(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.sender&&e.sender.track&&(t={mid:e.mid},t.type=e.sender.track.kind,t.id=e.sender.track.id,t.label=e.sender.track.label),t&&i.push(t)}return i}function B(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.receiver&&e.receiver.track&&(t={mid:e.mid},t.type=e.receiver.track.kind,t.id=e.receiver.track.id,t.label=e.receiver.track.label),t&&i.push(t)}return i}function P(e,n,r,i){i="function"==typeof i?i:t.noop;let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i(0);let a=r?"remote":"local",l=o.webrtcStuff;if(l.volume[a]||(l.volume[a]={value:0}),l.pc&&l.pc.getStats&&("chrome"===t.webRTCAdapter.browserDetails.browser||"safari"===t.webRTCAdapter.browserDetails.browser)){let e=l.pc;if(n){let o=l.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!o)return t.warn("No audio transceiver with mid "+n),void i(0);if(r&&!o.receiver)return t.warn("Remote transceiver track unavailable"),void i(0);if(!r&&!o.sender)return t.warn("Local transceiver track unavailable"),void i(0);e=r?o.receiver:o.sender}return e.getStats().then(function(e){e.forEach(function(e){e&&"audio"===e.kind&&(r&&!e.remoteSource||!r&&"media-source"!==e.type||i(e.audioLevel?e.audioLevel:0))})}),l.volume[a].value}return t.warn("Getting the "+a+" volume unsupported by browser"),void i(0)}function F(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),!0;let o=i.webrtcStuff;if(!o.pc)return t.warn("Invalid PeerConnection"),!0;if(!o.myStream)return t.warn("Invalid local MediaStream"),!0;if(r){if(!o.myStream.getVideoTracks()||0===o.myStream.getVideoTracks().length)return t.warn("No video track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No video sender with mid "+n),!0):(t.warn("No video transceiver with mid "+n),!0)}return!o.myStream.getVideoTracks()[0].enabled}if(!o.myStream.getAudioTracks()||0===o.myStream.getAudioTracks().length)return t.warn("No audio track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No audio sender with mid "+n),!0):(t.warn("No audio transceiver with mid "+n),!0)}return!o.myStream.getAudioTracks()[0].enabled}function U(e,n,r,i){let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),!1;let a=o.webrtcStuff;if(!a.pc)return t.warn("Invalid PeerConnection"),!1;if(!a.myStream)return t.warn("Invalid local MediaStream"),!1;if(r){if(!a.myStream.getVideoTracks()||0===a.myStream.getVideoTracks().length)return t.warn("No video track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!e)return t.warn("No video transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No video sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getVideoTracks())e.enabled=!i}else{if(!a.myStream.getAudioTracks()||0===a.myStream.getAudioTracks().length)return t.warn("No audio track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!e)return t.warn("No audio transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No audio sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getAudioTracks())e.enabled=!i}return!0}function q(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)return"Invalid PeerConnection";if(i.pc.getStats){let e=i.pc,r=n||"default";if(n){let r=i.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!r)return t.warn("No video transceiver with mid "+n),"No video transceiver with mid "+n;if(!r.receiver)return t.warn("No video receiver with mid "+n),"No video receiver with mid "+n;e=r.receiver}return i.bitrate[r]||(i.bitrate[r]={timer:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,value:"0 kbits/sec"}),i.bitrate[r].timer?i.bitrate[r].value:(t.log("Starting bitrate timer"+(n?" for mid "+n:"")+" (via getStats)"),i.bitrate[r].timer=setInterval(function(){e.getStats().then(function(e){e.forEach(function(e){if(!e)return;let n=!1;if(("video"===e.mediaType||"video"===e.kind||e.id.toLowerCase().indexOf("video")>-1)&&"inbound-rtp"===e.type&&e.id.indexOf("rtcp")<0?n=!0:"ssrc"!=e.type||!e.bytesReceived||"VP8"!==e.googCodecName&&""!==e.googCodecName||(n=!0),n)if(i.bitrate[r].bsnow=e.bytesReceived,i.bitrate[r].tsnow=e.timestamp,null===i.bitrate[r].bsbefore||null===i.bitrate[r].tsbefore)i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow;else{let e=i.bitrate[r].tsnow-i.bitrate[r].tsbefore;"safari"===t.webRTCAdapter.browserDetails.browser&&(e/=1e3);let n=Math.round(8*(i.bitrate[r].bsnow-i.bitrate[r].bsbefore)/e);"safari"===t.webRTCAdapter.browserDetails.browser&&(n=parseInt(n/1e3)),i.bitrate[r].value=n+" kbits/sec",i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow}})})},1e3),"0 kbits/sec")}return t.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser"}function W(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return void t.warn("Invalid handle");let o=i.webrtcStuff;if(!o.pc)return void t.warn("Invalid PeerConnection");let a=o.pc.getTransceivers().find(e=>e.mid===n);if(!a)return void t.warn("No transceiver with mid",n);if(!a.sender)return void t.warn("No sender for transceiver with mid",n);let l=a.sender.getParameters();l&&l.encodings&&0!==l.encodings.length?l.encodings.length>1?t.warn("Ignoring bitrate for simulcast track, use sendEncodings for that"):isNaN(r)||r<0?t.warn("Invalid bitrate (must be a positive integer)"):(l.encodings[0].maxBitrate=r,a.sender.setParameters(l)):t.warn("No parameters encodings")}function Q(e){t.error("WebRTC error:",e)}function G(e,i){t.log("Cleaning WebRTC stuff");let o=b.get(e);if(!o)return;let a=o.webrtcStuff;if(a){if(!0===i){let i={janus:"hangup",transaction:t.randomString(12)};o.token&&(i.token=o.token),C&&(i.apisecret=C),t.debug("Sending hangup request (handle="+e+"):"),t.debug(i),n?(i.session_id=w,i.handle_id=e,r.send(JSON.stringify(i))):t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:i})}a.volume&&(a.volume.local&&a.volume.local.timer&&clearInterval(a.volume.local.timer),a.volume.remote&&a.volume.remote.timer&&clearInterval(a.volume.remote.timer));for(let e in a.bitrate)a.bitrate[e].timer&&clearInterval(a.bitrate[e].timer);a.bitrate={},!a.streamExternal&&a.myStream&&(t.log("Stopping local stream tracks"),t.stopAllTracks(a.myStream)),a.streamExternal=!1,a.myStream=null;try{a.pc.close()}catch(e){}a.pc=null,a.candidates=null,a.mySdp=null,a.remoteSdp=null,a.iceDone=!1,a.dataChannel={},a.dtmfSender=null,a.insertableStreams=!1,a.externalEncryption=!1}o.oncleanup()}H(e),this.getServer=function(){return s},this.isConnected=function(){return y},this.reconnect=function(e){(e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.reconnect=!0,H(e)},this.getSessionId=function(){return w},this.getInfo=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,t.log("Getting info on Janus instance"),!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=t.randomString(12),o={janus:"info",transaction:i};p&&(o.token=p);C&&(o.apisecret=C);if(n)return A.set(i,function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)}),void r.send(JSON.stringify(o));t.httpAPICall(s,{verb:"POST",withCredentials:f,body:o,success:function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)},this.destroy=function(a){!function(a){a=a||{},a.success="function"==typeof a.success?a.success:t.noop,a.error="function"==typeof a.error?a.error:t.noop;let l=!0===a.unload,c=!0;void 0!==a.notifyDestroyed&&null!==a.notifyDestroyed&&(c=!0===a.notifyDestroyed);let d=!0===a.cleanupHandles;if(t.log("Destroying session "+w+" (unload="+l+")"),!w)return t.warn("No session to destroy"),a.success(),void(c&&e.destroyed());if(d)for(const e of b.keys())N(e,{noRequest:!0});if(!y)return t.warn("Is the server down? (connected=false)"),w=null,void a.success();let u={janus:"destroy",transaction:t.randomString(12)};p&&(u.token=p);C&&(u.apisecret=C);if(l)return n?(r.onclose=null,r.close(),r=null):navigator.sendBeacon(s+"/"+w,JSON.stringify(u)),t.log("Destroyed session:"),w=null,y=!1,a.success(),void(c&&e.destroyed());if(n){u.session_id=w;let t=function(){for(let e in i)r.removeEventListener(e,i[e]);r.removeEventListener("message",n),r.removeEventListener("error",l),o&&clearTimeout(o),r.close()},n=function(n){let r=JSON.parse(n.data);r.session_id==u.session_id&&r.transaction==u.transaction&&(t(),a.success(),c&&e.destroyed())},l=function(){t(),a.error("Failed to destroy the server: Is the server down?"),c&&e.destroyed()};return r.addEventListener("message",n),r.addEventListener("error",l),void(1===r.readyState?r.send(JSON.stringify(u)):l())}t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:u,success:function(n){t.log("Destroyed session:"),t.debug(n),w=null,y=!1,"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),a.success(),c&&e.destroyed()},error:function(n,r){t.error(n+":",r),w=null,y=!1,a.success(),c&&e.destroyed()}})}(a)},this.attach=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.dataChannelOptions=e.dataChannelOptions||{ordered:!0},e.consentDialog="function"==typeof e.consentDialog?e.consentDialog:t.noop,e.connectionState="function"==typeof e.connectionState?e.connectionState:t.noop,e.iceState="function"==typeof e.iceState?e.iceState:t.noop,e.mediaState="function"==typeof e.mediaState?e.mediaState:t.noop,e.webrtcState="function"==typeof e.webrtcState?e.webrtcState:t.noop,e.slowLink="function"==typeof e.slowLink?e.slowLink:t.noop,e.onmessage="function"==typeof e.onmessage?e.onmessage:t.noop,e.onlocaltrack="function"==typeof e.onlocaltrack?e.onlocaltrack:t.noop,e.onremotetrack="function"==typeof e.onremotetrack?e.onremotetrack:t.noop,e.ondata="function"==typeof e.ondata?e.ondata:t.noop,e.ondataopen="function"==typeof e.ondataopen?e.ondataopen:t.noop,e.oncleanup="function"==typeof e.oncleanup?e.oncleanup:t.noop,e.ondetached="function"==typeof e.ondetached?e.ondetached:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=e.plugin;if(!i)return t.error("Invalid plugin"),void e.error("Invalid plugin");let o=e.opaqueId,a=e.loopIndex,l=e.token?e.token:p,c=t.randomString(12),d={janus:"attach",plugin:i,opaque_id:o,loop_index:a,transaction:c};l&&(d.token=l);C&&(d.apisecret=C);if(n)return A.set(c,function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){z(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){I(r,!0,e)},createAnswer:function(e){I(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){N(r,e)}};b.set(r,o),e.success(o)}),d.session_id=w,void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:d,success:function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){z(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){I(r,!0,e)},createAnswer:function(e){I(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){N(r,e)}};b.set(r,o),e.success(o)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)}}return t.useDefaultDependencies=function(n){let r=n&&n.fetch||fetch,i=n&&n.Promise||Promise,o=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new o(e,t)},extension:n&&n.extension||e,isArray:function(e){return Array.isArray(e)},webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let o={method:n.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};"POST"===n.verb&&(o.headers["Content-Type"]="application/json"),void 0!==n.withCredentials&&(o.credentials=!0===n.withCredentials?"include":n.withCredentials?n.withCredentials:"omit"),n.body&&(o.body=JSON.stringify(n.body));let a=r(e,o).catch(function(e){return i.reject({message:"Probably a network error, is the server down?",error:e})});if(n.timeout){let e=new i(function(e,t){let r=setTimeout(function(){return clearTimeout(r),t({message:"Request timed out",timeout:n.timeout})},n.timeout)});a=i.race([a,e])}return a.then(function(e){return e.ok?typeof n.success==typeof t.noop?e.json().then(function(e){try{n.success(e)}catch(e){t.error("Unhandled httpAPICall success callback error",e)}},function(t){return i.reject({message:"Failed to parse response body",error:t,response:e})}):void 0:i.reject({message:"API call failed",response:e})}).catch(function(e){typeof n.error==typeof t.noop&&n.error(e.message||"<< internal error >>",e)}),a}}},t.useOldDependencies=function(n){let r=n&&n.jQuery||jQuery,i=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new i(e,t)},isArray:function(e){return r.isArray(e)},extension:n&&n.extension||e,webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let i=void 0!==n.body?{contentType:"application/json",data:JSON.stringify(n.body)}:{},o=void 0!==n.withCredentials?{xhrFields:{withCredentials:n.withCredentials}}:{};return r.ajax(r.extend(i,o,{url:e,type:n.verb,cache:!1,dataType:"json",async:n.async,timeout:n.timeout,success:function(e){typeof n.success==typeof t.noop&&n.success(e)},error:function(e,r,i){typeof n.error==typeof t.noop&&n.error(r,i)}}))}}},t.mediaToTracks=function(e){let t=[];if(e){if(!e.keepAudio&&!1!==e.audio&&(void 0===e.audio||e.audio||e.audioSend||e.audioRecv||e.addAudio||e.replaceAudio||e.removeAudio)){let n={type:"audio"};e.removeAudio?n.remove=!0:(e.addAudio?n.add=!0:e.replaceAudio&&(n.replace=!0),!1!==e.audioSend&&(n.capture=e.audio||!0),!1!==e.audioRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}if(!e.keepVideo&&!1!==e.video&&(void 0===e.video||e.video||e.videoSend||e.videoRecv||e.addVideo||e.replaceVideo||e.removeVideo)){let n={type:"video"};e.removeVideo?n.remove=!0:(e.addVideo?n.add=!0:e.replaceVideo&&(n.replace=!0),!1!==e.videoSend&&(n.capture=e.video||!0,["screen","window","desktop"].includes(n.capture)&&(n.type="screen",n.capture={video:{}},e.screenshareFrameRate&&(n.capture.frameRate=e.screenshareFrameRate),e.screenshareHeight&&(n.capture.height=e.screenshareHeight),e.screenshareWidth&&(n.capture.width=e.screenshareWidth))),!1!==e.videoRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}e.data&&t.push({type:"data"})}else t.push({type:"audio",capture:!0,recv:!0}),t.push({type:"video",capture:!0,recv:!0});return t},t.trackConstraints=function(e){let n={};if(!e||!e.capture)return n;if("audio"===e.type)n.audio=e.capture;else if("video"===e.type)if((e.simulcast||e.svc)&&!0===e.capture&&(e.capture="hires"),!0===e.capture||"object"==typeof e.capture)n.video=e.capture;else{let r=0,i=0;"lowres"===e.capture?(r=320,i=240):"lowres-16:9"===e.capture?(r=320,i=180):"hires"===e.capture||"hires-16:9"===e.capture||"hdres"===e.capture?(r=1280,i=720):"fhdres"===e.capture?(r=1920,i=1080):"4kres"===e.capture?(r=3840,i=2160):"stdres"===e.capture?(r=640,i=480):"stdres-16:9"===e.capture?(r=640,i=360):(t.log("Default video setting is stdres 4:3"),r=640,i=480),n.video={width:{ideal:r},height:{ideal:i}}}else"screen"===e.type&&(n.video=e.capture);return n},t.noop=function(){},t.dataChanDefaultLabel="JanusDataChannel",t.endOfCandidates=null,t.stopAllTracks=function(e){try{let n=e.getTracks();for(let e of n)t.log(e),e&&!0!==e.dontStop&&e.stop()}catch(e){}},t.init=function(e){if((e=e||{}).callback="function"==typeof e.callback?e.callback:t.noop,t.initDone)e.callback();else{if(void 0===console.log&&(console.log=function(){}),t.trace=t.noop,t.debug=t.noop,t.vdebug=t.noop,t.log=t.noop,t.warn=t.noop,t.error=t.noop,!0===e.debug||"all"===e.debug)t.trace=console.trace.bind(console),t.debug=console.debug.bind(console),t.vdebug=console.debug.bind(console),t.log=console.log.bind(console),t.warn=console.warn.bind(console),t.error=console.error.bind(console);else if(Array.isArray(e.debug))for(let n of e.debug)switch(n){case"trace":t.trace=console.trace.bind(console);break;case"debug":t.debug=console.debug.bind(console);break;case"vdebug":t.vdebug=console.debug.bind(console);break;case"log":t.log=console.log.bind(console);break;case"warn":t.warn=console.warn.bind(console);break;case"error":t.error=console.error.bind(console)}t.log("Initializing library");let n=e.dependencies||t.useDefaultDependencies();t.isArray=n.isArray,t.webRTCAdapter=n.webRTCAdapter,t.httpAPICall=n.httpAPICall,t.newWebSocket=n.newWebSocket,t.extension=n.extension,t.extension.init(),t.listDevices=function(e,n){e="function"==typeof e?e:t.noop,n||(n={audio:!0,video:!0}),t.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(n).then(function(n){navigator.mediaDevices.enumerateDevices().then(function(r){t.debug(r),e(r),t.stopAllTracks(n)})}).catch(function(n){t.error(n),e([])}):(t.warn("navigator.mediaDevices unavailable"),e([]))},t.attachMediaStream=function(e,n){try{e.srcObject=n}catch(r){try{e.src=URL.createObjectURL(n)}catch(e){t.error("Error attaching stream to element",e)}}},t.reattachMediaStream=function(e,n){try{e.srcObject=n.srcObject}catch(r){try{e.src=n.src}catch(e){t.error("Error reattaching stream to element",e)}}};let r=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0?"pagehide":"beforeunload",i=window["on"+r];if(window.addEventListener(r,function(){t.log("Closing window");for(const[e,n]of t.sessions)n&&n.destroyOnUnload&&(t.log("Destroying session "+e),n.destroy({unload:!0,notifyDestroyed:!1}));i&&"function"==typeof i&&i()}),t.safariVp8=!1,t.safariVp9=!1,"safari"===t.webRTCAdapter.browserDetails.browser&&t.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(let e of RTCRtpSender.getCapabilities("video").codecs)e&&e.mimeType&&"video/vp8"===e.mimeType.toLowerCase()?t.safariVp8=!0:e&&e.mimeType&&"video/vp9"===e.mimeType.toLowerCase()&&(t.safariVp9=!0);t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}else{let e=new RTCPeerConnection({});e.createOffer({offerToReceiveVideo:!0}).then(function(n){t.safariVp8=-1!==n.sdp.indexOf("VP8"),t.safariVp9=-1!==n.sdp.indexOf("VP9"),t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu"),e.close(),e=null})}t.initDone=!0,e.callback()}},t.isWebrtcSupported=function(){return!!window.RTCPeerConnection},t.isGetUserMediaAvailable=function(){return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia},t.randomString=function(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="";for(let r=0;r<e;r++){let e=Math.floor(62*Math.random());n+=t.charAt(e)}return n},t});let pW=!0,CW=!0;function mW(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function gW(e,t,n){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);const o=e=>{const t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,o),i.apply(this,[e,o])};const o=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);if(!this._eventMap[t].has(n))return o.apply(this,arguments);const r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function vW(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(pW=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function yW(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(CW=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function wW(){if("object"==typeof window){if(pW)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function bW(e,t){CW&&console.warn(e+" is deprecated, please use "+t+" instead.")}function EW(e){return"[object Object]"===Object.prototype.toString.call(e)}function MW(e){return EW(e)?Object.keys(e).reduce(function(t,n){const r=EW(e[n]),i=r?MW(e[n]):e[n],o=r&&!Object.keys(i).length;return void 0===i||o?t:Object.assign(t,{[n]:i})},{}):e}function AW(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith("Id")?AW(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(t=>{AW(e,e.get(t),n)})}))}function xW(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;const o=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)}),o.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&AW(e,n,i)})}),i}const LW=wW;function kW(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach(n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);const i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"==typeof r.ideal?(e[i("min",n)]=r.ideal,t.optional.push(e),e={},e[i("max",n)]=r.ideal,t.optional.push(e)):(e[i("",n)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",n)]=r.exact):["min","max"].forEach(e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"==typeof e.video){let o=e.video.facingMode;o=o&&("object"==typeof o?o:{ideal:o});const a=t.version<66;if(o&&("user"===o.exact||"environment"===o.exact||"user"===o.ideal||"environment"===o.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||a)){let t;if(delete e.video.facingMode,"environment"===o.exact||"environment"===o.ideal?t=["back","rear"]:"user"!==o.exact&&"user"!==o.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then(n=>{let a=(n=n.filter(e=>"videoinput"===e.kind)).find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!a&&n.length&&t.includes("back")&&(a=n[n.length-1]),a&&(e.video.deviceId=o.exact?{exact:a.deviceId}:{ideal:a.deviceId}),e.video=r(e.video),LW("chrome: "+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return LW("chrome: "+JSON.stringify(e)),i(e)},o=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){i(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(o(e))})})}.bind(n),n.mediaDevices.getUserMedia){const e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return i(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(o(e))))}}}function HW(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function SW(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};const i=new Event("track");i.track=n.track,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};const i=new Event("track");i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else gW(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function _W(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{const t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function VW(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>xW(t,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),gW(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>xW(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function OW(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")});const t=this.getSenders();n.apply(this,arguments);const r=this.getSenders().filter(e=>-1===t.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]}),i.apply(this,arguments)}}function zW(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return OW(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};const i=e.RTCPeerConnection.prototype.removeStream;function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,"g"),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find(e=>e===t))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(e=>e.track===t))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)},["createOffer","createAnswer"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[t=>{const n=o(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>o(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});const a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})}(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};const l=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=l.get.apply(this);return""===e.type?e:o(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function NW(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})}function TW(e,t){gW(e,"negotiationneeded",e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e})}var IW=Object.freeze({__proto__:null,fixNegotiationNeeded:TW,shimAddTrackRemoveTrack:zW,shimAddTrackRemoveTrackWithNative:OW,shimGetSendersWithDtmf:_W,shimGetUserMedia:kW,shimMediaStream:HW,shimOnTrack:SW,shimPeerConnection:NW,shimSenderReceiverGetStats:VW});function DW(e,t){const n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){bW("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"==typeof n&&"object"==typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},r&&r.prototype.getSettings){const t=r.prototype.getSettings;r.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(r&&r.prototype.applyConstraints){const t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"==typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function ZW(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function jW(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]});const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,i,o]=arguments;return r.apply(this,[e||null]).then(e=>{if(t.version<53&&!i)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(i,o)}}function RW(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function BW(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),gW(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function PW(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){bW("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function FW(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function UW(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const n=e.length>0;n&&e.forEach(e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const r=t.apply(this,arguments);if(n){const{sender:t}=r,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function qW(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function WW(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function QW(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}var GW=Object.freeze({__proto__:null,shimAddTransceiver:UW,shimCreateAnswer:QW,shimCreateOffer:WW,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})},shimGetParameters:qW,shimGetUserMedia:DW,shimOnTrack:ZW,shimPeerConnection:jW,shimRTCDataChannel:FW,shimReceiverGetStats:BW,shimRemoveStream:PW,shimSenderGetStats:RW});function KW(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function YW(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function XW(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,o=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};let l=function(e,t,n){const r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=l,l=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=l,l=function(e,t,n){const r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=l}function JW(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n($W(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function $W(e){return e&&void 0!==e.video?Object.assign({},e,{video:MW(e.video)}):e}function eQ(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];void 0===r.urls&&r.url?(bW("RTCIceServer.url","RTCIceServer.urls"),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function tQ(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function nQ(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function rQ(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var iQ,oQ=Object.freeze({__proto__:null,shimAudioContext:rQ,shimCallbacksAPI:XW,shimConstraints:$W,shimCreateOfferLegacy:nQ,shimGetUserMedia:JW,shimLocalStreamsAPI:KW,shimRTCIceServerUrls:eQ,shimRemoteStreamsAPI:YW,shimTrackEventTransceiver:tQ}),aQ={exports:{}};var lQ=(iQ||(iQ=1,function(e){const t={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map(e=>e.trim())},t.splitSections=function(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+"\r\n")},t.getDescription=function(e){const n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){const n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter(e=>0===e.indexOf(n))},t.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const n={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case"raddr":n.relatedAddress=t[e+1];break;case"rport":n.relatedPort=parseInt(t[e+1],10);break;case"tcptype":n.tcpType=t[e+1];break;case"ufrag":n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:void 0===n[t[e]]&&(n[t[e]]=t[e+1])}return n},t.writeCandidate=function(e){const t=[];t.push(e.foundation);const n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" ");const n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){const t={};let n;const r=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<r.length;e++)n=r[e].trim().split("="),t[n[0].trim()]=n[1];return t},t.writeFmtp=function(e){let t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const r=[];Object.keys(e.parameters).forEach(t=>{void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)}),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},t.parseSsrcMedia=function(e){const t=e.indexOf(" "),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},t.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},t.getMid=function(e){const n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substring(6)},t.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(e=>{n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},t.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){const r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],i=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&i?{usernameFragment:r.substring(12),password:i.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){const n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" ");n.profile=r[2];for(let i=3;i<r.length;i++){const o=r[i],a=t.matchPrefix(e,"a=rtpmap:"+o+" ")[0];if(a){const r=t.parseRtpMap(a),i=t.matchPrefix(e,"a=fmtp:"+o+" ");switch(r.parameters=i.length?t.parseFmtp(i[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+o+" ").map(t.parseRtcpFb),n.codecs.push(r),r.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(r.name.toUpperCase())}}}t.matchPrefix(e,"a=extmap:").forEach(e=>{n.headerExtensions.push(t.parseExtmap(e))});const i=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return n.codecs.forEach(e=>{i.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),n},t.writeRtpDescription=function(e,n){let r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" "+(n.profile||"UDP/TLS/RTP/SAVPF")+" ",r+=n.codecs.map(e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach(e=>{r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)});let i=0;return n.codecs.forEach(e=>{e.maxptime>i&&(i=e.maxptime)}),i>0&&(r+="a=maxptime:"+i+"\r\n"),n.headerExtensions&&n.headerExtensions.forEach(e=>{r+=t.writeExtmap(e)}),r},t.parseRtpEncodingParameters=function(e){const n=[],r=t.parseRtpParameters(e),i=-1!==r.fecMechanisms.indexOf("RED"),o=-1!==r.fecMechanisms.indexOf("ULPFEC"),a=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),l=a.length>0&&a[0].ssrc;let s;const c=t.matchPrefix(e,"a=ssrc-group:FID").map(e=>e.substring(17).split(" ").map(e=>parseInt(e,10)));c.length>0&&c[0].length>1&&c[0][0]===l&&(s=c[0][1]),r.codecs.forEach(e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:l,codecPayloadType:parseInt(e.parameters.apt,10)};l&&s&&(t.rtx={ssrc:s}),n.push(t),i&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:l,mechanism:o?"red+ulpfec":"red"},n.push(t))}}),0===n.length&&l&&n.push({ssrc:l});let d=t.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substring(7),10):0===d[0].indexOf("b=AS:")?1e3*parseInt(d[0].substring(5),10)*.95-16e3:void 0,n.forEach(e=>{e.maxBitrate=d})),n},t.parseRtcpParameters=function(e){const n={},r=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute)[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);const i=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=i.length>0,n.compound=0===i.length;const o=t.matchPrefix(e,"a=rtcp-mux");return n.mux=o.length>0,n},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let n;const r=t.matchPrefix(e,"a=msid:");if(1===r.length)return n=r[0].substring(7).split(" "),{stream:n[0],track:n[1]};const i=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"msid"===e.attribute);return i.length>0?(n=i[0].value.split(" "),{stream:n[0],track:n[1]}):void 0},t.parseSctpDescription=function(e){const n=t.parseMLine(e),r=t.matchPrefix(e,"a=max-message-size:");let i;r.length>0&&(i=parseInt(r[0].substring(19),10)),isNaN(i)&&(i=65536);const o=t.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substring(12),10),protocol:n.fmt,maxMessageSize:i};const a=t.matchPrefix(e,"a=sctpmap:");if(a.length>0){const e=a[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:i}}},t.writeSctpDescription=function(e,t){let n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,n,r){let i;const o=void 0!==n?n:2;return i=e||t.generateSessionId(),"v=0\r\no="+(r||"thisisadapterortc")+" "+i+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,n){const r=t.splitLines(e);for(let e=0;e<r.length;e++)switch(r[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[e].substring(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){const n=t.splitLines(e)[0].substring(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){const n=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;const n=t.splitLines(e);for(let e=0;e<n.length;e++)if(n[e].length<2||"="!==n[e].charAt(1))return!1;return!0},e.exports=t}(aQ)),aQ.exports),sQ=H(lQ),cQ=L({__proto__:null,default:sQ},[lQ]);function dQ(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){const n=new t(e),r=sQ.parseCandidate(e.candidate);for(const e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,gW(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function uQ(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||gW(e,"icecandidate",e=>{if(e.candidate){const t=sQ.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e})}function fQ(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(e){if(!e||!e.sdp)return!1;const t=sQ.splitSections(e.sdp);return t.shift(),t.some(e=>{const t=sQ.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")})}(arguments[0])){const e=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!=n?-1:n}(arguments[0]),n=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n}(e),r=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const i=sQ.matchPrefix(e.sdp,"a=max-message-size:");return i.length>0?r=parseInt(i[0].substring(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r}(arguments[0],e);let i;i=0===n&&0===r?Number.POSITIVE_INFINITY:0===n||0===r?Math.max(n,r):Math.min(n,r);const o={};Object.defineProperty(o,"maxMessageSize",{get:()=>i}),this._sctp=o}return n.apply(this,arguments)}}function hQ(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},gW(e,"datachannel",e=>(t(e.channel,e.target),e))}function pQ(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}})}function CQ(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t._safariVersion>=13.1)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const n=t.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function mQ(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function gQ(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return n.apply(this,[e]);return("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then(e=>n.apply(this,[e]))})}var vQ=Object.freeze({__proto__:null,removeExtmapAllowMixed:CQ,shimAddIceCandidateNullOrEmpty:mQ,shimConnectionState:pQ,shimMaxMessageSize:fQ,shimParameterlessSetLocalDescription:gQ,shimRTCIceCandidate:dQ,shimRTCIceCandidateRelayProtocol:uQ,shimSendThrowTypeError:hQ});const yQ=function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const n=wW,r=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){const e=n.userAgentData.brands.find(e=>"Chromium"===e.brand);if(e)return{browser:"chrome",version:parseInt(e.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=parseInt(mW(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=parseInt(mW(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2));else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=parseInt(mW(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,t._safariVersion=mW(n.userAgent,/Version\/(\d+(\.?\d+))/,1)}return t}(e),i={browserDetails:r,commonShim:vQ,extractVersion:mW,disableLog:vW,disableWarnings:yW,sdp:cQ};switch(r.browser){case"chrome":if(!IW||!NW||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),i;if(null===r.version)return n("Chrome shim can not determine version, not shimming."),i;n("adapter.js shimming chrome."),i.browserShim=IW,mQ(e,r),gQ(e),kW(e,r),HW(e),NW(e,r),SW(e),zW(e,r),_W(e),VW(e),TW(e,r),dQ(e),uQ(e),pQ(e),fQ(e,r),hQ(e),CQ(e,r);break;case"firefox":if(!GW||!jW||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),i;n("adapter.js shimming firefox."),i.browserShim=GW,mQ(e,r),gQ(e),DW(e,r),jW(e,r),ZW(e),PW(e),RW(e),BW(e),FW(e),UW(e),qW(e),WW(e),QW(e),dQ(e),pQ(e),fQ(e,r),hQ(e);break;case"safari":if(!oQ||!t.shimSafari)return n("Safari shim is not included in this adapter release."),i;n("adapter.js shimming safari."),i.browserShim=oQ,mQ(e,r),gQ(e),eQ(e),nQ(e),XW(e),KW(e),YW(e),tQ(e),JW(e),rQ(e),dQ(e),uQ(e),fQ(e,r),hQ(e),CQ(e,r);break;default:n("Unsupported browser!")}return i}({window:"undefined"==typeof window?void 0:window}),wQ=({actions:t=[{text:"Analyzing your application flow...",color:"var(--brand-color)"},{text:"AI agents are on action...",color:"var(--ff-electric-indigo)"},{text:"Thinking like a QA expert… just a few more seconds...",color:"var(--ff-vivid-orange)"},{text:"Hold on, test cases are on the way!",color:"var(--ff-dodger-blue)"}],width:r,height:i,path:o,DynamicHeight:a=500})=>{const[s,d]=c(0),[u,f]=c("");l(()=>{if(s>=t?.length)return;const e=t[s]?.text||" ";let n=0;const r=setInterval(()=>{n<=e?.length?(f(e?.slice(0,n)),n++):(clearInterval(r),setTimeout(()=>{d(e=>e<t?.length-1?e+1:e)},1e3))},80);return()=>clearInterval(r)},[s,t]);const h=t[s]?.color;return n("div",{className:"loader-container",style:{width:`${r}%`,height:`${i}%`},children:[e("div",{className:"ff-moving-sections-container",children:[1,2,3,4]?.map(t=>e("div",{className:`ff-moving-section${t}`,style:{height:""+(a+"px")}},t))}),n("div",{className:"ff-gif-container",children:[e("div",{className:"ff-typing-wrapper",children:e(F,{className:"ff-typing-text",fontSize:16,fontWeight:"medium",style:{color:h},children:u})}),e("img",{height:100,width:100,alt:"generation",src:o})]})]})},bQ=()=>{const e=()=>{const e=window.innerWidth;return{isMobile:e<=640,isTab:e>640&&e<=820,isLargeTab:e>820&&e<1025,isWeb:e>=1025}},[t,n]=c(e());return l(()=>{const t=()=>{n(e())};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),t},EQ=e=>{const t=document.createElement("textarea");document.body.appendChild(t),t.value=e,t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n};export{je as AADHAAR_REGEX,ye as ALPHABET_ONLY_REGEX,Bt as ALPHABET_WITH_SPACES_ONLY_REGEX,ht as ALPHANUMERIC_PARENTHESIS_REGEX,be as ALPHANUMERIC_REGEX,jt as ALPHANUMERIC_WITH_DOT_REGEX,Ee as ALPHANUMERIC_WITH_ROUND_BRACES_REGEX,Zt as ALPHA_NUM_EXTENDED_REGEX,Ot as ALPHA_NUM_REGEX,$ as Accordion,TE as AddContentButton,Ha as AddResourceButton,SE as AiToggle,rh as AllProjectsDropdown,_E as AnimatedSetting,dh as AppHeader,xv as AttachMedia,Ap as AttachmentButton,Lp as Avatar,Ye as BASE64_REGEX,ze as BIG_END_WHITESPACE,Xe as BINARY_NUMBER_REGEX,Mt as BODY_TAG_TYPE_VALIDATION,xA as BarChart,tW as Box,Fs as BrowserTabs,U as Button,Ct as CAMEL_CASE_REGEX,bt as CERTIFICATES_NAME_REGEX,Lt as CHECK_CAMEL_CASE,ke as CREDIT_CARD_REGEX,et as CURRENCY_GENERIC_REGEX,LE as ChatModal,kE as ChatModalAi,te as Checkbox,tn as Chip,zE as ChipWithCount,yE as ChooseFile,$t as Col,XL as Comments,rk as ConditionalDropdown,qL as ConnectingBranch,Xt as Container,Hp as ContentCard,mE as CreateVariableSlider,Me as DATE_REGEX,We as DECIMAL_NUMBER_REGEX,Ue as DRIVING_LICENSE_REGEX,vt as DYNAMIC_VALUE_PATTERN_REGEX,yt as DYNAMIC_VALUE_TYPE_REGEX,wt as DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX,gt as DYNAMIC_VALUE__PLACEHOLDER_REGEX,gh as DashboardDonutChart,Kf as DatePicker,dW as DebugToolsPanel,_a as DonutChart,fE as DownloadClient,th as DragAndDrop,X as Drawer,Ra as Dropzone,dt as ELEMENTS_TRAILING_SPACE_REGEX,ut as ELEMENTS_WHITE_SPACE_REGEX,qt as EMAIL_FORMAT_REGEX,de as EMAIL_REGEX,It as EMAIL_VALIDATION_REGEX,Rt as EXCEL_SPACING_REGEX,Ts as EditLabel,Vp as EditTextField,jL as Editor,NE as ErrorBoundary,bv as Excel,an as ExpandableMenu,Pt as FILENAME_VALIDATION_REGEX,xe as FILE_EXTENSION_REGEX,ct as FILE_NAME_REGEX,hE as FieldSet,Pa as FileDropzone,Ba as FilePreview,ks as Form,tk as FormatString,De as GSTIN_REGEX,Je as HEXADECIMAL_NUMBER_REGEX,me as HEX_COLOR_REGEX,Ke as HSL_COLOR_REGEX,Qe as HTML_ATTRIBUTE_REGEX,Et as HTML_FILE_TYPE_VALIDATION,_e as HTML_TAG_REGEX,J as HighlightText,HE as HistoryCard,Be as INDIAN_CURRENCY_REGEX,Fe as INDIAN_PASSPORT_REGEX,Te as INDIAN_PHONE_REGEX,Ie as INDIAN_PIN_CODE_REGEX,Pe as INTERNATIONAL_PHONE_REGEX,pe as IPV4_REGEX,Ce as IPV6_REGEX,P as Icon,Xf as IconButton,Av as IconRadialChart,Cp as IconRadioGroup,nn as Input,Hs as InputWithDropdown,xt as JAVASCRIPT_FILE_TYPE_VALIDATION,hW as Janus,tt as LINKEDIN_PROFILE_REGEX,Dt as LINK_VALIDATION_REGEX,Sp as LabelEditTextField,tr as LazyLoad,uE as LineChart,kp as LineLoader,OE as Link,Le as MAC_ADDRESS_REGEX,at as MEMORY_VALIDATION_REGEX,mp as MachineInputField,EE as MediaPreview,RE as MediaViewerModel,fr as MenuOption,xE as MessageBox,Ss as MiniModal,ME as MobileSkin,Jf as Modal,Ev as ModuleChip,kA as MultiRadialChart,Kt as MultiSelect,pp as NLPInput,st as NLP_DESCRIPTION_REGEX,Ft as NO_LEADING_TRAILING_SPACE_REGEX,we as NUMBERS_ONLY_REGEX,rt as NUMBER_REGEX,eW as NoDataContent,ZE as OsTree,jE as OtpVerification,_s as OverviewModal,Ze as PAN_CARD_REGEX,ft as PARAMETER_ALPHANUMERIC_REGEX,ve as PASSWORD_COMPLEX_REGEX,ge as PASSWORD_SIMPLE_REGEX,fe as PHONE_REGEX,he as POSTAL_CODE_REGEX,uh as Paper,wO as PhoneInputField,oh as PieChart,$L as PopUpModal,jO as PrePostTable,vE as ProgressBar,AE as Prompt,VE as PromptContainer,Ge as RGB_COLOR_REGEX,$e as ROMAN_NUMERALS_REGEX,on as RadialChart,Da as RadioButton,Za as RadioGroup,cp as Recaptcha,Jt as Row,ot as SCRIPT_REGEX,Ut as SERVER_HOST_REGEX,He as SSN_REGEX,Vt as START_END_WHITESPACE_REGEX,lt as STEP_GROUP_NAME_REGEX,wQ as ScriptGenerationLoader,wE as ScriptSwitchButton,Us as Search,ar as Select,Mp as SequentialConnectingBranch,BE as SessionDropdown,uW as SessionManager,Yf as StateDropdown,fW as StatusBadge,cr as StatusButton,Lv as StatusCard,DE as StatusIndicator,ez as StepLandingTable,JO as StepResultStats,bE as SwitchButton,Ae as TIME_REGEX,nt as TWITTER_HANDLE_REGEX,La as Table,Bs as TableTree,JE as TableTreeFn,gE as TableWithAccordion,Ps as Tabs,IE as TabsWithSilder,sr as TextArea,$q as TextEditor,Q as ThemeProvider,Yt as Toaster,Na as Toastify,en as Toggle,xp as ToggleSwitch,K as Tooltip,sn as TruncatedTooltip,F as Typography,it as UNIT_REGEX,ue as URL_REGEX,Ne as USERNAME_REGEX,qe as USERNAME_SPECIAL_REGEX,Oe as US_ZIP_CODE_REGEX,Se as UUID_REGEX,Re as VEHICLE_REGISTRATION_REGEX,dE as VariableDropdown,nh as VariableInput,CE as VariableSuggestionInputDropDown,Ve as WHITESPACE_REGEX,At as XML_FILE_TYPE_VALIDATION,yQ as adapter,VO as addPrePostStepGroup,OO as addStepGroup,rW as autoScrollToTableLastRow,_p as capitalize,G as checkEmpty,cW as checkMicrophoneAccess,ch as clearStore,tM as compareArrays,eM as compareObjects,MO as convertFormDataToObject,MA as convertToBytes,AA as convertToGB,zO as convertToISO,EQ as copyToClipboard,xa as debounce,sh as deleteStoreValue,gp as ffid,$E as findAndInsert,_O as formatDate,EO as formatResponseDate,EA as getEncryptedData,Va as getExtension,Oa as getExtensionWithPeriod,sW as getNavigateToKey,RL as getSequentialPayload,lh as getStoreValue,aW as getTopVisibleNodeKey,AO as getTreeDetails,NO as handleTimeZoneChange,iW as handleTreeExpandAllCollapseAll,SO as handleTreeNodeExpandCollapse,kO as handleTreeNodeSect,HO as handleUnCheckAllTreeNodesWithUpdates,ik as hasDuplicateFile,yp as isEmptyObject,oe as isTextTruncated,lW as nlpInputDelay,bO as rearrangeDragItem,WL as saveFileFromBlob,ZO as scrollToView,ah as setStoreValue,vv as throttle,nW as toCamelCase,Ta as toast,oW as toggleShowHideEntity,ie as truncateText,xO as updateTreeState,LO as useBeforeUnload,Y as useClickOutside,bQ as useDeviceType,Ia as useFileDropzone,ce as useKeyboardActions,Fa as useTheme,JL as useTriggerControl};
|
|
49
49
|
//# sourceMappingURL=index.js.map
|